OSDN Git Service
Matthew Simpson [Thu, 21 Jan 2016 17:17:20 +0000 (17:17 +0000)]
Revert "[SLP] Truncate expressions to minimum required bit width"
This reverts commit r258404.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258408
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Thu, 21 Jan 2016 17:16:53 +0000 (17:16 +0000)]
Use early return to simplify code (NFC)
Follow on to r258405.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258407
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Thu, 21 Jan 2016 17:04:42 +0000 (17:04 +0000)]
[GCOV] Avoid emitting profile arcs for module and skeleton CUs
Do not emit profile arc files and note files for module and skeleton
CU's.
Our users report seeing unexpected *.gcda and *.gcno files in their
projects when using gcov-style profiling with modules or frameworks.
The unwanted files come from these modules. This is not very helpful
for end-users. Further, we've seen reports of instrumented programs
crashing while writing these files out (due to I/O failures).
rdar://problem/
22838296
Reviewed-by: aprantl
Differential Revision: http://reviews.llvm.org/D15997
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258406
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Thu, 21 Jan 2016 16:46:40 +0000 (16:46 +0000)]
[ThinLTO] Avoid unnecesary hash lookups during metadata linking (NFC)
Replace sequences of count() followed by operator[] with either
find() or insert(), depending on the context.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258405
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Simpson [Thu, 21 Jan 2016 16:31:55 +0000 (16:31 +0000)]
[SLP] Truncate expressions to minimum required bit width
This change attempts to produce vectorized integer expressions in bit widths
that are narrower than their scalar counterparts. The need for demotion arises
especially on architectures in which the small integer types (e.g., i8 and i16)
are not legal for scalar operations but can still be used in vectors. Like
similar work done within the loop vectorizer, we rely on InstCombine to perform
the actual type-shrinking. We use the DemandedBits analysis and
ComputeNumSignBits from ValueTracking to determine the minimum required bit
width of an expression.
Differential revision: http://reviews.llvm.org/D15815
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258404
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Egerton [Thu, 21 Jan 2016 15:11:01 +0000 (15:11 +0000)]
[mips] Allowed dla instructions on 32-bit architectures.
Summary:
This is now the same as the behaviour of the GNU assembler. This was done
as it is required in order to build the Linux kernel with the integrated
assembler enabled.
Reviewers: dsanders, vkalintiris
Subscribers: dsanders, llvm-commits
Differential Revision: http://reviews.llvm.org/D13594
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258400
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Thu, 21 Jan 2016 14:28:52 +0000 (14:28 +0000)]
Revert obsolete llvm-link -preserve-modules option/test
This testing mode is now obsolete with the change to linkInModule
to take a std::unique_ptr to Module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258399
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Thu, 21 Jan 2016 14:18:11 +0000 (14:18 +0000)]
AVX512: Masked move intrinsic implementation.
Implemented intrinsic for the follow instructions (reg move) : VMOVDQU8/16, VMOVDQA32/64, VMOVAPS/PD.
Differential Revision: http://reviews.llvm.org/D16316
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258398
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Thu, 21 Jan 2016 13:36:01 +0000 (13:36 +0000)]
[AVX512] Adding VPERMT2B and VPERMI2B Intrinsics
Differential Revision: http://reviews.llvm.org/D16398
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258397
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 21 Jan 2016 12:45:17 +0000 (12:45 +0000)]
PR26172: unnecessary indirection in HexagonCopyToCombine.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258395
91177308-0d34-0410-b5e6-
96231b3b80d8
Marina Yatsina [Thu, 21 Jan 2016 11:37:06 +0000 (11:37 +0000)]
[X86] - Removing warning on legal cases caused by commit r258132
There's an overloading of the "movsd" and "cmpsd" instructions, e.g. movsd can be either "Move Data from String to String" or "Move or Merge Scalar Double-Precision Floating-Point Value".
The former should produce warnings when parsing a memory operand that is not ESI/EDI, but the latter should not.
Fixed the code to produce warnings only after making sure we're dealing with the first case.
Expanded the tests of the produced warnings + fixed RUN line of the test so that it would check both stdout and stderr
Differential Revision: http://reviews.llvm.org/D16359
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258393
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Jacob [Thu, 21 Jan 2016 06:33:22 +0000 (06:33 +0000)]
Change ConstantFoldInstOperands to take Instruction instead of opcode and type. NFC.
Summary:
The previous form, taking opcode and type, is moved to an internal
helper and the new form, taking an instruction, is a wrapper around this
helper.
Although this is a slight cleanup on its own, the main motivation is to
refactor the constant folding API to ease migration to opaque pointers.
This will be follow-up work.
Reviewers: eddyb
Subscribers: dblaikie, llvm-commits
Differential Revision: http://reviews.llvm.org/D16383
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258391
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Jacob [Thu, 21 Jan 2016 06:31:08 +0000 (06:31 +0000)]
Introduce ConstantFoldCastOperand function and migrate some callers of ConstantFoldInstOperands to use it. NFC.
Summary:
Although this is a slight cleanup on its own, the main motivation is to
refactor the constant folding API to ease migration to opaque pointers.
This will be follow-up work.
Reviewers: eddyb
Subscribers: zzheng, dblaikie, llvm-commits
Differential Revision: http://reviews.llvm.org/D16380
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258390
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Jacob [Thu, 21 Jan 2016 06:26:35 +0000 (06:26 +0000)]
Introduce ConstantFoldBinaryOpOperands function and migrate some callers of ConstantFoldInstOperands to use it. NFC.
Summary:
Although this is a slight cleanup on its own, the main motivation is to
refactor the constant folding API to ease migration to opaque pointers.
This will be follow-up work.
Reviewers: eddyb
Subscribers: dblaikie, llvm-commits
Differential Revision: http://reviews.llvm.org/D16378
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258389
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 21 Jan 2016 04:28:34 +0000 (04:28 +0000)]
AMDGPU/SI: Pass whether to use the SI scheduler via Target Attribute
Summary:
Currently the SI scheduler can be selected via command line option,
but it turned out it would be better if it was selectable via a Target Attribute.
This patch adds "si-scheduler" attribute to the backend.
Reviewers: tstellarAMD, echristo
Subscribers: echristo, arsenm
Differential Revision: http://reviews.llvm.org/D16192
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258386
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Thu, 21 Jan 2016 02:35:59 +0000 (02:35 +0000)]
re-submit test case (withright format-version)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258384
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Wilkins [Thu, 21 Jan 2016 02:33:39 +0000 (02:33 +0000)]
llvm-go: call llvm-config with components
Summary:
Add components back into calls to llvm-config,
which was accidentally removed in r258283.
Reviewers: pcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16392
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258383
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 21 Jan 2016 01:59:03 +0000 (01:59 +0000)]
Rename MCLineEntry to MCDwarfLineEntry
MCLineEntry gives the impression that it is generic MC machinery.
However, it is specific to DWARF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258381
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 21 Jan 2016 01:52:14 +0000 (01:52 +0000)]
[libFuzzer] don't use std::vector in one more hot path
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258380
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Wilkins [Thu, 21 Jan 2016 01:41:03 +0000 (01:41 +0000)]
[GlobalISel] make library an optional component
Summary:
Mark the LLVMGlobalISel library as optional in
LLVMBuild.txt, since the library is only built
if LLVM_BUILD_GLOBAL_ISEL is set. Without doing
this, llvm-config includes the library in the
list of components regardless of whether it's
built, and then will error out when asked for
the library names/paths.
Reviewers: qcolombet
Subscribers: joker.eph, llvm-commits, vkalintiris
Differential Revision: http://reviews.llvm.org/D16386
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258379
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 21 Jan 2016 01:37:18 +0000 (01:37 +0000)]
[GlobalISel] Move generic opcodes description to their own file.
Differential Revision: http://reviews.llvm.org/D16384
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258378
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Thu, 21 Jan 2016 01:21:00 +0000 (01:21 +0000)]
Revert 258376 -- wrong version
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258377
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Thu, 21 Jan 2016 00:57:42 +0000 (00:57 +0000)]
[Coverage] Add a test case for comdat
The binary contains two (merged) covmap sections which
have duplicate CovMapRecords from comdat (template instantation).
This test makes sure the reader reads it properly. It also
tests that the coverage data from different instantiations
of the same template function are properly merged in show
output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258376
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Aizatsky [Thu, 21 Jan 2016 00:02:09 +0000 (00:02 +0000)]
[libfuzzer] use %p for printing addresses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258370
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 21 Jan 2016 00:00:53 +0000 (00:00 +0000)]
Remove redundant argument.
It is already a member variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258369
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 20 Jan 2016 23:21:14 +0000 (23:21 +0000)]
[readobj] Print CodeOffset first, it's easier to read
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258368
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Jan 2016 23:16:59 +0000 (23:16 +0000)]
[SelectionDAG] Fix constant offset folding to avoid commuting non-commutative operators.
This fixes a miscompile in MultiSource/Benchmarks/MiBench/consumer-lame
introduced in r258296.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258366
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 20 Jan 2016 23:08:32 +0000 (23:08 +0000)]
MachineScheduler: Add a command line option to disable post scheduler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258364
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 20 Jan 2016 22:38:25 +0000 (22:38 +0000)]
MachineScheduler: Honor optnone functions in the pre-ra scheduler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258363
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 20 Jan 2016 22:38:23 +0000 (22:38 +0000)]
Simplify the logic. NFC.
Found while reviewing the change for PR26152.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258362
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Jacob [Wed, 20 Jan 2016 22:27:06 +0000 (22:27 +0000)]
Run clang-format over ConstantFolding.h, fixing inconsistent indentation. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258361
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 20 Jan 2016 22:24:38 +0000 (22:24 +0000)]
don't repeat function names in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258360
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 20 Jan 2016 22:24:26 +0000 (22:24 +0000)]
Orc: Simplify lambda by using std::set's initializer_list ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258359
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 20 Jan 2016 22:16:14 +0000 (22:16 +0000)]
[Orc] Try to turn Orc execution unit tests back on for Linux.
The fix in r258324 (plus r258354) should allow Orc execution tests to run on
Linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258358
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Wed, 20 Jan 2016 22:15:23 +0000 (22:15 +0000)]
Fix typo in an error string. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258357
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Wed, 20 Jan 2016 22:05:50 +0000 (22:05 +0000)]
Fix PR26152.
Fix the condition for when the new global takes over the name of
the existing one to be the negation of the condition for the new
global to get internal linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258355
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Wed, 20 Jan 2016 22:02:07 +0000 (22:02 +0000)]
Fix build warning.
error: field 'CCMgr' will be initialized after field 'IndirectStubsMgr' [-Werror,-Wreorder]
: DL(TM.createDataLayout()), CCMgr(std::move(CCMgr)),
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258354
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 20 Jan 2016 21:48:24 +0000 (21:48 +0000)]
AMDGPU/SI: Promote i1 SETCC operations
Summary:
While working on uniform branching, I've hit a few cases where we emit
i1 SETCC operations.
Reviewers: arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D16233
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258352
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 20 Jan 2016 21:22:21 +0000 (21:22 +0000)]
AMDGPU: Fix old comments that mention AMDIL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258350
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 20 Jan 2016 21:05:53 +0000 (21:05 +0000)]
AMDGPU: Remove AMDGPU.trunc intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258348
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 20 Jan 2016 21:05:49 +0000 (21:05 +0000)]
AMDGPU: Remove AMDIL.fraction intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258347
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 20 Jan 2016 21:05:40 +0000 (21:05 +0000)]
AMDGPU: Remove AMDIL.round.nearest intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258346
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Wed, 20 Jan 2016 20:58:56 +0000 (20:58 +0000)]
[GlobalISel] Add the proper cmake plumbing.
This patch adds the necessary plumbing to cmake to build the sources related to
GlobalISel.
To build the sources related to GlobalISel, we need to add -DBUILD_GLOBAL_ISEL=ON.
By default, this is OFF, thus GlobalISel sources will not impact people that do
not explicitly opt-in.
Differential Revision: http://reviews.llvm.org/D15983
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258344
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 20 Jan 2016 20:58:29 +0000 (20:58 +0000)]
AMDGPU: Remove abs intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258343
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 20 Jan 2016 20:50:19 +0000 (20:50 +0000)]
AMDGPU: Remove min/max intrinsics
This removes support for mesa 11.0.x
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258342
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 20 Jan 2016 19:50:25 +0000 (19:50 +0000)]
Add a "gc-transition" operand bundle
Summary:
This adds a new kind of operand bundle to LLVM denoted by the
`"gc-transition"` tag. Inputs to `"gc-transition"` operand bundle are
lowered into the "transition args" section of `gc.statepoint` by
`RewriteStatepointsForGC`.
This removes the last bit of functionality that was unsupported in the
deopt bundle based code path in `RewriteStatepointsForGC`.
Reviewers: pgavlin, JosephTremoulet, reames
Subscribers: sanjoy, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D16342
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258338
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Wed, 20 Jan 2016 19:15:18 +0000 (19:15 +0000)]
[llvm-readobj][ELF] Teach llvm-readobj to show arch specific ELF section's flags
Some architecture specific ELF section flags might have the same value
(for example SHF_X86_64_LARGE and SHF_HEX_GPREL) and we have to check
machine architectures to select an appropriate set of possible flags.
The patch selects architecture specific flags into separate arrays
`ElfxxxSectionFlags` and combines `ElfSectionFlags` and `ElfxxxSectionFlags`
before pass to the `StreamWriter::printFlags()` method.
Differential Revision: http://reviews.llvm.org/D16269
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258334
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Wed, 20 Jan 2016 19:14:55 +0000 (19:14 +0000)]
[GlobalISel] Add a generic machine opcode for ADD.
The selection process being split into separate passes, we need generic opcodes
to translate the LLVM IR to target independent code.
This patch adds an opcode for addition: G_ADD.
Differential Revision: http://reviews.llvm.org/D15472
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258333
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 20 Jan 2016 18:59:48 +0000 (18:59 +0000)]
fix typo; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258332
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 20 Jan 2016 18:59:16 +0000 (18:59 +0000)]
fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258330
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 20 Jan 2016 18:57:48 +0000 (18:57 +0000)]
Accept subtractions involving a weak symbol.
When a symbol S shows up in an expression in assembly there are two
possible interpretations
* The expression is referring to the value of S in this file.
* The expression is referring to the value after symbol resolution.
In the first case the assembler can reason about the value and try to
produce a relocation.
In the second case, that is only possible if the symbol cannot be
preempted.
Assemblers are not very consistent about which interpretation gets used.
This changes MC to agree with GAS in the case of an expression of the
form "Sym - WeakSym".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258329
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 20 Jan 2016 17:41:14 +0000 (17:41 +0000)]
[LibCallSimplifier] don't get fooled by a fake sqrt()
The test case will crash without this patch because the subsequent call to
hasUnsafeAlgebra() assumes that the call instruction is an FPMathOperator
(ie, returns an FP type).
This part of the function signature check was omitted for the sqrt() case,
but seems to be in place for all other transforms.
Before:
http://reviews.llvm.org/rL257400
...we would have needlessly continued execution in optimizeSqrt(), but the
bug was harmless because we'd eventually fail some other check and return
without damage.
This should fix:
https://llvm.org/bugs/show_bug.cgi?id=26211
Differential Revision: http://reviews.llvm.org/D16198
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258325
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 20 Jan 2016 17:39:52 +0000 (17:39 +0000)]
[Orc] Fix a use-after-move bug in the Orc C-bindings stack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258324
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 20 Jan 2016 16:41:43 +0000 (16:41 +0000)]
80-cols; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258323
91177308-0d34-0410-b5e6-
96231b3b80d8
Keith Walker [Wed, 20 Jan 2016 15:59:14 +0000 (15:59 +0000)]
Write AArch64 big endian data fixup entries as BE.
There was support for writing the AArch64 big endian data fixup entries in
the .eh_frame section in BE. This is changed to write all such fixup
entries in BE with no restriction on the section. This is similar to
the existing support for fixup entries for ARM.
A test is added to check the length field in the .debug_line section as
this is an example of where such a fixup occurs.
Differential Revision: http://reviews.llvm.org/D16064
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258320
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 20 Jan 2016 15:48:27 +0000 (15:48 +0000)]
Correctly initialize SIAnnotateControlFlow
Reviewers: arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D16304
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258319
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Wed, 20 Jan 2016 15:24:56 +0000 (15:24 +0000)]
[AVX512] Adding VPERMB Intrinsics
Differential Revision: http://reviews.llvm.org/D16296
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258316
91177308-0d34-0410-b5e6-
96231b3b80d8
Marina Yatsina [Wed, 20 Jan 2016 14:03:47 +0000 (14:03 +0000)]
Fixing bug in rL258132: [X86] Adding support for missing variations of X86 string related instructions
There was a bug in my rL258132 because there's an overloading of the "movsd" and "cmpsd" instructions, e.g. movsd can be either "Move Data from String to String" (the case I wanted to handle) or "Move or Merge Scalar Double-Precision Floating-Point Value" (the case that causes the asserts).
Added code for escaping the unfamiliar scenarios and falling back to old behviour.
Also changed the asserts to llvm_unreachable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258312
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 20 Jan 2016 13:14:52 +0000 (13:14 +0000)]
Proper handling of diamond-like cases in if-conversion
If converter was somewhat careless about "diamond" cases, where there
was no join block, or in other words, where the true/false blocks did
not have analyzable branches. In such cases, it was possible for it to
remove (needed) branches, resulting in a loss of entire basic blocks.
Differential Revision: http://reviews.llvm.org/D16156
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258310
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Wed, 20 Jan 2016 13:11:47 +0000 (13:11 +0000)]
AVX512: Store (MOVNTPD, MOVNTPS, MOVNTDQ) using non-temporal hint intrinsic implementation.
Differential Revision: http://reviews.llvm.org/D16350
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258309
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Wed, 20 Jan 2016 12:54:31 +0000 (12:54 +0000)]
[AArch64] Fix two bugs in the .inst directive
The AArch64 .inst directive was implemented using EmitIntValue, which resulted
in both $x and $d (code and data) mapping symbols being emitted at the same
address. This fixes it to only emit the $x mapping symbol.
EmitIntValue also emits the value in big-endian order when targeting big-endian
systems, but instructions are always emitted in little-endian order for
AArch64.
Differential Revision: http://reviews.llvm.org/D16349
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258308
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Wed, 20 Jan 2016 09:30:01 +0000 (09:30 +0000)]
[AVR] Defnined calling conventions. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258300
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Pavlu [Wed, 20 Jan 2016 09:03:42 +0000 (09:03 +0000)]
[LTO] Fix error reporting when a file passed to libLTO is invalid or non-existent
This addresses PR26060 where function lto_module_create() could return nullptr
but lto_get_error_message() returned an empty string.
The error() call after LTOModule::createFromFile() in llvm-lto is then removed
because any error from this function should go through the diagnostic handler in
llvm-lto which will exit the program. The error() call was added because this
previously did not happen when the file was non-existent. This is fixed by the
patch. (The situation that llvm-lto reports an error when the input file does
not exist is tested by llvm/tools/llvm-lto/error.ll).
Differential Revision: http://reviews.llvm.org/D16106
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258298
91177308-0d34-0410-b5e6-
96231b3b80d8
Ivan Krasin [Wed, 20 Jan 2016 08:41:22 +0000 (08:41 +0000)]
[Verifier] Fix performance regression for LTO builds
Summary:
Fix a significant performance regression by introducing GlobalValueVisited field and reusing the map.
This is a follow up to r257823 that slowed down linking Chrome with LTO by 2.5x.
If you revert this commit, please, also revert r257823.
BUG=https://llvm.org/bugs/show_bug.cgi?id=26214
Reviewers: pcc, loladiro, joker.eph
Subscribers: krasin1, joker.eph, loladiro, pcc
Differential Revision: http://reviews.llvm.org/D16338
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258297
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Jan 2016 07:03:08 +0000 (07:03 +0000)]
[SelectionDAG] Fold more offsets into GlobalAddresses
SelectionDAG previously missed opportunities to fold constants into
GlobalAddresses in several areas. For example, given `(add (add GA, c1), y)`, it
would often reassociate to `(add (add GA, y), c1)`, missing the opportunity to
create `(add GA+c, y)`. This isn't often visible on targets such as X86 which
effectively reassociate adds in their complex address-mode folding logic,
however it is currently visible on WebAssembly since it currently has very
simple address mode folding code that doesn't reassociate anything.
This patch fixes this by making SelectionDAG fold offsets into GlobalAddresses
at the same times that it folds constants together, so that it doesn't miss any
opportunities to perform such folding.
Differential Revision: http://reviews.llvm.org/D16090
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258296
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Jan 2016 05:55:09 +0000 (05:55 +0000)]
[WebAssembly] Tighten up some regexes in some tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258295
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Jan 2016 05:54:22 +0000 (05:54 +0000)]
[WebAssembly] Minor code cleanups. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258294
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Jan 2016 05:50:29 +0000 (05:50 +0000)]
[WebAssembly] Remove the Relooper code, as it is not currently being used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258293
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 20 Jan 2016 05:10:59 +0000 (05:10 +0000)]
[Orc] 'this' qualify more lambda-captured members.
More workaround attempts for GCC ICEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258288
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 20 Jan 2016 04:32:05 +0000 (04:32 +0000)]
[Orc] More qualifications of lambda-captured member variables to fix GCC ICEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258286
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Jan 2016 04:21:16 +0000 (04:21 +0000)]
[WebAssembly] Don't stackify stores across instructions with side effects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258285
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Wilkins [Wed, 20 Jan 2016 04:03:09 +0000 (04:03 +0000)]
tools/llvm-config: improve shared library support
Summary:
This is a re-commit of r257003, which was reverted,
along with the fixes from http://reviews.llvm.org/D15986.
r252532 added support for reporting the monolithic library
when LLVM_BUILD_LLVM_DYLIB is used. This would only be done
if the individual components were not found, and the dynamic
library is found.
This diff extends this as follows:
- If LLVM_LINK_LLVM_DYLIB is set, then prefer the shared
library, even if all component libraries exist.
- Two flags, --link-shared and --link-static are introduced
to provide explicit guidance. If --link-shared is passed
and the shared library does not exist, an error results.
Additionally, changed the expected shared library names from
(e.g.) LLVM-3.8.0 to LLVM-3.8. The former exists only in an
installation (and then only in CMake builds I think?), and not
in the build tree; this breaks usage of llvm-config during
builds, e.g. by llvm-go.
Reviewers: DiamondLovesYou, beanz
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D15986
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258283
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 20 Jan 2016 03:12:40 +0000 (03:12 +0000)]
[Orc] Qualify captured variable to work around GCC ICE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258278
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 20 Jan 2016 02:49:53 +0000 (02:49 +0000)]
Fix a bug in test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258276
91177308-0d34-0410-b5e6-
96231b3b80d8
Joseph Tremoulet [Wed, 20 Jan 2016 02:15:15 +0000 (02:15 +0000)]
[Inliner/WinEH] Honor implicit nounwinds
Summary:
Funclet EH tables require that a given funclet have only one unwind
destination for exceptional exits. The verifier will therefore reject
e.g. two cleanuprets with different unwind dests for the same cleanup, or
two invokes exiting the same funclet but to different unwind dests.
Because catchswitch has no 'nounwind' variant, and because IR producers
are not *required* to annotate calls which will not unwind as 'nounwind',
it is legal to nest a call or an "unwind to caller" catchswitch within a
funclet pad that has an unwind destination other than caller; it is
undefined behavior for such a call or catchswitch to unwind.
Normally when inlining an invoke, calls in the inlined sequence are
rewritten to invokes that unwind to the callsite invoke's unwind
destination, and "unwind to caller" catchswitches in the inlined sequence
are rewritten to unwind to the callsite invoke's unwind destination.
However, if such a call or "unwind to caller" catchswitch is located in a
callee funclet that has another exceptional exit with an unwind
destination within the callee, applying the normal transformation would
give that callee funclet multiple unwind destinations for its exceptional
exits. There would be no way for EH table generation to determine which
is the "true" exit, and the verifier would reject the function
accordingly.
Add logic to the inliner to detect these cases and leave such calls and
"unwind to caller" catchswitches as calls and "unwind to caller"
catchswitches in the inlined sequence.
This fixes PR26147.
Reviewers: rnk, andrew.w.kaylor, majnemer
Subscribers: alexcrichton, llvm-commits
Differential Revision: http://reviews.llvm.org/D16319
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258273
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 20 Jan 2016 01:26:34 +0000 (01:26 +0000)]
[PGO] Add a new interface to be used by Indirect Call Promotion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258271
91177308-0d34-0410-b5e6-
96231b3b80d8
Eduard Burtescu [Wed, 20 Jan 2016 00:26:52 +0000 (00:26 +0000)]
[NFC] Replace several manual GEP loops with gep_type_iterator.
Reviewers: dblaikie
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16335
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258262
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 20 Jan 2016 00:24:36 +0000 (00:24 +0000)]
Function name change /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258260
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 20 Jan 2016 00:23:32 +0000 (00:23 +0000)]
MachineScheduler: Allow independent scheduling of sub register defs
Note that this is disabled by default and still requires a patch to
handleMove() which is not upstreamed yet.
If the TrackLaneMasks policy/strategy is enabled the MachineScheduler
will build a schedule graph where definitions of independent
subregisters are no longer serialised.
Implementation comments:
- Without lane mask tracking a sub register def also counts as a use
(except for the first one with the read-undef flag set), with lane
mask tracking enabled this is no longer the case.
- Pressure Diffs where previously maintained per definition of a
vreg with the help of the SSA information contained in the
LiveIntervals. With lanemask tracking enabled we cannot do this
anymore and instead change the pressure diffs for all uses of the vreg
as it becomes live/dead. For this changed style to work correctly we
ignore uses of instructions that define the same register again: They
won't affect register pressure.
- With lanemask tracking we remove all read-undef flags from
sub register defs when building the graph and re-add them later when
all vreg lanes have become dead.
Differential Revision: http://reviews.llvm.org/D14969
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258259
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 20 Jan 2016 00:23:26 +0000 (00:23 +0000)]
RegisterPressure: Make liveness tracking subregister aware
Differential Revision: http://reviews.llvm.org/D14968
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258258
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 20 Jan 2016 00:23:21 +0000 (00:23 +0000)]
LiveInterval: Add utility class to rename independent subregister usage
This renaming is necessary to avoid a subregister aware scheduler
accidentally creating liveness "holes" which are rejected by the
MachineVerifier.
Explanation as found in this patch:
Helper class that can divide MachineOperands of a virtual register into
equivalence classes of connected components.
MachineOperands belong to the same equivalence class when they are part of
the same SubRange segment or adjacent segments (adjacent in control
flow); Different subranges affected by the same MachineOperand belong to
the same equivalence class.
Example:
vreg0:sub0 = ...
vreg0:sub1 = ...
vreg0:sub2 = ...
...
xxx = op vreg0:sub1
vreg0:sub1 = ...
store vreg0:sub0_sub1
The example contains 3 different equivalence classes:
- One for the (dead) vreg0:sub2 definition
- One containing the first vreg0:sub1 definition and its use,
but not the second definition!
- The remaining class contains all other operands involving vreg0.
We provide a utility function here to rename disjunct classes to different
virtual registers.
Differential Revision: http://reviews.llvm.org/D16126
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258257
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 20 Jan 2016 00:13:22 +0000 (00:13 +0000)]
AMDGPU/SI: Prevent the DAGCombiner from creating setcc with i1 inputs
Reviewers: arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D15035
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258256
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 20 Jan 2016 00:06:14 +0000 (00:06 +0000)]
[MachineSink] Don't break ImplicitNulls
Summary:
This teaches MachineSink to not sink instructions that might break the
implicit null check optimization that runs later. This should not
affect frontends that do not use implicit null checks.
Reviewers: aadg, reames, hfinkel, atrick
Subscribers: majnemer, llvm-commits
Differential Revision: http://reviews.llvm.org/D14632
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258254
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 19 Jan 2016 23:39:28 +0000 (23:39 +0000)]
Reinstate the second part of a comment. NFC.
Reported by: Filipe Cabecinhas
Pointy-hat to: me
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258223
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 19 Jan 2016 23:29:03 +0000 (23:29 +0000)]
[X86] Do not run shrink-wrapping on function with split-stack attribute or HiPE
calling convention.
The implementation of the related callbacks in the x86 backend for such
functions are not ready to deal with a prologue block that is not the entry
block of the function.
This fixes PR26107, but the longer term solution would be to fix those callbacks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258221
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 19 Jan 2016 23:07:10 +0000 (23:07 +0000)]
add tests to show missing memset/malloc optimizations (PR25892)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258218
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 19 Jan 2016 23:05:27 +0000 (23:05 +0000)]
[MC, COFF] Add .reloc support for WinCOFF
This adds rudimentary support for a few relocations that we will use for
the CodeView debug format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258216
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 19 Jan 2016 23:04:56 +0000 (23:04 +0000)]
[X86][SSE] Add VZEXT_MOVL target shuffle decoding.
Add support for decoding VZEXT_MOVL target shuffle masks, allowing it to be used as a source in target shuffle combines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258215
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 19 Jan 2016 22:46:33 +0000 (22:46 +0000)]
Reenable -Wexpansion-to-defined.
I think I fixed all instances of this in the codebase
(r258202, 258200, 258190). Also, the suppression didn't
have an effect on bots using make anyways, and it looks
like many bots still use configure/make bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258210
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 19 Jan 2016 22:32:58 +0000 (22:32 +0000)]
[Orc] Oops - lambda capture changed in r258206 was correct.
Fully qualify reference to Finalized in the body of the lambda instead to work
around GCC ICE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258208
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 19 Jan 2016 22:31:12 +0000 (22:31 +0000)]
[MachineFunction] Constify getter. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258207
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 19 Jan 2016 22:31:01 +0000 (22:31 +0000)]
[Orc] Add missing capture to lambda.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258206
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 19 Jan 2016 22:24:12 +0000 (22:24 +0000)]
[X86][SSE] Add INSERTPS target shuffle combines.
As vector shuffles can only reference two inputs many (V)INSERTPS patterns end up being split over two targets shuffles.
This patch adds combines to attempt to combine (V)INSERTPS nodes with input/output nodes that are just zeroing out these additional vector elements.
Differential Revision: http://reviews.llvm.org/D16072
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258205
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 19 Jan 2016 22:22:43 +0000 (22:22 +0000)]
[Orc] Qualify call to make_unique to avoid ambiguity with std::make_unique.
This should fix some of the bot failures associated with r258185.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258204
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 19 Jan 2016 22:20:21 +0000 (22:20 +0000)]
[Orc] #undef a MACRO after I'm done with it.
Suggested by Philip Reames in review of r257951.
Thanks Philip!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258203
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 19 Jan 2016 21:47:24 +0000 (21:47 +0000)]
[AArch64] Remove a bunch of useless FIXME comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258193
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 19 Jan 2016 21:31:41 +0000 (21:31 +0000)]
[WebAssembly] Remove an unused data member. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258192
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 19 Jan 2016 21:27:05 +0000 (21:27 +0000)]
[AArch64] Remove more dead code after r258093.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258191
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 19 Jan 2016 21:22:36 +0000 (21:22 +0000)]
Fix undefined behavior in llvm's local changes to googletest.
r100895 landed an llvm-only change to add minix support to googletest.
It did that by putting "defined()" in a macro, which has undefined
behavior. Slightly reshuffle things to remove that undefined behavior.
Also mention in README.LLVM that minix support is a local change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258190
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Tue, 19 Jan 2016 21:18:12 +0000 (21:18 +0000)]
Fix a coverage reading bug
function record pointer is not advanced when
duplicate entry is found.
Test case to be added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258188
91177308-0d34-0410-b5e6-
96231b3b80d8