Ed Maste [Fri, 31 Jul 2015 14:26:15 +0000 (14:26 +0000)]
Improve man page markup
Patch by Baptiste Daroussin
Differential Revision: http://reviews.llvm.org/D11561
llvm-svn: 243749
Ed Maste [Fri, 31 Jul 2015 14:24:32 +0000 (14:24 +0000)]
Report original thread ID for FreeBSD core files
On FreeBSD the tid is (somewhat unintuitively) found in the pr_pid
field of the NT_PRSTATUS note. Collect it when parsing the note and
store it in the thread data.
For Linux I've left the original behaviour of using sequential TIDs
(0, 1, 2...) as I don't yet have code to obtain it.
Differential Revision: http://reviews.llvm.org/D11652
llvm-svn: 243748
Alexander Kornienko [Fri, 31 Jul 2015 13:34:58 +0000 (13:34 +0000)]
[clang-tidy] Support replacements in macro arguments in misc-inefficient-algorithm
Summary:
Support replacements in macro arguments in the
misc-inefficient-algorithm check.
Reviewers: klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D11677
llvm-svn: 243747
Sergey Dmitrouk [Fri, 31 Jul 2015 13:32:09 +0000 (13:32 +0000)]
Fix __floatsitf() for negative input
Negative numbers were handled properly initially, but got broken
during addressing review, so none of them did actually work. Issues:
* Wrong negation.
* Wrong exponent calculation.
llvm-svn: 243746
Daniel Sanders [Fri, 31 Jul 2015 12:58:55 +0000 (12:58 +0000)]
[regalloc] Make RegMask clobbers prevent merging vreg's into PhysRegs when hoisting def's upwards.
Summary:
This prevents vreg260 and D7 from being merged in:
%vreg260<def> = LDC1 ...
JAL <ga:@sin>, <regmask ... list not containing D7 ...>
%D7<def> = COPY %vreg260; ...
Doing so is not valid because the JAL clobbers the D7.
This fixes the almabench regression in the LLVM 3.7.0 release branch.
Reviewers: MatzeB
Subscribers: MatzeB, qcolombet, hans, llvm-commits
Differential Revision: http://reviews.llvm.org/D11649
llvm-svn: 243745
Daniel Sanders [Fri, 31 Jul 2015 11:29:25 +0000 (11:29 +0000)]
Re-commit r243686 - [Sanitizers] [Bug 24151] Generalize type of offset in internal_mmap
The builder remains broken in the same way without this patch so this patch is
innocent.
llvm-svn: 243744
Renato Golin [Fri, 31 Jul 2015 10:50:29 +0000 (10:50 +0000)]
[AArch64|DFSAN] XPASS custom.cc, as it got fixed by r243686
llvm-svn: 243743
Hafiz Abid Qadeer [Fri, 31 Jul 2015 09:24:39 +0000 (09:24 +0000)]
Escape new line and tabs in the result of variable evaluation.
Expression evaluation error messages may have embedded new lines
and tabs. These should be escaped in the result string.
Patch by paulmaybee. Reviewed in http://reviews.llvm.org/D11570.
llvm-svn: 243741
Daniel Sanders [Fri, 31 Jul 2015 09:04:37 +0000 (09:04 +0000)]
Revert r243686 - [Sanitizers] [Bug 24151] Generalize type of offset in internal_mmap
It's implicated in a buildbot failure and while the failure looks unrelated,
this commit is the only probably candidate in the blamelist.
llvm-svn: 243740
Alexey Bataev [Fri, 31 Jul 2015 08:42:25 +0000 (08:42 +0000)]
Outline function Parser::ParseCXXClassMemberDeclarationWithPragmas(), NFC.
Parsing of pragmas followed by a class member declaration is outlined into a separate function Parser::ParseCXXClassMemberDeclarationWithPragmas().
llvm-svn: 243739
Pavel Labath [Fri, 31 Jul 2015 08:17:10 +0000 (08:17 +0000)]
Fix Clang-tidy misc-use-override warnings in some files in include/lldb/Core, unify closing inclusion guards
Patch by Eugene Zelenko
Differential Revision: http://reviews.llvm.org/D11669
llvm-svn: 243738
Eric Fiselier [Fri, 31 Jul 2015 06:08:32 +0000 (06:08 +0000)]
Print message when configuring for standalone build.
llvm-svn: 243737
Jason Molenda [Fri, 31 Jul 2015 05:47:00 +0000 (05:47 +0000)]
Move the computation of whether a DWARF compile unit
is optimized into DWARFCompileUnit, where it should have
been. Next I'll need to call this from another section
of code for DWARF-in-.o-file behavior correctness.
llvm-svn: 243736
Peter Collingbourne [Fri, 31 Jul 2015 05:33:34 +0000 (05:33 +0000)]
COFF: When resolving _load_config_used, add it as a GC root.
This fixes the cases where the symbol is defined in a comdat or by bitcode.
Differential Revision: http://reviews.llvm.org/D11673
llvm-svn: 243735
Jingyue Wu [Fri, 31 Jul 2015 05:09:47 +0000 (05:09 +0000)]
Refactor: Simplify boolean conditional return statements in lib/Target/NVPTX
Summary: Use clang-tidy to simplify boolean conditional return statements
Reviewers: rafael, echristo, chandlerc, bkramer, craig.topper, dexonsmith, chapuni, eliben, jingyue, jholewinski
Subscribers: llvm-commits, jholewinski
Differential Revision: http://reviews.llvm.org/D9983
llvm-svn: 243734
Eric Fiselier [Fri, 31 Jul 2015 04:34:25 +0000 (04:34 +0000)]
Fix failing unique_ptr tests.
When I was refactoring the unique_ptr.single.ctor tests I added a test
deleter, 'NCDeleter', to deleter.h. Other tests that include deleter.h
redefine the NCDeleter type causing test failures.
llvm-svn: 243733
Jason Molenda [Fri, 31 Jul 2015 04:21:25 +0000 (04:21 +0000)]
Add another log to the Host channel for logging
the actions taken when trying to locate binaries.
llvm-svn: 243732
Matt Arsenault [Fri, 31 Jul 2015 04:12:04 +0000 (04:12 +0000)]
AMDGPU: Fix v16i32 to v16i8 truncstore
llvm-svn: 243731
Eric Fiselier [Fri, 31 Jul 2015 02:43:52 +0000 (02:43 +0000)]
Start cleanup of unique_ptr tests.
One of the last sections of tests that still fail in C++03 are the unique_ptr
tests. This patch begins cleaning up the tests and fixing C++03 failures.
The main changes of this patch:
- The "Deleter" type in "deleter.h" tried to be "move-only" in C++03. However
the move simulation no longer works (see "__rv"). "Deleter" is now copy
constructible in C++03. However copying "Deleter" will "move" the test value
instead of copying it.
- Reduce the unique.ptr.single.ctor tests files from ~25 to 4. There is no
reason the tests were split through so many files.
llvm-svn: 243730
Eric Fiselier [Fri, 31 Jul 2015 02:29:11 +0000 (02:29 +0000)]
Mark any as done and comment out extra methods until speaking to Marshall
llvm-svn: 243729
Eric Fiselier [Fri, 31 Jul 2015 02:24:58 +0000 (02:24 +0000)]
[libcxx] Add <experimental/any> v2.
Summary:
This patch adds the second revision of <experimental/any>.
I've been working from the LFTS draft found at this link. https://rawgit.com/cplusplus/fundamentals-ts/v1/fundamentals-ts.html#any
Reviewers: danalbert, jroelofs, K-ballo, mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6762
llvm-svn: 243728
Argyrios Kyrtzidis [Fri, 31 Jul 2015 01:39:23 +0000 (01:39 +0000)]
Make sure the 2 method calls are sequenced.
llvm-svn: 243727
Kostya Serebryany [Fri, 31 Jul 2015 01:33:06 +0000 (01:33 +0000)]
[libFuzzer] trace switch statements and apply mutations based on the expected case values
llvm-svn: 243726
Eric Fiselier [Fri, 31 Jul 2015 01:25:01 +0000 (01:25 +0000)]
Add -Wno-error by default to work around failing compiler-rt builds
llvm-svn: 243725
Tom Stellard [Fri, 31 Jul 2015 01:15:15 +0000 (01:15 +0000)]
ELFYAML: Enable parsing of EM_AMDGPU
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11263
llvm-svn: 243724
Matt Arsenault [Fri, 31 Jul 2015 01:12:10 +0000 (01:12 +0000)]
AMDGPU/SI: Set DwarfRegNum
This requires a fix in tablegen for the cast<int> from bits<16>
to work in the list initializer.
llvm-svn: 243723
Matt Arsenault [Fri, 31 Jul 2015 01:12:06 +0000 (01:12 +0000)]
TableGen: Support folding casts from bits to int
This is to fix an incorrect error when trying to initialize
DwarfNumbers with a !cast<int> of a bits initializer.
getValuesAsListOfInts("DwarfNumbers") would not see an IntInit
and instead the cast, so would give up.
It seems likely that this could be generalized to attempt
the convertInitializerTo for any type. I'm not really sure
why the existing code seems to special case the string cast cases
when convertInitializerTo seems like it should generally handle this
sort of thing.
llvm-svn: 243722
Kostya Serebryany [Fri, 31 Jul 2015 01:07:12 +0000 (01:07 +0000)]
[libFuzzer] prepare for __sanitizer_cov_trace_switch in libFuzzer and sanitizer coverage. Also fix pedantic warnings
llvm-svn: 243721
Tom Stellard [Fri, 31 Jul 2015 01:02:35 +0000 (01:02 +0000)]
docs: Add information about helper scripts to HowToReleaseLLVM page
Differential Revision: http://reviews.llvm.org/D10081
llvm-svn: 243720
Tom Stellard [Fri, 31 Jul 2015 01:02:32 +0000 (01:02 +0000)]
AMDGPU/SI: Remove unused pattern for f32 constant loads
Reviewers: arsenm
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11603
llvm-svn: 243719
Argyrios Kyrtzidis [Fri, 31 Jul 2015 00:58:32 +0000 (00:58 +0000)]
[modules] Fix issue where building a module from a relative path when -working-directory option is set, results in error.
The error was "module '<name>' was built in directory '<path>' but now resides in directory '<path>'
rdar://
21330027
llvm-svn: 243718
Sumanth Gundapaneni [Fri, 31 Jul 2015 00:45:12 +0000 (00:45 +0000)]
[ARM] Lower modulo operation to generate __aeabi_divmod on Android
For a modulo (reminder) operation,
clang -target armv7-none-linux-gnueabi generates "__modsi3"
clang -target armv7-none-eabi generates "__aeabi_idivmod"
clang -target armv7-linux-androideabi generates "__modsi3"
Android bionic libc doesn't provide a __modsi3, instead it provides a
"__aeabi_idivmod". This patch fixes the LLVM ARMISelLowering to generate
the correct call when ever there is a modulo operation.
Differential Revision: http://reviews.llvm.org/D11661
llvm-svn: 243717
Chaoren Lin [Fri, 31 Jul 2015 00:35:40 +0000 (00:35 +0000)]
Allow ValueObject::Dereference to dereference references.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11667
llvm-svn: 243716
Dawn Perchik [Fri, 31 Jul 2015 00:26:46 +0000 (00:26 +0000)]
Fix build of lldb on Mavericks after svn rev.243511.
This patch adds a test for ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED
around the code which requires 10.10 support to link. Without this, lldb
gets unresolved references to _csr_check and _rootless_allows_task_for_pid.
Reviewed by: jasonmolenda
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11668
llvm-svn: 243715
Evgeniy Stepanov [Fri, 31 Jul 2015 00:00:03 +0000 (00:00 +0000)]
[asan] Fix signal() interception on 64-bit Android.
The bsd_signal() special case only applies to 32-bit Android targets.
Fixes AddressSanitizer.SignalTest on aarch64/android.
llvm-svn: 243714
Rui Ueyama [Thu, 30 Jul 2015 22:57:21 +0000 (22:57 +0000)]
COFF: Move code for Identical COMDAT Folding to ICF.cpp.
llvm-svn: 243701
Rui Ueyama [Thu, 30 Jul 2015 22:48:45 +0000 (22:48 +0000)]
COFF: Handle all COMDAT sections as non-GC root.
I don't remember why I thought that only functions are subject
of garbage collection, but the comment here said so, which is
not correct. Moreover, the code just below the comment does not
do what the comment says -- it handles non-COMDAT, non-function
sections as GC root. As a result, it just handles non-COMDAT
sections as GC root.
This patch cleans that up by removing SectionChunk::isRoot and
use isCOMDAT instead.
llvm-svn: 243700
Eric Fiselier [Thu, 30 Jul 2015 22:30:34 +0000 (22:30 +0000)]
Reapply working parts of CMake cleanup.
This patch adds the working parts of r243503. The difference with this patch
is that it doesn't include the HandleLLVMOptions.cmake file.
llvm-svn: 243698
Dawn Perchik [Thu, 30 Jul 2015 22:10:08 +0000 (22:10 +0000)]
Fix help message for target.language setting.
llvm-svn: 243697
Alex Lorenz [Thu, 30 Jul 2015 22:00:17 +0000 (22:00 +0000)]
MIR Parser: Report an error when a constant pool item is redefined.
llvm-svn: 243696
Alex Lorenz [Thu, 30 Jul 2015 21:54:10 +0000 (21:54 +0000)]
MIR Parser: Report an error when a virtual register is redefined.
llvm-svn: 243695
David Blaikie [Thu, 30 Jul 2015 21:42:22 +0000 (21:42 +0000)]
Split DWARF: Allow -gmlt/-gsplit-dwarf to override rather than complement each other
It doesn't make any sense to enable -gmlt with -gsplit-dwarf, since
-gmlt is designed for on-line symbolication (and -gsplit-dwarf normally
emits all the -gmlt data into the .o anyway - so there's nothing to
split out except redundant/duplicate info).
With this change they override each other, -gmlt -gsplit-dwarf is the
same as -gsplit-dwarf and -gsplit-dwarf -gmlt is the same as -gmlt.
llvm-svn: 243694
Sanjay Patel [Thu, 30 Jul 2015 21:41:50 +0000 (21:41 +0000)]
fix memcpy/memset/memmove lowering when optimizing for size
Fixing MinSize attribute handling was discussed in D11363.
This is a prerequisite patch to doing that.
The handling of OptSize when lowering mem* functions was broken
on Darwin because it wants to ignore -Os for these cases, but the
existing logic also made it ignore -Oz (MinSize).
The Linux change demonstrates a widespread problem. The backend
doesn't usually recognize the MinSize attribute by itself; it
assumes that if the MinSize attribute exists, then the OptSize
attribute must also exist.
Fixing this more generally will be a follow-on patch or two.
Differential Revision: http://reviews.llvm.org/D11568
llvm-svn: 243693
Hubert Tong [Thu, 30 Jul 2015 21:30:00 +0000 (21:30 +0000)]
Improved error recovery for _Pragma
Summary:
Currently, if the argument to _Pragma is not a parenthesised string
literal, the bad token will be consumed, as well as the ')', if present.
If additional bad tokens are passed to the _Pragma, this results in
extra error messages which may distract from the true problem.
The proposed patch causes all tokens to be consumed until the closing
')' or a new line, whichever is reached first.
Reviewers: hfinkel, rsmith
Subscribers: hubert.reinterpretcast, fraggamuffin, rnk, cfe-commits
Differential Revision: http://reviews.llvm.org/D8308
Patch by Rachel Craik!
llvm-svn: 243692
Kostya Serebryany [Thu, 30 Jul 2015 21:22:22 +0000 (21:22 +0000)]
[libFuzzer] fix the strncmp interceptor -- it should respect short strings.
llvm-svn: 243691
Hubert Tong [Thu, 30 Jul 2015 21:20:55 +0000 (21:20 +0000)]
[Concepts] Add diagnostic: non template declaration
Summary:
Adding diagnostic for concepts declared as non template (function
or variable)
Reviewers: faisalv, fraggamuffin, rsmith, hubert.reinterpretcast
Subscribers: nwilson, cfe-commits
Differential Revision: http://reviews.llvm.org/D11490
Patch by Nathan Wilson!
llvm-svn: 243690
Eric Christopher [Thu, 30 Jul 2015 21:16:34 +0000 (21:16 +0000)]
Fix TableGen code generation for ReadNone attribute.
Patch by Pete Abred!
llvm-svn: 243689
Adhemerval Zanella [Thu, 30 Jul 2015 21:13:21 +0000 (21:13 +0000)]
[dfsan] Enable dfsan for aarch64
This patch enable DFSan for AArch64 (39-bit VMA). All tests are passing
but:
* test/dfsan/custom.cc
Due an invalid access in dl_iterate_phdr instrumentation (commenting out
this function make the testcase to pass). The test is XFAIL for aarch64
for now.
llvm-svn: 243688
Sanjay Patel [Thu, 30 Jul 2015 21:06:55 +0000 (21:06 +0000)]
enable fast-math-flag propagation to DAG nodes
This uncovered latent bugs previously:
http://reviews.llvm.org/D10403
...but it's time to try again because internal tests aren't finding more.
If time passes and no other bugs are reported, we can remove this cl::opt.
llvm-svn: 243687
Daniel Sanders [Thu, 30 Jul 2015 21:00:48 +0000 (21:00 +0000)]
[Sanitizers] [Bug 24151] Generalize type of offset in internal_mmap
Summary:
Using u64 as type for offset changes its value, changing starting address for map in file.
This patch solves Bug 24151, which raises issue while mapping file in mips32.
Patch by Mohit Bhakkad
Reviewers: dsanders, kcc
Subscribers: hans, llvm-commits, samsonov, nitesh.jain, sagar, bhushan, jaydeep
Differential Revision: http://reviews.llvm.org/D11588
llvm-svn: 243686
Adhemerval Zanella [Thu, 30 Jul 2015 20:50:39 +0000 (20:50 +0000)]
[sanitizers] Enable dfsan for aarch64
This patch enables DFSan for aarch64/linux.
llvm-svn: 243685
Adhemerval Zanella [Thu, 30 Jul 2015 20:49:35 +0000 (20:49 +0000)]
Enable dfsan for aarch64
This patch enable DFSan memory transformation for aarch64 (39-bit VMA).
llvm-svn: 243684
Rui Ueyama [Thu, 30 Jul 2015 20:47:17 +0000 (20:47 +0000)]
Remove trailing whitespace.
llvm-svn: 243683
Mehdi Amini [Thu, 30 Jul 2015 20:33:18 +0000 (20:33 +0000)]
Add a TargetMachine hook that verifies DataLayout compatibility
Summary: Also provide the associated assertion when CodeGen starts.
Reviewers: echristo
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11654
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 243682
Zachary Turner [Thu, 30 Jul 2015 20:28:07 +0000 (20:28 +0000)]
Convert the ScriptInterpreter system to a plugin-based one.
Previously embedded interpreters were handled as ad-hoc source
files compiled into source/Interpreter. This made it hard to
disable a specific interpreter, or to add support for other
interpreters and allow the developer to choose which interpreter(s)
were enabled for a particular build.
This patch converts script interpreters over to a plugin-based system.
Script interpreters now live in source/Plugins/ScriptInterpreter, and
the canonical LLDB interpreter, ScriptInterpreterPython, is moved there
as well.
Any new code interfacing with the Python C API must live in this location
from here on out. Additionally, generic code should never need to
reference or make assumptions about the presence of a specific interpreter
going forward.
Differential Revision: http://reviews.llvm.org/D11431
Reviewed By: Greg Clayton
llvm-svn: 243681
David Majnemer [Thu, 30 Jul 2015 20:26:55 +0000 (20:26 +0000)]
COFF: Sort output sections which start with .debug to the end of the file
We want to convince the NT loader not to map these sections into memory.
A good first step is to move them to the end of the executable.
Differential Revision: http://reviews.llvm.org/D11655
llvm-svn: 243680
Evgeniy Stepanov [Thu, 30 Jul 2015 20:07:13 +0000 (20:07 +0000)]
[asan] Support arm64 devices in asan_device_setup.
llvm-svn: 243679
Michael Kruse [Thu, 30 Jul 2015 19:27:04 +0000 (19:27 +0000)]
Move computations out of constructors
It is common practice to keep constructors lightweight. The reasons
include:
- The vtable during the constructor's execution is set to the static
type of the object, not to the vtable of the derived class. That is,
method calls behave differently in constructors and ordinary methods.
This way it is possible to call unimplemented methods of abstract
classes, which usually results in a segmentation fault.
- If an exception is thrown in the constructor, the destructor is not
called, potentially leaking memory.
- Code in constructors cannot be called in a regular way, e.g. from
non-constructor methods of derived classes.
- Because it is common practice, people may not expect the constructor
to do more than initializing data and skip them when looking for bugs.
Not all of these are applicable to LLVM (e.g. exceptions are disabled).
This patch refactors out the computational work in the constructors of
Scop and IslAst into regular init functions and introduces static
create-functions as replacement.
Differential revision: http://reviews.llvm.org/D11491
Reviewers: grosser, jdoerfert
llvm-svn: 243677
Argyrios Kyrtzidis [Thu, 30 Jul 2015 19:06:04 +0000 (19:06 +0000)]
[sema] Allow to opt-out of overriding the super class's designated initializers by marking the initializer as unavailable in the subclass.
rdar://
20281322
llvm-svn: 243676
Naomi Musgrave [Thu, 30 Jul 2015 18:46:18 +0000 (18:46 +0000)]
testing for tail call optimization repression when sanitizing use-after-dtor
Summary: Verify that running in optimized mode while checking for use-after-dtor errors, does not generate tail call invocation of destructor. This avoids possible error where stack frame for the destructor is eliminated, making tracking down the errors more difficult.
Reviewers: eugenis, kcc
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D11614
simplified test cases
updated line numbering on test
renamed test
llvm-svn: 243675
Marshall Clow [Thu, 30 Jul 2015 18:26:34 +0000 (18:26 +0000)]
Fix PR#24267. use numeric_limits::max instead of ~0 for 'all ones', since that might give wrong answers on a 1's complement machine.
llvm-svn: 243674
Naomi Musgrave [Thu, 30 Jul 2015 17:59:55 +0000 (17:59 +0000)]
simplified test case
llvm-svn: 243673
Naomi Musgrave [Thu, 30 Jul 2015 17:59:54 +0000 (17:59 +0000)]
removed hardcoding for attribute associated with dtor in test
llvm-svn: 243672
Naomi Musgrave [Thu, 30 Jul 2015 17:59:52 +0000 (17:59 +0000)]
Testing to verify function attribute disable-tail-calls applied to destructor
llvm-svn: 243671
Naomi Musgrave [Thu, 30 Jul 2015 17:59:50 +0000 (17:59 +0000)]
updated test to be more explicit
llvm-svn: 243670
Naomi Musgrave [Thu, 30 Jul 2015 17:59:48 +0000 (17:59 +0000)]
Updated test regex and flags
llvm-svn: 243669
Naomi Musgrave [Thu, 30 Jul 2015 17:59:46 +0000 (17:59 +0000)]
repress tail call optimization when performing use-after-dtor sanitization
Reviewers: eugenis, kcc
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D11613
llvm-svn: 243668
Chaoren Lin [Thu, 30 Jul 2015 17:48:44 +0000 (17:48 +0000)]
Use only unnamed pipes to launch lldb-server gdbserver.
Summary:
If we used unnamed pipes instead of named pipes, we can avoid having the
file system littered with debugserver-named-pipes if lldb-server happens to
crash for whatever reason. Also, on some buggy systems, it's possible to be
able to create but not to delete a fifo. Ideally, support for unnamed pipes
should be added to debugserver as well, so we can avoid the `#ifdef` here.
Reviewers: clayborg, vharron, chying
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11609
llvm-svn: 243667
Wei Mi [Thu, 30 Jul 2015 17:40:39 +0000 (17:40 +0000)]
[SLP vectorizer]: Choose the best consecutive candidate to pair with a store instruction.
The patch changes the SLPVectorizer::vectorizeStores to choose the immediate
succeeding or preceding candidate for a store instruction when it has multiple
consecutive candidates. In this way it has better chance to find more slp
vectorization opportunities.
Differential Revision: http://reviews.llvm.org/D10445
llvm-svn: 243666
Mehdi Amini [Thu, 30 Jul 2015 17:29:33 +0000 (17:29 +0000)]
Fix lli with OrcLazyJIT: the default DataLayout was used.
Set the correct one using the TargetMachine instead.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 243664
Pete Cooper [Thu, 30 Jul 2015 17:22:52 +0000 (17:22 +0000)]
Use llvm::reverse to make a bunch of loops use foreach. NFC.
In llvm commit r243581, a reverse range adapter was added which allows
us to change code such as
for (auto I = Fields.rbegin(), E = Fields.rend(); I != E; ++I) {
in to
for (const FieldDecl *I : llvm::reverse(Fields))
This commit changes a few of the places in clang which are eligible to use
this new adapter.
llvm-svn: 243663
Matt Arsenault [Thu, 30 Jul 2015 17:03:11 +0000 (17:03 +0000)]
AMDGPU: Set SubRegIndex size and offset
I'm not sure what reasons the comment here could have
had for not setting these. Without these set, there is
an assertion hit during DWARF emission.
llvm-svn: 243661
Matt Arsenault [Thu, 30 Jul 2015 17:03:08 +0000 (17:03 +0000)]
AMDGPU: Fix unreachable when emitting binary debug info
Copy implementation of applyFixup from AArch64 with AArch64 bits
ripped out.
Tests will be included with a later commit. Several other
problems must be fixed before binary debug info emission
will work.
llvm-svn: 243660
Alex Lorenz [Thu, 30 Jul 2015 16:54:38 +0000 (16:54 +0000)]
MIR Serialization: Serialize the machine basic block's successor weights.
Reviewers: Duncan P. N. Exon Smith
llvm-svn: 243659
David Majnemer [Thu, 30 Jul 2015 16:47:56 +0000 (16:47 +0000)]
[COFF] Add IMAGE_SCN_TYPE_NOLOAD to SectionCharacteristics
llvm-svn: 243658
Pete Cooper [Thu, 30 Jul 2015 16:44:07 +0000 (16:44 +0000)]
Add fmodules-cache-path to 2 tests which were missing it.
These tests were creating a modules.idx file in my clang checkout, not
the build directory or temp.
All the other tests in this directory use -fmodules-cache-path=%t so
updated these to match.
llvm-svn: 243657
Renato Golin [Thu, 30 Jul 2015 16:40:17 +0000 (16:40 +0000)]
[ARM] Allow setting the generic features for native cpus
Copying the already existing code for x86 to ARM to set the correct CPU
features when using -mcpu=native. We can already detect the CPU name
but we were not setting the correct feature bits.
Moving fpu/hwdiv down to make sure they override whatever we set the
default to be.
No tests because this is native detection, and not all ARM-enabled builds
will hapen at a specific CPU, or even ARM. I have tested locally and it
works as expected.
Fixes PR12794.
llvm-svn: 243656
Tom Stellard [Thu, 30 Jul 2015 16:20:42 +0000 (16:20 +0000)]
AMDGPU/SI: Simplify moveSMRDToVALU()
Summary:
Replace the switch on instruction opcode with a switch on register size.
This way we don't need to update the switch statement when we add new
SMRD variants.
Reviewers: arsenm
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11601
llvm-svn: 243652
Tom Stellard [Thu, 30 Jul 2015 16:20:40 +0000 (16:20 +0000)]
AMDGPU/SI: Remove isTriviallyReMaterializable() function from SIInstrInfo
Summary:
This function is never called. isReallyTriviallyReMaterializable() is
the function that should be implemented instead.
Reviewers: arsenm
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11620
llvm-svn: 243651
Daniel Sanders [Thu, 30 Jul 2015 16:11:04 +0000 (16:11 +0000)]
[libcxxabi][mips] Correct float_data::mangled_size for all ABI's.
Summary:
Patch by Nitesh Jain and Jaydeep Patil with a small revision to use ABIs rather
than Architecture Revisions (which currently imply particular ABIs).
Fixes test_demangle.pass.cpp (PR24149).
Subscribers: mclow.lists, jaydeep, nitesh.jain, hans, cfe-commits
Differential Revision: http://reviews.llvm.org/D11483
llvm-svn: 243645
Ulrich Weigand [Thu, 30 Jul 2015 15:53:58 +0000 (15:53 +0000)]
Fix sanitizer fallout from r243642
The memory-sanitizer build bot reported:
==5574== WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x7f03089e15f6 in
clang::Parser::TryAltiVecTokenOutOfLine(clang::DeclSpec&,
clang::SourceLocation, char const*&, unsigned int&, bool&)
/mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/tools/clang/lib/Parse/ParseDecl.cpp:6290:11
This is because the "Ident_pixel" variable was uninitialized
in the getLangOpts().ZVector case, but we'd still call into
clang::Parser::TryAltiVecTokenOutOfLine, which uses the variable.
The simplest fix for this without sprinkling !getLangOpts().ZVector
checks all over the code seems to be to just initialize the variable
to nullptr; this will then do the right thing on ZVector.
Checked in to unbreak the build bots.
llvm-svn: 243644
Ulrich Weigand [Thu, 30 Jul 2015 14:10:43 +0000 (14:10 +0000)]
[SystemZ] Add support for vecintrin.h vector built-in functions
This patch adds support for the System Z vector built-in functions.
The API-defined header file has the name vecintrin.h.
The user-level functions are defined in the same style as the clang
version of altivec.h, making heavy use of the __overloadable__ and
__always_inline__ attributes. Where possible the functions expand to
generic operations rather than specific built-in functions, in the hope
that that form can be optimised better.
Where a built-in routine is specified to require an immediate integer
argument, the __enable_if__ attribute is used to verify the argument is
in fact constant and in the appropriate range.
Based on a patch by Richard Sandiford.
llvm-svn: 243643
Ulrich Weigand [Thu, 30 Jul 2015 14:08:36 +0000 (14:08 +0000)]
Add support for System z vector language extensions
The z13 vector facility has an associated language extension,
closely modeled on AltiVec/VSX. The main differences are:
- vector long, vector float and vector pixel are not supported
- vector long long and vector double are supported (like VSX)
- comparison operators return a vector rather than a scalar integer
- shift operators behave like the OpenCL shift operators
- vector bool is only supported as argument to certain operators;
some operators allow mixing a bool with a non-bool vector
This patch adds clang support for the extension. It is closely modelled
on the AltiVec support. Similarly to the -faltivec option, there's a
new -fzvector option to enable the extensions (as well as an -mzvector
alias for compatibility with GCC). There's also a separate LangOpt.
The extension as implemented here is intended to be compatible with
the -mzvector extension recently implemented by GCC.
Based on a patch by Richard Sandiford.
Differential Revision: http://reviews.llvm.org/D11001
llvm-svn: 243642
Marshall Clow [Thu, 30 Jul 2015 13:56:00 +0000 (13:56 +0000)]
Change some #ifdefs to #if - thanks to Dexon for thge catch.
llvm-svn: 243641
Vasileios Kalintiris [Thu, 30 Jul 2015 13:13:09 +0000 (13:13 +0000)]
[mips] Fix out-of-date debug information in test file.
Update the debug info in the check-lines because the change in r243638
introduced a constant initialization before the prologue's end as part
of a register spill.
llvm-svn: 243640
NAKAMURA Takumi [Thu, 30 Jul 2015 13:06:53 +0000 (13:06 +0000)]
MCJITTests/MCJITCAPITest.cpp: Try to appease i686-win32.
llvm-svn: 243639
Vasileios Kalintiris [Thu, 30 Jul 2015 12:39:33 +0000 (12:39 +0000)]
[mips][FastISel] Remove hidden mips-fast-isel option.
Summary:
This hidden option would disable code generation through FastISel by
default. It was removed from the available options and from the
Fast-ISel tests that required it in order to run the tests.
Reviewers: dsanders
Subscribers: qcolombet, llvm-commits
Differential Revision: http://reviews.llvm.org/D11610
llvm-svn: 243638
Tamas Berghammer [Thu, 30 Jul 2015 12:38:18 +0000 (12:38 +0000)]
Fix issues with separate symbolfile handling
Differential revision: http://reviews.llvm.org/D11595
llvm-svn: 243637
Vasileios Kalintiris [Thu, 30 Jul 2015 11:51:44 +0000 (11:51 +0000)]
[mips][FastISel] Apply only zero-extension to constants prior to their materialization.
Summary:
Previously, we would sign-extend non-boolean negative constants and
zero-extend otherwise. This was problematic for PHI instructions with
negative values that had a type with bitwidth less than that of the
register used for materialization.
More specifically, ComputePHILiveOutRegInfo() assumes the constants
present in a PHI node are zero extended in their container and
afterwards deduces the known bits.
For example, previously we would materialize an i16 -4 with the
following instruction:
addiu $r, $zero, -4
The register would end-up with the 32-bit 2's complement representation
of -4. However, ComputePHILiveOutRegInfo() would generate a constant
with the upper 16-bits set to zero. The SelectionDAG builder would use
that information to generate an AssertZero node that would remove any
subsequent trunc & zero_extend nodes.
In theory, we should modify ComputePHILiveOutRegInfo() to consult
target-specific hooks about the way they prefer to materialize the
given constants. However, git-blame reports that this specific code
has not been touched since 2011 and it seems to be working well for every
target so far.
Reviewers: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11592
llvm-svn: 243636
Alexey Bataev [Thu, 30 Jul 2015 11:36:16 +0000 (11:36 +0000)]
[OPENMP 4.1] Initial support for extended 'ordered' clause.
OpenMP 4.1 introduces optional argument '(n)' for 'ordered' clause, where 'n' is a number of loops that immediately follow the directive.
'n' must be constant positive integer expressions and it must be less or equal than the number of the loops in the resulting loop nest.
Patch adds parsing and semantic analysis for this optional argument.
llvm-svn: 243635
Daniel Sanders [Thu, 30 Jul 2015 10:14:57 +0000 (10:14 +0000)]
[test-release.sh] Add -no-libunwind to disable it on targets that don't support it.
Summary:
Mips doesn't implement unw_getcontext() or libunwind::Registers_*::jumpto() yet
so we must disable libunwind for this release.
Reviewers: hans
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11563
llvm-svn: 243633
Michael Kuperstein [Thu, 30 Jul 2015 10:10:47 +0000 (10:10 +0000)]
[X86] Recognize "flags" as an identifier, not a register in Intel-syntax inline asm
This contains the test-case for r243630.
Patch by: marina.yatsina@intel.com
Differential Revision: http://reviews.llvm.org/D11513
llvm-svn: 243632
Michael Kuperstein [Thu, 30 Jul 2015 10:10:25 +0000 (10:10 +0000)]
[X86] Recognize "flags" as an identifier, not a register in Intel-syntax inline asm
Patch by: marina.yatsina@intel.com
Differential Revision: http://reviews.llvm.org/D11512
llvm-svn: 243630
Tamas Berghammer [Thu, 30 Jul 2015 09:09:22 +0000 (09:09 +0000)]
Mark TestMiBreak as falkey on Linux
llvm-svn: 243628
Matt Arsenault [Thu, 30 Jul 2015 08:16:51 +0000 (08:16 +0000)]
Add amdopencl environment to triple
This is used by the AMD x86 OpenCL implementation
to change some ABI details on Windows and Linux.
llvm-svn: 243627
Simon Atanasyan [Thu, 30 Jul 2015 07:45:55 +0000 (07:45 +0000)]
[Mips] Implement definition of DT_MIPS_RLD_MAP dynamic tag, .rld_map section, and __RLD_MAP symbol
llvm-svn: 243626
Sean Silva [Thu, 30 Jul 2015 07:30:24 +0000 (07:30 +0000)]
Add a comment explaining differing Windows behavior.
llvm-svn: 243625
Sean Silva [Thu, 30 Jul 2015 07:23:17 +0000 (07:23 +0000)]
Enable accidentally-disabled tests.
I think I was isolating the failure in the last RUN: line during
development, and forgot to re-enable the others.
llvm-svn: 243624
Asaf Badouh [Thu, 30 Jul 2015 06:52:26 +0000 (06:52 +0000)]
[X86][AVX512BW] Remove whitespaces
llvm-svn: 243623
Mohit K. Bhakkad [Thu, 30 Jul 2015 05:45:56 +0000 (05:45 +0000)]
[LLDB][MIPS] Added expected failure for "test disassembler settings"
Patch by Nitesh Jain
Reviewers: clayborg, ovyalov.
Subscribers: jaydeep, bhushan, mohit.bhakkad, sagar, emaste, lldb-commits.
Differential Revision: http://reviews.llvm.org/D11562
llvm-svn: 243622