Kostya Serebryany [Sun, 18 Sep 2016 04:52:23 +0000 (04:52 +0000)]
[libFuzzer] use 'if guard' instead of 'if guard >= 0' with trace-pc; change the guard type to intptr_t; use separate array for 8-bit counters
llvm-svn: 281845
Davide Italiano [Sun, 18 Sep 2016 04:39:15 +0000 (04:39 +0000)]
[llvm-objump] Simplify the code. NFCI.
llvm-svn: 281844
Davide Italiano [Sat, 17 Sep 2016 22:32:42 +0000 (22:32 +0000)]
[lib/LTO] Try harder to reduce code duplication. NFCI.
llvm-svn: 281843
Simon Pilgrim [Sat, 17 Sep 2016 22:02:23 +0000 (22:02 +0000)]
[X86][SSE] Added vector udiv combine tests
llvm-svn: 281842
Simon Pilgrim [Sat, 17 Sep 2016 21:31:34 +0000 (21:31 +0000)]
[X86][SSE] Added vector fcopysign combine tests
Also demonstrating the poor lowering of fcopysign...
llvm-svn: 281841
Teresa Johnson [Sat, 17 Sep 2016 20:40:16 +0000 (20:40 +0000)]
[ThinLTO] Ensure anonymous globals renamed even at -O0
Summary:
This fixes an issue when files are compiled with -flto=thin
at default -O0. We need to rename anonymous globals before attempting
to write the module summary because all values need names for
the summary. This was happening at -O1 and above, but not before
the early exit when constructing the pipeline for -O0.
Also add an internal -prepare-for-thinlto option to enable this
to be tested via opt.
Fixes PR30419.
Reviewers: mehdi_amini
Subscribers: probinson, llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D24701
llvm-svn: 281840
Simon Pilgrim [Sat, 17 Sep 2016 20:06:16 +0000 (20:06 +0000)]
[X86][SSE] Added vector mul combine tests
llvm-svn: 281839
Tobias Grosser [Sat, 17 Sep 2016 19:22:31 +0000 (19:22 +0000)]
GPGPU: Store back non-read-only scalars
We may generate GPU kernels that store into scalars in case we run some
sequential code on the GPU because the remaining data is expected to already be
on the GPU. For these kernels it is important to not keep the scalar values
in thread-local registers, but to store them back to the corresponding device
memory objects that backs them up.
We currently only store scalars back at the end of a kernel. This is only
correct if precisely one thread is executed. In case more than one thread may
be run, we currently invalidate the scop. To support such cases correctly,
we would need to always load and store back from a corresponding global
memory slot instead of a thread-local alloca slot.
llvm-svn: 281838
Tobias Grosser [Sat, 17 Sep 2016 19:22:18 +0000 (19:22 +0000)]
GPGPU: Detect read-only scalar arrays ...
and pass these by value rather than by reference.
llvm-svn: 281837
George Rimar [Sat, 17 Sep 2016 19:21:05 +0000 (19:21 +0000)]
[ELF] - Fix comment. NFC.
llvm-svn: 281836
George Rimar [Sat, 17 Sep 2016 19:17:25 +0000 (19:17 +0000)]
[ELF] - Added comments. NFC.
llvm-svn: 281835
Simon Pilgrim [Sat, 17 Sep 2016 18:50:54 +0000 (18:50 +0000)]
[X86][SSE] Improve target shuffle mask extraction
Add ability to extract vXi64 'vzext_movl' masks on 32-bit targets
llvm-svn: 281834
Simon Pilgrim [Sat, 17 Sep 2016 18:42:41 +0000 (18:42 +0000)]
[X86][AVX] Test target shuffle combining on 32 and 64-bit targets
llvm-svn: 281833
George Rimar [Sat, 17 Sep 2016 18:35:24 +0000 (18:35 +0000)]
[ELF] - Linkerscript: change locationcounter.s to use llvm-objdump
Previously it used llvm-readobj -s, now changed to llvm-objdump -section-headers,
that reduced the output significantly and helps to read/support it.
llvm-svn: 281832
George Rimar [Sat, 17 Sep 2016 18:14:56 +0000 (18:14 +0000)]
[ELF] - SEGMENT_START's default argument can be an expression
Our implementation supported integer value previously.
ld can use expression,
for example, it is OK to write
. = SEGMENT_START("foobar", .);
Patch implements that.
llvm-svn: 281831
Simon Pilgrim [Sat, 17 Sep 2016 17:42:15 +0000 (17:42 +0000)]
[X86][AVX2] Add target shuffle constant folding tests
llvm-svn: 281830
Simon Pilgrim [Sat, 17 Sep 2016 17:41:14 +0000 (17:41 +0000)]
[X86][AVX] Add target shuffle constant folding tests
llvm-svn: 281829
Simon Pilgrim [Sat, 17 Sep 2016 17:40:40 +0000 (17:40 +0000)]
[X86][XOP] Add target shuffle constant folding tests
llvm-svn: 281828
Simon Pilgrim [Sat, 17 Sep 2016 17:40:08 +0000 (17:40 +0000)]
[X86][SSSE3] Add target shuffle constant folding tests
llvm-svn: 281827
Alexander Shaposhnikov [Sat, 17 Sep 2016 17:08:47 +0000 (17:08 +0000)]
[clang-rename] Fix handling of unchanged files
Fix the output of clang-rename for the files without modifications.
Update the code in clang-reorder-fields/tool/ClangReorderFields.cpp
to avoid inconsistency.
Example:
a.h:
struct A {};
a.cpp:
#include "a.h"
int main() { return 0; }
Before the changes the output looks like this:
clang-rename -qualified-name=A -new-name=B a.cpp
<<<<<INVALID SOURCE LOCATION>>>>>
Test plan: make -j8 check-clang-tools
Differential revision: https://reviews.llvm.org/D24634
llvm-svn: 281826
Ron Lieberman [Sat, 17 Sep 2016 16:21:09 +0000 (16:21 +0000)]
[Hexagon] segv while processing SUnit with nullNodePtr
Added BoundaryNode check to isBestZeroLatency function.
llvm-svn: 281825
Matt Arsenault [Sat, 17 Sep 2016 16:09:55 +0000 (16:09 +0000)]
AMDGPU: Fix broken FrameIndex handling
We were trying to avoid using a FrameIndex operand in non-pointer
operands in a convoluted way, and would break because of
using TargetFrameIndex. The TargetFrameIndex should only be used
in the case where it makes sense to fold it as part of the addressing
mode, otherwise it requires materialization like a normal constant.
This wasn't working reliably and failed in the added testcase, hitting
the assert when processing the frame index.
The TargetFrameIndex was coming from trying to produce an AssertZext
limiting the maximum stack size. I'm not sure this was correct to begin
with, because it is apparently possible to have a single workitem
dispatch that requires all 4G of private memory.
llvm-svn: 281824
Matt Arsenault [Sat, 17 Sep 2016 15:52:37 +0000 (15:52 +0000)]
AMDGPU: Rename spill operands to match real instruction
llvm-svn: 281823
Matt Arsenault [Sat, 17 Sep 2016 15:44:16 +0000 (15:44 +0000)]
AMDGPU: Push bitcasts through build_vector
This reduces the number of copies and reg_sequences
when using fp constant vectors. This significantly
reduces the code size in local-stack-alloc-bug.ll
llvm-svn: 281822
Kuba Brecka [Sat, 17 Sep 2016 14:39:53 +0000 (14:39 +0000)]
[tsan] Update fork_atexit.cc to consistently print to stderr (and not stdout)
llvm-svn: 281821
Kuba Brecka [Sat, 17 Sep 2016 14:33:36 +0000 (14:33 +0000)]
[tsan] Update signal_cond.cc to write to stderr intead of stdout
llvm-svn: 281820
Eric Liu [Sat, 17 Sep 2016 12:26:42 +0000 (12:26 +0000)]
When replacements have the same offset, make replacements with smaller length order first in the set.
Summary:
No behavioral change intended. The change makes iterating the replacements set more intuitive in Replacements class implementation. Previously, insertion is ordered before an deletion/replacement with the same offset, which is counter-intuitive for implementation, especially for a followup patch to support adding insertions around replacements.
With the current ordering, we only need to make `applyAllReplacements` iterate the replacements set reversely when applying them so that deletion/replacement is still applied before insertion with the same offset.
Reviewers: klimek, djasper
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D24663
llvm-svn: 281819
George Rimar [Sat, 17 Sep 2016 09:50:10 +0000 (09:50 +0000)]
[ELF] Linkerscript: fixed bug about commands processing.
It was possible situation about some commands just were not processed
(were skipped) because of a bug appeared when constraint checking used.
Testcase is attached.
llvm-svn: 281818
George Rimar [Sat, 17 Sep 2016 07:31:49 +0000 (07:31 +0000)]
[ELF] - Fixed mistypes in comments. NFC.
llvm-svn: 281817
Daniel Jasper [Sat, 17 Sep 2016 07:20:36 +0000 (07:20 +0000)]
clang-format: [JS] Fix a crash in handledTemplateStrings.
llvm-svn: 281816
Kuba Brecka [Sat, 17 Sep 2016 06:31:23 +0000 (06:31 +0000)]
[compiler-rt] Disable building of profiling runtime when LLVM_USE_SANITIZER is set
Currently, when doing a ASanified build of LLVM (with Clang, compiler-rt and libcxx) via -DLLVM_USE_SANITIZER=Address and not using any other options, we already disable building of sanitizer runtimes (because they themselves can’t be sanitized) and also exclude the sanitizer tests. However, the same is not done for the profiling runtime, which will build fine, but then all the tests fail due to linking errors. Let’s disable the profiling runtime as well (when LLVM_USE_SANITIZER is set).
Differential Revision: https://reviews.llvm.org/D24657
llvm-svn: 281815
Kostya Serebryany [Sat, 17 Sep 2016 06:01:55 +0000 (06:01 +0000)]
[libFuzzer] properly reset the guards when reseting the coverage. Also try to fix check-fuzzer on the bot
llvm-svn: 281814
Mehdi Amini [Sat, 17 Sep 2016 06:00:02 +0000 (06:00 +0000)]
Don't create a SymbolTable in Function when the LLVMContext discards value names (NFC)
The ValueSymbolTable is used to detect name conflict and rename
instructions automatically. This is not needed when the value
names are automatically discarded by the LLVMContext.
No functional change intended, just saving a little bit of memory.
This is a recommit of r281806 after fixing the accessor to return
a pointer instead of a reference and updating all the call-sites.
llvm-svn: 281813
Mehdi Amini [Sat, 17 Sep 2016 05:41:02 +0000 (05:41 +0000)]
[MIR Parser] Fix Build!
Last-second refactoring before push was bad idea...
llvm-svn: 281812
Mehdi Amini [Sat, 17 Sep 2016 05:33:58 +0000 (05:33 +0000)]
MIR Parser: issue an error when the Context discard value names.
This is in line with the LLParser behavior
llvm-svn: 281811
Kostya Serebryany [Sat, 17 Sep 2016 05:04:47 +0000 (05:04 +0000)]
[libFuzzer] change trace-pc to use 8-byte guards
llvm-svn: 281810
Kostya Serebryany [Sat, 17 Sep 2016 05:03:05 +0000 (05:03 +0000)]
[sanitizer-coverage] change trace-pc to use 8-byte guards
llvm-svn: 281809
Mehdi Amini [Sat, 17 Sep 2016 04:36:46 +0000 (04:36 +0000)]
Revert "Don't create a SymbolTable in Function when the LLVMContext discards value names (NFC)"
This reverts commit r281806. It introduces undefined behavior as an
API is returning a reference to the Symtab
llvm-svn: 281808
Mehdi Amini [Sat, 17 Sep 2016 03:39:01 +0000 (03:39 +0000)]
Don't create a SymbolTable in Function when the LLVMContext discards value names (NFC)
The ValueSymbolTable is used to detect name conflict and rename
instructions automatically. This is not needed when the value
names are automatically discarded by the LLVMContext.
No functional change intended, just saving a little bit of memory.
llvm-svn: 281806
Rui Ueyama [Sat, 17 Sep 2016 02:34:50 +0000 (02:34 +0000)]
Attempt to fix buildbot.
llvm-svn: 281805
Zachary Turner [Sat, 17 Sep 2016 02:34:40 +0000 (02:34 +0000)]
Fix boolean logic error in BreakpointID.
llvm-svn: 281804
Rui Ueyama [Sat, 17 Sep 2016 02:23:40 +0000 (02:23 +0000)]
Use named struct instead of unnamed std::pair.
It is important to give members names for readability.
llvm-svn: 281803
Rui Ueyama [Sat, 17 Sep 2016 02:15:28 +0000 (02:15 +0000)]
Define a versatile utility function and use it instead of a single purpose one.
llvm-svn: 281802
Rui Ueyama [Sat, 17 Sep 2016 02:10:15 +0000 (02:10 +0000)]
Remove unnecessary namespace specifiers.
llvm-svn: 281801
Matt Arsenault [Sat, 17 Sep 2016 02:02:19 +0000 (02:02 +0000)]
AMDGPU: Use i64 scalar compare instructions
VI added eq/ne for i64, so use them.
llvm-svn: 281800
Zachary Turner [Sat, 17 Sep 2016 02:00:02 +0000 (02:00 +0000)]
Convert many functions to use StringRefs.
Where possible, remove the const char* version. To keep the
risk and impact here minimal, I've only done the simplest
functions.
In the process, I found a few opportunities for adding some
unit tests, so I added those as well.
Tested on Windows, Linux, and OSX.
llvm-svn: 281799
Saleem Abdulrasool [Fri, 16 Sep 2016 23:41:13 +0000 (23:41 +0000)]
CodeGen: refactor the ObjC cstring literal creation
This refactors the cstring literal creation as mentioned in the couple of FIXMEs
littered in the various invocations to CreateMetadataVar. This centralises the
definition of the literals, and will enable changing the literal creation to a
single site. NFC.
llvm-svn: 281798
Richard Smith [Fri, 16 Sep 2016 23:30:39 +0000 (23:30 +0000)]
Fix a couple of wrong-code bugs in switch-on-constant optimization:
* recurse through intermediate LabelStmts and AttributedStmts when checking
whether a statement inside a switch declares a variable
* if the end of a compound statement is reachable from the chosen case label,
and the compound statement contains a variable declaration, it's not valid
to just emit the contents of the compound statement -- we must emit the
statement itself or we lose the scope (and thus end lifetimes at the wrong
point)
llvm-svn: 281797
Peter Collingbourne [Fri, 16 Sep 2016 22:56:12 +0000 (22:56 +0000)]
Add REQUIRES line.
llvm-svn: 281796
Rui Ueyama [Fri, 16 Sep 2016 22:51:17 +0000 (22:51 +0000)]
Partially fill Info stream with proper values.
llvm-svn: 281795
Rafael Espindola [Fri, 16 Sep 2016 22:47:34 +0000 (22:47 +0000)]
Try to fix a few bots.
llvm-svn: 281794
Tom Stellard [Fri, 16 Sep 2016 22:43:33 +0000 (22:43 +0000)]
configure: Add amdgcn-mesa-mesa3d target
llvm-svn: 281793
Tom Stellard [Fri, 16 Sep 2016 22:43:31 +0000 (22:43 +0000)]
amdgcn-amdhsa: Add get_num_groups implementation
llvm-svn: 281792
Tom Stellard [Fri, 16 Sep 2016 22:43:29 +0000 (22:43 +0000)]
amdgcn-amdhsa: Add get_global_size() implementation
llvm-svn: 281791
Peter Collingbourne [Fri, 16 Sep 2016 22:26:45 +0000 (22:26 +0000)]
Add target triples to fix test on non-x86.
llvm-svn: 281790
Tom Stellard [Fri, 16 Sep 2016 22:20:24 +0000 (22:20 +0000)]
AMDGPU/SI: Fix kernel argument ABI for HSA
Summary: i8, i16, and f16 values are not extended to 32-bit in the HSA kernel ABI.
Reviewers: arsenm
Subscribers: arsenm, kzhuravl, wdng, nhaehnle, llvm-commits, yaxunl
Differential Revision: https://reviews.llvm.org/D24621
llvm-svn: 281789
Chris Bieneman [Fri, 16 Sep 2016 22:19:19 +0000 (22:19 +0000)]
[CMake] Support symlinks with the same name as the binary
This supports creating symlinks to tools in different directories than
the tool is built to. This is useful for the LLDB framework build which
I’m sending patches for shortly.
llvm-svn: 281788
Sanjay Patel [Fri, 16 Sep 2016 22:16:18 +0000 (22:16 +0000)]
[InstCombine] canonicalize vector select with constant vector condition to shuffle
As discussed on llvm-dev ( http://lists.llvm.org/pipermail/llvm-dev/2016-August/104210.html ):
turn a vector select with constant condition operand into a shuffle as a canonicalization step.
Shuffles may be easier to reason about in conjunction with other shuffles and insert/extract.
Possible known (minor?) regressions from this change are filed as:
https://llvm.org/bugs/show_bug.cgi?id=28530
https://llvm.org/bugs/show_bug.cgi?id=28531
https://llvm.org/bugs/show_bug.cgi?id=30371
If something terrible happens to perf after this commit, feel free to revert until a backend
fix is in place.
Differential Revision: https://reviews.llvm.org/D24279
llvm-svn: 281787
Matt Arsenault [Fri, 16 Sep 2016 22:11:18 +0000 (22:11 +0000)]
AMDGPU: Allow some control flow intrinsics to be CSEd
These clean up some unnecessary or instructions in
cases with complex loops.
In the original testcase I noticed this, the same
or with exec was repeated 5 or 6 times in a row. With
this only one is emitted or sometimes a copy.
llvm-svn: 281786
Peter Collingbourne [Fri, 16 Sep 2016 22:05:53 +0000 (22:05 +0000)]
CodeGen: Add more checks to nobuiltin.c test, add a negative test.
llvm-svn: 281785
Evgeniy Stepanov [Fri, 16 Sep 2016 22:04:10 +0000 (22:04 +0000)]
[safestack] Fix assertion failure in stack coloring.
This is a fix for PR30318.
Clang may generate IR where an alloca is already live when entering a
BB with lifetime.start. In this case, conservatively extend the
alloca lifetime all the way back to the block entry.
llvm-svn: 281784
Quentin Colombet [Fri, 16 Sep 2016 22:00:50 +0000 (22:00 +0000)]
[RegAllocGreedy] Fix the list of NewVRegs for last chance recoloring.
When trying to recolor a register we may split live-ranges in the
process. When we create new live-ranges we will have to process them,
but when we move a register from Assign to Split, the allocation is not
changed until the whole recoloring session is successful.
Therefore, only push the live-ranges that changed from Assign to
Split when the recoloring is successful.
Same as the previous commit, I was not able to produce a test case that
reproduce the problem with in-tree targets.
Note: The bug has been here since the recoloring scheme has been added
back in r200883 (Feb 2014).
llvm-svn: 281783
Quentin Colombet [Fri, 16 Sep 2016 22:00:42 +0000 (22:00 +0000)]
[RegAllocGreedy] Fix an assertion and condition when last chance recoloring is used.
When last chance recoloring is used, the list of NewVRegs may not be
empty when calling selectOrSplitImpl. Indeed, another coloring may have
taken place with splitting/spilling in the same recoloring session.
Relax an assertion to take this into account and adapt a condition to
act as if the NewVRegs were local to this selectOrSplitImpl instance.
Unfortunately I am unable to produce a test case for this, I was only
able to reproduce the conditions on an out-of-tree target.
llvm-svn: 281782
Tom Stellard [Fri, 16 Sep 2016 21:53:00 +0000 (21:53 +0000)]
AMDGPU: Refactor kernel argument lowering
Summary:
The main challenge in lowering kernel arguments for AMDGPU is determing the
memory type of the argument. The generic calling convention code assumes
that only legal register types can be stored in memory, but this is not the
case for AMDGPU.
This consolidates all the logic AMDGPU uses for deducing memory types into a single
function. This will make it much easier to support different ABIs in the future.
Reviewers: arsenm
Subscribers: arsenm, wdng, nhaehnle, llvm-commits, yaxunl
Differential Revision: https://reviews.llvm.org/D24614
llvm-svn: 281781
Matt Arsenault [Fri, 16 Sep 2016 21:41:16 +0000 (21:41 +0000)]
AMDGPU: Use SOPK compare instructions
llvm-svn: 281780
Tom Stellard [Fri, 16 Sep 2016 21:34:26 +0000 (21:34 +0000)]
AMDGPU/SI: Add support for triples with the mesa3d operating system
Summary:
mesa3d will use the same kernel calling convention as amdhsa, but it will
handle everything else like the default 'unknown' OS type.
Reviewers: arsenm
Subscribers: arsenm, llvm-commits, kzhuravl
Differential Revision: https://reviews.llvm.org/D22783
llvm-svn: 281779
Rafael Espindola [Fri, 16 Sep 2016 21:29:07 +0000 (21:29 +0000)]
Put SHF_ALLOC sections first, even with linker scripts.
This matches gold and bfd, and is pretty much required by some linker
scripts. They end with commands like
foo 0 : { *(bar) }
if we put any SHF_ALLOC sections after they can have an address that
is too low.
llvm-svn: 281778
Sanjay Patel [Fri, 16 Sep 2016 21:20:36 +0000 (21:20 +0000)]
[InstCombine] allow vector types for constant folding / computeKnownBits (PR24942)
computeKnownBits() already works for integer vectors, so allow vector types when calling that from InstCombine.
I don't think the change to use m_APInt in computeKnownBits is strictly necessary because we do check for
ConstantVector later, but it's more efficient to handle the splat case without needing to loop on vector elements.
This should work with InstSimplify, but doesn't yet, so I made that a FIXME comment on the test for PR24942:
https://llvm.org/bugs/show_bug.cgi?id=24942
Differential Revision: https://reviews.llvm.org/D24677
llvm-svn: 281777
Rui Ueyama [Fri, 16 Sep 2016 21:14:55 +0000 (21:14 +0000)]
Rename SortSectionPolicy::IgnoreConfig to None.
Because it corresponds to SORT_NONE. None was renamed Default.
llvm-svn: 281776
Rafael Espindola [Fri, 16 Sep 2016 21:05:36 +0000 (21:05 +0000)]
Only process commands in a ONLY_IF_RO if it matches.
This matches bfd behavior. It also makes future changes simpler as we
don't have to worry about ignoring these commands in multiple places
llvm-svn: 281775
Davide Italiano [Fri, 16 Sep 2016 21:03:21 +0000 (21:03 +0000)]
[LTO] Add ability to parse AA pipelines.
This is supposed to be a drop in replacement for what lld
provides via --lto-newpm-aa-pipeline.
llvm-svn: 281774
Derek Schuff [Fri, 16 Sep 2016 20:58:31 +0000 (20:58 +0000)]
[WebAssembly] Fix function types of CFGStackify tests
Make the function's declared type match its (lack of) return type
llvm-svn: 281773
Rafael Espindola [Fri, 16 Sep 2016 20:34:02 +0000 (20:34 +0000)]
Fix constraint checking in ONLY_IF_RO.
We have to look at all the relevant input sections at once.
llvm-svn: 281772
George Rimar [Fri, 16 Sep 2016 20:21:55 +0000 (20:21 +0000)]
[ELF] - Implemented --sort-section cmd line option and SORT_NONE script command.
This fixes Bug 30385 - SORT_NONE not implemented,
`SORT_NONE' disables section sorting by ignoring the command line
section sorting option.
That is why this patch also implements --sort-section option.
Description of sorting rules
available at https://sourceware.org/binutils/docs/ld/Input-Section-Wildcards.html
Differential revision: https://reviews.llvm.org/D24604
llvm-svn: 281771
Greg Clayton [Fri, 16 Sep 2016 20:10:02 +0000 (20:10 +0000)]
Fix compiler warnings where two values weren't being initialized.
llvm-svn: 281770
Simon Pilgrim [Fri, 16 Sep 2016 20:00:51 +0000 (20:00 +0000)]
[X86][SSE] Added vector sub combine tests
llvm-svn: 281769
Simon Pilgrim [Fri, 16 Sep 2016 19:20:41 +0000 (19:20 +0000)]
[X86][SSE] Added vector add combine tests
Some work great and others currently demonstrate the anti-vector bias prevalent in DAGCombiner
llvm-svn: 281768
Shoaib Meenai [Fri, 16 Sep 2016 19:12:54 +0000 (19:12 +0000)]
[libc++] Fix inline attribute for non-MSVC Windows
gcc and clang in gcc compatibility mode do not accept __forceinline. Use
the gcc attribute for them instead.
Differential Revision: https://reviews.llvm.org/D24678
llvm-svn: 281766
Zachary Turner [Fri, 16 Sep 2016 19:09:19 +0000 (19:09 +0000)]
Set the correct triple when creating an ArchSpec for Windows.
Patch by Walter Erquinigo
Differential Revision: https://reviews.llvm.org/D24283
llvm-svn: 281765
Zachary Turner [Fri, 16 Sep 2016 19:09:12 +0000 (19:09 +0000)]
Add unit tests for a few string conversion functions in Args.
Also provided a StringRef overload for these functions and have
the const char* overloads delegate to the StringRef overload.
llvm-svn: 281764
Derek Schuff [Fri, 16 Sep 2016 18:50:39 +0000 (18:50 +0000)]
Install libLLVM if needed with LLVM_INSTALL_TOOLCHAIN_ONLY
Summary:
When LLVM_LINK_LLVM_DYLIB is set, the libLLVM shared
library needs to be installed in the toolchain. Without
this chanage LLVM_INSTALL_TOOLCHAIN_ONLY combined with
LLVM_LINK_LLVM_DYLIB results in a broken install.
Patch by Sam Clegg
Differential Revision: https://reviews.llvm.org/D24676
llvm-svn: 281763
Nirav Dave [Fri, 16 Sep 2016 18:30:20 +0000 (18:30 +0000)]
Defer asm errors to post-statement failure
Recommitting after fixing AsmParser initialization and X86 inline asm
error cleanup.
Allow errors to be deferred and emitted as part of clean up to simplify
and shorten Assembly parser code. This will allow error messages to be
emitted in helper functions and be modified by the caller which has
better context.
As part of this many minor cleanups to the Parser:
* Unify parser cleanup on error
* Add Workaround for incorrect return values in ParseDirective instances
* Tighten checks on error-signifying return values for parser functions
and fix in-tree TargetParsers to be more consistent with the changes.
* Fix AArch64 test cases checking for spurious error messages that are
now fixed.
These changes should be backwards compatible with current Target Parsers
so long as the error status are correctly returned in appropriate
functions.
Reviewers: rnk, majnemer
Subscribers: aemerson, jyknight, llvm-commits
Differential Revision: https://reviews.llvm.org/D24047
llvm-svn: 281762
Dehao Chen [Fri, 16 Sep 2016 18:27:20 +0000 (18:27 +0000)]
Change extractProfMetadata and extractProfTotalWeight to const member function.
llvm-svn: 281760
Michael Kuperstein [Fri, 16 Sep 2016 18:20:43 +0000 (18:20 +0000)]
Make test slightly more explicit. NFC.
llvm-svn: 281759
Eli Friedman [Fri, 16 Sep 2016 18:01:48 +0000 (18:01 +0000)]
LoopDistribute should preserve GlobalsAA.
Differential Revision: https://reviews.llvm.org/D24204
llvm-svn: 281758
Eli Friedman [Fri, 16 Sep 2016 17:58:07 +0000 (17:58 +0000)]
LoopLoadElimination should preserve GlobalsAA.
Avoids losing GlobalsAA in the standard pass pipeline.
Differential Revision: https://reviews.llvm.org/D24094
llvm-svn: 281757
Sanjay Patel [Fri, 16 Sep 2016 17:54:52 +0000 (17:54 +0000)]
auto-generate checks
llvm-svn: 281756
Sanjay Patel [Fri, 16 Sep 2016 17:48:16 +0000 (17:48 +0000)]
auto-generate checks
llvm-svn: 281755
George Rimar [Fri, 16 Sep 2016 17:42:10 +0000 (17:42 +0000)]
Recommit r281721 "[ELF] - Linkerscript: implement EXCLUDE_FILE in the middle of a input section description."
With fix for 2 bots. Details about the fix performed is on a review page.
Initial commit message:
This is PR30387:
From PR description:
We fail to parse
SECTIONS
{
foo :
{
*(sec0 EXCLUDE_FILE (zed1.o) sec1 EXCLUDE_FILE (zed2.o) sec2 )
}
}
The semantics according to bfd are:
Include sec1 from every file but zed1.o
Include sec2 from every file but zed2.o
Include sec0 from every file
Patch implements the support.
Differential revision: https://reviews.llvm.org/D24650
llvm-svn: 281754
Nirav Dave [Fri, 16 Sep 2016 17:42:02 +0000 (17:42 +0000)]
Introduce inline assembly parsing test is PR30372.
llvm-svn: 281753
Mehdi Amini [Fri, 16 Sep 2016 17:18:16 +0000 (17:18 +0000)]
Fix test after renaming -name-anon-functions pass to -name-anon-globals
llvm-svn: 281752
Teresa Johnson [Fri, 16 Sep 2016 17:12:48 +0000 (17:12 +0000)]
[LTO] Use llvm-nm instead of nm in new tests
The use of nm in the new tests added with r281725 caused a couple
of bot failures:
http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/15701
http://bb.pgr.jp/builders/ninja-clang-i686-msc19-R/builds/6939
Use llvm-nm instead.
llvm-svn: 281750
Eric Christopher [Fri, 16 Sep 2016 17:07:23 +0000 (17:07 +0000)]
Actually remove the Mangler from the AsmPrinter and clean up the places it was "used" but not used.
llvm-svn: 281749
Eric Christopher [Fri, 16 Sep 2016 17:07:13 +0000 (17:07 +0000)]
Fix a hidden use of grabbing the Mangler from the AsmPrinter and update
accordingly.
llvm-svn: 281748
Reid Kleckner [Fri, 16 Sep 2016 17:05:40 +0000 (17:05 +0000)]
Remove undefined weak hooks from dll thunk export list to really fix windows build
llvm-svn: 281747
Francis Ricci [Fri, 16 Sep 2016 16:59:31 +0000 (16:59 +0000)]
[compiler-rt] Don't force ASAN_HAS_EXCEPTIONS to be true for all builds
Summary:
This value is already defaulted to true in asan_internal.h.
Allow the value to be overriden in cases where exceptions are unavailable.
Reviewers: kcc, samsonov, compnerd
Subscribers: kubabrecka, dberris, beanz, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D24633
llvm-svn: 281746
Mehdi Amini [Fri, 16 Sep 2016 16:56:30 +0000 (16:56 +0000)]
Rename NameAnonFunctions to NameAnonGlobals to match what it is doing (NFC)
llvm-svn: 281745
Mehdi Amini [Fri, 16 Sep 2016 16:56:25 +0000 (16:56 +0000)]
Fix NameAnonFunctions pass: for ThinLTO we need to rename global variables as well
A follow-up patch will rename this pass and the source file accordingly,
but I figured the non-NFC change will be easier to spot in isolation.
Differential Revision: https://reviews.llvm.org/D24641
llvm-svn: 281744
Sanjay Patel [Fri, 16 Sep 2016 16:10:22 +0000 (16:10 +0000)]
[InstCombine] add helper functions for visitICmpInst(); NFCI
llvm-svn: 281743
Davide Italiano [Fri, 16 Sep 2016 16:07:19 +0000 (16:07 +0000)]
[IRObjectFile] Turn llvm_unreachable("foo") into something more explicative.
llvm-svn: 281742