Vasileios Kalintiris [Mon, 16 Nov 2015 17:05:01 +0000 (17:05 +0000)]
[mips] Disable code generation through FastISel for MIPS32R6.
Reviewers: dsanders
Subscribers: llvm-commits, dsanders
Differential Revision: http://reviews.llvm.org/D14708
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253225
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 16 Nov 2015 16:54:28 +0000 (16:54 +0000)]
[SimplifyLibCalls] Generalize a comment. This doesn't apply only to sqrt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253224
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Pavlu [Mon, 16 Nov 2015 16:41:13 +0000 (16:41 +0000)]
[ARM] Prevent use of a value pointed by end() iterator when placing a jump table
Function ARMConstantIslands::doInitialJumpTablePlacement() iterates over all
basic blocks in a machine function. It calls `MI = MBB.getLastNonDebugInstr()`
to get the last instruction in each block and then uses MI->getOpcode() to
decide what to do. If getLastNonDebugInstr() returns MBB.end() (for example,
when the block does not contain any instructions) then calling getOpcode() on
this value is incorrect. Avoid this problem by checking the result of
getLastNonDebugInstr().
Differential Revision: http://reviews.llvm.org/D14694
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253222
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Mon, 16 Nov 2015 16:25:47 +0000 (16:25 +0000)]
[ARM,AArch64] Store source location of asm constant pool entries
Storing the source location of the expression that created a constant pool
entry allows us to emit better error messages if we later discover that the
expression cannot be represented by a relocation.
Differential Revision: http://reviews.llvm.org/D14646
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253220
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Mon, 16 Nov 2015 16:22:47 +0000 (16:22 +0000)]
[ARM,AArch64] Store source location for values in assembly files
The MCValue class can store a SMLoc to allow better error messages to be
emitted if an error is detected after parsing. The ARM and AArch64 assembly
parsers were not setting this, so error messages did not have source
information.
Differential Revision: http://reviews.llvm.org/D14645
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253219
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 16 Nov 2015 16:18:28 +0000 (16:18 +0000)]
[WebAssembly] Prototype passes for register coloring and register stackifying.
These passes are not yet enabled by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253217
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Mon, 16 Nov 2015 14:19:32 +0000 (14:19 +0000)]
[mips][ias] Remove spurious ';' from inline assembly test.
IAS will not emit it. NFC at the moment but will prevent a test failure once
IAS is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253210
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Mon, 16 Nov 2015 14:16:45 +0000 (14:16 +0000)]
[mips][ias] Accept $31 or $ra in hf16call32.ll. IAS prints the latter.
NFC at the moment, but it will prevent a test failure once IAS is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253209
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Mon, 16 Nov 2015 14:14:59 +0000 (14:14 +0000)]
[mips][ias] Allow whitespace after commas in inlineasm*.ll tests.
IAS always prints whitespace after a comma. NFC at the moment but this will
prevent failures when IAS is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253208
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Mon, 16 Nov 2015 14:05:32 +0000 (14:05 +0000)]
Handle ARMv6KZ naming
Summary:
* ARMv6KZ is the "canonical" name, given in the ARMARM
* ARMv6Z is an "official abbreviation" for it, mentioned in the ARMARM
* ARMv6ZK is a popular misspelling, which we should support as an alias.
The patch corrects the handling of the names.
Functional changes:
* ARMv6Z no longer treated as an architecture in its own right
* ARMv6ZK renamed to ARMv6KZ, accepting ARMv6ZK as an alias
* arm1176jz-s and arm1176jzf-s recognized as ARMv6ZK, instead of ARMv6K
* default ARMv6K CPU changed to arm1176j-s
Reviewers: rengolin, logan, compnerd
Subscribers: aemerson, llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D14568
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253206
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Mon, 16 Nov 2015 12:08:05 +0000 (12:08 +0000)]
NFC refactorings in lib/Support/TargetParser.cpp
Summary:
* declare FPUNames, ARCHNames, ARCHExtNames, HWDivNames, CPUNames
as static const
* implement getDefaultExtensions with a StringSwitch, in the same
way getDefaultFPU is implemented
Reviewers: rengolin
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D14648
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253201
91177308-0d34-0410-b5e6-
96231b3b80d8
Bradley Smith [Mon, 16 Nov 2015 11:15:22 +0000 (11:15 +0000)]
[ARM] Allow TargetParser to accurately target architectures
Instead of defaulting to an empty string, we want to default to
the CPU 'generic' in the case of no valid default CPU being found,
(as long as the architecture is actually valid).
In order to do this we add a default FPU for each architecture, as
well as falling back to architecture defaults for extensions and FPU
in the case of a generic CPU is specified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253198
91177308-0d34-0410-b5e6-
96231b3b80d8
Bradley Smith [Mon, 16 Nov 2015 11:10:19 +0000 (11:10 +0000)]
[ARM] Introduce subtarget features per ARM architecture.
This allows for accurate architecture targeting as well as removing
duplicate information (hardcoded feature strings) from MCTargetDesc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253196
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Mon, 16 Nov 2015 10:49:25 +0000 (10:49 +0000)]
Properly check if a CMPZ node is in fact comparing against zero
This was left implicit and never ever checked, which means we could have a CMPZ against some non-zero value and we were carrying on with BFI conversion regardless.
Caught by Oliver Stannard using csmith; regression test added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253195
91177308-0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Mon, 16 Nov 2015 10:40:38 +0000 (10:40 +0000)]
Don't generate discriminators for calls to debug intrinsics
Summary:
This fails a check in Verifier.cpp, which checks for location matches between the declared
variable and the !dbg attachments.
Reviewers: dnovillo, dblaikie, danielcdh
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D14657
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253194
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Mon, 16 Nov 2015 10:25:19 +0000 (10:25 +0000)]
[AArch64] ldr= pseudo-instruction silently ignored if register invalid
The AArch64 assembler was silently ignoring instructions like this:
ldr foo, =bar
AArch64AsmParser::parseOperand was returning true as the parse failed, but was
not calling AArch64AsmParser::Error to report this to the user, so the
instruction was ignored without printing an error message.
Differential Revision: http://reviews.llvm.org/D14651
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253193
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Mon, 16 Nov 2015 10:16:22 +0000 (10:16 +0000)]
[GlobalOpt] Address post-commit review comments on r253168
Address Duncan Exon Smith's comments on D14148, which was added after the patch had been LGTM'd and committed:
* clang-format one area where whitespace diffs occurred.
* Add a threshold to limit the store/load dominance checks as they are quadratic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253192
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 16 Nov 2015 09:01:28 +0000 (09:01 +0000)]
Move helper classes into anonymous namespaces. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253189
91177308-0d34-0410-b5e6-
96231b3b80d8
Keno Fischer [Mon, 16 Nov 2015 08:25:14 +0000 (08:25 +0000)]
Fix r253186 test case
Referencing a DILocation whose scope is a different subprogram causes
an assertion failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253187
91177308-0d34-0410-b5e6-
96231b3b80d8
Keno Fischer [Mon, 16 Nov 2015 07:57:32 +0000 (07:57 +0000)]
[DIBuilder] Make createReferenceType take size and align
Summary: Since we're passing references to dbg.value as pointers,
we need to have the frontend properly declare their sizes and
alignments (as it already does for regular pointers) in preparation
for my upcoming patch to have the verifer check that the sizes agree.
Also augment the backend logic that skips actually emitting this
information into DWARF such that it also handles reference types.
Reviewers: aprantl, dexonsmith, dblaikie
Subscribers: dblaikie, llvm-commits
Differential Revision: http://reviews.llvm.org/D14275
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253186
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Mon, 16 Nov 2015 07:22:00 +0000 (07:22 +0000)]
AVX512: Implemented encoding and intrinsics for VMOVSHDUP/VMOVSLDUP instructions.
Differential Revision: http://reviews.llvm.org/D14322
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253185
91177308-0d34-0410-b5e6-
96231b3b80d8
Keno Fischer [Mon, 16 Nov 2015 05:13:30 +0000 (05:13 +0000)]
Also map the personality function in CloneFunctionInto
Summary: The Old personality function gets copied over, but the
Materializer didn't have a chance to inspect it (e.g. to fix up
references to the correct module for the target function).
Also add a verifier check that makes sure the personality routine
is in the same module as the function whose personality it is.
Reviewers: majnemer
Subscribers: jevinskie, llvm-commits
Differential Revision: http://reviews.llvm.org/D14474
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253183
91177308-0d34-0410-b5e6-
96231b3b80d8
Keno Fischer [Mon, 16 Nov 2015 04:47:58 +0000 (04:47 +0000)]
[Sink] Don't move landingpads
Summary: Moving landingpads into successor basic blocks makes the
verifier sad. Teach Sink that much like PHI nodes and terminator
instructions, landingpads (and cleanuppads, etc.) may not be moved
between basic blocks.
Reviewers: majnemer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D14475
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253182
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Mon, 16 Nov 2015 04:02:36 +0000 (04:02 +0000)]
[ADT] Make capacity_in_bytes support BitVector. NFC.
This makes it a bit easier to replace instances of vector<bool> with
BitVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253180
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 15 Nov 2015 15:34:19 +0000 (15:34 +0000)]
[WebAssembly] Use tabs instead of spaces in assembly output.
This seems to be the most popular convention among the other backends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253172
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 15 Nov 2015 14:57:07 +0000 (14:57 +0000)]
[X86][SSE] Tidyup with implicit SDValue bool check. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253171
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Sun, 15 Nov 2015 14:50:14 +0000 (14:50 +0000)]
Fix mapping of unmaterialized global values during metadata linking
Summary:
The patch to move metadata linking after global value linking didn't
correctly map unmaterialized global values to null as desired. They
were in fact mapped to the source copy. It largely worked by accident
since most module linker clients destroyed the source module which
caused the source GVs to be replaced by null, but caused a failure with
LTO linking on Windows:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-
20151109/312869.html
The problem is that a null return value from materializeValueFor is
handled by mapping the value to self. This is the desired behavior when
materializeValueFor is passed a non-GlobalValue. The problem is how to
distinguish that case from the case where we really do want to map to
null.
This patch addresses this by passing in a new flag to the value mapper
indicating that unmapped global values should be mapped to null. Other
Value types are handled as before.
Note that the documented behavior of asserting on unmapped values when
the flag RF_IgnoreMissingValues isn't set is currently disabled with
FIXME notes due to bootstrap failures. I modified these disabled asserts
so when they are eventually enabled again it won't assert for the
unmapped values when the new RF_NullMapMissingGlobalValues flag is set.
I also considered using a callback into the value materializer, but a
flag seemed cleaner given that there are already existing flags.
I also considered modifying materializeValueFor to return the input
value when we want to map to source and then treat a null return
to mean map to null. However, there are other value materializer
subclasses that implement materializeValueFor, and they would all need
to be audited and the return values possibly changed, which seemed
error-prone.
Reviewers: dexonsmith, joker.eph
Subscribers: pcc, llvm-commits
Differential Revision: http://reviews.llvm.org/D14682
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253170
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Sun, 15 Nov 2015 14:21:37 +0000 (14:21 +0000)]
[GlobalOpt] Demote globals to locals more aggressively
Global to local demotion can speed up programs that use globals a lot. It is particularly useful with LTO, when the entire call graph is known and most functions have been internalized.
For a global to be demoted, it must only be accessed by one function and that function:
1. Must never recurse directly or indirectly, else the GV would be clobbered.
2. Must never rely on the value in GV at the start of the function (apart from the initializer).
GlobalOpt can already do this, but it is hamstrung and only ever tries to demote globals inside "main", because C++ gives extra guarantees about how main is called - once and only once.
In LTO mode, we can often prove the first property (if the function is internal by this point, we know enough about the callgraph to determine if it could possibly recurse). FunctionAttrs now infers the "norecurse" attribute for this reason.
The second property can be proven for a subset of functions by proving that all loads from GV are dominated by a store to GV. This is conservative in the name of compile time - this only requires a DominatorTree which is fairly cheap in the grand scheme of things. We could do more fancy stuff with MemoryDependenceAnalysis too to catch more cases but this appears to catch most of the useful ones in my testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253168
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Denisov [Sun, 15 Nov 2015 14:13:24 +0000 (14:13 +0000)]
[Docs] Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253167
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Sun, 15 Nov 2015 12:19:11 +0000 (12:19 +0000)]
Revert r253160.
It broke layering violation. Reproducible with BUILD_SHARED_LIBS=ON.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253163
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 15 Nov 2015 08:19:35 +0000 (08:19 +0000)]
Fixed GEP visitor in the InstCombine pass.
The current implementation of GEP visitor in InstCombine fails with assertion on Vector GEP with mix of scalar and vector types, like this:
getelementptr double, double* %a, <8 x i32> %i
(It fails to create a "sext" from <8 x i32> to <8 x i64>)
I fixed it and added some tests.
Differential Revision: http://reviews.llvm.org/D14485
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253162
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Sun, 15 Nov 2015 07:23:13 +0000 (07:23 +0000)]
AVX512: Implemented encoding and intrinsics for VMOVSHDUP/VMOVSLDUP instructions.
Differential Revision: http://reviews.llvm.org/D14322
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253160
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Sun, 15 Nov 2015 05:43:11 +0000 (05:43 +0000)]
NFC: Document MSVC getters on Triple
Summary:
Document the differences between the isKnownWindowsMSVC() and isWindowsMSVC() methods on Triple.
Also removed the '\brief' Doxygen annotations - now that 'AUTOBRIEF' is set to on, they are unnecessary.
Subscribers: jfb, tberghammer, danalbert, srhines, dschuff
Differential Revision: http://reviews.llvm.org/D14110
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253159
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Sun, 15 Nov 2015 02:00:09 +0000 (02:00 +0000)]
Use a different block id for block of metadata kind records
Summary:
There are currently two blocks with the METADATA_BLOCK id at module
scope. The first has the module-level metadata values (consisting of
some combination of METADATA_* record codes except for METADATA_KIND).
The second consists only of METADATA_KIND records. The latter is used
only in the METADATA_ATTACHMENT block within function blocks (for
metadata attached to instructions).
For ThinLTO we want to delay the parsing of module level metadata
until all functions have been imported from that module (there is some
bookkeeping used to suture it up when we read it during a post-pass).
However, we do need the METADATA_KIND records when parsing the function
body during importing, since those kinds are used as described above.
To simplify identification and parsing of just the block containing
the metadata kinds, use a different block id (METADATA_KIND_BLOCK_ID).
Support older bitcode without the new block id as well.
Reviewers: dexonsmith, joker.eph
Subscribers: davidxl, llvm-commits
Differential Revision: http://reviews.llvm.org/D14654
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253154
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 14 Nov 2015 23:28:15 +0000 (23:28 +0000)]
[WebAssembly] Minor code simplification. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253150
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 14 Nov 2015 23:17:07 +0000 (23:17 +0000)]
[WebAssembly] Make indentation consistent with the other testcases. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253149
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 14 Nov 2015 23:15:41 +0000 (23:15 +0000)]
[WebAssembly] Support signext, zeroext, and several other function attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253148
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 14 Nov 2015 23:02:31 +0000 (23:02 +0000)]
[WebAssembly] Change int_wasm_memory_size from IntrNoMem to IntrReadMem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253147
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 14 Nov 2015 20:42:01 +0000 (20:42 +0000)]
[X86][SSE] Fixed arch/triple and regenerated results.
Tidyup before diffs from new patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253144
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Sat, 14 Nov 2015 19:00:33 +0000 (19:00 +0000)]
[llvm-ar] Use failIfError/fail helpers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253141
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Sat, 14 Nov 2015 18:33:47 +0000 (18:33 +0000)]
[llvm-ar] Use fail() helper to reduce duplication.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253139
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Sat, 14 Nov 2015 18:25:18 +0000 (18:25 +0000)]
[llvm-ar] Simplify the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253138
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 14 Nov 2015 15:23:59 +0000 (15:23 +0000)]
[X86][SSE] Added extra vector truncation tests
Baseline comparison to D14588
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253132
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 14 Nov 2015 06:35:56 +0000 (06:35 +0000)]
Reduce the size of MCRelaxableFragment.
MCRelaxableFragment previously kept a copy of MCSubtargetInfo and
MCInst to enable re-encoding the MCInst later during relaxation. A copy
of MCSubtargetInfo (instead of a reference or pointer) was needed
because the feature bits could be modified by the parser.
This commit replaces the MCSubtargetInfo copy in MCRelaxableFragment
with a constant reference to MCSubtargetInfo. The copies of
MCSubtargetInfo are kept in MCContext, and the target parsers are now
responsible for asking MCContext to provide a copy whenever the feature
bits of MCSubtargetInfo have to be toggled.
With this patch, I saw a 4% reduction in peak memory usage when I
compiled verify-uselistorder.lto.bc using llc.
rdar://problem/
21736951
Differential Revision: http://reviews.llvm.org/D14346
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253127
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Sat, 14 Nov 2015 05:51:41 +0000 (05:51 +0000)]
Don't recompute LCSSA after loop-unrolling when possible.
Summary:
Currently we always recompute LCSSA for outer loops after unrolling an
inner loop. That leads to compile time problem when we have big loop
nests, and we can solve it by avoiding unnecessary work. For instance,
if w eonly do partial unrolling, we don't break LCSSA, so we don't need
to rebuild it. Also, if all exits from the inner loop are inside the
enclosing loop, then complete unrolling won't break LCSSA either.
I replaced unconditional LCSSA recomputation with conditional recomputation +
unconditional assert and added several tests, which were failing when I
experimented with it.
Soon I plan to follow up with a similar patch for recalculation of dominators
tree.
Reviewers: hfinkel, dexonsmith, bogner, joker.eph, chandlerc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D14526
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253126
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 14 Nov 2015 05:20:05 +0000 (05:20 +0000)]
[MCTargetAsmParser] Move the member varialbes that reference
MCSubtargetInfo in the subclasses into MCTargetAsmParser and define a
member function getSTI.
This is done in preparation for making changes to shrink the size of
MCRelaxableFragment. (see http://reviews.llvm.org/D14346).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253124
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 14 Nov 2015 03:04:00 +0000 (03:04 +0000)]
Add MMX to the 3dnow enum and propagate changes around. This makes
it somewhat more consistent with how the feature is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253122
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Sat, 14 Nov 2015 01:55:17 +0000 (01:55 +0000)]
[ShrinkWrapping] Disable the optimization for functions with sanitize like
attribute.
Even if the target supports shrink-wrapping, the prologue and epilogue
must not move because a crash can happen anywhere and sanitizers need
to be able to unwind from the PC of the crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253116
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 14 Nov 2015 01:32:27 +0000 (01:32 +0000)]
Remove some unused includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253115
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Sat, 14 Nov 2015 00:16:15 +0000 (00:16 +0000)]
[RuntimeDyld] Fix indentation and whitespace; NFC
Whitespace-only change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253105
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 13 Nov 2015 23:05:46 +0000 (23:05 +0000)]
AArch64: Default AArch64Subtarget::ReserveX18 to true on darwin
Darwin reserves x18, so it's never ABI compliant to generate code that
uses it. Set the default value based on the OS part of the triple
rather than forcing front-ends to set the +reserve-x18 target feature
in order to build correct code for Darwin.
This will make r243310 redundant, so I'll revert that shortly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253102
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 13 Nov 2015 22:30:31 +0000 (22:30 +0000)]
MachineScheduler: Print initial pressure in debug dump
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253097
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 13 Nov 2015 22:30:29 +0000 (22:30 +0000)]
MachineScheduler: Improve debug output for "only one node in readyset"
When there is only 1 node left in the ready queue and it is picked call
the reason "ONLY1" instead of "NOCAND".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253096
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 13 Nov 2015 22:30:27 +0000 (22:30 +0000)]
tablegen: Add a simple heuristic to get better names for pressure sets
Differential Revision: http://reviews.llvm.org/D14597
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253095
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 13 Nov 2015 21:51:02 +0000 (21:51 +0000)]
[LIR] Add support for creating memcpys from loops with a negative stride.
This allows us to transform the below loop into a memcpy.
void test(unsigned *__restrict__ a, unsigned *__restrict__ b) {
for (int i = 2047; i >= 0; --i) {
a[i] = b[i];
}
}
This is the memcpy version of r251518, which added support for memset with
negative strided loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253091
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 13 Nov 2015 21:45:50 +0000 (21:45 +0000)]
[Hexagon] Fixing memory leak during relaxation by allocating MCInst in MCContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253090
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 13 Nov 2015 21:27:00 +0000 (21:27 +0000)]
[WinEH] Fix ESP management with 32-bit __CxxFrameHandler3
The C++ EH personality automatically restores ESP from the C++ EH
registration node after a catchret. I mistakenly thought it was like
SEH, which does not restore ESP.
It makes sense for C++ EH to differ from SEH here because SEH does not
use funclets for catches, and does not allow catching inside of finally.
C++ EH may need to unwind through multiple catch funclets and eventually
catchret to some outer funclet. Therefore, the runtime has to keep track
of which ESP to use with catchret, rather than having the compiler
reload it manually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253084
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Fri, 13 Nov 2015 21:21:42 +0000 (21:21 +0000)]
[safestack] Rewrite isAllocaSafe using SCEV.
Use ScalarEvolution to calculate memory access bounds.
Handle function calls based on readnone/nocapture attributes.
Handle memory intrinsics with constant size.
This change improves both recall and precision of IsAllocaSafe.
See the new tests (ex. BitCastWide) for the kind of code that was wrongly
classified as safe.
SCEV efficiency seems to be limited by the fact the SafeStack runs late
(in CodeGenPrepare), and many loops are unrolled or otherwise not in LCSSA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253083
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 13 Nov 2015 21:09:57 +0000 (21:09 +0000)]
[Docs] Fix warning "Title underline too short."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253082
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Nov 2015 20:27:45 +0000 (20:27 +0000)]
[WebAssembly] Rename the Const instructions to be upper-case too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253072
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Fri, 13 Nov 2015 20:24:28 +0000 (20:24 +0000)]
SamplePGO - Add dump routines for LineLocation, SampleRecord and FunctionSamples
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253071
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Nov 2015 20:19:11 +0000 (20:19 +0000)]
[WebAssembly] Rename memory intrinsics to be upper-case, following convention. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253070
91177308-0d34-0410-b5e6-
96231b3b80d8
Cong Hou [Fri, 13 Nov 2015 19:47:43 +0000 (19:47 +0000)]
[X86][SSE] Combine UNPCKL with vector_shuffle into UNPCKH to save one instruction for sext from v16i8 to v16i16 and v8i16 to v8i32.
This patch is enabling combining UNPCKL with vector_shuffle that moves the upper
half of a vector into the lower half, into a UNPCKH instruction. For example:
t2: v16i8 = vector_shuffle<8,9,10,11,12,13,14,15,u,u,u,u,u,u,u,u> t1, undef:v16i8
t3: v16i8 = X86ISD::UNPCKL undef:v16i8, t2
will be combined to:
t3: v16i8 = X86ISD::UNPCKH undef:v16i8, t1
Differential revision: http://reviews.llvm.org/D14399
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253067
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 13 Nov 2015 19:18:49 +0000 (19:18 +0000)]
dwarfdump: Add support for dumping the table contents of DWP indexes
This is a recommit of 252842 which was reverted in 252859. The issue was
using %s format specifier for a StringRef - used Format's
left_justify(StringRef, int) instead.
It'd be nice to have __attribute__((format(..))) on llvm::format, but
apparently it's only implemented for c-style variadics, not C++ variadic
templates. Perhaps we could fix that & conditionalize the attribute on
such...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253065
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 13 Nov 2015 19:13:40 +0000 (19:13 +0000)]
Add a comment that should have made my last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253063
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 13 Nov 2015 19:11:12 +0000 (19:11 +0000)]
Add missing triple to WinEH test case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253062
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 13 Nov 2015 19:11:07 +0000 (19:11 +0000)]
[LIR] Factor out the code to compute base ptr for negative strided loops.
This will allow for the code to be reused in the memcpy optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253061
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 13 Nov 2015 19:06:01 +0000 (19:06 +0000)]
[WinEH] Make UnwindHelp a fixed stack object allocated after XMM CSRs
Now the offset of UnwindHelp in our EH tables and the offset that we
store to in the prologue agree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253059
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 13 Nov 2015 17:42:46 +0000 (17:42 +0000)]
[Hexagon] Factoring bundle creation in to a utility function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253056
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 13 Nov 2015 17:06:32 +0000 (17:06 +0000)]
AMDGPU: Add stony support
Patch by: Alex Deucher
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253053
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 13 Nov 2015 17:06:29 +0000 (17:06 +0000)]
ELFYAML: Add support for parsing AMDGPU section attribute flags
Reviewers: silvas
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D14444
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253052
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 13 Nov 2015 17:00:36 +0000 (17:00 +0000)]
[Symbolizer] Don't use PE symbol tables to override PDB symbols
Summary:
PE files are stripped by default, and only contain the names of exported
symbols.
The actual reason that we bother to do this override by default is
actually due to a quirk of the way -gline-tables-only is implemented, so
I phrased the check as "if we are symbolizing from dwarf, do the symtab
override".
This fixes lots of Windows ASan tests that I broke in r250582.
Reviewers: samsonov
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D14594
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253051
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 13 Nov 2015 16:21:23 +0000 (16:21 +0000)]
use range-based for loop; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253048
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Fri, 13 Nov 2015 16:05:22 +0000 (16:05 +0000)]
[ARM] Replace ARMISD::RBIT with ISD::BITREVERSE
ISD::BITREVERSE matches "rbit" completely, so remove ARMISD::RBIT and mark ISD::BITREVERSE as legal, adding a test for lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253047
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Fri, 13 Nov 2015 15:14:04 +0000 (15:14 +0000)]
Fixing a typo in docs/CodeGenerator.rst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253045
91177308-0d34-0410-b5e6-
96231b3b80d8
Zlatko Buljan [Fri, 13 Nov 2015 13:14:25 +0000 (13:14 +0000)]
[mips][microMIPS] Implement SHRA[_R].PH, SHRAV[_R].PH, SHRAV[_R].QB, SHRAV_R.W, SHRA_R.W, SHRL.PH, SHRL.QB, SHRLV.PH and SHRLV.QB instructions
Differential Revision: http://reviews.llvm.org/D14010
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253041
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 13 Nov 2015 13:02:31 +0000 (13:02 +0000)]
[mips][ias] Explicitly disable IAS on asm-large-immediate.ll.
NFC at the moment but it will prevent a failure when IAS is enabled by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253039
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Fri, 13 Nov 2015 13:00:27 +0000 (13:00 +0000)]
[SystemZ] Simplify boolean conditional return statements
Use clang-tidy to simplify conditonal return statements.
Author: LegalizeAdulthood
Differential Revision: http://reviews.llvm.org/D9986
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253038
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 13 Nov 2015 11:44:00 +0000 (11:44 +0000)]
[mips][ias] Replace invalid assembly insn in test since IAS parses inline assembly.
This is NFC at the moment but will prevent this test from failing when
IAS is the default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253033
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Fri, 13 Nov 2015 11:38:07 +0000 (11:38 +0000)]
[lit] Improve error message when lit fails to executable a command by
showing the executable it tried to use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253032
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Fri, 13 Nov 2015 11:37:25 +0000 (11:37 +0000)]
[lit] Fix bug where ``lit.util.which()`` would return a directory
instead of executable if the argument was found inside a directory
contained in PATH.
An example where this could cause a problem is if there was a RUN line
that ran the ``test`` command and if the user had a directory in their
PATH that contained a directory called ``test/`` (that occured before
``/usr/bin/``). Lit would try to use the directory as the executable
which would fail with the rather cryptic message.
```
Could not create process due to [Errno 13] Permission denied
```
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253031
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Fri, 13 Nov 2015 11:05:13 +0000 (11:05 +0000)]
[GlobalOpt] Make sure all debug lines end with '\n'
GlobalVariable::print() used to emit a newline. It hasn't for a while now, but these debug lines weren't updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253030
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Fri, 13 Nov 2015 11:05:07 +0000 (11:05 +0000)]
[GlobalOpt] Coding style - remove function names from doxygen comments
Suggested by Mehdi in the review of D14148.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253029
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Fri, 13 Nov 2015 10:05:31 +0000 (10:05 +0000)]
[AArch64] Check the expansion of BITREVERSE in regression test
Something I missed from Hal's review, rightly pointed out by Ben Kramer - we should make sure the expansion is properly checked as it can be easy for bugs to creep in.
I've checked the scalar i8 expansion here and the vector i8 expansion in a previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253024
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Fri, 13 Nov 2015 10:02:36 +0000 (10:02 +0000)]
[SDAG] Fix expansion of BITREVERSE
Richard Trieu noted that UBSan detected an overflowing shift, and the obvious fix caused a crash.
What was happening was that the shiftee (1U) was indeed too small for the possible range of shifts it had to handle, but also we were using "VT.getSizeInBits()" to get the maximum type bitwidth, but we wanted "VT.getScalarSizeInBits()" to get the vector lane size instead of the entire vector size.
Use an APInt for the shift and VT.getScalarSizeInBits().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253023
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Fri, 13 Nov 2015 08:14:00 +0000 (08:14 +0000)]
[ImplicitNulls] Add some clarifying comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253020
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 13 Nov 2015 07:58:06 +0000 (07:58 +0000)]
[Hexagon] Fixing leak in padEndloop by allocating in MCContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253019
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 13 Nov 2015 06:06:58 +0000 (06:06 +0000)]
llvm/test/tools/llvm-profdata/text-format-errors.test: Use prepared version of the input file, instead of using echo.
...and s/\C9/\xC9/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253014
91177308-0d34-0410-b5e6-
96231b3b80d8
Nathan Slingerland [Fri, 13 Nov 2015 03:47:58 +0000 (03:47 +0000)]
[llvm-profdata] Add check for text profile formats and improve error reporting (2nd try)
Summary:
This change addresses two possible instances of user error / confusion when
merging sampled profile data.
Previously any input that didn't match the raw or processed instrumented format
would automatically be interpreted as instrumented profile text format data.
No error would be reported during the merge.
Example:
If foo-sampled.profdata and bar-sampled.profdata are binary sampled profiles:
Old behavior:
$ llvm-profdata merge foo-sampled.profdata bar-sampled.profdata -output foobar-sampled.profdata
$ llvm-profdata show -sample foobar-sampled.profdata
error: foobar-sampled.profdata:1: Expected 'mangled_name:NUM:NUM', found lprofi
This change adds basic checks for valid input data when assuming text input.
It also makes error messages related to file format validity more specific about
the assumbed profile data type.
New behavior:
$ llvm-profdata merge foo-sampled.profdata bar-sampled.profdata -o foobar-sampled.profdata
error: foo.profdata: Unrecognized instrumentation profile encoding format
Perhaps you forgot to use the -sample option?
Reviewers: bogner, davidxl, dnovillo
Subscribers: davidxl, llvm-commits
Differential Revision: http://reviews.llvm.org/D14558
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253009
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 13 Nov 2015 02:44:16 +0000 (02:44 +0000)]
[libFuzzer] more trophies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253006
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Fri, 13 Nov 2015 02:16:51 +0000 (02:16 +0000)]
[lib/Linker] Convert assert(false) to llvm_unreachable().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253005
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 13 Nov 2015 01:54:40 +0000 (01:54 +0000)]
[libFuzzer] make libFuzzer build even with a compiler that does not have sanitizer headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253003
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 13 Nov 2015 01:46:06 +0000 (01:46 +0000)]
[Hexagon] NFC. Adding a number of packet correctness tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253000
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 13 Nov 2015 01:44:32 +0000 (01:44 +0000)]
Revert r252990.
Some of the buildbots are still failing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252999
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Nov 2015 01:42:29 +0000 (01:42 +0000)]
[WebAssembly] Inline asm support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252997
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 13 Nov 2015 01:26:31 +0000 (01:26 +0000)]
LLVM_ENABLE_MODULES: No need to set -fcxx-modules in trunk, just -fmodules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252996
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 13 Nov 2015 01:23:11 +0000 (01:23 +0000)]
Provide a way to specify inliner's attribute compatibility and merging.
This reapplies r252949. I've changed the type of FuncName to be
std::string instead of StringRef in emitFnAttrCompatCheck.
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@252990
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 13 Nov 2015 01:12:25 +0000 (01:12 +0000)]
[Hexagon] Adding relaxation functionality to backend and test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252989
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Nov 2015 00:50:04 +0000 (00:50 +0000)]
[WebAssembly] Un-mangle the conversion instruction names.
This arranges the types in the LLVM instruction names in the same order that
they appear in the WebAssembly opcode names, and eliminates
double-underscores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252988
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Nov 2015 00:46:31 +0000 (00:46 +0000)]
[WebAssembly] Rename BR_IF_ to BR_IF
With MC-based instruction printing, we no longer need instruction names to
mangle in hints about how they should be printed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252987
91177308-0d34-0410-b5e6-
96231b3b80d8