148623 Commits

Author SHA1 Message Date
Zachary Turner
f393f97e65 [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
2017-05-03 17:11:11 +00:00
Tim Northover
2c038deab6 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
2017-05-03 16:54:30 +00:00
Simon Pilgrim
2cd10f6a97 [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
2017-05-03 16:46:30 +00:00
Simon Pilgrim
d27e7d384a 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
2017-05-03 16:43:57 +00:00
Amaury Sechet
d161fb6774 [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
2017-05-03 16:28:10 +00:00
Greg Clayton
c8e3032271 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
2017-05-03 16:02:29 +00:00
Zachary Turner
6b4b26a1a7 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
2017-05-03 15:58:37 +00:00
Simon Pilgrim
9226f72364 [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
2017-05-03 15:51:39 +00:00
Craig Topper
52bc9d9102 [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
2017-05-03 15:46:24 +00:00
Greg Clayton
8364badbd9 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
2017-05-03 15:45:31 +00:00
Simon Pilgrim
dad8f545ae 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
2017-05-03 15:42:29 +00:00
Krzysztof Parzyszek
30c3f70068 [Hexagon] Handle S2_storerf_io in HexagonInstrInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302036 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-03 15:36:51 +00:00
Krzysztof Parzyszek
0685f416f9 [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
2017-05-03 15:34:52 +00:00
Krzysztof Parzyszek
6da858a291 [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
2017-05-03 15:33:09 +00:00
Krzysztof Parzyszek
b866debf20 [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
2017-05-03 15:30:46 +00:00
Krzysztof Parzyszek
7cff8063d1 [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
2017-05-03 15:28:56 +00:00
Krzysztof Parzyszek
2f1d015824 [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
2017-05-03 15:26:13 +00:00
Krzysztof Parzyszek
7812bede76 [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
2017-05-03 15:23:53 +00:00
Simon Pilgrim
0766da9258 [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
2017-05-03 15:18:34 +00:00
Tom Stellard
26efd16b30 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
2017-05-03 14:43:44 +00:00
Tom Stellard
2891d41ee6 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
2017-05-03 14:29:56 +00:00
Guy Blank
cb866d20a6 [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
2017-05-03 13:34:05 +00:00
Jonas Paulsson
0441b20083 [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
2017-05-03 13:33:45 +00:00
Oren Ben Simhon
5bbf1b2a54 [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
2017-05-03 13:07:19 +00:00
Elad Cohen
ea59a24717 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
2017-05-03 12:28:54 +00:00
Dylan McKay
6804210951 [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
2017-05-03 11:56:01 +00:00
Anna Thomas
469af3f37f [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
2017-05-03 11:47:11 +00:00
Dylan McKay
8ec2e3efa4 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
2017-05-03 11:36:42 +00:00
Alex Lorenz
ddc58c4e34 [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
2017-05-03 10:42:35 +00:00
Simon Pilgrim
ab50a12a45 [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
2017-05-03 10:40:18 +00:00
Daniel Jasper
5d9d83fb55 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
2017-05-03 07:29:25 +00:00
Zachary Turner
d947f15959 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
2017-05-03 05:34:00 +00:00
Matt Arsenault
921f454dae 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
2017-05-03 02:26:10 +00:00
Peter Collingbourne
8d8582cf12 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
2017-05-03 00:18:48 +00:00
Tim Shen
85fd68bf82 [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
2017-05-03 00:07:02 +00:00
Zachary Turner
c7dd63d90e Fix type conversion error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301987 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-02 23:41:51 +00:00
Zachary Turner
288180ac40 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
2017-05-02 23:36:17 +00:00
Xin Tong
66ac3d52f5 Typo in LangRef.rst. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301985 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-02 23:24:12 +00:00
Greg Clayton
cfa02bf159 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
2017-05-02 22:48:52 +00:00
Tim Northover
3d8a34a84b 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
2017-05-02 22:45:19 +00:00
Reid Kleckner
dac7487074 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
2017-05-02 22:07:37 +00:00
Joel Jones
845c8c41bc [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
2017-05-02 22:01:48 +00:00
Paul Robinson
a6125fe83b [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
2017-05-02 21:40:47 +00:00
Sanjay Patel
05c11eb3e6 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
2017-05-02 21:37:28 +00:00
Davide Italiano
e8a0898f79 [NewGVN] Fix typo and format comment. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301974 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-02 21:11:40 +00:00
Greg Clayton
edadbde29a Verify that all references point to actual DIEs in "llvm-dwarfdump --verify"
LTO and other fancy linking previously led to DWARF that contained invalid references. We already validate that CU relative references fall into the CU, and the DW_FORM_ref_addr references fall inside the .debug_info section, but we didn't validate that the references pointed to correct DIE offsets. This new verification will ensure that all references refer to actual DIEs and not an offset in between.

This caught a bug in DWARFUnit::getDIEForOffset() where if you gave it any offset, it would match the DIE that mathes the offset _or_ the next DIE. This has been fixed.

Differential Revision: https://reviews.llvm.org/D32722


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301971 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-02 20:28:33 +00:00
Tim Northover
dbb0e70756 ARM: add arm1176j-f processor
I doubt anyone actually uses it, and I'm not even entirely convinced it exists
myself; but it is our default for "clang -arch armv6". Functionally, if it does
exist it's identical to the arm1176jz-f from LLVM's point of view (the
difference is apparently in the "Security Extensions").

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301962 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-02 19:06:13 +00:00
Matt Arsenault
012b7077ca PEI: Skip dead objects when looking at CSRs
On AMDGPU if an SGPR is spilled to a VGPR, the frame index
is deleted. If there were any CSR SGPRs, this woudl
assert when setting the offset.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301961 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-02 18:56:28 +00:00
Xinliang David Li
1d482c01f6 [PartialInlining] Add more early filtering
This is a follow up to the previous
inline cost patch for quicker filtering.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301959 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-02 18:43:21 +00:00
Matt Arsenault
5c95b810cb AMDGPU: Don't promote alloca to LDS for leaf functions
LDS use in leaf functions not currently handled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301958 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-02 18:33:18 +00:00