OSDN Git Service
Silviu Baranga [Mon, 25 Apr 2016 14:29:18 +0000 (14:29 +0000)]
[ARM] Add support for the X asm constraint
Summary:
This patch adds support for the X asm constraint.
To do this, we lower the constraint to either a "w" or "r" constraint
depending on the operand type (both constraints are supported on ARM).
Fixes PR26493
Reviewers: t.p.northover, echristo, rengolin
Subscribers: joker.eph, jgreenhalgh, aemerson, rengolin, llvm-commits
Differential Revision: http://reviews.llvm.org/D19061
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267411
91177308-0d34-0410-b5e6-
96231b3b80d8
Artem Tamazov [Mon, 25 Apr 2016 14:13:51 +0000 (14:13 +0000)]
[AMDGPU][llvm-mc] s_getreg/setreg* - Add hwreg(...) syntax.
Added hwreg(reg[,offset,width]) syntax.
Default offset = 0, default width = 32.
Possibility to specify 16-bit immediate kept.
Added out-of-range checks.
Disassembling is always to hwreg(...) format.
Tests updated/added.
Differential Revision: http://reviews.llvm.org/D19329
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267410
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Mon, 25 Apr 2016 13:58:05 +0000 (13:58 +0000)]
Test commit: modified comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267406
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 25 Apr 2016 13:25:14 +0000 (13:25 +0000)]
Typo. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267399
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Mon, 25 Apr 2016 12:49:47 +0000 (12:49 +0000)]
[Hexagon] Correctly set "Flags" in ELF header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267397
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Mon, 25 Apr 2016 10:48:29 +0000 (10:48 +0000)]
[GlobalOpt] Allow constant globals to be SRA'd
The current logic assumes that any constant global will never be SRA'd. I presume this is because normally constant globals can be pushed into their uses and deleted. However, that sometimes can't happen (which is where you really want SRA, so the elements that can be eliminated, are!).
There seems to be no reason why we can't SRA constants too, so let's do it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267393
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Kudrin [Mon, 25 Apr 2016 09:43:37 +0000 (09:43 +0000)]
[Coverage] Restore the correct count value after processing a nested region in case of combined regions.
If several regions cover the same area of code, we have to restore
the combined value for that area when return from a nested region.
This patch achieves that by combining regions before calling buildSegments.
Differential Revision: http://reviews.llvm.org/D18610
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267390
91177308-0d34-0410-b5e6-
96231b3b80d8
Silviu Baranga [Mon, 25 Apr 2016 09:27:16 +0000 (09:27 +0000)]
[SCEV] Improve the run-time checking of the NoWrap predicate
Summary:
This implements a new method of run-time checking the NoWrap
SCEV predicates, which should be easier to optimize and nicer
for targets that don't correctly handle multiplication/addition
of large integer types (like i128).
If the AddRec is {a,+,b} and the backedge taken count is c,
the idea is to check that |b| * c doesn't have unsigned overflow,
and depending on the sign of b, that:
a + |b| * c >= a (b >= 0) or
a - |b| * c <= a (b <= 0)
where the comparisons above are signed or unsigned, depending on
the flag that we're checking.
The advantage of doing this is that we avoid extending to a larger
type and we avoid the multiplication of large types (multiplying
i128 can be expensive).
Reviewers: sanjoy
Subscribers: llvm-commits, mzolotukhin
Differential Revision: http://reviews.llvm.org/D19266
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267389
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcin Koscielnicki [Mon, 25 Apr 2016 09:24:34 +0000 (09:24 +0000)]
[PowerPC] [PR27387] Disallow r0 for ADD8TLS.
ADD8TLS, a variant of add instruction used for initial-exec TLS,
currently accepts r0 as a source register. While add itself supports
r0 just fine, linker can relax it to a local-exec sequence, converting
it to addi - which doesn't support r0.
Differential Revision: http://reviews.llvm.org/D19193
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267388
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 25 Apr 2016 08:47:49 +0000 (08:47 +0000)]
Run GlobalOpt before emitting the bitcode for ThinLTO
This is motivated by reducing the size of the IR and thus reduce
compile time.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267385
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 25 Apr 2016 08:47:37 +0000 (08:47 +0000)]
ThinLTO: Move createNameAnonFunctionPass insertion in PassManagerBuilder (NFC)
It is just code motion, but makes more sense this way.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267384
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Mon, 25 Apr 2016 08:30:28 +0000 (08:30 +0000)]
fix comments
related to
Differential Revision: http://reviews.llvm.org/D17913
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267383
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Mon, 25 Apr 2016 05:27:51 +0000 (05:27 +0000)]
Fixing wrong mask size error. From __mmask8 to __mmask16.
Was reviewed over the shoulder by AsafBadouh.
Connected to review http://reviews.llvm.org/D19195.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267379
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 25 Apr 2016 04:38:08 +0000 (04:38 +0000)]
[Support/ELFRelocs] Add R_386_GOT32X.
The new relocation recently defined in the Intel386 psABI
was still missing from this file. A subsequent commit will
add support for GOT32X in MC, together with a test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267378
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 25 Apr 2016 04:30:29 +0000 (04:30 +0000)]
[X86] Replace a SmallVector used to pass 2 values to an ArrayRef parameter with a fixed size array. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267377
91177308-0d34-0410-b5e6-
96231b3b80d8
Junmo Park [Mon, 25 Apr 2016 01:40:54 +0000 (01:40 +0000)]
Minor code cleanups. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267375
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 25 Apr 2016 01:01:15 +0000 (01:01 +0000)]
[X86] Add a complete set of tests for all operand sizes of cttz/ctlz with and without zero undef being lowered to bsf/bsr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267373
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Sun, 24 Apr 2016 22:23:13 +0000 (22:23 +0000)]
Verifier: Verify that each inlinable callsite of a debug-info-bearing function
in a debug-info-bearing function has a debug location attached to it. Failure to
do so causes an "!dbg attachment points at wrong subprogram for function"
assertion failure when the inliner sets up inline scope info.
rdar://problem/
25878916
This reaplies r267320 without changes after fixing an issue in the OpenMP IR
generator in clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267370
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 24 Apr 2016 21:42:56 +0000 (21:42 +0000)]
Also check the IR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267367
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 24 Apr 2016 21:30:18 +0000 (21:30 +0000)]
Add a test for how we handle protected visibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267366
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Apr 2016 20:30:48 +0000 (20:30 +0000)]
[X86][AVX] Added PR24935 test case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267362
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 24 Apr 2016 20:12:48 +0000 (20:12 +0000)]
ARM: fix __chkstk Frame Setup on WoA
This corrects the MI annotations for the stack adjustment following the __chkstk
invocation. We were marking the original SP usage as a Def rather than Kill.
The (new) assigned value is the definition, the original reference is killed.
Adjust the ISelLowering to mark Kills and FrameSetup as well.
This partially resolves PR27480.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267361
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Apr 2016 19:31:56 +0000 (19:31 +0000)]
Tweak comments to make it clear that these combines are for SSE scalar instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267360
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Apr 2016 18:35:59 +0000 (18:35 +0000)]
[InstCombine][SSE] Reduce DIVSS/DIVSD to FDIV if only first element is required
As discussed on D19318, if we only demand the first element of a DIVSS/DIVSD intrinsic, then reduce to a FDIV call. This matches the existing FADD/FSUB/FMUL patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267359
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Apr 2016 18:23:14 +0000 (18:23 +0000)]
[InstCombine][SSE] Demanded vector elements for scalar intrinsics (Part 2 of 2)
Split from D17490. This patch improves support for determining the demanded vector elements through SSE scalar intrinsics:
1 - demanded vector element support for unary and some extra binary scalar intrinsics (RCP/RSQRT/SQRT/FRCZ and ADD/CMP/DIV/ROUND).
2 - addss/addsd get simplified to a fadd call if we aren't interested in the pass through elements
3 - if we don't need the lowest element of a scalar operation then just use the first argument (the pass through elements) directly
We can add support for propagating demanded elements through any equivalent packed SSE intrinsics in a future patch (these wouldn't use the pass through patterns).
Differential Revision: http://reviews.llvm.org/D19318
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267357
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Apr 2016 18:12:42 +0000 (18:12 +0000)]
[InstCombine][SSE] Demanded vector elements for scalar intrinsics (Part 1 of 2)
This patch improves support for determining the demanded vector elements through SSE scalar intrinsics:
1 - recognise that we only need the lowest element of the second input for binary scalar operations (and all the elements of the first input)
2 - recognise that the roundss/roundsd intrinsics use the lowest element of the second input and the remaining elements from the first input
Differential Revision: http://reviews.llvm.org/D17490
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267356
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Apr 2016 17:57:27 +0000 (17:57 +0000)]
[InstCombine] Avoid updating argument demanded elements in separate passes.
As discussed on D17490, we should attempt to update an intrinsic's arguments demanded elements in one pass if we can.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267355
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 24 Apr 2016 17:55:57 +0000 (17:55 +0000)]
Fix typo in comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267354
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 24 Apr 2016 17:55:41 +0000 (17:55 +0000)]
Remove emacs mode markers from .cpp files. NFC
.cpp files are unambiguously C++, you only need the mode markers on .h files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267353
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Apr 2016 17:23:46 +0000 (17:23 +0000)]
[X86][InstCombine] Tidyup VPERMILVAR -> shufflevector conversion to helper function. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267352
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Apr 2016 17:00:34 +0000 (17:00 +0000)]
[X86][InstCombine] Tidyup PSHUFB -> shufflevector conversion to helper function. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267351
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Apr 2016 16:49:53 +0000 (16:49 +0000)]
[X86][SSE] getTargetShuffleMaskIndices - dropped (unused) UNDEF handling
We aren't currently making use of this in any successful mask decode and its actually incorrect as it inserts the wrong number of SM_SentinelUndef mask elements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267350
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Apr 2016 16:33:35 +0000 (16:33 +0000)]
[X86][SSE] Use range loop. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267349
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 24 Apr 2016 16:30:51 +0000 (16:30 +0000)]
[Lanai] Use EVT::getEVTString() to print a type as a string instead of an enum encoding value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267348
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Apr 2016 15:45:06 +0000 (15:45 +0000)]
[X86][SSE] Added SSSE3/AVX/AVX2 BITREVERSE tests
Codegen is pretty bad at the moment but could use PSHUFB quite efficiently
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267347
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Apr 2016 15:05:04 +0000 (15:05 +0000)]
[X86][XOP] Fixed VPPERM permute op decoding (PR27472).
Fixed issue with VPPERM target shuffle mask decoding that was incorrectly masking off the 3-bit permute op with a 2-bit mask.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267346
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sun, 24 Apr 2016 15:04:28 +0000 (15:04 +0000)]
BitcodeReader: Delay metadata parsing until reading a function body
There's hardly any functionality change here. Instead of calling
materializeMetadata on the first call to materialize(GlobalValue*), wait
until the first one that's actually going to do something. Noticed by
inspection; I don't have a concrete case where this makes a difference.
Added an assertion in materializeMetadata to be sure this (or a future
change) doesn't delay materializeMetadata after function-level metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267345
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Sun, 24 Apr 2016 14:57:11 +0000 (14:57 +0000)]
[ThinLTO] Remove GlobalValueInfo class from index
Summary:
Remove the GlobalValueInfo and change the ModuleSummaryIndex to directly
reference summary objects. The info structure was there to support lazy
parsing of the combined index summary objects, which is no longer
needed and not supported.
Reviewers: joker.eph
Subscribers: joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D19462
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267344
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Apr 2016 14:53:54 +0000 (14:53 +0000)]
[X86][SSE] Improved support for decoding target shuffle masks through bitcasts
Reused the ability to split constants of a type wider than the shuffle mask to work with masks generated from scalar constants transfered to xmm.
This fixes an issue preventing PSHUFB target shuffle masks decoding rematerialized scalar constants and also exposes the XOP VPPERM bug described in PR27472.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267343
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sun, 24 Apr 2016 14:25:37 +0000 (14:25 +0000)]
ModuleSummaryIndex: Avoid enum bitfields for MSVC portability
Enum bitfields have crazy portability issues with MSVC. Use unsigned
instead of LinkageTypes here in the ModuleSummaryIndex to address
Takumi's concerns from r267335.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267342
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sun, 24 Apr 2016 14:13:17 +0000 (14:13 +0000)]
Revert "Declare GlobalValue::LinkageTypes based on unsigned."
This reverts commit r267335. The build has been broken for hours
because of it:
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/23352/
The correct fix is avoid using any enum in a bitfield.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267341
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcin Koscielnicki [Sun, 24 Apr 2016 13:57:49 +0000 (13:57 +0000)]
[SystemZ] [SSP] Add support for LOAD_STACK_GUARD.
This fixes PR22248 on s390x. The previous attempt at this was D19101,
which was before LOAD_STACK_GUARD existed. Compared to the previous
version, this always emits a rather ugly block of 4 instructions, involving
a thread pointer load that can't be shared with other potential users.
However, this is necessary for SSP - spilling the guard value (or thread
pointer used to load it) is counter to the goal, since it could be
overwritten along with the frame it protects.
Differential Revision: http://reviews.llvm.org/D19363
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267340
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Apr 2016 13:45:30 +0000 (13:45 +0000)]
[X86][SSE] Demonstrate issue with decoding shuffle masks that have been lowered as rematerialized constants on scalar unit
Found whilst investigating PR27472
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267339
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sun, 24 Apr 2016 13:03:20 +0000 (13:03 +0000)]
Silence two C4806 warnings ('|': unsafe operation: no value of type 'bool' promoted to type 'const unsigned int' can equal the given constant). The fact that they trigger with this code seems like it may be a bug, but the warning itself is still generally useful enough to retain it for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267337
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 24 Apr 2016 10:11:45 +0000 (10:11 +0000)]
Declare GlobalValue::LinkageTypes based on unsigned.
Or, "LinkageTypes Linkage : 4;" might be sign-extended on msc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267335
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 24 Apr 2016 08:02:00 +0000 (08:02 +0000)]
llvm/test/tools/gold/X86/thinlto.ll: Possible fix corresponding to r267318.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267334
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sun, 24 Apr 2016 06:52:01 +0000 (06:52 +0000)]
BitcodeReader: Fix some holes in upgrade from r267296
Add tests for some missing cases to bitcode upgrade in r267296.
- DICompositeType with an 'elements:' field, which will cause it to be
involved in a cycle after the upgrade.
- A DIDerivedType that references a class in 'extraData:'.
I updated test/Bitcode/dityperefs-3.8.ll with the missing cases and
regenerated test/Bitcode/dityperefs-3.8.ll.bc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267332
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 24 Apr 2016 06:27:39 +0000 (06:27 +0000)]
[X86] Merge LowerCTLZ and LowerCTLZ_ZERO_UNDEF into a single function that branches internally for the one difference, allowing the rest of the code to be common. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267331
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 24 Apr 2016 06:27:35 +0000 (06:27 +0000)]
[X86] Node need to check if AVX512 is supported when lowering vector CTLZ. The CTLZ operation is only Custom for vectors if AVX512 is enabled so if a vector gets here AVX512 is implied. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267330
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sun, 24 Apr 2016 05:31:43 +0000 (05:31 +0000)]
Add "hasSection" flag in the Summary
Reviewers: tejohnson
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19405
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267329
91177308-0d34-0410-b5e6-
96231b3b80d8
Gerolf Hoflehner [Sun, 24 Apr 2016 05:14:01 +0000 (05:14 +0000)]
[MachineCombiner] Support for floating-point FMA on ARM64 (re-commit r267098)
The original patch caused crashes because it could derefence a null pointer
for SelectionDAGTargetInfo for targets that do not define it.
Evaluates fmul+fadd -> fmadd combines and similar code sequences in the
machine combiner. It adds support for float and double similar to the existing
integer implementation. The key features are:
- DAGCombiner checks whether it should combine greedily or let the machine
combiner do the evaluation. This is only supported on ARM64.
- It gives preference to throughput over latency: the heuristic used is
to combine always in loops. The targets decides whether the machine
combiner should optimize for throughput or latency.
- Supports for fmadd, f(n)msub, fmla, fmls patterns
- On by default at O3 ffast-math
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267328
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 24 Apr 2016 04:38:34 +0000 (04:38 +0000)]
[X86] Remove isel patterns for selecting tzcnt/lzcnt from cmove/ne+cttz/ctlz. These are folded by DAG combine now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267326
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 24 Apr 2016 04:38:32 +0000 (04:38 +0000)]
[CodeGen] Teach DAG combine to fold select_cc seteq X, 0, sizeof(X), ctlz_zero_undef(X) -> ctlz(X). InstCombine already does this for IR and X86 pattern matches this during isel.
A follow up commit will remove the X86 patterns to allow this to be tested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267325
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 24 Apr 2016 04:38:29 +0000 (04:38 +0000)]
Fix an assertion that can never fire because the condition ANDed with the string is just true or 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267324
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Sun, 24 Apr 2016 03:47:37 +0000 (03:47 +0000)]
Revert "Verifier: Verify that each inlinable callsite of a debug-info-bearing function"
This reverts commit r267320 while investigating an OpenMP buildbot failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267322
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Sun, 24 Apr 2016 03:23:02 +0000 (03:23 +0000)]
Verifier: Verify that each inlinable callsite of a debug-info-bearing function
in a debug-info-bearing function has a debug location attached to it. Failure to
do so causes an "!dbg attachment points at wrong subprogram for function"
assertion failure when the inliner sets up inline scope info.
rdar://problem/
25878916
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267320
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sun, 24 Apr 2016 03:18:18 +0000 (03:18 +0000)]
Reorganize GlobalValueSummary with a "Flags" bitfield.
Right now it only contains the LinkageType, but will be extended
with "hasSection", "isOptSize", "hasInlineAssembly", etc.
Differential Revision: http://reviews.llvm.org/D19404
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267319
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sun, 24 Apr 2016 03:18:11 +0000 (03:18 +0000)]
Add a version field in the bitcode for the summary
Differential Revision: http://reviews.llvm.org/D19456
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267318
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sun, 24 Apr 2016 03:18:01 +0000 (03:18 +0000)]
Add an internalization step to the ThinLTOCodeGenerator
Keeping as much as possible internal/private is
known to help the optimizer. Let's try to benefit from
this in ThinLTO.
Note: this is early work, but is enough to build clang (and
all the LLVM tools). I still need to write some lit-tests...
Differential Revision: http://reviews.llvm.org/D19103
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267317
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 24 Apr 2016 02:01:25 +0000 (02:01 +0000)]
Fix a couple assertions that can never fire because they just contained the text string which always evaluates to true. Add a ! so they'll evaluate to false.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267312
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 24 Apr 2016 02:01:22 +0000 (02:01 +0000)]
[X86] Fix patterns that turn cmove/cmovne+ctlz/cttz into lzcnt/tzcnt instructions. Only one of the conditions should be valid for each pattern, not both. Update tests accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267311
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Sun, 24 Apr 2016 01:36:37 +0000 (01:36 +0000)]
[RuntimeDyldELF] Handle GOTPCRELX/REX_GOTPCRELX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267309
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Sun, 24 Apr 2016 01:08:35 +0000 (01:08 +0000)]
[MC/ELF] Make the relaxation test more interesting.
Add a case where we can't relax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267308
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Sun, 24 Apr 2016 01:03:57 +0000 (01:03 +0000)]
[MC/ELF] Implement support for GOTPCRELX/REX_GOTPCRELX.
The option to control the emission of the new relocations
is -relax-relocations (blatantly copied from GNU as).
It can't be enabled by default because it breaks relatively
recent versions of ld.bfd/ld.gold (late 2015).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267307
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sun, 24 Apr 2016 00:25:15 +0000 (00:25 +0000)]
Relax test using CHECK-DAG instead of CHECK-NEXT
It seems we still have some ordering issue in the combined index
emission, but I can't figure out why right now.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267306
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sun, 24 Apr 2016 00:03:57 +0000 (00:03 +0000)]
Fix test stability (was sensitive to the path)
This is a fixup for r267304.
The test was sensitive to the path in a subtle way:
the index in memory is sorted by GUID, which are hashes
that include the source filename for local globals.
Teresa recently added a directive at the IR level, so
we can specify it here to make the test independent of
the path.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267305
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sat, 23 Apr 2016 23:38:17 +0000 (23:38 +0000)]
Store and emit original name in combined index
Summary:
As discussed in D18298, some local globals can't
be renamed/promoted (because they have a section, or because
they are referenced from inline assembly).
To be able to detect naming collision, we need to keep around
the "GUID" using their original name without taking the linkage
into account.
Reviewers: tejohnson
Subscribers: joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D19454
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267304
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sat, 23 Apr 2016 23:29:24 +0000 (23:29 +0000)]
Always traverse GlobalVariable initializer when computing the export list
Summary:
We are always importing the initializer for a GlobalVariable.
So if a GlobalVariable is in the export-list, we pull in any
refs as well.
Reviewers: tejohnson
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19102
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267303
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 23 Apr 2016 22:29:09 +0000 (22:29 +0000)]
DebugInfo: Change DIBuilder to make distinct DIGlobalVariables
A long overdue change to make DIGlobalVariable distinct. Much like
DISubprogram definitions (changed in r246098), it isn't logical to
unique DIGlobalVariable definitions from two different compile units.
(Longer-term, we should also find a way to reverse the link between
GlobalVariable and DIGlobalVariable, and between DIGlobalVariable and
DICompileUnit, so that debug info to do with optimized-out globals
disappears. Admittedly it's harder than with Function/DISubprogram,
since global variables may be constant-folded and the debug info should
still describe that somehow.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267301
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Sat, 23 Apr 2016 22:26:31 +0000 (22:26 +0000)]
[MC/ELF] Pass Fixup to getRelocType64.
In preparation for other changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267300
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 23 Apr 2016 21:36:59 +0000 (21:36 +0000)]
BitcodeReader: Avoid std::vector with non-movable types from r267296
r267298 didn't quite fix the build errors. Use SmallVector instead of
std::vector, the latter of which I think is trying to maintain a strong
exception safety guarantee.
http://lab.llvm.org:8011/builders/lldb-amd64-ninja-freebsd11/builds/6228
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267299
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 23 Apr 2016 21:23:41 +0000 (21:23 +0000)]
BitcodeReader: Avoid non-moving std::piecewise_construct from r267296
Not exactly sure why the host tries to use a copy constructor here, but
it's easy enough to work around it.
http://lab.llvm.org:8011/builders/lldb-amd64-ninja-freebsd11/builds/6227
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267298
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 23 Apr 2016 21:08:00 +0000 (21:08 +0000)]
DebugInfo: Remove MDString-based type references
Eliminate DITypeIdentifierMap and make DITypeRef a thin wrapper around
DIType*. It is no longer legal to refer to a DICompositeType by its
'identifier:', and DIBuilder no longer retains all types with an
'identifier:' automatically.
Aside from the bitcode upgrade, this is mainly removing logic to resolve
an MDString-based reference to an actualy DIType. The commits leading
up to this have made the implicit type map in DICompileUnit's
'retainedTypes:' field superfluous.
This does not remove DITypeRef, DIScopeRef, DINodeRef, and
DITypeRefArray, or stop using them in DI-related metadata. Although as
of this commit they aren't serving a useful purpose, there are patchces
under review to reuse them for CodeView support.
The tests in LLVM were updated with deref-typerefs.sh, which is attached
to the thread "[RFC] Lazy-loading of debug info metadata":
http://lists.llvm.org/pipermail/llvm-dev/2016-April/098318.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267296
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 23 Apr 2016 20:01:22 +0000 (20:01 +0000)]
replace duplicated static functions for profile metadata access with BranchInst member function; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267295
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Sat, 23 Apr 2016 19:30:52 +0000 (19:30 +0000)]
Revert "[AArch64] Fix optimizeCondBranch logic."
This reverts commit r267206, as it broke self-hosting on AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267294
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 23 Apr 2016 16:31:48 +0000 (16:31 +0000)]
improve documentation comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267292
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 23 Apr 2016 11:14:18 +0000 (11:14 +0000)]
[X86][XOP] Added VPPERM -> BLEND-WITH-ZERO Test
Currently failing due to poor blend matching, found whilst investigating PR27472
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267282
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 23 Apr 2016 11:01:36 +0000 (11:01 +0000)]
Use %T instead of cd'ing to Output directly.
%T expands to Output if not configured differently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267281
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 23 Apr 2016 05:20:47 +0000 (05:20 +0000)]
[CodeGen] When promoting CTTZ operations to larger type, don't insert a select to detect if the input is zero to return the original size instead of the extended size. Instead just set the first bit in the zero extended part.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267280
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Sat, 23 Apr 2016 05:15:59 +0000 (05:15 +0000)]
[gold] Gate value name discarding under save-temps
Summary:
This removes a couple of flags added to control this behavior, and
simply keeps all value names when save-temps is specified.
Reviewers: rafael
Subscribers: llvm-commits, pcc, davide
Differential Revision: http://reviews.llvm.org/D19384
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267279
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 23 Apr 2016 04:59:22 +0000 (04:59 +0000)]
BitcodeWriter: Emit uniqued subgraphs after all distinct nodes
Since forward references for uniqued node operands are expensive (and
those for distinct node operands are cheap due to
DistinctMDOperandPlaceholder), minimize forward references in uniqued
node operands.
Moreover, guarantee that when a cycle is broken by a distinct node, none
of the uniqued nodes have any forward references. In
ValueEnumerator::EnumerateMetadata, enumerate uniqued node subgraphs
first, delaying distinct nodes until all uniqued nodes have been
handled. This guarantees that uniqued nodes only have forward
references when there is a uniquing cycle (since r267276 changed
ValueEnumerator::organizeMetadata to partition distinct nodes in front
of uniqued nodes as a post-pass).
Note that a single uniqued subgraph can hit multiple distinct nodes at
its leaves. Ideally these would themselves be emitted in post-order,
but this commit doesn't attempt that; I think it requires an extra pass
through the edges, which I'm not convinced is worth it (since
DistinctMDOperandPlaceholder makes forward references quite cheap
between distinct nodes).
I've added two testcases:
- test/Bitcode/mdnodes-distinct-in-post-order.ll is just like
test/Bitcode/mdnodes-in-post-order.ll, except with distinct nodes
instead of uniqued ones. This confirms that, in the absence of
uniqued nodes, distinct nodes are still emitted in post-order.
- test/Bitcode/mdnodes-distinct-nodes-break-cycles.ll is the minimal
example where a naive post-order traversal would cause one uniqued
node to forward-reference another. IOW, it's the motivating test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267278
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 23 Apr 2016 04:52:47 +0000 (04:52 +0000)]
Avoid MSVC failure with default arguments in lambdas from r267270
http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/11700
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267277
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 23 Apr 2016 04:42:39 +0000 (04:42 +0000)]
BitcodeWriter: Emit distinct nodes before uniqued nodes
When an operand of a distinct node hasn't been read yet, the reader can
use a DistinctMDOperandPlaceholder. This is much cheaper than forward
referencing from a uniqued node. Change
ValueEnumerator::organizeMetadata to partition distinct nodes and
uniqued nodes to reduce the overhead of cycles broken by distinct nodes.
Mehdi measured this for me; this removes most of the RAUW from the
importing step of -flto=thin, even after a WIP patch that removes
string-based DITypeRefs (introducing many more cycles to the metadata
graph).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267276
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 23 Apr 2016 04:34:11 +0000 (04:34 +0000)]
Add #ifndef NDEBUG markers around EXPECT_DEATH after r267270
http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/36076
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267275
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Sat, 23 Apr 2016 04:31:20 +0000 (04:31 +0000)]
Address comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267274
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Sat, 23 Apr 2016 04:30:47 +0000 (04:30 +0000)]
Refactor bitcode writer into classes (NFC)
Summary:
As discussed in on the mailing list yesterday, I have refactored
BitcodeWriter.cpp to use classes to manage the bitcode writing process,
instead of passing around long lists of parameters between static
functions. See:
http://lists.llvm.org/pipermail/llvm-dev/2016-April/098610.html
I created a parent BitcodeWriter class to own the BitstreamWriter,
write the header, and contain the main entry point into the writing
process. There are two derived classes, one for writing a module and one
for writing a combined index file (for ThinLTO), which manage the
writing process specific to those bitcode file types.
I also changed the functions to conform to LLVM coding standards
(lowercase function name first letter). The only two routines that still
start with an uppercase letter are the two external interfaces, which
can be fixed as a follow-on (I wanted to keep this round just within
BitcodeWriter.cpp).
Reviewers: dexonsmith, joker.eph
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19447
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267273
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 23 Apr 2016 04:23:57 +0000 (04:23 +0000)]
Avoid ternery statement to please g++ after r267270, NFC
http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/36074
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267272
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 23 Apr 2016 04:22:38 +0000 (04:22 +0000)]
ValueEnumerator: Use std::find_if, NFC
Mehdi's pattern recognition pulled this one out. This is cleaner with
std::find_if than with the strange helper function that took an iterator
by reference and updated it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267271
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 23 Apr 2016 04:15:56 +0000 (04:15 +0000)]
BitcodeReader: Avoid referencing unresolved nodes from distinct ones
Each reference to an unresolved MDNode is expensive, since the RAUW
support in MDNode uses a separate allocation and side map. Since
a distinct MDNode doesn't require its operands on creation (unlike
uniuqed nodes, there's no need to check for structural equivalence),
use nullptr for any of its unresolved operands. Besides reducing the
burden on MDNode maps, this can avoid allocating temporary MDNodes in
the first place.
We need some way to track operands. Invent DistinctMDOperandPlaceholder
for this purpose, which is a Metadata subclass that holds an ID and
points at its single user. DistinctMDOperandPlaceholder::replaceUseWith
is just like RAUW, but its name highlights that there is only ever
exactly one use.
There is no support for moving (or, obviously, copying) these. Move
support would be possible but expensive; leaving it unimplemented
prevents user error. In the BitcodeReader I originally considered
allocating on a BumpPtrAllocator and keeping a vector of pointers to
them, and then I realized that std::deque implements exactly this.
A couple of obvious follow-ups:
- Change ValueEnumerator to emit distinct nodes first to take more
advantage of this optimization. (How convenient... I think I might
have a couple of patches for this.)
- Change DIBuilder and its consumers (like CGDebugInfo in clang) to
use something like this when constructing debug info in the first
place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267270
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 23 Apr 2016 04:02:39 +0000 (04:02 +0000)]
Tag the end of an anonymous namespace, NFC
Prevent clang-format from moving the closing branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267269
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 23 Apr 2016 04:01:57 +0000 (04:01 +0000)]
BitcodeReader: Consistently use IsDistinct, NFC
Consistently use the IsDistinct variable and start relying on it in
GET_OR_DISTINCT. This change has NFC, but prepares for using IsDistinct
to optimize the behaviour of the getMD() and getMDOrNull() helpers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267268
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 23 Apr 2016 03:55:14 +0000 (03:55 +0000)]
BitcodeReader: Use getMD/getMDOrNull helpers consistently, almost NFC
The only functionality change was removing an error check from the
BitcodeReader (and an assertion from DILocation::getImpl) that is
already caught by Verifier::visitDILocation. The Verifier is a better
place for this anyway, and being inconsistent with other subclasses of
MDNode isn't serving anyone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267267
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 23 Apr 2016 02:49:31 +0000 (02:49 +0000)]
[Hexagon] Set ctlz_zero_undef/cttz_zero_undef to Expand so LegalizeDAG will convert them to ctlz/cttz. Remove the now unneccessary isel patterns. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267266
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 23 Apr 2016 02:49:29 +0000 (02:49 +0000)]
[NVPTX] Set ctlz_zero_undef to Expand so LegalizeDAG will convert it to ctlz. Remove the now unneccessary isel patterns. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267265
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 23 Apr 2016 02:49:25 +0000 (02:49 +0000)]
[WebAssembly] Set ctlz_zero_undef/cttz_zero_undef to Expand so LegalizeDAG will convert them to ctlz/cttz. Remove the now unneccessary isel patterns. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267264
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Sat, 23 Apr 2016 00:12:45 +0000 (00:12 +0000)]
Style fix in Core.h / Core.cpp. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267257
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 22 Apr 2016 23:23:31 +0000 (23:23 +0000)]
llvm-objdump: deal with invalid ARM encodings slightly better.
Before we printed a warning to stderr and left the actual output stream in a
mess. This tries to print a .long or .short representation of what we saw (as
if there was a data-in-code directive).
This isn't guaranteed to restore synchronization in Thumb-mode (if the invalid
instruction was supposed to be 32-bits, we may be off-by-16 for the rest of the
function). But there's no certain way to deal with that, and it's invalid code
anyway (if the data really wasn't an instruction, the user can add proper
.data_in_code directives if they care)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267250
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 22 Apr 2016 23:21:13 +0000 (23:21 +0000)]
MachO: remove weird ARM/Thumb interface from MachOObjectFile
Only one consumer (llvm-objdump) actually cared about the fact that there were
two triples. Others were actively working around the fact that the Triple
returned by getArch might have been invalid. As for llvm-objdump, it needs to
be acutely aware of both Triples anyway, so being generic in the exposed API is
no benefit.
Also rename the version of getArch returning a Triple. Users were having to
pass an unwanted nullptr to disambiguate the two, which was nasty.
The only functional change here is that armv7m and armv7em object files no
longer crash llvm-objdump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267249
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 22 Apr 2016 22:59:16 +0000 (22:59 +0000)]
AMDGPU: sext_inreg (srl x, K), vt -> bfe x, K, vt.Size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267244
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 22 Apr 2016 22:51:48 +0000 (22:51 +0000)]
Fix llvm/test/CodeGen/ARM/Windows/dbzchk.ll not to check mixed output, take #2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267242
91177308-0d34-0410-b5e6-
96231b3b80d8