OSDN Git Service
David Majnemer [Wed, 23 Dec 2015 09:58:36 +0000 (09:58 +0000)]
[OperandBundles] Have DeadArgElim play nice with operand bundles
A call site's use of a Value might not correspond to an argument
operand but to a bundle operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256326
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Wed, 23 Dec 2015 08:06:50 +0000 (08:06 +0000)]
AVX512BW: Enable packed word shift for 512bit vector. Enable lowering scalar immidiate shift v64i8 .Fix predicate for AVX1/2 shifts.
Differential Revision: http://reviews.llvm.org/D15713
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256324
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 23 Dec 2015 03:59:04 +0000 (03:59 +0000)]
[WinEH] Don't visit the same catchswitch twice
We visited the same catchswitch twice because it was both the child of
another funclet and the predecessor of a cleanuppad.
Instead, change the numbering algorithm to only recurse if the unwind
destination of the inner funclet agrees with the unwind destination of
the catchswitch.
This fixes PR25926.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256317
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 23 Dec 2015 02:38:31 +0000 (02:38 +0000)]
win: Pass /W4 in front of all the -wd flags.
This should fix many many -Wunused-parameter warnings in self-host builds on
Windows after r255382. cl.exe doesn't care about the order of /W4 and
/wd flags, but clang-cl currently does (just like -Wno-foo -Wall order
matters for clang). We might want to change how clang-cl behaves in
the future, but until then this change makes self-host builds much more
silent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256315
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Wed, 23 Dec 2015 01:57:31 +0000 (01:57 +0000)]
Form reform for MCDwarf.
MCDwarf emits a canned abbreviation table, but was not emitting proper
forms for DWARF version 4, which is the default after r249655.
Differential Revision: http://reviews.llvm.org/D15732
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256313
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Wed, 23 Dec 2015 01:42:15 +0000 (01:42 +0000)]
[GC] Make GCStrategy::isGCManagedPointer a type predicate not a value predicate [NFC]
Reasons:
1) The existing form was a form of false generality. None of the implemented GCStrategies use anything other than a type. Its becoming more and more clear we're going to need some type of strong GC pointer in the type system and we shouldn't pretend otherwise at this point.
2) The API was awkward when applied to vectors-of-pointers. The old one could have been made to work, but calling isGCManagedPointer(Ty->getScalarType()) is much cleaner than the Value alternatives.
3) The rewriting implementation effectively assumes the type based predicate as well. We should be consistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256312
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 23 Dec 2015 01:04:53 +0000 (01:04 +0000)]
Unbreak LLVM_ENABLE_THREADS=OFF builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256308
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 23 Dec 2015 00:22:04 +0000 (00:22 +0000)]
[WebAssembly] Add a TODO comment for a possible future optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256306
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Jacob [Wed, 23 Dec 2015 00:19:45 +0000 (00:19 +0000)]
[RS4GC] Fix base pair printing for constants.
Previously, "%" + name of the value was printed for each derived and base
pointer. This is correct for instructions, but wrong for e.g. globals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256305
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 22 Dec 2015 23:57:37 +0000 (23:57 +0000)]
Provide a way to specify inliner's attribute compatibility and merging.
This reapplies r256277 with two changes:
- In emitFnAttrCompatCheck, change FuncName's type to std::string to fix
a use-after-free bug.
- Remove an unnecessary install-local target in lib/IR/Makefile.
Original commit message for r252949:
Provide a way to specify inliner's attribute compatibility and merging
rules using table-gen. NFC.
This commit adds new classes CompatRule and MergeRule to Attributes.td,
which are used to generate code to check attribute compatibility and
merge attributes of the caller and callee.
rdar://problem/
19836465
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256304
91177308-0d34-0410-b5e6-
96231b3b80d8
Cong Hou [Tue, 22 Dec 2015 23:45:55 +0000 (23:45 +0000)]
[BPI] Fix two potential divide-by-zero operations that are introduced in r256263.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256303
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 22 Dec 2015 23:45:49 +0000 (23:45 +0000)]
Disable use list order on the gold plugin.
It turns out that his is *really* slow. With this change the link of
clang with plugin-opt=emit-llvm goes from 41 to 26 seconds.
We can add an option to enable it again if needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256302
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 22 Dec 2015 23:45:21 +0000 (23:45 +0000)]
[WebAssembly] Trim unneeded #includes. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256301
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 22 Dec 2015 23:39:16 +0000 (23:39 +0000)]
[WebAssembly] Minor code simplification. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256300
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 22 Dec 2015 23:37:37 +0000 (23:37 +0000)]
Add an OperandNamespace field to Target.td's Operand.
For targets to add their own operand types as needed, as advertised in
Operand's comment, they need to be able to specify an alternate namespace
for OperandType names too. This matches the RegisterOperand class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256299
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 22 Dec 2015 23:12:41 +0000 (23:12 +0000)]
[unittest] Use Support/thread.h instead of <thread> (second try)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256292
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 22 Dec 2015 23:12:00 +0000 (23:12 +0000)]
lit: Limit number of processes on Windows to 32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256291
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 22 Dec 2015 23:09:08 +0000 (23:09 +0000)]
[unittest] Use Support/Thread.h instead of <thread> to fix the Windows build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256290
91177308-0d34-0410-b5e6-
96231b3b80d8
Changpeng Fang [Tue, 22 Dec 2015 20:55:23 +0000 (20:55 +0000)]
AMDGPU/SI: Use flat for global load/store when targeting HSA
Summary:
For some reason doing executing an MUBUF instruction with the addr64
bit set and a zero base pointer in the resource descriptor causes
the memory operation to be dropped when the shader is executed using
the HSA runtime.
This kind of MUBUF instruction is commonly used when the pointer is
stored in VGPRs. The base pointer field in the resource descriptor
is set to zero and and the pointer is stored in the vaddr field.
This patch resolves the issue by only using flat instructions for
global memory operations when targeting HSA. This is an overly
conservative fix as all other configurations of MUBUF instructions
appear to work.
NOTE: re-commit by fixing a failure in Codegen/AMDGPU/llvm.dbg.value.ll
Reviewers: tstellarAMD
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D15543
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256282
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 22 Dec 2015 20:43:30 +0000 (20:43 +0000)]
Also add unnamed_addr to functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256281
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 22 Dec 2015 20:29:09 +0000 (20:29 +0000)]
Revert r256277 and r256279.
Some of the bots failed again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256280
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 22 Dec 2015 20:06:50 +0000 (20:06 +0000)]
Add a .td file I forgot to add in r256277.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256279
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 22 Dec 2015 20:00:05 +0000 (20:00 +0000)]
Provide a way to specify inliner's attribute compatibility and merging.
This reapplies r252990 and r252949. I've added member function getKind
to the Attr classes which returns the enum or string of the attribute.
Original commit message for r252949:
Provide a way to specify inliner's attribute compatibility and merging
rules using table-gen. NFC.
This commit adds new classes CompatRule and MergeRule to Attributes.td,
which are used to generate code to check attribute compatibility and
merge attributes of the caller and callee.
rdar://problem/
19836465
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256277
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 22 Dec 2015 19:50:22 +0000 (19:50 +0000)]
Delete dead GlobalAliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256276
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 22 Dec 2015 19:46:44 +0000 (19:46 +0000)]
Revert "AMDGPU/SI: Use flat for global load/store when targeting HSA"
This reverts commit r256273.
It broke CodeGen/AMDGPU/llvm.dbg.value.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256275
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 22 Dec 2015 19:38:07 +0000 (19:38 +0000)]
Merge duplicated code.
The code for deleting dead global variables and functions was
duplicated.
This is in preparation for also deleting dead global aliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256274
91177308-0d34-0410-b5e6-
96231b3b80d8
Changpeng Fang [Tue, 22 Dec 2015 19:32:28 +0000 (19:32 +0000)]
AMDGPU/SI: Use flat for global load/store when targeting HSA
Summary:
For some reason doing executing an MUBUF instruction with the addr64
bit set and a zero base pointer in the resource descriptor causes
the memory operation to be dropped when the shader is executed using
the HSA runtime.
This kind of MUBUF instruction is commonly used when the pointer is
stored in VGPRs. The base pointer field in the resource descriptor
is set to zero and and the pointer is stored in the vaddr field.
This patch resolves the issue by only using flat instructions for
global memory operations when targeting HSA. This is an overly
conservative fix as all other configurations of MUBUF instructions
appear to work.
Reviewers: tstellarAMD
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D15543
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256273
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 22 Dec 2015 19:26:18 +0000 (19:26 +0000)]
Use early continue to reduce indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256272
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 22 Dec 2015 19:16:50 +0000 (19:16 +0000)]
Simplify iterator management. NFC.
Not passing an iterator to processGlobal will allow it to work with
other GlobalValues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256271
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Tue, 22 Dec 2015 18:59:02 +0000 (18:59 +0000)]
Add advice on choosing reviewers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256265
91177308-0d34-0410-b5e6-
96231b3b80d8
Cong Hou [Tue, 22 Dec 2015 18:56:14 +0000 (18:56 +0000)]
[BPI] Replace weights by probabilities in BPI.
This patch removes all weight-related interfaces from BPI and replace
them by probability versions. With this patch, we won't use edge weight
anymore in either IR or MC passes. Edge probabilitiy is a better
representation in terms of CFG update and validation.
Differential revision: http://reviews.llvm.org/D15519
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256263
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Jacob [Tue, 22 Dec 2015 18:44:45 +0000 (18:44 +0000)]
Remove deprecated llvm.experimental.gc.result.{int,float,ptr} intrinsics.
Summary:
These were deprecated 11 months ago when a generic
llvm.experimental.gc.result intrinsic, which works for all types, was added.
Reviewers: sanjoy, reames
Subscribers: sanjoy, chenli, llvm-commits
Differential Revision: http://reviews.llvm.org/D15719
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256262
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 22 Dec 2015 17:36:17 +0000 (17:36 +0000)]
[Support] Allow multiple paired calls to {start,stop}Timer()
Differential Revision: http://reviews.llvm.org/D15619
Reviewed-by: rafael
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256258
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Jacob [Tue, 22 Dec 2015 16:50:44 +0000 (16:50 +0000)]
[RS4GC] Fix crash in the case that a live variable has a constant base.
Summary:
Previously, RS4GC crashed in CreateGCRelocates() because it assumed
that every base is also in the array of live variables, which isn't true if a
live variable has a constant base.
This change fixes the crash by making sure CreateGCRelocates() won't try to
relocate a live variable with a constant base. This would be unnecessary
anyway because anything with a constant base won't move.
Reviewers: reames
Subscribers: llvm-commits, sanjoy
Differential Revision: http://reviews.llvm.org/D15556
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256252
91177308-0d34-0410-b5e6-
96231b3b80d8
Jun Bum Lim [Tue, 22 Dec 2015 16:36:16 +0000 (16:36 +0000)]
[AArch64] Promote loads from stored
This is a recommit of r256004 which was reverted in r256160. The issue was the
incorrect promotion for half and byte loads transformed into mov instructions.
This fix will replace half and byte type loads only with bit field extracts.
Original commit message:
This change promotes load instructions which directly read from stored by
replacing them with mov instructions. If the store is wider than the load,
the load will be replaced with a bitfield extract.
For example :
STRWui %W1, %X0, 1
%W0 = LDRHHui %X0, 3
becomes
STRWui %W1, %X0, 1
%W0 = UBFMWri %W1, 16, 31
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256249
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 22 Dec 2015 15:06:47 +0000 (15:06 +0000)]
Typo. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256242
91177308-0d34-0410-b5e6-
96231b3b80d8
Asaf Badouh [Tue, 22 Dec 2015 11:40:04 +0000 (11:40 +0000)]
[X86][AVX512] Add rcp14 and rsqrt14 intrinsics
Differential Revision: http://reviews.llvm.org/D15414
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256237
91177308-0d34-0410-b5e6-
96231b3b80d8
Keno Fischer [Tue, 22 Dec 2015 07:14:50 +0000 (07:14 +0000)]
[ASMPrinter] Fix missing handling of DW_OP_bit_piece
In r256077, I added printing for DIExpressions in DEBUG_VALUE comments,
but neglected to handle DW_OP_bit_piece operands. Thanks to
Mikael Holmen and Joerg Sonnenberger for spotting this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256236
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 22 Dec 2015 01:50:51 +0000 (01:50 +0000)]
[libFuzzer] add AFL-style dictionary for C++, remove the old file with tokens
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256229
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 22 Dec 2015 01:39:04 +0000 (01:39 +0000)]
[MC] Don't use the architecture to govern which object file format to use
InitMCObjectFileInfo was trying to override the triple in awkward ways.
For example, a triple specifying COFF but not Windows was forced as ELF.
This makes it easy for internal invariants to get violated, such as
those which triggered PR25912.
This fixes PR25912.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256226
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 22 Dec 2015 01:18:49 +0000 (01:18 +0000)]
Partial fix for PR25912, see comment 13. Should fix the sanitizer bootstrap bot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256225
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Tue, 22 Dec 2015 01:17:19 +0000 (01:17 +0000)]
Handle empty Subprogram list when linking metadata.
Use an iterator that handles an empty subprogram list.
Fixes PR25915.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256224
91177308-0d34-0410-b5e6-
96231b3b80d8
Easwaran Raman [Tue, 22 Dec 2015 00:32:35 +0000 (00:32 +0000)]
Determine callee's hotness and adjust threshold based on that. NFC.
This uses the same criteria used in CFE's CodeGenPGO to identify hot and cold
callees and uses values of inlinehint-threshold and inlinecold-threshold
respectively as the thresholds for such callees.
Differential Revision: http://reviews.llvm.org/D15245
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256222
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Tue, 22 Dec 2015 00:13:11 +0000 (00:13 +0000)]
[safestack] Add option for non-TLS unsafe stack pointer.
This patch adds an option, -safe-stack-no-tls, for using normal
storage instead of thread-local storage for the unsafe stack pointer.
This can be useful when SafeStack is applied to an operating system
kernel.
http://reviews.llvm.org/D15673
Patch by Michael LeMay.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256221
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Tue, 22 Dec 2015 00:11:15 +0000 (00:11 +0000)]
[PGO] Fix another comdat related issue for COFF
The linker requires that a comdat section must be associated
with a another comdat section that precedes it. This
means the comdat section's name needs to use the profile name
var's name.
Patch tested by Johan Engelen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256220
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Mon, 21 Dec 2015 23:41:38 +0000 (23:41 +0000)]
[Support] Timer: Use emplace_back() and range-based loops (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256217
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Mon, 21 Dec 2015 23:27:44 +0000 (23:27 +0000)]
[Support] Timer: simplify the init() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256215
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Mon, 21 Dec 2015 23:13:15 +0000 (23:13 +0000)]
[AVR] Added configuration file and machine function information class
This commit adds the 'AVRMachineFunctionInfo' class, which simply stores
basic properties about generated machine functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256213
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 21 Dec 2015 23:04:27 +0000 (23:04 +0000)]
Fix line endings after r256155. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256211
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Mon, 21 Dec 2015 22:26:49 +0000 (22:26 +0000)]
Fix test case comment (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256206
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Mon, 21 Dec 2015 22:14:04 +0000 (22:14 +0000)]
[cfi] Fix LowerBitSets on 32-bit targets.
This code attempts to truncate IntPtrTy to i32, which may be the same
type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256205
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 21 Dec 2015 22:09:27 +0000 (22:09 +0000)]
[MC, COFF] Support link /incremental conditionally
Today, we always take into account the possibility that object files
produced by MC may be consumed by an incremental linker. This results
in us initialing fields which vary with time (TimeDateStamp) which harms
hermetic builds (e.g. verifying a self-host went well) and produces
sub-optimal code because we cannot assume anything about the relative
position of functions within a section (call sites can get redirected
through incremental linker thunks).
Let's provide an MCTargetOption which controls this behavior so that we
can disable this functionality if we know a-priori that the build will
not rely on /incremental.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256203
91177308-0d34-0410-b5e6-
96231b3b80d8
Jun Bum Lim [Mon, 21 Dec 2015 22:00:51 +0000 (22:00 +0000)]
Enhance BranchProbabilityInfo::calcUnreachableHeuristics for InvokeInst
This is recommit of r256028 with minor fixes in unittests:
CodeGen/Mips/eh.ll
CodeGen/Mips/insn-zero-size-bb.ll
Original commit message:
When identifying blocks post-dominated by an unreachable-terminated block
in BranchProbabilityInfo, consider only the edge to the normal destination
block if the terminator is InvokeInst and let calcInvokeHeuristics() decide
edge weights for the InvokeInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256202
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Mon, 21 Dec 2015 21:52:27 +0000 (21:52 +0000)]
Resubmit r256193 with test fix: assertion failure analyzed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256201
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Mon, 21 Dec 2015 21:00:33 +0000 (21:00 +0000)]
Revert r256193: build bot failure triggered
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256198
91177308-0d34-0410-b5e6-
96231b3b80d8
Cong Hou [Mon, 21 Dec 2015 20:42:43 +0000 (20:42 +0000)]
[X86][SSE] Transform truncations between vectors of integers into X86ISD::PACKUS/PACKSS operations during DAG combine.
This patch transforms truncation between vectors of integers into
X86ISD::PACKUS/PACKSS operations during DAG combine. We don't do it in
lowering phase because after type legalization, the original truncation
will be turned into a BUILD_VECTOR with each element that is extracted
from a vector and then truncated, and from them it is difficult to do
this optimization. This greatly improves the performance of truncations
on some specific types.
Cost table is updated accordingly.
Differential revision: http://reviews.llvm.org/D14588
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256194
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Mon, 21 Dec 2015 20:41:20 +0000 (20:41 +0000)]
[PGO] Fix profile var comdat generation problem with COFF
When targeting COFF, it is required that a comdat section to
have a global obj with the same name as the comdat (except for
comdats with select kind to be associative). This fix makes
sure that the comdat is keyed on the data variable for COFF.
Also improved test coverage for this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256193
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Mon, 21 Dec 2015 20:38:18 +0000 (20:38 +0000)]
[ValueTracking] Properly handle non-sized types in isAligned function.
Reviewers: apilipenko, reames, sanjoy, hfinkel
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D15597
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256192
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 21 Dec 2015 20:03:00 +0000 (20:03 +0000)]
Fix PR24563 (LiveDebugVariables unconditionally propagates all DBG_VALUEs)
LiveDebugVariables unconditionally propagates all DBG_VALUE down the
dominator tree, which happens to work fine if there already is another
DBG_VALUE or the DBG_VALUE happends to describe a single-assignment vreg
but is otherwise wrong if the DBG_VALUE is coming from only one of the
predecessors.
In r255759 we introduced a proper data flow analysis scheduled after
LiveDebugVariables that correctly propagates DBG_VALUEs across basic block
boundaries. With the new pass in place, the incorrect propagation in
LiveDebugVariables can be retired witout loosing any of the benefits
where LiveDebugVariables happened to do the right thing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256188
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 21 Dec 2015 19:44:42 +0000 (19:44 +0000)]
Convert the CodeGen/ARM/sched-it-debug-nodes.ll testcase from IR -> MIR.
NFC
PR24563
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256187
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 21 Dec 2015 19:25:03 +0000 (19:25 +0000)]
Teach ARMLoadStoreOptimizer to ignore DBG_VALUE instructions when merging
instructions.
As noted in PR24563.
rdar://problem/
23963293
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256183
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 21 Dec 2015 19:09:01 +0000 (19:09 +0000)]
fix leak in a test, make the sanitizer bot green
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256179
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 21 Dec 2015 18:44:27 +0000 (18:44 +0000)]
AMDGPU/SI: Fix encoding for FLAT_SCRATCH registers on VI
Summary:
These register has different encodings on CI and VI, so we add pseudo
FLAT_SCRACTH registers to be used before MC, and subtarget specific
registers to be used by the MC layer.
Reviewers: arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D15661
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256178
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 21 Dec 2015 18:44:21 +0000 (18:44 +0000)]
AMDGPU/SI: Change assembly name for flat scratch registers to flat_scratch
This matches what the assembler accepts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256177
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Simpson [Mon, 21 Dec 2015 18:31:25 +0000 (18:31 +0000)]
[AArch64] Add additional extract-extend patterns for smov
This patch adds to the target description two additional patterns for matching
extract-extend operations to SMOV. The patterns catch the v16i8-to-i64 and
v8i16-to-i64 cases. The existing patterns miss these cases because the
extracted elements must first be legalized to i32, resulting in any_extend
nodes.
This was originally implemented as a DAG combine (r255895), but was reverted
due to failing out-of-tree tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256176
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Mon, 21 Dec 2015 18:24:35 +0000 (18:24 +0000)]
Add testcase for r256161 (PR25907)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256174
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 21 Dec 2015 18:08:05 +0000 (18:08 +0000)]
Remove extra whitespace. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256173
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Mon, 21 Dec 2015 17:33:24 +0000 (17:33 +0000)]
[ThinLTO] Rename variable to reflect bulk importing change (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256171
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 21 Dec 2015 17:22:02 +0000 (17:22 +0000)]
[WebAssembly] Convert a regular for loop to a range-based for loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256169
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 21 Dec 2015 17:19:31 +0000 (17:19 +0000)]
[WebAssembly] Clean up comments and fix a missing #include dependency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256168
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 21 Dec 2015 17:12:40 +0000 (17:12 +0000)]
[WebAssembly] Remove an unneeded empty destructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256167
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 21 Dec 2015 16:58:49 +0000 (16:58 +0000)]
[WebAssembly] Enclose the operand variables for load and store instructions in braces.
This allows the AsmMatcherEmitter to properly tokenize the AsmStrings for
load and store instructions. This is a step towards asm parsing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256166
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 21 Dec 2015 16:53:29 +0000 (16:53 +0000)]
[WebAssembly] Mark the ARGUMENT pseudo-instructions as CodeGenOnly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256165
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 21 Dec 2015 16:50:41 +0000 (16:50 +0000)]
[WebAssembly] Add some comments and make some minor source cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256164
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 21 Dec 2015 16:47:10 +0000 (16:47 +0000)]
Teach MCOperand::print how to print FPImm operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256163
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Mon, 21 Dec 2015 15:49:59 +0000 (15:49 +0000)]
Remove unused functions from ModuleLinker (NFC)
Remove a couple ModuleLinker methods and a related static function that
are no longer used after the linker split.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256162
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Mon, 21 Dec 2015 15:38:13 +0000 (15:38 +0000)]
Remove overly strict new assert in BitcodeReader.
This fixes a bug introduced by the ThinLTO metadata linking patch
r255909. The assert is overly-strict and while useful in development of
the patch, doesn't seem interesting to keep.
Fixes PR25907.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256161
91177308-0d34-0410-b5e6-
96231b3b80d8
Jun Bum Lim [Mon, 21 Dec 2015 15:36:49 +0000 (15:36 +0000)]
Revert "[AArch64] Promote loads from stores"
This reverts commit r256004 due to a failure in cortex-a53.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256160
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 21 Dec 2015 14:49:32 +0000 (14:49 +0000)]
[LIR] Refactor code to enable future patch. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256159
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 21 Dec 2015 14:43:45 +0000 (14:43 +0000)]
[AArch64] Enable PostRAScheduler for AArch64 generic build.
Disable post-ra scheduler for perturbed tests to appease the bots and to
preserve the history of the tests.
http://reviews.llvm.org/D15652
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256158
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Mon, 21 Dec 2015 14:40:36 +0000 (14:40 +0000)]
AVX512BW: Enable AND/OR/XOR vector byte/word paked operation by promoting to qword that natively suppored.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256157
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 21 Dec 2015 14:10:54 +0000 (14:10 +0000)]
[llvm-objdump] Use appropriate helper. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256156
91177308-0d34-0410-b5e6-
96231b3b80d8
Amjad Aboud [Mon, 21 Dec 2015 14:07:14 +0000 (14:07 +0000)]
Implemented Support of IA interrupt and exception handlers:
http://lists.llvm.org/pipermail/cfe-dev/2015-September/045171.html
Differential Revision: http://reviews.llvm.org/D15567
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256155
91177308-0d34-0410-b5e6-
96231b3b80d8
Zlatko Buljan [Mon, 21 Dec 2015 13:08:58 +0000 (13:08 +0000)]
[mips][microMIPS] Implement DERET and DI instructions and check size operand for EXT and DEXT* instructions
Differential Revision: http://reviews.llvm.org/D15570
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256152
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 21 Dec 2015 08:46:12 +0000 (08:46 +0000)]
check-llvm: Tweak the feature "timestamps" for autoconf.
Note, ENABLE_TIMESTAMPS is either 1 or 0 in Makefile.config.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256138
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 21 Dec 2015 08:03:07 +0000 (08:03 +0000)]
[MC, COFF] Unbreak support for COFF timestamps
Support for COFF timestamps was unintentionally broken in r246905 when
it was conditionally available depending on whether or not LLVM was
configured with LLVM_ENABLE_TIMESTAMPS. However, Config/config.h was
never included which essentially broke the feature. Due to lax testing,
the breakage was never identified until we observed strange failures
during incremental links of Chromium.
This issue is resolved by simply including Config/config.h in
WinCOFFObjectWriter and teaching lit that the MC/COFF/timestamp.s test
is conditionally supported depending on LLVM_ENABLE_TIMESTAMPS. With
this in place, we can strengthen the test to ensure that it will not
accidentally get broken in the future.
This fixes PR25891.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256137
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 21 Dec 2015 02:37:23 +0000 (02:37 +0000)]
[Cygwin] Enable TLS as emutls.
It resolves clang selfhosting with std::once() for Cygwin.
FIXME: It may be EmulatedTLS-generic also for X86-Android.
FIXME: Pass EmulatedTLS to LLVM CodeGen from Clang with -femulated-tls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256134
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Jacob [Mon, 21 Dec 2015 01:26:46 +0000 (01:26 +0000)]
[RS4GC] Add an assert which fails if there is a (yet unsupported) addrspacecast.
The slightly strange indentation comes from clang-format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256132
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 21 Dec 2015 01:02:28 +0000 (01:02 +0000)]
[InstCombine] Fix indentation. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256131
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Sun, 20 Dec 2015 23:17:44 +0000 (23:17 +0000)]
[AVR] Added AVRCallingConv.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256130
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 20 Dec 2015 18:41:57 +0000 (18:41 +0000)]
[X86] Use range-based for loop. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256127
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 20 Dec 2015 18:41:54 +0000 (18:41 +0000)]
[X86] Prevent constant hoisting for a couple compare immediates that the selection DAG knows how to optimize into a shift.
This allows "icmp ugt %a,
4294967295" and "icmp uge %a,
4294967296" to be optimized into right shifts by 32 which can fold the immediate into the shift instruction. These patterns show up with some regularity in real code.
Unfortunately, since getImmCost can't see the icmp predicate we can't be tell if we're only catching these specific cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256126
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Sun, 20 Dec 2015 12:16:20 +0000 (12:16 +0000)]
Add AVR.td and AVRRegisterInfo.td
Summary:
This adds the core AVR TableGen file, along with the register descriptions.
Lines in AVR.td which require other TableGen files which haven't been committed
yet are commented out.
This is a fairly trivial patch, and should only require a quick review.
I kept the line width smaller than 80 columns, but there are a few exceptions
because I'm not sure how to split a string over several lines.
Reviewers: stoklund
Subscribers: dylanmckay, agnat
Differential Revision: http://reviews.llvm.org/D14684
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256120
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Sun, 20 Dec 2015 09:54:34 +0000 (09:54 +0000)]
[llvm-objdump] Move COFF function to where it belongs.
Ideally much more stuff should be moved out of llvm-objdump.cpp, but that
will happen later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256118
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Sun, 20 Dec 2015 08:49:31 +0000 (08:49 +0000)]
Fix a bug in test case -- duplicate entries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256117
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Sun, 20 Dec 2015 08:46:18 +0000 (08:46 +0000)]
Fix a latent UAF bug in profwriter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256116
91177308-0d34-0410-b5e6-
96231b3b80d8
Weiming Zhao [Sun, 20 Dec 2015 06:41:44 +0000 (06:41 +0000)]
Fix mapping of @llvm.arm.ssat/usat intrinsics to ssat/usat instructions for Thumb2
Summary:
r250697 fixed the mapping for ARM mode. We have to do the same for Thumb2 otherwise the same llvm.arm.ssat() will generate different saturating amount for ARM and Thumb.
r250697: http://reviews.llvm.org/rL250697
Reviewers: rmaprath
Subscribers: aemerson, llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D15653
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256115
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Sun, 20 Dec 2015 06:22:13 +0000 (06:22 +0000)]
[PGO] Improve Indexed Profile Reader efficiency
With the support of value profiling added, the Indexed prof
reader gets less efficient. The prof reader initialization
used to be just reading the file header, but with VP support
added, initialization needs to walk through all profile keys
of ondisk hash table resulting in very poor locality and large
memory increase (keys are stored together with the profile data
in the mapped profile buffer). Even worse, when the reader is
used by the compiler (not llvm-profdata too), the penalty becomes
very high as compilation of each single module requires touching
profile data buffer for the whole program.
In this patch, the icall target values (MD5hash) are no longer eargerly
converted back to name strings when the data is read into memory. New
interface is added to to profile reader so that InstrProfSymtab can be
lazily created for Indexed profile reader on-demand. Creating of the
symtab is intended to be used by llvm-profdata tool for symbolic dumping
of VP data. It can be used with compiler (for legacy out of tree uses)
too but not recommended due to compile time and memory reasons
mentioned above.
Some other cleanups are also included: Function Addr to md5 map is now
consolated into InstrProfSymtab. InstrProfStringtab is no longer used and
eliminated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256114
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Sun, 20 Dec 2015 05:15:45 +0000 (05:15 +0000)]
Minor clean up -- move large single use method out of header(NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256113
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 20 Dec 2015 03:48:23 +0000 (03:48 +0000)]
Revert r219171, "llvm/test/lit.cfg: Suppress dwarf stuff for targeting x86_64-mingw32 while investigating since r219108."
It has been fixed since r219280 by David Majnemer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256112
91177308-0d34-0410-b5e6-
96231b3b80d8