George Burgess IV [Sat, 19 Mar 2016 21:51:45 +0000 (21:51 +0000)]
[Sema] Make type deduction work with some overloadable functions
Some functions can't have their address taken. If we encounter an
overload set where only one of the candidates can have its address
taken, we should automatically select that candidate's type in type
deduction.
Differential Revision: http://reviews.llvm.org/D15591
llvm-svn: 263888
George Burgess IV [Sat, 19 Mar 2016 21:36:10 +0000 (21:36 +0000)]
[Sema] Allow casting of some overloaded functions
Some functions can't have their address taken. If we encounter an
overload set where only one of the candidates can have its address
taken, we should automatically select that candidate in cast
expressions.
Differential Revision: http://reviews.llvm.org/D17701
llvm-svn: 263887
Mehdi Amini [Sat, 19 Mar 2016 21:28:28 +0000 (21:28 +0000)]
Expose IRBuilder::CreateAtomicCmpXchg as LLVMBuildAtomicCmpXchg in the C API.
Summary: Also expose getters and setters in the C API, so that the change can be tested.
Reviewers: nhaehnle, axw, joker.eph
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D18260
From: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
llvm-svn: 263886
Mehdi Amini [Sat, 19 Mar 2016 21:28:18 +0000 (21:28 +0000)]
Const-correctness in libLTO
Looks like I was sloppy when bridging to C.
Thanks D. Blaikie for noticing!
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 263885
Saleem Abdulrasool [Sat, 19 Mar 2016 16:35:32 +0000 (16:35 +0000)]
CodeGen: use range based for loop
Convert a loop to use a range based style loop. NFC.
llvm-svn: 263884
George Rimar [Sat, 19 Mar 2016 11:15:54 +0000 (11:15 +0000)]
[ELF] - ignore the -rpath-link option
Just ignore the -rpath-link command line
option in the same way like gold do.
Behavior of lld/gold differs from gnu ld here.
GNU ld tries to resolve undefined symbols in all
shared object files at link time.
Differential revision: http://reviews.llvm.org/D18269
llvm-svn: 263876
David Majnemer [Sat, 19 Mar 2016 04:53:02 +0000 (04:53 +0000)]
[SimplifyLibCalls] Only consider sinpi/cospi functions within the same function
The sinpi/cospi can be replaced with sincospi to remove unnecessary
computations. However, we need to make sure that the calls are within
the same function!
This fixes PR26993.
llvm-svn: 263875
David Majnemer [Sat, 19 Mar 2016 04:39:52 +0000 (04:39 +0000)]
[InstCombine] Don't insert instructions before a catch switch
CatchSwitches are not splittable, we cannot insert casts, etc. before
them.
This fixes PR26992.
llvm-svn: 263874
Mehdi Amini [Sat, 19 Mar 2016 03:12:54 +0000 (03:12 +0000)]
Add a dependency from llvm-link to TransformUtils following r263860
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 263873
Davide Italiano [Sat, 19 Mar 2016 02:34:33 +0000 (02:34 +0000)]
[gold] Use early return to simplify.
llvm-svn: 263872
Simon Pilgrim [Sat, 19 Mar 2016 02:05:33 +0000 (02:05 +0000)]
Removed trailing whitespace
llvm-svn: 263871
Mehdi Amini [Sat, 19 Mar 2016 01:24:23 +0000 (01:24 +0000)]
Fix a const_cast related warning in GCC in the C API for libLTO
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 263870
Mehdi Amini [Sat, 19 Mar 2016 01:06:24 +0000 (01:06 +0000)]
Add a comment on partial hashing of Metadata
Following r263866, on D. Blaikie suggestion.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 263869
Kostya Serebryany [Sat, 19 Mar 2016 01:05:33 +0000 (01:05 +0000)]
[libFuzzer] one more trophie
llvm-svn: 263868
Mehdi Amini [Sat, 19 Mar 2016 01:02:34 +0000 (01:02 +0000)]
Hash Metadata using pointer for MDString argument instead of value (NFC)
MDString are uniqued in the Context on creation, hashing the
pointer is less expensive than hashing the String itself.
Reviewers: dexonsmith
Differential Revision: http://reviews.llvm.org/D16560
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 263867
Mehdi Amini [Sat, 19 Mar 2016 00:59:26 +0000 (00:59 +0000)]
Compute some Debug Info Metadata hash key partially (NFC)
Summary:
This patch changes the computation of the hash key for DISubprogram to
be computed on a small subset of the fields. The hash is computed a
lot faster, but there might be more collision in the table.
However by carefully selecting the fields, colisions should be rare.
Using `opt` to load the IR for FastISelEmitter.cpp.o, with this patch:
- DISubprogram::getImpl() goes from 28ms to 15ms.
- DICompositeType::getImpl() goes from 6ms to 2ms
- DIDerivedType::getImpl() goes from 18 to 12ms
Reviewers: dexonsmith
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16571
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 263866
Jim Ingham [Sat, 19 Mar 2016 00:53:20 +0000 (00:53 +0000)]
Use Enrico's new CommandAlias to give better help to the "sif" command.
llvm-svn: 263865
Sean Callanan [Sat, 19 Mar 2016 00:51:43 +0000 (00:51 +0000)]
Handle any persistent Decl in the Clang expression parser, not just types.
Persistent decls have traditionally only been types. However, we want to
be able to persist more things, like functions and global variables. This
changes some of the nomenclature and the lookup rules to make this possible.
<rdar://problem/
22864976>
llvm-svn: 263864
Mehdi Amini [Sat, 19 Mar 2016 00:40:31 +0000 (00:40 +0000)]
Rework linkInModule(), making it oblivious to ThinLTO
Summary:
ThinLTO is relying on linkInModule to import selected function.
However a lot of "magic" was hidden in linkInModule and the IRMover,
who would rename and promote global variables on the fly.
This is moving to an approach where the steps are decoupled and the
client is reponsible to specify the list of globals to import.
As a consequence some test are changed because they were relying on
the previous behavior which was importing the definition of *every*
single global without control on the client side.
Now the burden is on the client to decide if a global has to be imported
or not.
Reviewers: tejohnson
Subscribers: joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D18122
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 263863
Davide Italiano [Sat, 19 Mar 2016 00:40:09 +0000 (00:40 +0000)]
[LTO] Ignore -plugin/-plugin-opt options.
This is required to get 'clang -flto' to work transparently
with lld. Please refer to the short comment in the code
for a more detailed explanation.
llvm-svn: 263862
Jim Ingham [Sat, 19 Mar 2016 00:21:21 +0000 (00:21 +0000)]
Fix the project file for the removal of lldb-mi's Platform.cpp.
llvm-svn: 263861
Mehdi Amini [Sat, 19 Mar 2016 00:17:32 +0000 (00:17 +0000)]
Add a test for r263577: "Add missing error handling in llvm-lto"
On Rafael's suggestion!
(also fix a discrepancy between this error message format and the others)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 263860
Sean Callanan [Sat, 19 Mar 2016 00:03:59 +0000 (00:03 +0000)]
Add a DiagnosticManager replace error streams in the expression parser.
We want to do a better job presenting errors that occur when evaluating
expressions. Key to this effort is getting away from a model where all
errors are spat out onto a stream where the client has to take or leave
all of them.
To this end, this patch adds a new class, DiagnosticManager, which
contains errors produced by the compiler or by LLDB as an expression
is created. The DiagnosticManager can dump itself to a log as well as
to a string. Clients will (in the future) be able to filter out the
errors they're interested in by ID or present subsets of these errors
to the user.
This patch is not intended to change the *users* of errors - only to
thread DiagnosticManagers to all the places where streams are used. I
also attempt to standardize our use of errors a bit, removing trailing
newlines and making clients omit 'error:', 'warning:' etc. and instead
pass the Severity flag.
The patch is testsuite-neutral, with modifications to one part of the
MI tests because it relied on "error: error:" being erroneously
printed. This patch fixes the MI variable handling and the testcase.
<rdar://problem/
22864976>
llvm-svn: 263859
Zachary Turner [Fri, 18 Mar 2016 23:47:48 +0000 (23:47 +0000)]
Delete the custom implementation of signal() on Windows.
The Windows SDK provides a version of signal() that is much more
limited compared to other platforms. It only supports about 5-6
signal values. LLDB uses signals for a number of things, most
notably to handle Ctrl+C so we can gracefully shut down. The
portability solution to this on Windows has been to provide a
hand-rolled implementation of `signal` using the name `signal`
so that you could write code that simply calls signal directly
and it would work.
But this introduces a multiply defined symbol with the builtin
version and depending on how you included header files, you could
get yourself into a situation where you had linker errors. To
make matters worse, it led to a ton of compiler warnings. Worst
of all though is that this custom implementation of signal was,
in fact, identical for the purposes of handling Ctrl+C as the
builtin implementation of signal. So it seems to have literally
not been serving any useful purpose.
This patch deletes all the custom signal() functions for Windows,
and includes the signal.h system header, so that any calls to
signal now go to the actual version provided by the Windows SDK.
Differential Revision: http://reviews.llvm.org/D18287
llvm-svn: 263858
Manman Ren [Fri, 18 Mar 2016 23:44:37 +0000 (23:44 +0000)]
[CXX_FAST_TLS] Fix issues in ARM.
We need to be careful on which registers can be explicitly handled
via copies. Prologue, Epilogue use physical registers and if one belongs
to the set of CSRsViaCopy, it will no longer be CSRed, since PEI overwrites
it after the explicit copies.
llvm-svn: 263857
Manman Ren [Fri, 18 Mar 2016 23:41:51 +0000 (23:41 +0000)]
[CXX_FAST_TLS] Disable tail call when calling conventions are mismatched.
Since CXX_FAST_TLS has a bigger set of CSRs, we don't tail call when caller
and callee have mismatched calling conventions.
llvm-svn: 263856
Manman Ren [Fri, 18 Mar 2016 23:38:49 +0000 (23:38 +0000)]
[CXX_FAST_TLS] fix issues with O0 on ARM, AArch64 and X86.
Since at O0, explicit copies via SplitCSR may not be removed even if
they are unnecessary, we choose not to use SplitCSR at O0.
llvm-svn: 263855
Manman Ren [Fri, 18 Mar 2016 23:35:21 +0000 (23:35 +0000)]
[TLS on Darwin] use CXX_FAST_TLS calling convention for tls_init.
This makes sure we don't generate a lot of code to spill/reload
CSRs when calling tls_init from the access functions.
This helps performance when tls_init is not inlined into the access
functions.
llvm-svn: 263854
Duncan P. N. Exon Smith [Fri, 18 Mar 2016 23:30:54 +0000 (23:30 +0000)]
AArch64: Don't modify other modules in AArch64PromoteConstant
Avoid modifying other modules in `AArch64PromoteConstant` when the
constant is `ConstantData` (a horrible accident, I'm sure, caught by an
experimental follow-up to r261464).
Previously, this walked through all the users of a constant, but that
reaches into other modules when the constant doesn't depend transitively
on a `GlobalValue`! Since we're walking instructions anyway, just
modify the instructions we actually see.
As a drive-by, instead of storing `Use` and getting the instructions
again via `Use::getUser()` (which is not a constantant time lookup),
store `std::pair<Instruction, unsigned>`. Besides being cheaper, this
makes it easier to drop use-lists form `ConstantData` in the future.
(I threw this in because I was touching all the code anyway.)
Because the patch completely changes the traversal logic, it looks
like a rewrite of the pass, but the core logic is all the same (or
should be, minus the out-of-module changes). In other words, there
should be NFC as long as the LLVMContext only has a single Module.
I didn't think of a good way to test this, but I hope to submit a patch
eventually that makes walking these use-lists illegal/impossible.
llvm-svn: 263853
Mike Aizatsky [Fri, 18 Mar 2016 23:29:29 +0000 (23:29 +0000)]
[sancov] clang-formatting SanitizerCoverage.cpp and fully pleasing clang-tidy.
Differential Revision: http://reviews.llvm.org/D18288
llvm-svn: 263852
Davide Italiano [Fri, 18 Mar 2016 23:22:40 +0000 (23:22 +0000)]
[ELF] Refactor run of LTO passes into an helper. NFC.
Requested by: Rui Ueyama.
llvm-svn: 263851
Michael Kuperstein [Fri, 18 Mar 2016 23:19:29 +0000 (23:19 +0000)]
Have DataLayout::isLegalInteger() accept uint64_t
While not strictly necessary, since we don't support large integer
types, this avoids bugs due to silent truncation from uint64_t to a
32-bit unsigned (e.g. DL.isLegalInteger(DL.getTypeSizeInBits(Ty) )
This fixes PR26972.
Differential Revision: http://reviews.llvm.org/D18258
llvm-svn: 263850
Mike Aizatsky [Fri, 18 Mar 2016 22:46:10 +0000 (22:46 +0000)]
[sancov] typo fix
llvm-svn: 263849
Lang Hames [Fri, 18 Mar 2016 22:44:16 +0000 (22:44 +0000)]
[Support] Update comment to match actual behavior.
llvm-svn: 263848
Chandler Carruth [Fri, 18 Mar 2016 22:43:42 +0000 (22:43 +0000)]
Revert "Revert "[sancov] specifying sanitizer coverage dependencies.""
This reverts commit r263825, re-instating r263797.
llvm-svn: 263847
Mike Aizatsky [Fri, 18 Mar 2016 22:40:52 +0000 (22:40 +0000)]
[sancov] reformat & 1 clang-tidy warning.
llvm-svn: 263846
Chandler Carruth [Fri, 18 Mar 2016 22:35:58 +0000 (22:35 +0000)]
[sancov] Fix the sancov pass to initialize itself inside its
constructor. This should fix the recent crashes on certain
architectures.
llvm-svn: 263845
Zachary Turner [Fri, 18 Mar 2016 22:33:59 +0000 (22:33 +0000)]
Fix a build issue where the python module could become stale.
We are using hardlinks instead of symlinks, and we attempted to
have some logic where we don't re-create the link if the target
file already exists. This logic is faulty, however, when you
manually delete the source file (e.g. liblldb.dll) and then rebuild
lldb so that a brand new liblldb.dll gets written. Now the two files
have different inodes, but the target exists, so we would not remake
the link and the target would become stale.
We fix this by only doing the optimization if they are really the
exact same file (by comparing inode numbers), and if they are not
the same file but the target exists, we delete it and re-create
the link.
llvm-svn: 263844
Chris Bieneman [Fri, 18 Mar 2016 22:11:51 +0000 (22:11 +0000)]
Fixing autocorrect changing cmake->make
llvm-svn: 263843
Alexei Starovoitov [Fri, 18 Mar 2016 22:02:47 +0000 (22:02 +0000)]
BPF: emit an error message for unsupported signed division operation
Signed-off-by: Yonghong Song <yhs@plumgrid.com>
Signed-off-by: Alexei Starovoitov <ast@fb.com>
llvm-svn: 263842
Chris Bieneman [Fri, 18 Mar 2016 21:59:33 +0000 (21:59 +0000)]
Missed a few non-ascii characters
llvm-svn: 263841
Chris Bieneman [Fri, 18 Mar 2016 21:57:51 +0000 (21:57 +0000)]
Updates based on post-commit review of r263834
* Renamed to be camel case, consistent with other docs.
* Fixed non-ascii characters (this is what I get for writing docs on an iPad).
llvm-svn: 263840
David Majnemer [Fri, 18 Mar 2016 21:51:14 +0000 (21:51 +0000)]
[obj2yaml, COFF] Assert that the alignment is not bogus
llvm-svn: 263839
David Majnemer [Fri, 18 Mar 2016 21:47:12 +0000 (21:47 +0000)]
[COFF] Correct tests with bogus alignment
llvm-svn: 263838
Carlo Bertolli [Fri, 18 Mar 2016 21:43:32 +0000 (21:43 +0000)]
[OPENMP] Implementation of codegen for firstprivate clause of target directive
This patch implements the following aspects:
It extends sema to check that a variable is not reference in both a map clause and firstprivate or private. This is needed to ensure correct functioning at codegen level, apart from being useful for the user.
It implements firstprivate for target in codegen. The implementation applies to both host and nvptx devices.
It adds regression tests for codegen of firstprivate, host and device side when using the host as device, and nvptx side.
Please note that the regression test for nvptx codegen is missing VLAs. This is because VLAs currently require saving and restoring the stack which appears not to be a supported operation by nvptx backend.
It adds a check in sema regression tests for target map, firstprivate, and private clauses.
http://reviews.llvm.org/D18203
llvm-svn: 263837
Steven Watanabe [Fri, 18 Mar 2016 21:35:59 +0000 (21:35 +0000)]
Fix printing of anonymous struct typedefs.
clang -cc1 -ast-print put the struct
definition in the wrong place, like this:
struct {} typedef S;
The reason that this happens is that the printing code
first prints the struct definition, and then tells the next
declaration to leave out the type. This behavior
is correct for simple variable declarations, but fails for
typedefs (or extern, mutable, etc).
The patch address this problem by skipping the struct
declaration when we first see it, and then telling the first
subsequent declaration that it needs to print out the full
struct definition.
Differential Revision: http://reviews.llvm.org/D17285
llvm-svn: 263836
Easwaran Raman [Fri, 18 Mar 2016 21:29:30 +0000 (21:29 +0000)]
Interface to get/set profile summary metadata to module
Differential Revision: http://reviews.llvm.org/D17894
llvm-svn: 263835
Chris Bieneman [Fri, 18 Mar 2016 21:16:26 +0000 (21:16 +0000)]
[Docs] New documentation for advanced build configurations
This document covers how to use some of the new complex build configurations CMake supports.
Feedback and improvements welcomed!
llvm-svn: 263834
Saleem Abdulrasool [Fri, 18 Mar 2016 21:06:06 +0000 (21:06 +0000)]
builtins: make __clear_cache work on Linux-ARM
__clear_cache on Android is identical to the version on Linux. Use __linux__
instead of __ANDROID__ as __linux__ is defined for Linux and Android.
llvm-svn: 263833
Saleem Abdulrasool [Fri, 18 Mar 2016 21:06:03 +0000 (21:06 +0000)]
builtins: port __clear_cache to Windows ARM
Support __clear_cache on Windows on ARM using the `FlushInstructionCache`
library call.
llvm-svn: 263832
Kostya Serebryany [Fri, 18 Mar 2016 20:58:29 +0000 (20:58 +0000)]
[libFuzzer] add a flag close_fd_mask so that we can silence spammy targets by closing stderr/stdout
llvm-svn: 263831
Greg Clayton [Fri, 18 Mar 2016 20:53:35 +0000 (20:53 +0000)]
Added a break statement that was needed. Caught by clang's unannotated case fall through warning.
llvm-svn: 263830
Matthias Braun [Fri, 18 Mar 2016 20:41:11 +0000 (20:41 +0000)]
MILexer: Add ErrorCallbackType typedef; NFC
llvm-svn: 263829
Sanjoy Das [Fri, 18 Mar 2016 20:37:11 +0000 (20:37 +0000)]
[IndVars] Make the fix for PR26973 more obvious; NFCI
llvm-svn: 263828
Sanjoy Das [Fri, 18 Mar 2016 20:37:07 +0000 (20:37 +0000)]
[IndVars] Pass the right loop to isLoopInvariantPredicate
The loop on IVOperand's incoming values assumes IVOperand to be an
induction variable on the loop over which `S Pred X` is invariant;
otherwise loop invariant incoming values to IVOperand are not guaranteed
to dominate the comparision.
This fixes PR26973.
llvm-svn: 263827
Greg Clayton [Fri, 18 Mar 2016 20:36:30 +0000 (20:36 +0000)]
Fixed an case fall through that wasn't meant to happen. Caught by clang's unannotated case fall through warning.
llvm-svn: 263826
Mike Aizatsky [Fri, 18 Mar 2016 20:34:58 +0000 (20:34 +0000)]
Revert "[sancov] specifying sanitizer coverage dependencies."
This fails on arm.
This reverts commit
52c8e0f7119d1ea1050c0708565a8c92b73386d2.
llvm-svn: 263825
Greg Clayton [Fri, 18 Mar 2016 20:33:49 +0000 (20:33 +0000)]
Fixed a bug where DW_AT_start_scope would fall through to DW_AT_artificial in SymbolFileDWARF::ParseVariableDIE(). This was caught by the clang warning that catches unannotated case fall throughs.
llvm-svn: 263824
Nicolai Haehnle [Fri, 18 Mar 2016 20:32:04 +0000 (20:32 +0000)]
AMDGPU: add missing braces around multi-line if block
This fixes an issue with rL263658 pointed out by Tom Stellard.
llvm-svn: 263823
Samuel Benzaquen [Fri, 18 Mar 2016 20:14:35 +0000 (20:14 +0000)]
[clang-tidy] Use hasAnyName() instead of matchesName().
matchesName() uses regular expressions and it is very slow.
hasAnyName() gives the same result and it is much faster.
A benchmark (with all the checks enabled) shows a ~5% speed up of
clang-tidy.
llvm-svn: 263822
Mike Spertus [Fri, 18 Mar 2016 20:06:16 +0000 (20:06 +0000)]
Typesafe visualization of PointerIntPairs in Visual Studio
In the <DisplayString> of PointerIntPair , I cast the pointer to the actual type, so VS can leverage it while visualizing, not unlike the recent change to PointerUnion visualization.
In the expansion, the current code is casting to the incorrect type (wrong number of stars), so I fixed that as well.
llvm-svn: 263821
Mike Aizatsky [Fri, 18 Mar 2016 19:28:07 +0000 (19:28 +0000)]
[sancov] common flags initialization.
Summary:
Introducing InitializeCommonFlags accross all sanitizers to simplify
common flags management.
Setting coverage=1 when html_cov_report is requested.
Differential Revision: http://reviews.llvm.org/D18273
llvm-svn: 263820
Chad Rosier [Fri, 18 Mar 2016 19:21:02 +0000 (19:21 +0000)]
[AArch64] Enable more load clustering in the MI Scheduler.
This patch adds unscaled loads and sign-extend loads to the TII
getMemOpBaseRegImmOfs API, which is used to control clustering in the MI
scheduler. This is done to create more opportunities for load pairing. I've
also added the scaled LDRSWui instruction, which was missing from the scaled
instructions. Finally, I've added support in shouldClusterLoads for clustering
adjacent sext and zext loads that too can be paired by the load/store optimizer.
Differential Revision: http://reviews.llvm.org/D18048
llvm-svn: 263819
Akira Hatanaka [Fri, 18 Mar 2016 19:03:50 +0000 (19:03 +0000)]
[Objective-c] Fix a crash in WeakObjectProfileTy::getBaseInfo.
The crash occurs in WeakObjectProfileTy::getBaseInfo when getBase() is
called on an ObjCPropertyRefExpr object whose receiver is an interface.
This commit fixes the crash by checking the type of the receiver and
setting IsExact to true if it is an interface.
rdar://problem/
25208167
Differential Revision: http://reviews.llvm.org/D18268
llvm-svn: 263818
Reid Kleckner [Fri, 18 Mar 2016 18:54:32 +0000 (18:54 +0000)]
[codeview] Only emit function ids for inlined functions
We aren't referencing any other kind of function currently.
Should save a bit on our debug info size.
llvm-svn: 263817
Reid Kleckner [Fri, 18 Mar 2016 18:42:56 +0000 (18:42 +0000)]
[clang-cl] Allow use of -gline-tables-only
llvm-svn: 263816
Colin LeMahieu [Fri, 18 Mar 2016 18:22:07 +0000 (18:22 +0000)]
[MCParser] Accept uppercase radix variants 0X and 0B
Differential Revision: http://reviews.llvm.org/D14781
llvm-svn: 263802
Rafael Espindola [Fri, 18 Mar 2016 18:11:26 +0000 (18:11 +0000)]
Revert "bar"
This reverts commit r263799.
It was a mistake. Sorry about that.
llvm-svn: 263801
Rafael Espindola [Fri, 18 Mar 2016 18:09:35 +0000 (18:09 +0000)]
The ELF lld doesn't depend on LTO.
Tested with a shared build.
llvm-svn: 263800
Rafael Espindola [Fri, 18 Mar 2016 18:09:32 +0000 (18:09 +0000)]
bar
llvm-svn: 263799
JF Bastien [Fri, 18 Mar 2016 17:48:58 +0000 (17:48 +0000)]
Missing ATOMIC_*_LOCK_FREE tests
Forked from D17951, these tests should have been there but weren't.
llvm-svn: 263798
Mike Aizatsky [Fri, 18 Mar 2016 17:33:21 +0000 (17:33 +0000)]
[sancov] specifying sanitizer coverage dependencies.
Summary:
These dependencies would be used in the future to reduce the number
of instrumented blocks(http://reviews.llvm.org/rL262103)
This is submitted as a separate CL because of previous problems with
ARM.
Subscribers: aemerson
Differential Revision: http://reviews.llvm.org/D18227
llvm-svn: 263797
Jan Vesely [Fri, 18 Mar 2016 17:12:31 +0000 (17:12 +0000)]
[ELF] Link with Analysis, IPO, and LTO
Fixes SHARED_LIB build broken by r263761
llvm-svn: 263796
Pirama Arumuga Nainar [Fri, 18 Mar 2016 16:58:36 +0000 (16:58 +0000)]
Add -fnative-half-arguments-and-returns
Summary:
r246764 handled __fp16 arguments and returns for AAPCS, but skipped this
handling for OpenCL. Simlar to OpenCL, RenderScript also handles __fp16
type natively.
This patch adds the -fnative-half-arguments-and-returns command line
flag to allow such languages to skip this coercion of __fp16.
Reviewers: srhines, olista01
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D18138
llvm-svn: 263795
Mike Spertus [Fri, 18 Mar 2016 16:38:34 +0000 (16:38 +0000)]
Show members of DeclContexts (i.e., class members) in Visual Studio native visualizers
This change shows members of DeclContext objects in the Visual Studio debugger. It will also cast a TagType like a class or a struct to a DeclContext, so its methods and fields are visualized.
llvm-svn: 263794
Colin LeMahieu [Fri, 18 Mar 2016 16:26:48 +0000 (16:26 +0000)]
[llvm-objdump] Print <unknown> in place of instruction text if it couldn't be disassembled.
llvm-svn: 263793
Nicolai Haehnle [Fri, 18 Mar 2016 16:24:40 +0000 (16:24 +0000)]
AMDGPU: Overload return type of llvm.amdgcn.buffer.load.format
Summary:
Allow the selection of BUFFER_LOAD_FORMAT_x and _XY. Do this now before
the frontend patches land in Mesa. Eventually, we may want to automatically
reduce the size of loads at the LLVM IR level, which requires such overloads,
and in some cases Mesa can generate them directly.
Reviewers: tstellarAMD, arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D18255
llvm-svn: 263792
Nicolai Haehnle [Fri, 18 Mar 2016 16:24:31 +0000 (16:24 +0000)]
AMDGPU/SI: Add llvm.amdgcn.buffer.atomic.* intrinsics
Summary:
These intrinsics expose the BUFFER_ATOMIC_* instructions and will be used
by Mesa to implement atomics with buffer semantics. The intrinsic interface
matches that of buffer.load.format and buffer.store.format, except that the
GLC bit is not exposed (it is automatically deduced based on whether the
return value is used).
The change of hasSideEffects is required for TableGen to accept the pattern
that matches the intrinsic.
Reviewers: tstellarAMD, arsenm
Subscribers: arsenm, rivanvx, llvm-commits
Differential Revision: http://reviews.llvm.org/D18151
llvm-svn: 263791
Nicolai Haehnle [Fri, 18 Mar 2016 16:24:20 +0000 (16:24 +0000)]
AMDGPU: use ComplexPattern for offsets in llvm.amdgcn.buffer.load/store.format
Summary:
We cannot easily deduce that an offset is in an SGPR, but the Mesa frontend
cannot easily make use of an explicit soffset parameter either. Furthermore,
it is likely that in the future, LLVM will be in a better position than the
frontend to choose an SGPR offset if possible.
Since there aren't any frontend uses of these intrinsics in upstream
repositories yet, I would like to take this opportunity to change the
intrinsic signatures to a single offset parameter, which is then selected
to immediate offsets or voffsets using a ComplexPattern.
Reviewers: arsenm, tstellarAMD, mareko
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D18218
llvm-svn: 263790
Sam Kolton [Fri, 18 Mar 2016 15:35:51 +0000 (15:35 +0000)]
[AMDGPU] Assembler: Change dpp_ctrl syntax to match sp3
Review: http://reviews.llvm.org/D18267
llvm-svn: 263789
Jonathan Peyton [Fri, 18 Mar 2016 14:50:01 +0000 (14:50 +0000)]
Update www/index.html to reflect current status of OpenMP project
llvm-svn: 263788
Benjamin Kramer [Fri, 18 Mar 2016 14:19:19 +0000 (14:19 +0000)]
[Fuzzer] Guard no_sanitize_memory attributes behind __has_feature.
Otherwise GCC fails to build it because it doesn't know the attribute.
llvm-svn: 263787
Krzysztof Parzyszek [Fri, 18 Mar 2016 14:08:42 +0000 (14:08 +0000)]
Fix some typos; NFC
Patch by Dongyuan Liu.
Differential Revision: http://reviews.llvm.org/D17977
llvm-svn: 263786
Benjamin Kramer [Fri, 18 Mar 2016 13:31:00 +0000 (13:31 +0000)]
Make LookupResult movable again.
We lost copy semantics in r263730, because it only worked for a few very
specific cases. Move semantics don't have this issue. Sadly the
implementation is a bit messy but I don't know how to clean it up
without losing support for msvc 2013 :/
llvm-svn: 263785
Arpith Chacko Jacob [Fri, 18 Mar 2016 12:39:40 +0000 (12:39 +0000)]
Revert r263783 as buildbot failure is being investigated.
llvm-svn: 263784
Arpith Chacko Jacob [Fri, 18 Mar 2016 11:47:43 +0000 (11:47 +0000)]
[OpenMP] Base support for target directive codegen on NVPTX device.
Summary:
Reworked test case after buildbot failure on windows.
This patch adds base support for codegen of the target directive on the NVPTX device.
Reviewers: ABataev
Differential Revision: http://reviews.llvm.org/D17877
llvm-svn: 263783
Kuba Brecka [Fri, 18 Mar 2016 10:54:11 +0000 (10:54 +0000)]
[tsan] Add interceptor for pthread_cond_timedwait_relative_np
On OS X, we have pthread_cond_timedwait_relative_np. TSan needs to intercept this API to avoid false positives when using condition variables.
Differential Revision: http://reviews.llvm.org/D18184
llvm-svn: 263782
Simon Atanasyan [Fri, 18 Mar 2016 09:52:12 +0000 (09:52 +0000)]
[llvm-objdump] Move test case to the X86 sub-directory because it depends on X86 target supporting. NFC.
llvm-svn: 263781
George Rimar [Fri, 18 Mar 2016 09:28:39 +0000 (09:28 +0000)]
[ELF] - Set the sh_entsize for mergable sections
Previously sh_entsize field was not set for MergeOutputSection.
Patch fixes that.
That should resolve the https://llvm.org/bugs/show_bug.cgi?id=26975
Differential revision: http://reviews.llvm.org/D18248
llvm-svn: 263780
Sagar Thakur [Fri, 18 Mar 2016 07:55:44 +0000 (07:55 +0000)]
[TSAN] Fix build bot failure for powerpc64le
race_on_mutex.c passes for powerpc64le too after revision 263778. So removing the XFAIL marker.
llvm-svn: 263779
Sagar Thakur [Fri, 18 Mar 2016 05:41:20 +0000 (05:41 +0000)]
[TSAN] Relax the expected output of race_on_mutex.c
The stack trace produced by TSan on MIPS is:
Previous write of size 8 at 0x0120ed2930 by thread T1:
#0 memset
/home/slt/LLVM/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:678
(race_on_mutex.c.tmp+0x0120071808)
#1 __GI___pthread_mutex_init
/build/glibc-g99ldr/glibc-2.19/nptl/pthread_mutex_init.c:84
(libpthread.so.0+0x000000d634)
#2 <null>
/home/slt/LLVM/llvm/projects/compiler-rt/test/tsan/race_on_mutex.c:11 (race_on_mutex.c.tmp+0x01200ea59c)
Reviewers: samsonov, dvyukov
Subscribers: llvm-commits, mohit.bhakkad, jaydeep
Differential: http://reviews.llvm.org/D17796
llvm-svn: 263778
Pete Cooper [Fri, 18 Mar 2016 05:04:04 +0000 (05:04 +0000)]
Always cache resolved paths as it even saves on StringMap lookups.
Now that the resolved path cache stores the StringRef's, its
best to just always cache the results, even when realpath isn't
used. This way we'll still avoid the StringMap hashing and lookup.
This also conveniently reorganises this code in a way I need for
a future patch.
llvm-svn: 263777
Ehsan Amiri [Fri, 18 Mar 2016 04:02:25 +0000 (04:02 +0000)]
adding another optimization opportunity to readme file
llvm-svn: 263775
Pete Cooper [Fri, 18 Mar 2016 03:48:09 +0000 (03:48 +0000)]
Use StringRef's in resolved path cache to avoid extra internString lookups. NFC.
ResolvedPaths was storing std::string's as a cache. We would then take those strings and look them up in the internString pool to get a unique StringRef for each path.
This patch changes ResolvedPaths to store the StringRef pointing in to the internString pool itself. This way, when getResolvedPath returns a string, we know we have the StringRef we would find in the pool anyway. We can avoid the duplicate memory of the std::string's, and also the time from the lookup.
Unfortunately my profiles show no runtime change here, but it should still save memory allocations which is nice.
Reviewed by Frederic Riss.
Differential Revision: http://reviews.llvm.org/D18259
llvm-svn: 263774
Kostya Serebryany [Fri, 18 Mar 2016 01:36:00 +0000 (01:36 +0000)]
[libFuzzer] read corpus dirs recursively
llvm-svn: 263773
Adam Nemet [Fri, 18 Mar 2016 00:27:43 +0000 (00:27 +0000)]
[LoopDataPrefetch] Add TTI to limit the number of iterations to prefetch ahead
Summary:
It can hurt performance to prefetch ahead too much. Be conservative for
now and don't prefetch ahead more than 3 iterations on Cyclone.
Reviewers: hfinkel
Subscribers: llvm-commits, mzolotukhin
Differential Revision: http://reviews.llvm.org/D17949
llvm-svn: 263772
Adam Nemet [Fri, 18 Mar 2016 00:27:38 +0000 (00:27 +0000)]
[LoopDataPrefetch/Aarch64] Allow selective prefetching of large-strided accesses
Summary:
And use this TTI for Cyclone. As it was explained in the original RFC
(http://thread.gmane.org/gmane.comp.compilers.llvm.devel/92758), the HW
prefetcher work up to 2KB strides.
I am also adding tests for this and the previous change (D17943):
* Cyclone prefetching accesses with a large stride
* Cyclone not prefetching accesses with a small stride
* Generic Aarch64 subtarget not prefetching either
Reviewers: hfinkel
Subscribers: aemerson, rengolin, llvm-commits, mzolotukhin
Differential Revision: http://reviews.llvm.org/D17945
llvm-svn: 263771
Adam Nemet [Fri, 18 Mar 2016 00:27:29 +0000 (00:27 +0000)]
[Aarch64] Add pass LoopDataPrefetch for Cyclone
Summary:
This wires up the pass for Cyclone but keeps it off for now because we
need a few more TTIs.
The getPrefetchMinStride value is not very well tuned right now but it
works well with CFP2006/433.milc which motivated this.
Tests will be added as part of the upcoming large-stride prefetching
patch.
Reviewers: t.p.northover
Subscribers: llvm-commits, aemerson, hfinkel, rengolin
Differential Revision: http://reviews.llvm.org/D17943
llvm-svn: 263770
Kostya Serebryany [Fri, 18 Mar 2016 00:23:29 +0000 (00:23 +0000)]
[libFuzzer] improve -merge functionality
llvm-svn: 263769
Lang Hames [Fri, 18 Mar 2016 00:12:37 +0000 (00:12 +0000)]
[Support] Refactor Error unit tests to avoid duplicating work.
Suggested by Dave Blaikie in review for r263749. Thanks Dave!
llvm-svn: 263768