Anna Thomas [Fri, 8 Jul 2016 22:15:08 +0000 (22:15 +0000)]
Revert "InstCombine rule to fold truncs whose value is available"
This reverts commit r274853.
Caused failure in ppcBE build
llvm-svn: 274943
Duncan P. N. Exon Smith [Fri, 8 Jul 2016 22:11:30 +0000 (22:11 +0000)]
Lanai: Avoid implicit iterator conversions, NFC
Avoid implicit conversions from MachineInstrBundleIterator to
MachineInstr* in the Lanai backend.
llvm-svn: 274942
David Majnemer [Fri, 8 Jul 2016 21:54:16 +0000 (21:54 +0000)]
[MC, COFF] Permit a variable to be redefined
Our assertions in WinCOFFStreamer had unexpected side effects resulting
in symbols getting unexpectedly marked as used.
This fixes PR28462.
llvm-svn: 274941
Jingyue Wu [Fri, 8 Jul 2016 21:48:05 +0000 (21:48 +0000)]
[TTI] Expose TTI::getGEPCost and use it in SLSR and NaryReassociate.
NFC.
llvm-svn: 274940
Matt Arsenault [Fri, 8 Jul 2016 21:39:44 +0000 (21:39 +0000)]
AMDGPU: Remove unused control flow intrinsic
llvm-svn: 274939
Piotr Padlewski [Fri, 8 Jul 2016 21:25:39 +0000 (21:25 +0000)]
Add 'thinlto_src_module' md with asserts or -enable-import-metadata
Summary:
This way the metadata will be only generated when asserts enabled,
or when -enable-import-metadata specified
Reviewers: tejohnson, eraman, mehdi_amini
Subscribers: mehdi_amini, llvm-commits
Differential Revision: http://reviews.llvm.org/D22167
llvm-svn: 274938
Matt Arsenault [Fri, 8 Jul 2016 21:25:33 +0000 (21:25 +0000)]
Reapply r274829 with fix for FP vectors
llvm-svn: 274937
Adam Nemet [Fri, 8 Jul 2016 21:24:13 +0000 (21:24 +0000)]
[BFI] Minor cleanup. NFC
Use typedef Result in BlockFrequencyAnalysis::run. Fix typo in comment.
llvm-svn: 274936
Adam Nemet [Fri, 8 Jul 2016 21:24:06 +0000 (21:24 +0000)]
[LAA] Port test to the new PM
This is a follow-on to r274452.
The LAA with the new PM is a loop pass so we go from inner to outer loops.
Also using a CHECK-NOT didn't make much sense because we print something
in either case; whether an invariant is 'found' or 'not found'.
llvm-svn: 274935
Xinliang David Li [Fri, 8 Jul 2016 21:21:44 +0000 (21:21 +0000)]
[PM] name the new PM LAA class LoopAccessAnalysis (LAA) /NFC
llvm-svn: 274934
Duncan P. N. Exon Smith [Fri, 8 Jul 2016 21:19:46 +0000 (21:19 +0000)]
MSP430: Avoid implicit iterator conversions, NFC
Avoid implicit conversions from MachineInstrBundleIIterator to
MachineInstr* in the MSP430 backend by preferring MachineInstr& over
MachineInstr* when a pointer isn't nullable.
llvm-svn: 274933
Sanjay Patel [Fri, 8 Jul 2016 21:17:51 +0000 (21:17 +0000)]
[InstCombine] don't form select from bitcasted logic ops if bitcasts have >1 use
This isn't a sure thing (are 2 extra bitcasts less expensive than a logic op?),
but we'll try to err on the conservative side by going with the case that has
less IR instructions.
Note: This question came up in http://reviews.llvm.org/D22114 , but this part is
independent of that patch proposal, so I'm making this small change ahead of that
one.
See also:
http://reviews.llvm.org/rL274926
llvm-svn: 274932
Duncan P. N. Exon Smith [Fri, 8 Jul 2016 21:10:58 +0000 (21:10 +0000)]
NVPTX: Avoid implicit iterator conversions, NFC
Avoid implicit conversions from MachineInstrBundleIterator to
MachineInstr* in the NVPTX backend, mainly by preferring MachineInstr&
over MachineInstr* when a pointer isn't nullable and using range-based
for loops.
There was one piece of questionable code in
NVPTXInstrInfo::AnalyzeBranch, where a condition checked a pointer
converted from an iterator for nullptr. Since this case is impossible
(moreover, the code above guarantees that the iterator is valid), I
removed the check when I changed the pointer to a reference.
Despite that case, there should be no functionality change here.
llvm-svn: 274931
Vassil Vassilev [Fri, 8 Jul 2016 21:09:08 +0000 (21:09 +0000)]
Teach -ast-print to print constexpr variables.
Patch reviewed by Richard Smith (D22168).
llvm-svn: 274930
Sanjay Patel [Fri, 8 Jul 2016 21:08:16 +0000 (21:08 +0000)]
add another multi-use test for logic->select transform
llvm-svn: 274929
Wei Mi [Fri, 8 Jul 2016 21:08:09 +0000 (21:08 +0000)]
Allow dead insts to be kept in DeadRemat only when they are rematerializable.
Because isReallyTriviallyReMaterializableGeneric puts many limits on
rematerializable instructions, this fix can prevent instructions with
tied virtual operands and instructions with virtual register uses from
being kept in DeadRemat, so as to workaround the live interval consistency
problem for the dummy instructions kept in DeadRemat.
But we still need to fix the live interval consistency problem. This patch
is just a short time relieve. PR28464 has been filed as a reminder.
Differential Revision: http://reviews.llvm.org/D19486
llvm-svn: 274928
Xinliang David Li [Fri, 8 Jul 2016 20:55:26 +0000 (20:55 +0000)]
Rename LoopAccessAnalysis to LoopAccessLegacyAnalysis /NFC
llvm-svn: 274927
Sanjay Patel [Fri, 8 Jul 2016 20:53:29 +0000 (20:53 +0000)]
[InstCombine] don't form select from logic ops if it's unlikely that we'll eliminate any ops
llvm-svn: 274926
Sanjay Patel [Fri, 8 Jul 2016 20:35:53 +0000 (20:35 +0000)]
adjust test so it won't completely optimize away
llvm-svn: 274925
Duncan P. N. Exon Smith [Fri, 8 Jul 2016 20:29:42 +0000 (20:29 +0000)]
AArch64: Avoid implicit iterator conversions, NFC
Avoid implicit conversions from MachineInstrBundleInstr to MachineInstr*
in the AArch64 backend, mainly by preferring MachineInstr& over
MachineInstr* when a pointer isn't nullable.
llvm-svn: 274924
Yaxun Liu [Fri, 8 Jul 2016 20:28:29 +0000 (20:28 +0000)]
[OpenCL] Add missing -cl-no-signed-zeros option into driver
Add OCL option -cl-no-signed-zeros to driver options.
Also added to opencl.cl testcases.
Patch by Aaron En Ye Shi.
Differential Revision: http://reviews.llvm.org/D22067
llvm-svn: 274923
Sanjay Patel [Fri, 8 Jul 2016 20:22:27 +0000 (20:22 +0000)]
add tests for multi-use folding to select
llvm-svn: 274922
Xinliang David Li [Fri, 8 Jul 2016 20:21:32 +0000 (20:21 +0000)]
Remove duplicate inclusion /NFC
llvm-svn: 274921
Duncan P. N. Exon Smith [Fri, 8 Jul 2016 20:21:17 +0000 (20:21 +0000)]
ARM: Remove implicit iterator conversions, NFC
Remove remaining implicit conversions from MachineInstrBundleIterator to
MachineInstr* from the ARM backend. In most cases, I made them less attractive
by preferring MachineInstr& or using a ranged-based for loop.
Once all the backends are fixed I'll make the operator explicit so that this
doesn't bitrot back.
llvm-svn: 274920
Justin Bogner [Fri, 8 Jul 2016 20:14:27 +0000 (20:14 +0000)]
TableGen: Update style in CodeGenIntrinsics. NFC
Ran clang-format to remove the namespace indentation, and stopped
repeating names in doc comments since I was updating every line
anyway.
llvm-svn: 274919
Dehao Chen [Fri, 8 Jul 2016 20:12:44 +0000 (20:12 +0000)]
Remove inline hints computation from SampleProfile.cpp
Summary: As we will move to use uniformed hotness check in inliner, we do not need inline hints in SampleProfile pass any more.
Reviewers: dnovillo, davidxl
Subscribers: eraman, llvm-commits
Differential Revision: http://reviews.llvm.org/D19287
llvm-svn: 274918
Rui Ueyama [Fri, 8 Jul 2016 19:59:11 +0000 (19:59 +0000)]
Attempt to fix buildbots.
llvm-svn: 274917
Nico Weber [Fri, 8 Jul 2016 19:52:19 +0000 (19:52 +0000)]
Revert r274829, it caused PR28472.
llvm-svn: 274916
Simon Pilgrim [Fri, 8 Jul 2016 19:51:08 +0000 (19:51 +0000)]
[X86] Regenerated bitreverse tests to demonstrate what is going on.
llvm-svn: 274915
Simon Pilgrim [Fri, 8 Jul 2016 19:48:33 +0000 (19:48 +0000)]
[X86] Added bitreverse tests for non-legal types
Requested on D21578
llvm-svn: 274914
Duncan P. N. Exon Smith [Fri, 8 Jul 2016 19:41:40 +0000 (19:41 +0000)]
Sparc: Avoid implicit iterator conversions, NFC
Remove the only implicit conversions from MachineInstrBundleIterator to
MachineInstr* in the Sparc backend.
llvm-svn: 274913
Duncan P. N. Exon Smith [Fri, 8 Jul 2016 19:36:40 +0000 (19:36 +0000)]
WebAssembly: Avoid implicit iterator conversions, NFC
Avoid implicit conversions from MachineInstrBundleIterator to
MachineInstr* in the WebAssembly backend by preferring MachineInstr&
over MachineInstr*.
llvm-svn: 274912
Duncan P. N. Exon Smith [Fri, 8 Jul 2016 19:31:47 +0000 (19:31 +0000)]
AsmPrinter: Avoid implicit iterator conversions in DbgValueHistoryCalculator, NFC
llvm-svn: 274911
Davide Italiano [Fri, 8 Jul 2016 19:30:06 +0000 (19:30 +0000)]
[CrossDSOCFI] Change the pass so that it doesn't require doInitialization()
Differential Revision: http://reviews.llvm.org/D21357
llvm-svn: 274910
Rafael Espindola [Fri, 8 Jul 2016 19:28:55 +0000 (19:28 +0000)]
fix use of uninitialized.
llvm-svn: 274909
Simon Pilgrim [Fri, 8 Jul 2016 19:23:29 +0000 (19:23 +0000)]
[X86][AVX2] Add support for target shuffle combining to VPERMPD/VPERMQ
llvm-svn: 274908
Duncan P. N. Exon Smith [Fri, 8 Jul 2016 19:23:12 +0000 (19:23 +0000)]
SelectionDAG: Avoid implicit iterator conversions in SelectionDAGBuilder, NFC
llvm-svn: 274907
Duncan P. N. Exon Smith [Fri, 8 Jul 2016 19:16:05 +0000 (19:16 +0000)]
AMDGPU: Remove implicit iterator conversions, NFC
Remove remaining implicit conversions from MachineInstrBundleIterator to
MachineInstr* from the AMDGPU backend. In most cases, I made them less
attractive by preferring MachineInstr& or using a ranged-based for loop.
Once all the backends are fixed I'll make the operator explicit so that
this doesn't bitrot back.
llvm-svn: 274906
Davide Italiano [Fri, 8 Jul 2016 19:13:40 +0000 (19:13 +0000)]
[SCCP] Fold constants as we build them whne visiting cast instructions.
This should be slightly more efficient and could avoid spurious overdefined
markings, as Eli pointed out.
Differential Revision: http://reviews.llvm.org/D22122
llvm-svn: 274905
Duncan P. N. Exon Smith [Fri, 8 Jul 2016 19:11:40 +0000 (19:11 +0000)]
SelectionDAG: Avoid implicit iterator conversions in SelectionDAGISel, NFC
llvm-svn: 274904
Duncan P. N. Exon Smith [Fri, 8 Jul 2016 19:07:09 +0000 (19:07 +0000)]
SelectionDAG: Avoid implicit iterator conversions in ScheduleDAGSDNodes, NFC
llvm-svn: 274903
Duncan P. N. Exon Smith [Fri, 8 Jul 2016 19:00:17 +0000 (19:00 +0000)]
AMDGPU: Make infinite loop clear, NFC
Change a while loop that was checking for nullptr on an
iterator-to-pointer conversion to an infinite for loop. Now it's clear
that the condition doesn't terminate.
The only change in behaviour is if an invalid iterator (holding nullptr)
was passed into AMDGPUCFGStructurizer::reversePredicateSetter. There
are only two callers, and they both dereference the iterator before
sending it in, so rather than adding an early return to avoid the loop
I've just asserted (using a static_cast, to avoid an implicit conversion
to pointer).
llvm-svn: 274902
Enrico Granata [Fri, 8 Jul 2016 18:39:36 +0000 (18:39 +0000)]
Make IsSyntheticChildrenGenerated() virtual so that dynamic and synthetic values can refer back to their parents
llvm-svn: 274901
Saleem Abdulrasool [Fri, 8 Jul 2016 18:36:56 +0000 (18:36 +0000)]
COFF: remove unused function (touchFile)
Remove some dead code. NFC.
llvm-svn: 274900
Duncan P. N. Exon Smith [Fri, 8 Jul 2016 18:36:41 +0000 (18:36 +0000)]
SelectionDAG: Avoid implicit iterator conversions in FastISel, NFC
llvm-svn: 274899
Duncan P. N. Exon Smith [Fri, 8 Jul 2016 18:26:20 +0000 (18:26 +0000)]
Target: Avoid getFirstTerminator() => pointer, NFC
Stop using an implicit conversion from the return of
MachineBasicBlock::getFirstTerminator to MachineInstr*. In two cases,
directly dereference to a MachineInstr& since later code assumes it's
valid. In a third case, change to an iterator since later code checks
against MachineBasicBlock::end.
Although the fix for the third case avoids undefined behaviour, I expect
this doesn't cause a functionality change in practice (since the basic
block already has a terminator).
llvm-svn: 274898
Justin Lebar [Fri, 8 Jul 2016 17:59:24 +0000 (17:59 +0000)]
Fix flag name in comment in cuda-version-check.cu.
llvm-svn: 274897
Rui Ueyama [Fri, 8 Jul 2016 17:58:54 +0000 (17:58 +0000)]
Fix memory leak.
Symbol's dtors are not called because they are allocated using
BumpPtrAllocators. So, members of std::unique_ptr type are not
freed when symbols are deallocated.
This patch is to allocate Thunks using BumpPtrAllocators.
llvm-svn: 274896
Oleksiy Vyalov [Fri, 8 Jul 2016 17:45:37 +0000 (17:45 +0000)]
Use shell cat command as a workaround if ADB stat cannot lookup a file.
http://reviews.llvm.org/D22081
llvm-svn: 274895
Jonathan Peyton [Fri, 8 Jul 2016 17:43:21 +0000 (17:43 +0000)]
Improving EPCC performance when linking with hwloc
When linking with libhwloc, the ORDERED EPCC test slows down on big
machines (> 48 cores). Performance analysis showed that a cache thrash
was occurring and this padding helps alleviate the problem.
Also, inside the main spin-wait loop in kmp_wait_release.h, we can eliminate
the references to the global shared variables by instead creating a local
variable, oversubscribed and instead checking that.
Differential Revision: http://reviews.llvm.org/D22093
llvm-svn: 274894
Duncan P. N. Exon Smith [Fri, 8 Jul 2016 17:43:08 +0000 (17:43 +0000)]
CodeGen: Avoid iterator conversions in TwoAddressInstructionPass, NFC
Mostly through preferring MachineInstr&, avoid implicit conversions from
iterator to pointer.
Although this may bitrot (since there are other uses blocking me from
removing the implicit operator), this removes the last of the implicit
conversions from MachineInstrBundleIterator to MachineInstr* in the
LLVMCodeGen build target.
llvm-svn: 274893
Duncan P. N. Exon Smith [Fri, 8 Jul 2016 17:28:40 +0000 (17:28 +0000)]
CodeGen: Use MachineInstr& in StackSlotColoring, NFC
Avoid implicit iterator to pointer conversions.
llvm-svn: 274892
Sanjay Patel [Fri, 8 Jul 2016 17:26:47 +0000 (17:26 +0000)]
[InstCombine] check for one-use before turning simple logic op into a select
llvm-svn: 274891
Justin Bogner [Fri, 8 Jul 2016 17:25:18 +0000 (17:25 +0000)]
IR: Set a TargetPrefix for nvvm intrinsics
Since these are named nvvm_* rather than nvptx_*, we also need to
update getArchTypePrefix. It's a bit unusual for getArchTypePrefix not
to match the backend name, but I think this fits the intent of the
function in this case.
llvm-svn: 274890
Simon Pilgrim [Fri, 8 Jul 2016 17:19:13 +0000 (17:19 +0000)]
[SLPVectorizer][X86] Added fma vectorization tests
llvm-svn: 274889
Duncan P. N. Exon Smith [Fri, 8 Jul 2016 17:16:57 +0000 (17:16 +0000)]
CodeGen: Use MachineInstr& in RegisterScavenging, NFC
Prefer MachineInstr& in order to avoid implicit conversions from
MachineInstrBundleIterator to MachineInstr*.
llvm-svn: 274888
Sanjay Patel [Fri, 8 Jul 2016 17:12:27 +0000 (17:12 +0000)]
add test to show multi-use output
llvm-svn: 274887
Matt Arsenault [Fri, 8 Jul 2016 17:06:48 +0000 (17:06 +0000)]
AMDGPU: Minor adjustment to r274817
The commit message is inaccurate, modifiesRegister
will check for partial defs of exec.
We currently don't ever emit partial defs of exec,
so it doesn't really matter.
llvm-svn: 274886
NAKAMURA Takumi [Fri, 8 Jul 2016 17:06:27 +0000 (17:06 +0000)]
CFGTests: Update libdeps.
llvm-svn: 274885
Simon Pilgrim [Fri, 8 Jul 2016 17:01:42 +0000 (17:01 +0000)]
[X86][AVX] Added combine test that should simplify to insertps
llvm-svn: 274884
Sanjay Patel [Fri, 8 Jul 2016 17:01:15 +0000 (17:01 +0000)]
[InstCombine] allow or(sext(A), B) --> A ? -1 : B transform for vectors
llvm-svn: 274883
Marshall Clow [Fri, 8 Jul 2016 16:59:54 +0000 (16:59 +0000)]
Fix typo in #ifdef; leave tests commented out b/c gcc 4.8 harks on them.
llvm-svn: 274882
Zachary Turner [Fri, 8 Jul 2016 16:57:14 +0000 (16:57 +0000)]
Try to fix compilation error in DebugInfoPDBTests.
llvm-svn: 274881
Marshall Clow [Fri, 8 Jul 2016 16:54:47 +0000 (16:54 +0000)]
Implement LWG685 (which is from C++11!). Fixes PR#28421. Note: this (subtly) changes the return type of operator-(Iter1, Iter2) where Iter1 is a reverse iterator or a move_iterator, and Iter2 is some other move/reverse iterator type. In practice, I believe that almost every time the second param will be const_XXX and this will mean that the return type will be the same as it was before.
llvm-svn: 274880
NAKAMURA Takumi [Fri, 8 Jul 2016 16:52:36 +0000 (16:52 +0000)]
clang/unittests/Analysis/CFGTest.cpp: Appease msc targets with -fno-delayed-template-parsing.
llvm-svn: 274879
Zhan Jun Liau [Fri, 8 Jul 2016 16:50:02 +0000 (16:50 +0000)]
[SystemZ] Add support for the .word directive.
Summary: Branch off the work to add support for the .word directive,
using addAliasForDirective.
Reviewers: koriakin
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D22142
llvm-svn: 274878
Chad Rosier [Fri, 8 Jul 2016 16:48:40 +0000 (16:48 +0000)]
[DSE] Minor refactor based on D21007. NFC.
llvm-svn: 274877
Sanjay Patel [Fri, 8 Jul 2016 16:39:53 +0000 (16:39 +0000)]
add vector tests to show missing transform
llvm-svn: 274876
David Majnemer [Fri, 8 Jul 2016 16:39:00 +0000 (16:39 +0000)]
[CodeGen, TargetPassConfig] Remove a race from createRegAllocPass
The createRegAllocPass reads and writes to a global variable 'Registry'
via calls to getDefault and setDefault. Run this under a call_once to
avoid races.
llvm-svn: 274875
Matt Arsenault [Fri, 8 Jul 2016 16:29:11 +0000 (16:29 +0000)]
PeepholeOptimizer: Make pass name match DEBUG_TYPE
llvm-svn: 274874
Alina Sbirlea [Fri, 8 Jul 2016 16:28:54 +0000 (16:28 +0000)]
Add runtime support for __cpu_model (__builtin_cpu_supports)
Summary:
This aims to add support for __cpu_model and address Bug 25510. It uses
the code from lib/Support/Host.cpp for cpu detection, and creates
__cpu_model with that info.
Tested on OSX, it builts successfully, but the current version does
*not* resolve Bug 25510. The __cpu_model symbol is present in the
library but it only gets loaded with -all_load. This patch will not land
until this issue is clarified.
Built on Linux as well (though libgcc is the default). The use of "asm"
required -std=gnu99, hence the cmake change. Corrections on better
addressing this are welcome.
Note: See additional comments on D20988 (committed as r271921).
Reviewers: llvm-commits, joerg, echristo, mehdi_amini
Subscribers: mehdi_amini
Differential revision: http://reviews.llvm.org/D21033
llvm-svn: 274873
Alina Sbirlea [Fri, 8 Jul 2016 16:28:52 +0000 (16:28 +0000)]
Revert r274865-r274870
llvm-svn: 274872
John Brawn [Fri, 8 Jul 2016 16:20:57 +0000 (16:20 +0000)]
Explicitly export symbols from the sample analyzer plugin
This is done so that it will work when built using MSVC if
LLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON.
Differential Revision: http://reviews.llvm.org/D21971
llvm-svn: 274871
Alina Sbirlea [Fri, 8 Jul 2016 16:18:41 +0000 (16:18 +0000)]
Added comments identifing code source
llvm-svn: 274870
Zhan Jun Liau [Fri, 8 Jul 2016 16:18:40 +0000 (16:18 +0000)]
[SystemZ] Add support for missing instructions
Summary:
Add support to allow clang integrated assembler to recognize some
missing instructions, for openssl.
Instructions are:
LM, LMH, LMY, STM, STMH, STMY, ICM, ICMH, ICMY, SLA, SLAK, TML, TMH, EX, EXRL.
Reviewers: uweigand
Subscribers: koriakin, llvm-commits
Differential Revision: http://reviews.llvm.org/D22050
llvm-svn: 274869
Alina Sbirlea [Fri, 8 Jul 2016 16:18:39 +0000 (16:18 +0000)]
Check cpuid supported for i386.
Summary:
Reviewers:
Subscribers:
llvm-svn: 274868
Alina Sbirlea [Fri, 8 Jul 2016 16:18:38 +0000 (16:18 +0000)]
Add default initialization. Add unit test.
llvm-svn: 274867
Alina Sbirlea [Fri, 8 Jul 2016 16:18:36 +0000 (16:18 +0000)]
clang-format it
llvm-svn: 274866
Alina Sbirlea [Fri, 8 Jul 2016 16:18:34 +0000 (16:18 +0000)]
Add runtime support for __cpu_model (__builtin_cpu_supports)
Summary:
This aims to add support for __cpu_model and address Bug 25510. It uses the code from lib/Support/Host.cpp for cpu detection, and creates __cpu_model with that info.
Tested on OSX, it builts successfully, but the current version does *not* resolve Bug 25510. The __cpu_model symbol is present in the library but it only gets loaded with -all_load. This patch will not land until this issue is clarified.
Built on Linux as well (though libgcc is the default). The use of "asm" required -std=gnu99, hence the cmake change. Corrections on better addressing this are welcome.
Note: See additional comments on D20988 (committed as r271921).
Reviewers: llvm-commits, joerg, echristo, mehdi_amini
Subscribers: mehdi_amini
Differential Revision: http://reviews.llvm.org/D21033
llvm-svn: 274865
Sanjay Patel [Fri, 8 Jul 2016 16:11:48 +0000 (16:11 +0000)]
minimize tests
The cmp and load aren't required.
llvm-svn: 274864
Peter Smith [Fri, 8 Jul 2016 16:10:27 +0000 (16:10 +0000)]
Recommit R274836 Add Thunk support framework for ARM and Mips
The TinyPtrVector of const Thunk<ELFT>* in InputSections.h can cause
build failures on certain compiler/library combinations when Thunk<ELFT>
is not a complete type or is an abstract class. Fixed by making Thunk<ELFT>
non Abstract.
type or is an abstract class
llvm-svn: 274863
Eric Liu [Fri, 8 Jul 2016 16:09:51 +0000 (16:09 +0000)]
Move setName after accessing Name
llvm-svn: 274862
Eric Liu [Fri, 8 Jul 2016 16:09:48 +0000 (16:09 +0000)]
Make a std::string copy of StringRef Name so that it remains valid when the original Name is overridden.
Summary: lib/IR/AutoUpgrade.cpp:348 and lib/IR/AutoUpgrade.cpp:350 upset sanitizer.
Reviewers: bkramer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D22140
llvm-svn: 274861
Sanjay Patel [Fri, 8 Jul 2016 16:06:38 +0000 (16:06 +0000)]
regenerate checks
llvm-svn: 274860
Vassil Vassilev [Fri, 8 Jul 2016 16:04:22 +0000 (16:04 +0000)]
Don't crash when printing auto variables.
Patch by Axel Naumann!
llvm-svn: 274859
Alexey Bader [Fri, 8 Jul 2016 15:34:59 +0000 (15:34 +0000)]
[OpenCL] Fix access qualifiers handling for typedefs
OpenCL s6.6: "Access qualifier must be used with image object arguments
of kernels and of user-defined functions [...] If no qualifier is
provided, read_only is assumed".
This does not define the behavior for image types used in typedef
declaration, but following the spec logic, we should allow access
qualifiers specification in typedefs, e.g.:
typedef write_only image1d_t img1d_wo;
Unlike cv-qualifiers, user cannot add access qualifier to a typedef
type, i.e. this is not allowed:
typedef image1d_t img1d; // note: previously declared 'read_only' here
void foo(write_only img1d im) {} // error: multiple access qualifier
Patch by Andrew Savonichev.
Reviewers: Anastasia Stulova.
Differential revision: http://reviews.llvm.org/D20948
llvm-svn: 274858
Kwasi Mensah [Fri, 8 Jul 2016 15:34:28 +0000 (15:34 +0000)]
[libc++] Check hash before calling __hash_table key_eq function
Summary: The current implementations of __hash_table::find used by std::unordered_set/unordered_map call key_eq on each key that lands in the same bucket as the key you're looking for. However, since equal objects mush hash to the same value, you can short-circuit the possibly expensive call to key_eq by checking the hashes first.
Reviewers: EricWF
Subscribers: kmensah, cfe-commits
Differential Revision: http://reviews.llvm.org/D21510
llvm-svn: 274857
Chris Dewhurst [Fri, 8 Jul 2016 15:33:56 +0000 (15:33 +0000)]
[Sparc] Leon errata fix passes.
Errata fixes for various errata in different versions of the Leon variants of the Sparc 32 bit processor.
The nature of the errata are listed in the comments preceding the errata fix passes. Relevant unit tests are implemented for each of these.
Note: Running clang-format has changed a few other lines too, unrelated to the implemented errata fixes. These have been left in as this keeps the code formatting consistent.
Differential Revision: http://reviews.llvm.org/D21960
llvm-svn: 274856
Sjoerd Meijer [Fri, 8 Jul 2016 15:32:01 +0000 (15:32 +0000)]
Do not expand SDIV when compiling for minimum code size
Differential Revision: http://reviews.llvm.org/D22139
llvm-svn: 274855
Andrey Churbanov [Fri, 8 Jul 2016 15:23:35 +0000 (15:23 +0000)]
D22138: Added more Intel compiler versions as allowed build compilers
llvm-svn: 274854
Anna Thomas [Fri, 8 Jul 2016 15:18:56 +0000 (15:18 +0000)]
InstCombine rule to fold truncs whose value is available
We can fold truncs whose operand feeds from a load, if the trunc value
is available through a prior load/store.
This change is from: http://reviews.llvm.org/D21246, which folded the
trunc but missed the bitcast or ptrtoint/inttoptr required in the RAUW
call, when the load type didnt match the prior load/store type.
Differential Revision: http://reviews.llvm.org/D21791
llvm-svn: 274853
Valery Pykhtin [Fri, 8 Jul 2016 15:12:46 +0000 (15:12 +0000)]
[AMDGPU] fix ds_swizzle_b32 opcode for VI (bz 28371)
Differential Revision: http://reviews.llvm.org/D22049
llvm-svn: 274852
Andrey Churbanov [Fri, 8 Jul 2016 14:53:24 +0000 (14:53 +0000)]
D22137: Memory leak fixed by adding missed cleanup of single level array of hot teams info
llvm-svn: 274851
Andrey Churbanov [Fri, 8 Jul 2016 14:40:20 +0000 (14:40 +0000)]
D22136: Memory leaks fixed by adding missed __kmp_free() calls
llvm-svn: 274850
Andrey Churbanov [Fri, 8 Jul 2016 14:35:41 +0000 (14:35 +0000)]
D22135: formatting change
llvm-svn: 274849
Haojian Wu [Fri, 8 Jul 2016 14:28:43 +0000 (14:28 +0000)]
[include-fixer] Don't add qualifiers to symbols which have global scope operator.
Reviewers: bkramer
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D22127
llvm-svn: 274848
Sjoerd Meijer [Fri, 8 Jul 2016 14:17:09 +0000 (14:17 +0000)]
Addressing post-commit comments regarding not expanding UDIV;
we don't expand only when compiling for minimum code size.
llvm-svn: 274847
Simon Pilgrim [Fri, 8 Jul 2016 13:28:34 +0000 (13:28 +0000)]
[X86][SSE] Improve constant folding tests for CVTSD/CVTSS/CVTTSD/CVTTSS
As discussed on D22106, improve the testing for constant folding sse scalar conversion intrinsics to ensure we are correctly handling special/out of range cases
llvm-svn: 274846
Haojian Wu [Fri, 8 Jul 2016 13:11:38 +0000 (13:11 +0000)]
[include-fixer] Pull out Context implementation code to a cpp file.
llvm-svn: 274845
Sjoerd Meijer [Fri, 8 Jul 2016 12:54:43 +0000 (12:54 +0000)]
Code size optimisation: don't expand a div to a mul and and a shift sequence.
As a result, the urem instruction will not be expanded to a sequence of umull,
lsrs, muls and sub instructions, but just a call to __aeabi_uidivmod.
Differential Revision: http://reviews.llvm.org/D22131
llvm-svn: 274843