Yichao Yu [Wed, 23 Nov 2016 16:25:31 +0000 (16:25 +0000)]
Fix doc of `llvm.bitreverse.iN`
Summary:
The return type is `iN` rather than always `i16`
Seems to be a typo in https://reviews.llvm.org/rL252878 .
Reviewers: jmolloy
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D27047
llvm-svn: 287769
Shoaib Meenai [Wed, 23 Nov 2016 16:11:15 +0000 (16:11 +0000)]
[libc++] Remove unneeded visibility pragmas
The function definitions being guarded by the pragma were all static, so
they wouldn't be exported anyway. In any case, we should prefer the
visibility macros. No functional change.
Differential Revision: https://reviews.llvm.org/D26940
llvm-svn: 287768
Marcin Koscielnicki [Wed, 23 Nov 2016 16:07:07 +0000 (16:07 +0000)]
Revert "[ASan] Enable on SystemZ."
This reverts commit r287764.
Two tests broke on the clang-s390x-linux buildbot:
http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/1293.
llvm-svn: 287767
John Brawn [Wed, 23 Nov 2016 16:05:51 +0000 (16:05 +0000)]
[DAGCombiner] Fix infinite loop in vector mul/shl combining
We have the following DAGCombiner transformations:
(mul (shl X, c1), c2) -> (mul X, c2 << c1)
(mul (shl X, C), Y) -> (shl (mul X, Y), C)
(shl (mul x, c1), c2) -> (mul x, c1 << c2)
Usually the constant shift is optimised by SelectionDAG::getNode when it is
constructed, by SelectionDAG::FoldConstantArithmetic, but when we're dealing
with vectors and one of those vector constants contains an undef element
FoldConstantArithmetic does not fold and we enter an infinite loop.
Fix this by making FoldConstantArithmetic use getNode to decide how to fold each
vector element, the same as FoldConstantVectorArithmetic does, and rather than
adding the constant shift to the work list instead only apply the transformation
if it's already been folded into a constant, as if it's not we're going to loop
endlessly. Additionally add missing NoOpaques to one of those transformations,
which I noticed when writing the tests for this.
Differential Revision: https://reviews.llvm.org/D26605
llvm-svn: 287766
Nemanja Ivanovic [Wed, 23 Nov 2016 15:51:52 +0000 (15:51 +0000)]
[PowerPC] Remove InstAlias definitions that cause incorrect assembly
In rL283190, I added some InstAlias definitions to generate extended mnemonics
for some uses of the XXPERMDI instruction. However, when the assembler matches
these extended mnemonics, it matches the new instruction in situations where it
should match the old one.
This patch removes these definitions and accomplishes that by defining these
mnemonics with additional instructions that are isCodeGenOnly.
Fixes PR31127.
llvm-svn: 287765
Marcin Koscielnicki [Wed, 23 Nov 2016 15:47:41 +0000 (15:47 +0000)]
[ASan] Enable on SystemZ.
Differential Revision: http://reviews.llvm.org/D21831
llvm-svn: 287764
Gabor Horvath [Wed, 23 Nov 2016 15:24:23 +0000 (15:24 +0000)]
[ASTImporter] Added ability to import AtomicType nodes
Patch by: Kareem Khazem
Differential Revision: https://reviews.llvm.org/D26328
llvm-svn: 287763
Simon Pilgrim [Wed, 23 Nov 2016 14:01:18 +0000 (14:01 +0000)]
[X86][AVX512] Add support for v4i64 fptosi/fptoui/sitofp/uitofp on AVX512DQ-only targets
Use 512-bit instructions with subvector insertion/extraction like we do in a number of similar circumstances
llvm-svn: 287762
Elena Demikhovsky [Wed, 23 Nov 2016 13:58:24 +0000 (13:58 +0000)]
Type legalization for compressstore and expandload intrinsics.
Implemented widening (v2f32) and splitting (v16f64).
On splitting, I use "popcnt" to calculate memory increment.
More type legalization work will come in the next patches.
llvm-svn: 287761
Simon Pilgrim [Wed, 23 Nov 2016 13:42:09 +0000 (13:42 +0000)]
[CostModel][X86] Add missing AVX512DQ v8i64 fptosi/sitofp costs
llvm-svn: 287760
Benjamin Kramer [Wed, 23 Nov 2016 13:14:19 +0000 (13:14 +0000)]
[clang-rename] Add test case for r287758.
llvm-svn: 287759
Benjamin Kramer [Wed, 23 Nov 2016 13:10:07 +0000 (13:10 +0000)]
[clang-rename] Fix non-functional offset check.
Adding something to a SourceLocation will only produce an invalid
SourceLocation in edge cases (overflow or adding 0 to an invalid one).
Check that the offset is inside the file instead and add a test case to
verify that the error message works.
llvm-svn: 287758
Benjamin Kramer [Wed, 23 Nov 2016 11:49:28 +0000 (11:49 +0000)]
[MD5] Use write32le instead of spelling it out with shifts.
No functionality change intended.
llvm-svn: 287757
Simon Pilgrim [Wed, 23 Nov 2016 11:43:00 +0000 (11:43 +0000)]
[CostModel][X86] Add v2f32 -> v2i64 fptosi/fptoui cost tests
llvm-svn: 287756
Simon Pilgrim [Wed, 23 Nov 2016 11:38:52 +0000 (11:38 +0000)]
[X86][AVX512VL] Add missing _mm256_maskz_alignr_epi64 shufflevector check
Missed in rL287733
llvm-svn: 287755
Benjamin Kramer [Wed, 23 Nov 2016 11:20:27 +0000 (11:20 +0000)]
[CodeGen] Simplify code. No functionality change intended.
llvm-svn: 287754
Eugene Leviant [Wed, 23 Nov 2016 10:07:46 +0000 (10:07 +0000)]
[ELF] Refactor several error messages
Differential revision: https://reviews.llvm.org/D26970
llvm-svn: 287753
Haojian Wu [Wed, 23 Nov 2016 10:04:19 +0000 (10:04 +0000)]
[clang-move] Add some options allowing to add old/new.h to new/old.h respectively.
Summary:
* --new_depend_on_old: new header will include old header
* --old_depend_on_new: old header will include new header.
Reviewers: ioeric
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D26966
llvm-svn: 287752
Eugene Leviant [Wed, 23 Nov 2016 09:47:38 +0000 (09:47 +0000)]
[ELF] Fixup buffer pointer when writing synthetic sections
Differential revision: https://reviews.llvm.org/D26980
llvm-svn: 287751
Eugene Leviant [Wed, 23 Nov 2016 09:45:17 +0000 (09:45 +0000)]
[ELF] Print error location in .eh_frame parser
Differential revision: https://reviews.llvm.org/D26914
llvm-svn: 287750
Eric Fiselier [Wed, 23 Nov 2016 09:16:12 +0000 (09:16 +0000)]
Fix __hash_table::max_size() on 32 bit systems
llvm-svn: 287749
Marcin Koscielnicki [Wed, 23 Nov 2016 08:28:42 +0000 (08:28 +0000)]
[profile] Enable on SystemZ.
Differential Revision: http://reviews.llvm.org/D21738
llvm-svn: 287748
Rui Ueyama [Wed, 23 Nov 2016 06:59:47 +0000 (06:59 +0000)]
Remove one of SymbolTable::addRegular function that forwards other addRegular.
So that we have less number of overloaded functions.
llvm-svn: 287745
Craig Topper [Wed, 23 Nov 2016 06:54:55 +0000 (06:54 +0000)]
[AVX-512] Remove intrinsics for valignd/q and autoupgrade them to native shuffles.
llvm-svn: 287744
Zvi Rackover [Wed, 23 Nov 2016 06:45:25 +0000 (06:45 +0000)]
[X86] Simplify lowerVectorShuffleAsBitMask to handle only integer VT's
Summary: This function is only called with integer VT arguments, so remove code that handles FP vectors.
Reviewers: RKSimon, craig.topper, delena, andreadb
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26985
llvm-svn: 287743
Rui Ueyama [Wed, 23 Nov 2016 06:31:23 +0000 (06:31 +0000)]
Remove a forwarding constructor that is used only once.
llvm-svn: 287742
Rui Ueyama [Wed, 23 Nov 2016 05:48:40 +0000 (05:48 +0000)]
Parse symbol versions in scanVersionScript() instead of insert().
There are two ways to set symbol versions. One way is to use symbol
definition file, and the other is to embed version names to symbol
names. In the latter way, symbol name is in the form of `foo@version1`
where `foo` is a real name and `version1` is a version.
We were parsing symbol names in insert(). That seems unnecessarily
too early. We can do it later after we resolve all symbols. Doing it
lazily is a good thing because it makes code easier to read
(because now we have a separate pass to parse symbol names). Also
it could slightly improve performance because if two identical symbols
have versions, we now parse them only once.
llvm-svn: 287741
Simon Atanasyan [Wed, 23 Nov 2016 05:25:02 +0000 (05:25 +0000)]
[ELF][MIPS] Turn Config->Threads off for MIPS targets
For now MipsGotSection class is not ready for concurrent access from
multiple threads. The problem is in the getPageEntryOffset method. It
changes state of MipsGotSection object and might be called from
different threads at the same time. So turn Threads off for this target.
It's a temporary solution. The patch fixes MipsGotSection::getPageEntryOffset
is almost ready.
Differential revision: https://reviews.llvm.org/D27035
llvm-svn: 287740
Rui Ueyama [Wed, 23 Nov 2016 05:14:01 +0000 (05:14 +0000)]
Better formatting.
If a line is too long, its error message becomes hard to read.
llvm-svn: 287739
Simon Atanasyan [Wed, 23 Nov 2016 05:09:36 +0000 (05:09 +0000)]
[ELF][MIPS] clang-format the code
llvm-svn: 287738
Rui Ueyama [Wed, 23 Nov 2016 04:57:25 +0000 (04:57 +0000)]
Allow calling getName() on local symbols.
Previously, we stored offsets in string tables to symbols, so
you needed to pass a string table to get a symbol name. This patch
stores const char pointers instead to eliminate the need to pass
a string table.
llvm-svn: 287737
Dean Michael Berris [Wed, 23 Nov 2016 04:47:41 +0000 (04:47 +0000)]
[XRay][compiler-rt] Add newlines to error messages (NFC).
This goes through all the calls to `Report(...)` to make sure that each
one would have a newline at the end of the message for readability.
llvm-svn: 287736
Rui Ueyama [Wed, 23 Nov 2016 03:58:12 +0000 (03:58 +0000)]
Fix builbots.
llvm-svn: 287735
Kuba Mracek [Wed, 23 Nov 2016 02:07:04 +0000 (02:07 +0000)]
[xray] Add XRay support for Mach-O in CodeGen
Currently, XRay only supports emitting the XRay table (xray_instr_map) on ELF binaries. Let's add Mach-O support.
Differential Revision: https://reviews.llvm.org/D26983
llvm-svn: 287734
Craig Topper [Wed, 23 Nov 2016 01:47:12 +0000 (01:47 +0000)]
[X86] Replace valignd/q builtins with appropriate __builtin_shufflevector.
llvm-svn: 287733
Casey Carter [Wed, 23 Nov 2016 01:44:53 +0000 (01:44 +0000)]
Don't "LIBCPP_ONLY(stuff;)" at namespace scope.
Differential review: https://reviews.llvm.org/D27029
llvm-svn: 287732
Davide Italiano [Wed, 23 Nov 2016 01:42:39 +0000 (01:42 +0000)]
[SCCP] Add a test for switches on undef.
Without this test, you can just remove the code fixing the
switch to the first constant in ResolvedUndefs in and everything
pass. This test, instead, fails with an assertion if the code
is removed. Found while refactoring SCCP to integrate undef in
the solver.
llvm-svn: 287731
Rui Ueyama [Wed, 23 Nov 2016 01:19:13 +0000 (01:19 +0000)]
Revert r287727: Use SHA1::hash and MD5::hash functions.
It broke buildbots.
llvm-svn: 287730
Eric Fiselier [Wed, 23 Nov 2016 01:18:56 +0000 (01:18 +0000)]
[libcxx] Fix max_size() across all containers
Summary: The `max_size()` method of containers should respect both the allocator's reported `max_size` and the range of the `difference_type`. This patch makes all containers choose the smallest of those two values.
Reviewers: mclow.lists, EricWF
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D26885
llvm-svn: 287729
Eric Fiselier [Wed, 23 Nov 2016 01:02:51 +0000 (01:02 +0000)]
Add <variant> tests but disable them for libc++
llvm-svn: 287728
Rui Ueyama [Wed, 23 Nov 2016 00:52:28 +0000 (00:52 +0000)]
Use SHA1::hash and MD5::hash functions.
llvm-svn: 287727
Rui Ueyama [Wed, 23 Nov 2016 00:46:09 +0000 (00:46 +0000)]
Add convenient functions to compute hashes of byte vectors.
In many sitautions, you just want to compute a hash for one chunk
of data. This patch adds convenient functions for that purpose.
Differential Revision: https://reviews.llvm.org/D26988
llvm-svn: 287726
Eugene Zelenko [Wed, 23 Nov 2016 00:30:24 +0000 (00:30 +0000)]
[ADT] Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes.
Differential revision: https://reviews.llvm.org/D27001
llvm-svn: 287725
Zachary Turner [Wed, 23 Nov 2016 00:27:23 +0000 (00:27 +0000)]
Make STL range adapter naming consistent.
Differential Revision: https://reviews.llvm.org/D27009
llvm-svn: 287724
Rui Ueyama [Tue, 22 Nov 2016 23:51:34 +0000 (23:51 +0000)]
Dump not only type records but symbol records.
llvm-svn: 287723
Zachary Turner [Tue, 22 Nov 2016 23:22:19 +0000 (23:22 +0000)]
Add some searching functions for ArrayRef<T>.
Differential Revision: https://reviews.llvm.org/D26999
llvm-svn: 287722
Justin Lebar [Tue, 22 Nov 2016 23:14:11 +0000 (23:14 +0000)]
[StructurizeCFG] Refactor OrderNodes.
Summary:
No need to copy the RPOT vector before using it. Switch from std::map
to SmallDenseMap. Get rid of an unused variable (TempVisited). Get rid
of a typedef, RNVector, which is now used only once.
Differential Revision: https://reviews.llvm.org/D26997
llvm-svn: 287721
Justin Lebar [Tue, 22 Nov 2016 23:14:07 +0000 (23:14 +0000)]
[StructurizeCFG] Add whitespace in getAnalysisUsage.
Summary:
"addRequired" and "addPreserved" look very similar when squished up next
to each other -- without the newline this code looked to me like it was
addRequired'ing DominatorTreeWrapperPass twice.
Reviewers: arsenm
Subscribers: wdng, llvm-commits
Differential Revision: https://reviews.llvm.org/D26996
llvm-svn: 287720
Justin Lebar [Tue, 22 Nov 2016 23:13:49 +0000 (23:13 +0000)]
[StructurizeCFG] Remove unnecessary "using" in class.
Reviewers: arsenm
Subscribers: wdng, llvm-commits
Differential Revision: https://reviews.llvm.org/D26995
llvm-svn: 287719
Justin Lebar [Tue, 22 Nov 2016 23:13:44 +0000 (23:13 +0000)]
[StructurizeCFG] Merge the two constructors into one.
Reviewers: arsenm
Subscribers: wdng, llvm-commits
Differential Revision: https://reviews.llvm.org/D26994
llvm-svn: 287718
Justin Lebar [Tue, 22 Nov 2016 23:13:37 +0000 (23:13 +0000)]
[StructurizeCFG] Use a for-each loop instead of iterators in runOnRegion.
Summary:
Reviewers: arsenm
Subscribers: wdng, llvm-commits
Differential Revision: https://reviews.llvm.org/D26993
llvm-svn: 287717
Justin Lebar [Tue, 22 Nov 2016 23:13:33 +0000 (23:13 +0000)]
[StructurizeCFG] Make hasOnlyUniformBranches a non-member function.
Summary: Lets us get rid of one member variable too.
Reviewers: arsenm
Subscribers: wdng, llvm-commits
Differential Revision: https://reviews.llvm.org/D26992
llvm-svn: 287716
Justin Lebar [Tue, 22 Nov 2016 23:13:29 +0000 (23:13 +0000)]
[CUDA] Note in docs that you need to build with -lcudart on MacOS
-lcudart_static doesn't work. We don't know why.
llvm-svn: 287715
Rui Ueyama [Tue, 22 Nov 2016 23:13:08 +0000 (23:13 +0000)]
Fix memory leak detected by asan.
llvm-svn: 287714
Richard Smith [Tue, 22 Nov 2016 22:55:12 +0000 (22:55 +0000)]
Make diagnostic for use of default member initializer before enclosing class is
complete a little more general; it is produced in other cases than the one that
it previously talked about.
llvm-svn: 287713
Sanjay Patel [Tue, 22 Nov 2016 22:54:36 +0000 (22:54 +0000)]
add and use isBitwiseLogicOp() helper function; NFCI
llvm-svn: 287712
Rui Ueyama [Tue, 22 Nov 2016 22:54:03 +0000 (22:54 +0000)]
Accept -script=<file> in addition to -script <file>.
Fixes PR31126.
llvm-svn: 287711
Dehao Chen [Tue, 22 Nov 2016 22:50:01 +0000 (22:50 +0000)]
Before sample pgo annotation, do not inline a function that has no debug info. (NFC)
If there is no debug info in the callee, inlining it will not help annotator. This avoids infinite loop as reported in PR/31119.
llvm-svn: 287710
Davide Italiano [Tue, 22 Nov 2016 22:11:25 +0000 (22:11 +0000)]
[SCCP] Remove code in visitBinaryOperator (and add tests).
We visit and/or, we try to derive a lattice value for the
instruction even if one of the operands is overdefined.
If the non-overdefined value is still 'unknown' just return and wait
for ResolvedUndefsIn to "plug in" the correct value. This simplifies
the logic a bit. While I'm here add tests for missing cases.
llvm-svn: 287709
Matthias Braun [Tue, 22 Nov 2016 22:09:03 +0000 (22:09 +0000)]
TargetSubtargetInfo: Move implementation to lib/CodeGen; NFC
TargetSubtargetInfo is filled with CodeGen specific interfaces nowadays
(getInstrInfo(), getFrameLowering(), getSelectionDAGInfo()) most of the
tuning flags like enablePostRAScheduler(), getAntiDepBreakMode(),
enableRALocalReassignment(), ... also do not seem to be universal enough
to make sense outside of CodeGen.
Differential Revision: https://reviews.llvm.org/D26948
llvm-svn: 287708
Sanjay Patel [Tue, 22 Nov 2016 22:05:48 +0000 (22:05 +0000)]
[InstCombine] change bitwise logic type to eliminate bitcasts
In PR27925:
https://llvm.org/bugs/show_bug.cgi?id=27925
...we proposed adding this fold to eliminate a bitcast. In D20774, there was
some concern about changing the type of a bitwise op as well as creating
bitcasts that might not be free for a target. However, if we're strictly
eliminating an instruction (by limiting this to one-use ops), then we should
be able to do this in InstCombine.
But we're cautiously restricting the transform for now to vector types to
avoid possible backend problems. A transform to make sure the logic op is
legal for the target should be added to reverse this transform and improve
codegen.
Differential Revision: https://reviews.llvm.org/D26641
llvm-svn: 287707
Simon Pilgrim [Tue, 22 Nov 2016 22:04:50 +0000 (22:04 +0000)]
[X86][AVX512DQ] Add fp <-> int tests for AVX512DQ/AVX512DQ+VL
llvm-svn: 287706
Chandler Carruth [Tue, 22 Nov 2016 21:40:10 +0000 (21:40 +0000)]
[LCG] Add a previously missing assert about the relationship of RefSCCs.
No intended change, everything seems to be in working order already.
llvm-svn: 287705
Rafael Espindola [Tue, 22 Nov 2016 21:37:38 +0000 (21:37 +0000)]
Fix test to not depend on the path size.
llvm-svn: 287704
Tobias Grosser [Tue, 22 Nov 2016 21:31:59 +0000 (21:31 +0000)]
Update to isl-0.17.1-284-gbb38638
Regular maintenance update with only minor changes.
llvm-svn: 287703
Peter Collingbourne [Tue, 22 Nov 2016 21:25:30 +0000 (21:25 +0000)]
LTO: Remove a now-unused InputFile accessor.
llvm-svn: 287702
Rafael Espindola [Tue, 22 Nov 2016 21:12:20 +0000 (21:12 +0000)]
move VerDef finalization before DynStrTab
llvm-svn: 287701
Vyacheslav Klochkov [Tue, 22 Nov 2016 20:52:53 +0000 (20:52 +0000)]
Fixed the lost FastMathFlags in GVN(Global Value Numbering).
Reviewer: Hal Finkel.
Differential Revision: https://reviews.llvm.org/D26952
llvm-svn: 287700
Davide Italiano [Tue, 22 Nov 2016 20:37:37 +0000 (20:37 +0000)]
[LTO] Remove a check on datalayout.
Now that lld switched to lib/LTO, which always calls setDataLayout(),
we don't need this check anymore.
Thanks to Peter for pointing out!
llvm-svn: 287699
Chandler Carruth [Tue, 22 Nov 2016 20:35:32 +0000 (20:35 +0000)]
[LCG] Start using SCC relationship predicates in the unittest.
This mostly gives us nice unittesting of the predicates themselves. I'll
start using them further in subsequent commits to help test the actual
operations performed on the graph.
llvm-svn: 287698
Rui Ueyama [Tue, 22 Nov 2016 20:32:22 +0000 (20:32 +0000)]
Remove PDBFileBuilder::build() and related functions.
PDBFileBuilder supports two different ways to create files.
One is PDBFileBuilder::commit. That function takes a filename
and write a result to the file. The other is PDBFileBuilder::build.
That returns a new PDBFile object.
This patch removes the latter because no one is using it and
in a real life situation we are very unlikely to need it.
Even if you need it, it'd be easy to write a new PDB to a memory
buffer and read it back.
Removing PDBFileBuilder::build enables us to remove other classes
build transitively.
Differential Revision: https://reviews.llvm.org/D26987
llvm-svn: 287697
Kuba Mracek [Tue, 22 Nov 2016 20:24:26 +0000 (20:24 +0000)]
[sanitizer] Fix the dedup_token_length_test.cc testcase to not fail when user's home directory contains "bar"
Differential Revision: https://reviews.llvm.org/D24605
llvm-svn: 287696
Vyacheslav Klochkov [Tue, 22 Nov 2016 20:23:04 +0000 (20:23 +0000)]
Fixed the lost FastMathFlags in Reassociate optimization.
Reviewer: Hal Finkel.
Differential Revision: https://reviews.llvm.org/D26957
llvm-svn: 287695
Tobias Grosser [Tue, 22 Nov 2016 20:21:16 +0000 (20:21 +0000)]
[CodeGen] Add flag to code-generate most memory access expressions
Introduce the new flag -polly-codegen-generate-expressions which forces Polly
to code generate AST expressions instead of using our SCEV based access
expression generation even for cases where the original memory access relation
was not changed and the SCEV based access expression could be code generated
without any issue.
This is an experimental option for better testing the isl ast expression
generation. The default behavior of Polly remains unchanged. We also exclude
a couple of cases for which the AST expression is not yet working.
llvm-svn: 287694
Eric Fiselier [Tue, 22 Nov 2016 20:15:39 +0000 (20:15 +0000)]
Allow libc++ to use modules in C++03.
Libc++ internal uses <atomic> in C++03 code but the module map forbids its use.
This causes the libc++ 'std' module to fail to build in C++03.
This patch removes the requirement to fix this issue.
llvm-svn: 287693
Rui Ueyama [Tue, 22 Nov 2016 20:15:35 +0000 (20:15 +0000)]
Remove '.' from a help message.
llvm-svn: 287692
John McCall [Tue, 22 Nov 2016 20:12:32 +0000 (20:12 +0000)]
Remove variable only used in an assertion.
llvm-svn: 287691
Eric Fiselier [Tue, 22 Nov 2016 20:05:19 +0000 (20:05 +0000)]
Attempt to fix stdint/cstdint modules try 2
llvm-svn: 287690
Marcin Koscielnicki [Tue, 22 Nov 2016 20:03:40 +0000 (20:03 +0000)]
Add test for D21736.
Differential Revision: http://reviews.llvm.org/D21741
llvm-svn: 287689
Marcin Koscielnicki [Tue, 22 Nov 2016 20:03:35 +0000 (20:03 +0000)]
[CodeGen] Insert TargetLibraryInfoWrapperPass before anything else.
Currently, TargetLibraryInfoWrapperPass is inserted by PMBuilder.
However, some passes are inserted manually before the PMBuilder
ones - if any of them happens to use TargetLibraryInfoWrapperPass,
it'll get a default-constructed one, with an unknown target triple.
This happens to InstrProfiling in D21736, breaking it.
Differential Revision: http://reviews.llvm.org/D21737
llvm-svn: 287688
Eric Fiselier [Tue, 22 Nov 2016 20:00:21 +0000 (20:00 +0000)]
Cleanup module.modulemap
llvm-svn: 287687
Paul Robinson [Tue, 22 Nov 2016 19:46:51 +0000 (19:46 +0000)]
Restructure DwarfDebug::beginInstruction(). [NFC]
Will help a pending patch.
Differential Revision: http://reviews.llvm.org/D26982
llvm-svn: 287686
Nico Weber [Tue, 22 Nov 2016 19:38:07 +0000 (19:38 +0000)]
darwin: Unconditionally pass -lto_library, remove -Wliblto warning.
https://reviews.llvm.org/D25932 made it so that clang always checks if
libLTO.dylib is present on disk, even if -flto is not being used. The
motivation for that change was that if a dependency happens to contain bitcode,
ld64 will try to load libLTO without -flto explicitly being enabled. However,
the change had the undesirable side effect of warning if libLTO.dylib doesn't
exist even if it isn't needed.
Change things so that -lto_library is always passes, independent of if it
exists or not. ld64 only looks at this flag if it uses LTO. If the dylib
exists, all is well. If it doesn't, and LTO is not being used, all is well too.
If ld64 does end up using LTO and the dylib does not exist, ld64 will print
something like
ld: could not process llvm bitcode object file, because foo/libLTO.dylib could not be loaded file 'test.o' for architecture x86_64
https://reviews.llvm.org/D26984
llvm-svn: 287685
Shoaib Meenai [Tue, 22 Nov 2016 19:36:26 +0000 (19:36 +0000)]
[Triple] Add Facebook vendor
Add a compiler vendor for Facebook, to enable future vendor-specific
behavior.
Differential Revision: https://reviews.llvm.org/D25136
llvm-svn: 287684
Rui Ueyama [Tue, 22 Nov 2016 19:24:52 +0000 (19:24 +0000)]
Fix build breakage.
We cannot have MipsRldMap class and In<ELFT>::MipsRldMap.
Renamed the class.
llvm-svn: 287683
Chandler Carruth [Tue, 22 Nov 2016 19:23:31 +0000 (19:23 +0000)]
[LCG] Add utilities to compute parent and ascestor relationships between
SCCs.
These will be fairly expensive routines to call and might be abused in
real code, but are quite useful when debugging or in asserts and are
reasonable and well formed properties to query.
I've used one of them in an assert that was requested in a code review
here. In subsequent commits I'll start using these routines more
heavily, for example in unittests etc. But this at least gets the
groundwork in place.
Differential Revision: https://reviews.llvm.org/D25506
llvm-svn: 287682
Simon Dardis [Tue, 22 Nov 2016 19:17:23 +0000 (19:17 +0000)]
[mips] seb, seh instruction aliases
Add the single operand form.
Reviewers: vkalintiris
Differential Revision: https://reviews.llvm.org/D26961
llvm-svn: 287681
Andrew Kaylor [Tue, 22 Nov 2016 19:16:04 +0000 (19:16 +0000)]
Add IntrInaccessibleMemOnly property for intrinsics
Differential Revision: https://reviews.llvm.org/D26485
llvm-svn: 287680
Nemanja Ivanovic [Tue, 22 Nov 2016 19:02:07 +0000 (19:02 +0000)]
[PowerPC] Emit VMX loads/stores for aligned ops to avoid adding swaps on LE
This patch corresponds to review:
https://reviews.llvm.org/D26861
It also fixes PR30730.
Committing on behalf of Lei Huang.
llvm-svn: 287679
Simon Pilgrim [Tue, 22 Nov 2016 18:55:49 +0000 (18:55 +0000)]
[CostModel][X86] Updated sitofp/uitofp scalar/vector cost tests
Better coverage of all legal types + special cases.
Removed old fptoui tests which are all handled in fptoui.ll
llvm-svn: 287678
Meador Inge [Tue, 22 Nov 2016 18:01:50 +0000 (18:01 +0000)]
[ELF] Allow `ASSERT` in output section descriptions
GNU LD allows `ASSERT` commands to be in output section descriptions.
Note that LD also mandates that `ASSERT` commands in this context must
end with a semicolon.
llvm-svn: 287677
Simon Pilgrim [Tue, 22 Nov 2016 17:50:06 +0000 (17:50 +0000)]
[X86][SSE] Combine UNPCKL(FHADD,FHADD) -> FHADD for v2f64 shuffles.
This occurs during UINT_TO_FP v2f64 lowering.
We can easily generalize this to other horizontal ops (FHSUB, PACKSS, PACKUS) as required - we are doing something similar with PACKUS in lowerV2I64VectorShuffle
llvm-svn: 287676
Eugene Leviant [Tue, 22 Nov 2016 17:49:14 +0000 (17:49 +0000)]
[ELF] Convert .rld_map to input section
Differential revision: https://reviews.llvm.org/D26958
llvm-svn: 287675
Benjamin Kramer [Tue, 22 Nov 2016 17:29:45 +0000 (17:29 +0000)]
[clang-rename] Prune away AST nodes more correctly and effectively when looking for a point
Due to the way the preprocessor works nodes can be half in a macro or a
different file. This means checking the file name of the start location
of a Decl is not a correct way of checking if the entire Decl is in that
file. Remove that flawed assumption and replace it with a more effective
check: If the point we're looking for is *inside* of the begin and end
location of a Decl, look inside.
This should make clang-rename more reliable (for example macro'd namespaces
threw it off before, as seen in the test case) and maybe a little faster
by pruning off more stuff that the RecursiveASTVisitor doesn't have to
drill into.
llvm-svn: 287649
Zachary Turner [Tue, 22 Nov 2016 17:10:15 +0000 (17:10 +0000)]
Re-add "demonstrate new Args API"
This fixes the build breakage due to the use of C++14.
llvm-svn: 287647
Vasileios Kalintiris [Tue, 22 Nov 2016 16:43:49 +0000 (16:43 +0000)]
[mips] Add support for unaligned load/store macros.
Add missing unaligned store macros (ush/usw) and fix the exisiting
implementation of the unaligned load macros in order to generate
identical expansions with the GNU assembler.
llvm-svn: 287646
Tim Northover [Tue, 22 Nov 2016 16:17:20 +0000 (16:17 +0000)]
CodeGen: simplify TargetMachine::getSymbol interface. NFC.
No-one actually had a mangler handy when calling this function, and
getSymbol itself went most of the way towards getting its own mangler
(with a local TLOF variable) so forcing all callers to supply one was
just extra complication.
llvm-svn: 287645
Zvi Rackover [Tue, 22 Nov 2016 15:33:28 +0000 (15:33 +0000)]
[X86] Change lowerBuildVectorToBitOp() to take a BuildVectorSDNode. NFC.
llvm-svn: 287644
Zvi Rackover [Tue, 22 Nov 2016 15:17:52 +0000 (15:17 +0000)]
[X86] Remove dead code from LowerVectorBroadcast
Summary: Splat vectors are canonicalized to BUILD_VECTOR's so the code can be simplified. NFC-ish.
Reviewers: craig.topper, delena, RKSimon, andreadb
Subscribers: RKSimon, llvm-commits
Differential Revision: https://reviews.llvm.org/D26678
llvm-svn: 287643
Chad Rosier [Tue, 22 Nov 2016 14:25:02 +0000 (14:25 +0000)]
[AArch64] Set the max interleave factor for Falkor.
llvm-svn: 287642