OSDN Git Service
Adrian Prantl [Thu, 4 May 2017 16:24:31 +0000 (16:24 +0000)]
Cleanup tests to not share a DISubprogram between multiple Functions.
rdar://problem/
31926379
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302166
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Thu, 4 May 2017 16:21:30 +0000 (16:21 +0000)]
[test-release] Status update *before* long gzip
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302165
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 4 May 2017 14:24:50 +0000 (14:24 +0000)]
[globalisel][tablegen] Add several GINodeEquiv's for operators that do not require additional support.
Summary:
As of this patch, 350 out of 3938 rules are currently imported.
Depends on D32229
Reviewers: qcolombet, kristof.beyls, rovka, t.p.northover, ab, aditya_nandakumar
Reviewed By: ab
Subscribers: dberris, llvm-commits, igorb
Differential Revision: https://reviews.llvm.org/D32275
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302154
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 4 May 2017 14:14:44 +0000 (14:14 +0000)]
[DAGCombine] Transform (fadd A, (fmul B, -2.0)) -> (fsub A, (fadd B, B)).
Differential Revision: http://reviews.llvm.org/D32596
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302153
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 4 May 2017 13:42:57 +0000 (13:42 +0000)]
[X86][AVX512] Fix VPABSD file checks
Fix capitalization and string matching
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302150
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 4 May 2017 13:35:40 +0000 (13:35 +0000)]
[X86][SSE] Add i686 triple tests for partial vector and re-association
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302149
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 4 May 2017 13:35:17 +0000 (13:35 +0000)]
Refactoring with range-based for, NFC
Patch by Wei-Ren Chen.
Differential Revision: https://reviews.llvm.org/D32682
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302148
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Thu, 4 May 2017 13:33:30 +0000 (13:33 +0000)]
[SystemZ] Make copyPhysReg() add impl-use operands of super reg.
When a 128 bit COPY is lowered into two instructions, an impl-use operand of
the super-reg should be added to each new instruction in case one of the
sub-regs is undefined.
Review: Ulrich Weigand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302146
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 4 May 2017 13:08:09 +0000 (13:08 +0000)]
[X86][SSE] Add i686 triple tests for PBLENDW commutation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302145
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 4 May 2017 13:00:30 +0000 (13:00 +0000)]
[X86][AVX1] Regenerate checks and add i686 triple tests for folded logical ops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302144
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Liu [Thu, 4 May 2017 11:49:39 +0000 (11:49 +0000)]
Revert "IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI."
This reverts commit r302108. This causes crash in clang bootstrap with LTO.
Contacted the auther in the original commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302140
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Thu, 4 May 2017 11:03:50 +0000 (11:03 +0000)]
[mips][XRay] Use the base version of emitXRayTable
Follow up rL290858 by removing the MIPS specific version of XRayTable
emission in favour of the basic version.
This resolves a buildbot failure where the ELF sections were malformed
causing the linker to reject the object files with xray related sections.
Reviewers: dberris, slthakur
Differential Revision: https://reviews.llvm.org/D32808
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302138
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Thu, 4 May 2017 10:54:35 +0000 (10:54 +0000)]
[ArgPromotion] Fix a truncated variable
This fixes a regression since SVN rev 273808 (which was supposed to
not change functionality).
The regression caused miscompilations (noted in the wild when targeting
AArch64) on platforms with 32 bit long.
Differential Revision: https://reviews.llvm.org/D32850
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302137
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Thu, 4 May 2017 10:37:00 +0000 (10:37 +0000)]
[LLVM][inline-asm][Altmacor] Altmacro string delimiter '<..>'
In this patch, I introduce a new altmacro string delimiter.
This review is the second review in a series of four reviews.
(one for each altmacro feature: LOCAL, string delimiter, string '!' escape sign and absolute expression as a string '%' ).
In the alternate macro mode, you can delimit strings with matching angle brackets <..>
when using it as a part of calling macro arguments.
As described in the https://sourceware.org/binutils/docs-2.27/as/Altmacro.html
"<string>
You can delimit strings with matching angle brackets."
assumptions:
1. If an argument begins with '<' and ends with '>'. The argument is considered as a string.
2. Except adding new string mark '<..>', a regular macro behavior is expected.
3. The altmacro cannot affect the regular less/greater behavior.
4. If a comma is present inside an angle brackets it considered as a character and not as a separator.
Differential Revision: https://reviews.llvm.org/D32701
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302135
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Thu, 4 May 2017 07:34:58 +0000 (07:34 +0000)]
[X86][AVX-512] Allow EVEX encoded instruction selection when available for mul v8i32.
Differential Revision: https://reviews.llvm.org/D32679
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302127
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Thu, 4 May 2017 07:31:28 +0000 (07:31 +0000)]
[ARM] ACLE Chapter 9 intrinsics
Added the integer data processing intrinsics from ACLE v2.1 Chapter 9
but I have missed out the saturation_occurred intrinsics for now. For
the instructions that read and write the GE bits, a chain is included
and the only instruction that reads these flags (sel) is only
selectable via the implemented intrinsic.
Differential Revision: https://reviews.llvm.org/D32281
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302126
91177308-0d34-0410-b5e6-
96231b3b80d8
Oren Ben Simhon [Thu, 4 May 2017 07:22:49 +0000 (07:22 +0000)]
[X86] Disabling PLT in Regcall CC Functions
According to psABI, PLT stub clobbers XMM8-XMM15.
In Regcall calling convention those registers are used for passing parameters.
Thus we need to prevent lazy binding in Regcall.
Differential Revision: https://reviews.llvm.org/D32430
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302124
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Thu, 4 May 2017 06:53:31 +0000 (06:53 +0000)]
[AVX-512VL] Autogenerate checks. Add --show-mc-encoding to check instruction predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302123
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Thu, 4 May 2017 06:24:52 +0000 (06:24 +0000)]
[AVX] Fix vpcmpeqq predicate.
Summary:
Fix vpcmpeqq predicate. AVX512 version of vpcmpeqq is not equivalent to AVX one.
Split from https://reviews.llvm.org/D32679
Reviewers: craig.topper, zvi, aymanmus
Reviewed By: craig.topper
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32786
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302119
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Thu, 4 May 2017 05:31:56 +0000 (05:31 +0000)]
Use right function in LoopVectorize.
- unsigned AS = getMemInstAlignment(I);
+ unsigned AS = getMemInstAddressSpace(I);
Review: Hal Finkel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302114
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Thu, 4 May 2017 04:55:46 +0000 (04:55 +0000)]
[XRay] Use wordsize-dependent alignment for index
This makes it simpler for the runtime to consistently handle the entries
in the function sled index in both 32 and 64 bit platforms where the
XRay runtime works.
Follow-up on D32693.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302111
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 4 May 2017 04:33:27 +0000 (04:33 +0000)]
[SelectionDAG] Improve known bits support for CTPOP.
This is based on the same concept from ValueTracking's version of computeKnownBits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302110
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Thu, 4 May 2017 03:37:57 +0000 (03:37 +0000)]
[XRay] Create an Index of sleds per function
Summary:
This change adds a new section to the xray-instrumented binary that
stores an index into ranges of the instrumentation map, where sleds
associated with the same function can be accessed as an array. At
runtime, we can get access to this index by function ID offset allowing
for selective patching and unpatching by function ID.
Each entry in this new section (xray_fn_idx) will include two pointers
indicating the start and one past the end of the sleds associated with
the same function. These entries will be 16 bytes long on x86 and
aarch64. On arm, we align to 16 bytes anyway so the runtime has to take
that into consideration.
__{start,stop}_xray_fn_idx will be the symbols that the runtime will
look for when we implement the selective patching/unpatching by function
id APIs. Because XRay synthesizes the function id's in a monotonically
increasing manner at runtime now, implementations (and users) can use
this table to look up the sleds associated with a specific function.
This is useful in implementations that want to do things like:
- Implement coverage mode for functions by patching everything
pre-main, then as functions are encountered, the installed handler
can unpatch the function that's been encountered after recording
that it's been called.
- Do "learning mode", so that the implementation can figure out some
statistical information about function calls by function id for a
time being, and then determine which functions are worth
uninstrumenting at runtime.
- Do "selective instrumentation" where an implementation can
specifically instrument only certain function id's at runtime
(either based on some external data, or through some other
heuristics) instead of patching all the instrumented functions at
runtime.
Reviewers: dblaikie, echristo, chandlerc, javed.absar
Subscribers: pelikan, aemerson, kpw, llvm-commits, rengolin
Differential Revision: https://reviews.llvm.org/D32693
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302109
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 4 May 2017 03:36:16 +0000 (03:36 +0000)]
IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI.
When profiling a no-op incremental link of Chromium I found that the functions
computeImportForFunction and computeDeadSymbols were consuming roughly 10% of
the profile. The goal of this change is to improve the performance of those
functions by changing the map lookups that they were previously doing into
pointer dereferences.
This is achieved by changing the ValueInfo data structure to be a pointer to
an element of the global value map owned by ModuleSummaryIndex, and changing
reference lists in the GlobalValueSummary to hold ValueInfos instead of GUIDs.
This means that a ValueInfo will take a client directly to the summary list
for a given GUID.
Differential Revision: https://reviews.llvm.org/D32471
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302108
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 4 May 2017 02:01:18 +0000 (02:01 +0000)]
llvm/IR/Function.h: Prune an obsolete @param in r302060. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302106
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Thu, 4 May 2017 01:24:26 +0000 (01:24 +0000)]
[XRay] Detect loops in functions being lowered
Summary:
This is an implementation of the loop detection logic that XRay needs to
determine whether a function might take time at runtime. Without this
heuristic, XRay will tend to not instrument short functions that have
loops that might have runtime dependent on inputs or external values.
While this implementation doesn't do any further analysis than just
figuring out whether there is a loop in the MachineFunction being
code-gen'ed, we're paving the way for being able to perform more
sophisticated analysis of the function in the future (for example to
determine whether the trip count for the loop might be constant, and
make a decision on that instead). This enables us to cover more
functions with the default heuristics, and potentially identify ones
that have variable runtime latency just by looking for the presence of
loops.
Reviewers: chandlerc, rnk, pelikan
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32274
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302103
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Wed, 3 May 2017 23:53:38 +0000 (23:53 +0000)]
[SCEV] createAddRecFromPHI: Optimize for the most common case.
Summary:
The existing implementation creates a symbolic SCEV expression every
time we analyze a phi node and then has to remove it, when the analysis
is finished. This is very expensive, and in most of the cases it's also
unnecessary. According to the data I collected, ~60-70% of analyzed phi
nodes (measured on SPEC) have the following form:
PN = phi(Start, OP(Self, Constant))
Handling such cases separately significantly speeds this up.
Reviewers: sanjoy, pete
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32663
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302096
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 3 May 2017 23:32:51 +0000 (23:32 +0000)]
strlen-1.ll: Fix test
Change test for `strlen(x) == 0 --> *x == 0` to actually test the
pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302094
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 May 2017 23:22:46 +0000 (23:22 +0000)]
[InstCombine][KnownBits] Use KnownBits better to detect nsw adds
Change checkRippleForAdd from a heuristic to a full check -
if it is provable that the add does not overflow return true, otherwise false.
Patch by Yoav Ben-Shalom
Differential Revision: https://reviews.llvm.org/D32686
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302093
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 3 May 2017 23:13:42 +0000 (23:13 +0000)]
Mark functions as not having CFI once we finalize an x86 stack frame
We'll set it back to true in emitPrologue if it gets called. It doesn't
get called for naked functions.
Fixes PR32912
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302092
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 May 2017 23:12:29 +0000 (23:12 +0000)]
[KnownBits] Add methods for determining if KnownBits is a constant value
This patch adds isConstant and getConstant for determining if KnownBits represents a constant value and to retrieve the value. Use them to simplify code.
Differential Revision: https://reviews.llvm.org/D32785
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302091
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 May 2017 22:25:19 +0000 (22:25 +0000)]
[ValueTracking] Remove handling for BitWidth being 0 in ComputeSignBit and isKnownNonZero.
I don't believe its possible to have non-zero values here since DataLayout became required. The APInt constructor inside of the KnownBits object will assert if this ever happens.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302089
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 May 2017 22:07:25 +0000 (22:07 +0000)]
[KnownBits] Add zext, sext, and trunc methods to KnownBits
This patch adds zext, sext, and trunc methods to KnownBits and uses them where possible.
Differential Revision: https://reviews.llvm.org/D32784
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302088
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 3 May 2017 21:55:34 +0000 (21:55 +0000)]
[TargetLowering] use isSubsetOf in SimplifyDemandedBits; NFCI
This is the DAG equivalent of https://reviews.llvm.org/D32255 ,
which will hopefully be committed again. The functionality
(preferring a 'not' op) is already here in the DAG, so this is
just intended to be a clean-up and performance improvement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302087
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Wed, 3 May 2017 21:53:21 +0000 (21:53 +0000)]
clang-format and restyle DWARFFormValue before working on it. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302086
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 3 May 2017 21:39:01 +0000 (21:39 +0000)]
DebugInfo: elide type index entries for synthetic types
Compiler emitted synthetic types may not have an associated DIFile
(translation unit). In such a case, when generating CodeView debug type
information, we would attempt to compute an absolute filepath which
would result in a segfault due to a NULL DIFile*. If there is no source
file associated with the type, elide the type index entry for the type
and record the type information. This actually results in higher
fidelity debug information than clang/C2 as of this writing.
Resolves PR32668!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302085
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Wed, 3 May 2017 20:51:34 +0000 (20:51 +0000)]
[AArch64] Fix variable name ambiguity in r302078.
ArchKind is passed to the function, but it's also a type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302081
91177308-0d34-0410-b5e6-
96231b3b80d8
Xin Tong [Wed, 3 May 2017 20:37:07 +0000 (20:37 +0000)]
[TailCallElim] Remove an unused argument. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302080
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Wed, 3 May 2017 20:33:58 +0000 (20:33 +0000)]
[AArch64] Make the TargetParser add CPU exts provided by the arch.
Otherwise, each CPU has to manually specify the extensions it supports,
even though they have to be a superset of the base arch extensions.
And when there's redundant data there's stale data, so most of the CPUs
lie about the features they support (almost none lists AEK_FP).
Instead, do the saner thing: add the optional extensions on top of the
base extensions provided by the architecture.
The ARM TargetParser has the same behavior.
Differential Revision: https://reviews.llvm.org/D32780
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302078
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Wed, 3 May 2017 20:33:52 +0000 (20:33 +0000)]
[AArch64] armv8-A doesn't have CRC.
That's only a required extension as of v8.1a.
Remove it from the "generic" CPU as well: it should only support the
base ISA (and binutils agrees).
Also unify the MC tests into crc.s and arm64-crc32.s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302077
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Wed, 3 May 2017 20:31:19 +0000 (20:31 +0000)]
[libFuzzer] exit without running atexit handlers in libfuzzer's crash handler
Summary:
It's not safe to assume that atexit handlers can be run once the app crashed.
Patch by Jochen Eisinger.
Reviewers: kcc, vitalybuka
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32640
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302076
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 3 May 2017 20:10:36 +0000 (20:10 +0000)]
[Hexagon] Use automatically-generated scheduling information for HVX
Patch by Jyotsna Verma.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302073
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 3 May 2017 19:42:06 +0000 (19:42 +0000)]
Remove unused private field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302069
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Wed, 3 May 2017 19:25:04 +0000 (19:25 +0000)]
Avoid warning of unused variable in release builds. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302068
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 3 May 2017 18:29:34 +0000 (18:29 +0000)]
Fix typos in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302063
91177308-0d34-0410-b5e6-
96231b3b80d8
Greg Clayton [Wed, 3 May 2017 18:25:46 +0000 (18:25 +0000)]
Break verification down into smaller functions to keep code clean.
Adrian requested that we break things down to make things clean in the DWARFVerifier. This patch breaks everything down into nice individual functions and cleans up the code quite a bit and prepares us for the next round of verifiers.
Differential Revision: https://reviews.llvm.org/D32812
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302062
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Wed, 3 May 2017 18:25:43 +0000 (18:25 +0000)]
Fix PPC64 warning for missing parantheses. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302061
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 3 May 2017 18:17:31 +0000 (18:17 +0000)]
[IR] Abstract away ArgNo+1 attribute indexing as much as possible
Summary:
Do three things to help with that:
- Add AttributeList::FirstArgIndex, which is an enumerator currently set
to 1. It allows us to change the indexing scheme with fewer changes.
- Add addParamAttr/removeParamAttr. This just shortens addAttribute call
sites that would otherwise need to spell out FirstArgIndex.
- Remove some attribute-specific getters and setters from Function that
take attribute list indices. Most of these were only used from
BuildLibCalls, and doesNotAlias was only used to test or set if the
return value is malloc-like.
I'm happy to split the patch, but I think they are probably easier to
review when taken together.
This patch should be NFC, but it sets the stage to change the indexing
scheme to this, which is more convenient when indexing into an array:
0: func attrs
1: retattrs
2...: arg attrs
Reviewers: chandlerc, pete, javed.absar
Subscribers: david2050, llvm-commits
Differential Revision: https://reviews.llvm.org/D32811
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302060
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 3 May 2017 18:02:46 +0000 (18:02 +0000)]
[CodeView] Remove constructor initialization of a removed field.
I should've staged this with my last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302059
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Wed, 3 May 2017 17:43:59 +0000 (17:43 +0000)]
[RuntimeLoopUnroller] Add assert that we dont unroll non-rotated loops
Summary:
Cloning basic blocks in the loop for runtime loop unroller depends on loop being
in rotated form (i.e. loop latch target is the exit block).
Assert that this is true, so that callers of runtime loop unroller pass in
canonical loops.
The single caller of this function has that check recently added:
https://reviews.llvm.org/rL301239
Reviewers: davide
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32801
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302058
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 3 May 2017 17:38:49 +0000 (17:38 +0000)]
Delete dead function causing compilation failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302057
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 3 May 2017 17:37:35 +0000 (17:37 +0000)]
[CodeView] Remove unused private field. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302056
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexei Starovoitov [Wed, 3 May 2017 17:30:56 +0000 (17:30 +0000)]
[bpf] add relocation support
. there should be no runtime relocation inside the bpf function.
. relocation supported here mostly for debugging.
. a test case is added.
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302055
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 3 May 2017 17:22:23 +0000 (17:22 +0000)]
Revert "CMake: Move sphinx detection into AddSphinxTarget.cmake"
This reverts commit r302025.
clang and lld need to be updated too so they don't break with this patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302054
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 3 May 2017 17:11:40 +0000 (17:11 +0000)]
[CodeView] Use actual strings for dealing with checksums and lines.
The raw CodeView format references strings by "offsets", but it's
confusing what table the offset refers to. In the case of line
number information, it's an offset into a buffer of records,
and an indirection is required to get another offset into a
different table to find the final string. And in the case of
checksum information, there is no indirection, and the offset
refers directly to the location of the string in another buffer.
This would be less confusing if we always just referred to the
strings by their value, and have the library be smart enough
to correctly resolve the offsets on its own from the right
location.
This patch makes that possible. When either reading or writing,
all the user deals with are strings, and the library does the
appropriate translations behind the scenes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302053
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 3 May 2017 17:11:11 +0000 (17:11 +0000)]
[llvm-readobj] Update readobj to re-use parsing code.
llvm-readobj hand rolls some CodeView parsing code for string
tables, so this patch updates it to re-use some of the newly
introduced parsing code in LLVMDebugInfoCodeView.
Differential Revision: https://reviews.llvm.org/D32772
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302052
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 3 May 2017 16:54:30 +0000 (16:54 +0000)]
ARM: add extra test for addrmode folding.
I was worried we might replace a mul with a mul+shift even if there were later
uses. Turns out to be unfounded but I'd just as well add an actual test for it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302051
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 3 May 2017 16:46:30 +0000 (16:46 +0000)]
[X86][LWP] Add stack folding mappings and tests for LWPINS/LWPVAL instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302049
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 3 May 2017 16:43:57 +0000 (16:43 +0000)]
Silence a 'enum and non-enum used in conditional' warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302048
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Wed, 3 May 2017 16:28:10 +0000 (16:28 +0000)]
[DAGCombine] (addcarry (add|uaddo X, Y), 0, Carry) -> (addcarry X, Y, Carry)
Summary: Do the transform when the carry isn't used. It's a pattern exposed when legalizing large integers.
Reviewers: jyknight, nemanjai, mkuper, spatel, RKSimon, zvi, bkramer
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32755
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302047
91177308-0d34-0410-b5e6-
96231b3b80d8
Greg Clayton [Wed, 3 May 2017 16:02:29 +0000 (16:02 +0000)]
Create DWARFVerifier.cpp and .h and move all DWARF verification code over into it.
Adrian requested we create a DWARFVerifier.cpp file to contain all of the DWARF verification stuff. This change simply moves the functionality over into DWARFVerifier.h and DWARFVerifier.cpp, renames the DWARFVerifier methods to start with lower case, and switches DWARFContext.cpp over to using the new functionality.
Differential Revision: https://reviews.llvm.org/D32809
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302044
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 3 May 2017 15:58:37 +0000 (15:58 +0000)]
Resubmit r301986 and r301987 "Add codeview::StringTable"
This was reverted due to a "missing" file, but in reality
what happened was that I renamed a file, and then due to
a merge conflict both the old file and the new file got
added to the repository. This led to an unused cpp file
being in the repo and not referenced by any CMakeLists.txt
but #including a .h file that wasn't in the repo. In an
even more unfortunate coincidence, CMake didn't report the
unused cpp file because it was in a subdirectory of the
folder with the CMakeLists.txt, and not in the same directory
as any CMakeLists.txt.
The presence of the unused file was then breaking certain
tools that determine file lists by globbing rather than
by what's specified in CMakeLists.txt
In any case, the fix is to just remove the unused file from
the patch set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302042
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 3 May 2017 15:51:39 +0000 (15:51 +0000)]
[X86][LWP] Add llvm support for LWP instructions (reapplied).
This patch adds support for the the LightWeight Profiling (LWP) instructions which are available on all AMD Bulldozer class CPUs (bdver1 to bdver4).
Reapplied - this time without changing line endings of existing files.
Differential Revision: https://reviews.llvm.org/D32769
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302041
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 May 2017 15:46:24 +0000 (15:46 +0000)]
[APInt] Give the value union a name so we can remove assumptions on VAL being the larger member
Currently several places assume the VAL member is always at least the same size as pVal. In particular for a memcpy in the move assignment operator. While this is a true assumption, it isn't good practice to assume this.
This patch gives the union a name so we can write the memcpy in terms of the union itself. This also adds a similar memcpy to the move constructor where we previously just copied using VAL directly.
This patch is mostly just a mechanical addition of the U in front of VAL and pVAL everywhere. But several constructors had to be modified since we can't directly initializer a field of named union from the initializer list.
Differential Revision: https://reviews.llvm.org/D30629
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302040
91177308-0d34-0410-b5e6-
96231b3b80d8
Greg Clayton [Wed, 3 May 2017 15:45:31 +0000 (15:45 +0000)]
Verify that no compile units share the same line table in "llvm-dwarfdump --verify"
Check to make sure no compile units have the same DW_AT_stmt_list values. Report a verification error if they do.
Differential Revision: https://reviews.llvm.org/D32771
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302039
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 3 May 2017 15:42:29 +0000 (15:42 +0000)]
Revert rL302028 due to accidental line ending changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302038
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 3 May 2017 15:36:51 +0000 (15:36 +0000)]
[Hexagon] Handle S2_storerf_io in HexagonInstrInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302036
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 3 May 2017 15:34:52 +0000 (15:34 +0000)]
[Hexagon] Misc fixes in HexagonInstrInfo, NFC
Formatting changes + remove unused function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302035
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 3 May 2017 15:33:09 +0000 (15:33 +0000)]
[Hexagon] Adjust latency between allocframe and the first store on stack
Allocframe and the following stores on the stack have a latency of 2 cycles
when not in the same packet. This happens because R29 is needed early by the
store instruction. Since one of such stores can be packetized along with
allocframe and use old value of R29, we can assign it 0 cycle latency
while leaving latency of other stores to the default value of 2 cycles.
Patch by Jyotsna Verma.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302034
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 3 May 2017 15:30:46 +0000 (15:30 +0000)]
[Hexagon] Handle J2_jumptpt and J2_jumpfpt in HexagonInstrInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302033
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 3 May 2017 15:28:56 +0000 (15:28 +0000)]
[Hexagon] Implement undoing .cur instructions in packetizer
The packetizer needs to convert .cur instruction to its regular form if
the use is not in the same packet as the .cur. The code in the packetizer
handles one type of .cur, which is the vector load case. This patch
updates the packetizer so that it can undo all the .cur instructions.
In the test case, the .cur is the 128B version, but there are also the
post-increment versions.
Patch by Brendon Cahoon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302032
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 3 May 2017 15:26:13 +0000 (15:26 +0000)]
[Hexagon] Add memory operands to a rewritten load
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302030
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 3 May 2017 15:23:53 +0000 (15:23 +0000)]
[Hexagon] Reset spill alignment when variable-sized objects are present
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302029
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 3 May 2017 15:18:34 +0000 (15:18 +0000)]
[X86][LWP] Add llvm support for LWP instructions.
This patch adds support for the the LightWeight Profiling (LWP) instructions which are available on all AMD Bulldozer class CPUs (bdver1 to bdver4).
Differential Revision: https://reviews.llvm.org/D32769
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302028
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 3 May 2017 14:43:44 +0000 (14:43 +0000)]
CMake: Add LLVM_DYLIB_SYMBOL_VERSIONING option
Summary:
When apps or other libraries link against a library with symbol
versions, the version string is recorded in the import table, and used
at runtime to resolve the symbol back to a library that provides that
version (vaguely like how two-level namespaces work in Mach-O). ld's
--default-symver flag tags every exported symbol with a symbol version
string equal to the library's soname. Using --default-symver means
multiple versions of libLLVM can coexist within the same process, at
least to the extent that they don't try to pass data between each
other's llvms.
As an example, imagine a language like Rust using llvm for CPU codegen,
binding to OpenGL, with Mesa as the OpenGL implementation using llvm for
R600 codegen. With --default-symver Rust and Mesa will resolve their
llvm usage to the version each was linked against, which need not match.
(Other ELF platforms like BSD and Solaris might have similar semantics,
I've not checked.)
This is based on an autoconf version of this patch by Adam Jackson.
This new option can be used to add --default-symver to the linker flags
for libLLVM.so.
Reviewers: beanz
Reviewed By: beanz
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D30997
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302026
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 3 May 2017 14:29:56 +0000 (14:29 +0000)]
CMake: Move sphinx detection into AddSphinxTarget.cmake
Reviewers: chandlerc, beanz, mgorny
Reviewed By: beanz
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D31773
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302025
91177308-0d34-0410-b5e6-
96231b3b80d8
Guy Blank [Wed, 3 May 2017 13:34:05 +0000 (13:34 +0000)]
[X86][AVX512] remove unnecessary case. NFC
VFPCLASS is for vector types and not scalar, so it cannot get here.
Differential Revision: https://reviews.llvm.org/D32694
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302023
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Wed, 3 May 2017 13:33:45 +0000 (13:33 +0000)]
[SystemZ] Properly check number of operands in getCmpOpsType()
It is needed to check that the number of operands are 2 when
finding the case of a logic combination, e.g. 'and' of two compares.
Review: Ulrich Weigand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302022
91177308-0d34-0410-b5e6-
96231b3b80d8
Oren Ben Simhon [Wed, 3 May 2017 13:07:19 +0000 (13:07 +0000)]
[X86] Support of no_caller_saved_registers attribute
This patch implements the LLVM part for no_caller_saved_registers attribute as appears here: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=
5ed3cc7b66af4758f7849ed6f65f4365be8223be.
In order to implement the attribute, we use the dynamic CSR mechanism to remove returned/passed arguments from the function regmask/CSR list.
Differential Revision: https://reviews.llvm.org/D31876
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302020
91177308-0d34-0410-b5e6-
96231b3b80d8
Elad Cohen [Wed, 3 May 2017 12:28:54 +0000 (12:28 +0000)]
Support arbitrary address space pointers in masked gather/scatter intrinsics.
Fixes PR31789 - When loop-vectorize tries to use these intrinsics for a
non-default address space pointer we fail with a "Calling a function with a
bad singature!" assertion. This patch solves this by adding the 'vector of
pointers' argument as an overloaded type which will determine the address
space.
Differential revision: https://reviews.llvm.org/D31490
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302018
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Wed, 3 May 2017 11:56:01 +0000 (11:56 +0000)]
[AVR] Reserve the Y register in all functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302017
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Wed, 3 May 2017 11:47:11 +0000 (11:47 +0000)]
[Loop Deletion] Delete loops that are never executed
Summary:
Currently, loop deletion deletes loop where the only values
that are used outside the loop are loop-invariant.
This patch adds logic to delete loops where the loop is proven to be
never executed (i.e. the only predecessor of the loop preheader has a
constant conditional branch as terminator, and the preheader is not the
taken target). This will remove loops that become dead after
loop-unswitching generates constant conditional branches.
The next steps are:
1. moving the loop deletion implementation to LoopUtils.
2. Add logic in loop-simplifyCFG which will support changing conditional
constant branches to unconditional branches. If loops become unreachable in this
process, they can be removed using `deleteDeadLoop` function.
Reviewers: chandlerc, efriedma, sanjoy, reames
Reviewed by: sanjoy
Subscribers: mzolotukhin, llvm-commits
Differential Revision: https://reviews.llvm.org/D32494
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302015
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Wed, 3 May 2017 11:36:42 +0000 (11:36 +0000)]
Revert "[AVR] Enable the frame pointer for all functions"
This reverts commit
358ad02d999e88853d2cfc954bd2f668308a51f7.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302014
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Wed, 3 May 2017 10:42:35 +0000 (10:42 +0000)]
[Triple] Add a "macos" OS type that acts as a synonym for "macosx"
The "macosx" OS type is still the canonical type. In the future "macos" will
become the canonical OS type (but we will still support "macosx").
rdar://
27043820
Differential Revision: https://reviews.llvm.org/D32748
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302011
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 3 May 2017 10:40:18 +0000 (10:40 +0000)]
[X86] Refactored LowerINTRINSIC_W_CHAIN to use a switch statament. NFCI.
Pre-commit as requested in D32769.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302010
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Wed, 3 May 2017 07:29:25 +0000 (07:29 +0000)]
Revert r301986 (and subsequent r301987).
The patch is failing to add StringTableStreamBuilder.h, but that isn't
even discovered because the corresponding StringTableStreamBuilder.cpp
isn't added to any CMakeLists.txt file and thus never built. I think
this patch is just incomplete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302002
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 3 May 2017 05:34:00 +0000 (05:34 +0000)]
Fix use after free in BinaryStream library.
This was reported by the ASAN bot, and it turned out to be
a fairly fundamental problem with the design of VarStreamArray
and the way it passes context information to the extractor.
The fix was cumbersome, and I'm not entirely pleased with it,
so I plan to revisit this design in the future when I'm not
pressed to get the bots green again. For now, this fixes
the issue by storing the context information by value instead
of by reference, and introduces some impossibly-confusing
template magic to make things "work".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301999
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 3 May 2017 02:26:10 +0000 (02:26 +0000)]
Replace hardcoded intrinsic list with speculatable attribute.
No change in which intrinsics should be speculated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301995
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 3 May 2017 00:18:48 +0000 (00:18 +0000)]
Revert r295861, "[ModuleSummaryAnalysis] Don't crash when referencing unnamed globals."
We should always expect values to be named before running the module summary
analysis (see NameAnonGlobals pass), so it's fine if we crash in that case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301991
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Shen [Wed, 3 May 2017 00:07:02 +0000 (00:07 +0000)]
[PowerPC, DAGCombiner] Fold a << (b % (sizeof(a) * 8)) back to a single instruction
Summary:
This is the corresponding llvm change to D28037 to ensure no performance
regression.
Reviewers: bogner, kbarton, hfinkel, iteratee, echristo
Subscribers: nemanjai, llvm-commits
Differential Revision: https://reviews.llvm.org/D28329
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301990
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 2 May 2017 23:41:51 +0000 (23:41 +0000)]
Fix type conversion error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301987
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 2 May 2017 23:36:17 +0000 (23:36 +0000)]
Make codeview::StringTable.
Previously we had knowledge of how to serialize and deserialize
a string table inside of DebugInfo/PDB, but the string table
that it serializes contains a piece that is actually considered
CodeView and can appear outside of a PDB. We already have logic
in llvm-readobj and MCCodeView to read and write this format,
so it doesn't make sense to duplicate the logic in DebugInfoPDB
as well.
This patch makes codeview::StringTable (for writing) and
codeview::StringTableRef (for reading), updates DebugInfoPDB
to use these classes for its own writing, and updates llvm-readobj
to additionally use StringTableRef for reading.
It's a bit more difficult to get MCCodeView to use this for
writing, but it's a logical next step.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301986
91177308-0d34-0410-b5e6-
96231b3b80d8
Xin Tong [Tue, 2 May 2017 23:24:12 +0000 (23:24 +0000)]
Typo in LangRef.rst. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301985
91177308-0d34-0410-b5e6-
96231b3b80d8
Greg Clayton [Tue, 2 May 2017 22:48:52 +0000 (22:48 +0000)]
Add line table verification to lldb-dwarfdump --verify
This patch verifies the .debug_line:
- verify all addresses in a line table sequence have ascending addresses
- verify that all line table file indexes are valid
Unit tests added for both cases.
Differential Revision: https://reviews.llvm.org/D32765
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301984
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 2 May 2017 22:45:19 +0000 (22:45 +0000)]
ARM: avoid handing a deleted node back to TableGen during ISel.
When we replaced the multiplicand the destination node might already exist.
When that happens the original gets CSEd and deleted. However, it's actually
used as the offset so nonsense is produced.
Should fix PR32726.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301983
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 2 May 2017 22:07:37 +0000 (22:07 +0000)]
Re-land r301697 "[IR] Make add/remove Attributes use AttrBuilder instead of AttributeList"
This time, I fixed, built, and tested clang.
This reverts r301712.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301981
91177308-0d34-0410-b5e6-
96231b3b80d8
Joel Jones [Tue, 2 May 2017 22:01:48 +0000 (22:01 +0000)]
[AArch64] ILP32 Backend Relocation Support
Remove "_NC" suffix and semantics from TLSDESC_LD{64,32}_LO12 and
TLSDESC_ADD_LO12 relocations
Rearrange ordering in AArch64.def to follow relocation encoding
Fix name:
R_AARCH64_P32_LD64_GOT_LO12_NC => R_AARCH64_P32_LD32_GOT_LO12_NC
Add support for several "TLS", "TLSGD", and "TLSLD" relocations for
ILP32
Fix return values from isNonILP32reloc
Add implementations for
R_AARCH64_ADR_PREL_PG_HI21_NC, R_AARCH64_P32_LD32_GOT_LO12_NC,
R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC,
R_AARCH64_P32_TLSDESC_LD32_LO12, R_AARCH64_LD64_GOT_LO12_NC,
*TLSLD_LDST128_DTPREL_LO12, *TLSLD_LDST128_DTPREL_LO12_NC,
*TLSLE_LDST128_TPREL_LO12, *TLSLE_LDST128_TPREL_LO12_NC
Modify error messages to give name of equivalent relocation in the
ABI not being used, along with better checking for non-existent
requested relocations.
Added assembler support for "pg_hi21_nc"
Relocation definitions added without implementations:
R_AARCH64_P32_TLSDESC_ADR_PREL21, R_AARCH64_P32_TLSGD_ADR_PREL21,
R_AARCH64_P32_TLSGD_ADD_LO12_NC, R_AARCH64_P32_TLSLD_ADR_PREL21,
R_AARCH64_P32_TLSLD_ADR_PAGE21, R_AARCH64_P32_TLSLD_ADD_LO12_NC,
R_AARCH64_P32_TLSLD_LD_PREL19, R_AARCH64_P32_TLSDESC_LD_PREL19,
R_AARCH64_P32_TLSGD_ADR_PAGE21, R_AARCH64_P32_TLS_DTPREL,
R_AARCH64_P32_TLS_DTPMOD, R_AARCH64_P32_TLS_TPREL,
R_AARCH64_P32_TLSDESC
Fix encoding:
R_AARCH64_P32_TLSDESC_ADR_PAGE21
Reviewers: Peter Smith
Patch by: Joel Jones (jjones@cavium.com)
Differential Revision: https://reviews.llvm.org/D32072
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301980
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Tue, 2 May 2017 21:40:47 +0000 (21:40 +0000)]
[DWARFv5] Parse new line-table header format.
The directory and file tables now have form-based content descriptors.
Parse these and extract the per-directory/file records based on the
descriptors. For now we support only DW_FORM_string (inline) for the
path names; follow-up work will add support for indirect forms (i.e.,
DW_FORM_strp, strx<N>, and line_strp).
Differential Revision: http://reviews.llvm.org/D32713
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301978
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 2 May 2017 21:37:28 +0000 (21:37 +0000)]
revert r301766: InstructionSimplify: Canonicalize shuffle operands. NFC-ish
Turns out this wasn't NFC-ish at all because there's a bug processing shuffles
that change the size of their input vectors (that case always seems to trip us
up).
This should fix PR32872 while we investigate how it failed and reduce a testcase:
https://bugs.llvm.org/show_bug.cgi?id=32872
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301977
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 2 May 2017 21:11:40 +0000 (21:11 +0000)]
[NewGVN] Fix typo and format comment. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301974
91177308-0d34-0410-b5e6-
96231b3b80d8