130668 Commits

Author SHA1 Message Date
Zachary Turner
ec474295eb Refactor raw pdb dumper into library
PDB parsing code was hand-rolled into llvm-pdbdump. This patch moves the
parsing of this code into DebugInfoPDB and makes the dumper use this.

This is achieved by implementing the skeleton of RawPdbSession, the
non-DIA counterpart to the existing PDB read interface. None of the type /
source file / etc information is accessible yet, so this implementation is
not yet close to achieving parity with the DIA counterpart, but the
RawSession class simply holds a reference to a PDBFile class which handles
parsing the file format. Additionally a PDBStream class is introduced
which allows accessing the bytes of a particular stream in a PDB file.

Differential Revision: http://reviews.llvm.org/D19343
Reviewed By: majnemer

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267049 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 20:58:35 +00:00
Quentin Colombet
e4d168d65f [MachineBasicBlock] Refactor SplitCriticalEdge to expose a query API.
Introduce canSplitCriticalEdge, so that clients can now query whether or
not a critical edge can be split without actually needing to split it.
This may be useful when gathering information for cost models for
instance.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267046 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 20:46:27 +00:00
Kevin Enderby
c7e7d3290e hange the variable name big_size to BigSize. Caught by Rafael Espíndola!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267043 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 20:29:49 +00:00
Andrew Kaylor
7c699fb008 Zero-initialize members of the CpuHashInfoTy structure for AsmParser
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267042 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 20:09:35 +00:00
Lang Hames
484ff8d53d [RuntimeDyld] Fix conservative over-allocation of memory for common symbols.
The previous allocation code was over-estimating the amount of memory required.

No test case: we don't currently have a good way to detect conervative
over-allocation.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267041 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 20:08:06 +00:00
JF Bastien
8f964ad73a NFC: fix copy / paste comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267039 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 19:53:39 +00:00
Krzysztof Parzyszek
ad7d56b336 [Hexagon] Properly recognize register alt names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267038 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 19:49:53 +00:00
Kevin Enderby
13eabc323f Fix crash in llvm-objdump with -macho -objc-meta-data that was trying dump a non-existent section.
Showed up in running on a large binary with the missing section.  I could create a fake
test case if anyone really wants but the fix is pretty obvious.

rdar://25837034


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267037 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 19:49:29 +00:00
JF Bastien
372b2d6464 NFC: fix nonsensical comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267036 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 19:41:48 +00:00
Sanjoy Das
80fd5b26e3 Folding compares with unescaped allocations
Summary:
If we know that the pointer allocated within a function does not escape,
we can fold away comparisons that are done with global pointers

Patch by Anna Thomas!

Reviewers: reames, majnemer, sanjoy

Subscribers: mgrang, mcrosier, majnemer, llvm-commits

Differential Revision: http://reviews.llvm.org/D19276

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267035 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 19:26:45 +00:00
Krzysztof Parzyszek
c552ed7f63 [Hexagon] Expand handling of the small-data/bss section
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267034 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 18:56:45 +00:00
Quentin Colombet
0e156ed701 [RegisterBankInfo] Change the API for the verify methods.
Return bool instead of void so that it is natural to put the calls into
asserts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267033 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 18:34:43 +00:00
Matt Arsenault
4ec85d0131 AMDGPU: Fix debug name of pass to better match
I get this wrong every time I try to debug this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267030 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 18:21:54 +00:00
Matt Arsenault
193934bd68 LegalizeDAG: Move unaligned load/store expansion to TLI
When custom lowered, this is not called if the store is custom
lowered. Move it to be a utility function so targets can
easily expand unaligned accesses when custom lowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267029 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 18:19:11 +00:00
Quentin Colombet
99b0ca43ae [RegisterBankInfo] Change the representation of the partial mappings.
Instead of holding a mask, hold two value: the start index and the
length of the mapping. This is a more compact representation, although
less powerful. That being said, arbitrary masks would not have worked
for the generic so do not allow them in the first place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267025 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 18:09:34 +00:00
Matt Arsenault
88c88b2b19 DAGCombiner: Reduce 64-bit BFE pattern to pattern on 32-bit component
If the extracted bits are restricted to the upper half or lower half,
this can be truncated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267024 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 18:03:06 +00:00
Philip Reames
43a1464ccf [instcombine][unordered] Extend load(select) transform to handle unordered loads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267023 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 17:59:40 +00:00
Andrew Kaylor
c852398cbc Initial implementation of optimization bisect support.
This patch implements a optimization bisect feature, which will allow optimizations to be selectively disabled at compile time in order to track down test failures that are caused by incorrect optimizations.

The bisection is enabled using a new command line option (-opt-bisect-limit).  Individual passes that may be skipped call the OptBisect object (via an LLVMContext) to see if they should be skipped based on the bisect limit.  A finer level of control (disabling individual transformations) can be managed through an addition OptBisect method, but this is not yet used.

The skip checking in this implementation is based on (and replaces) the skipOptnoneFunction check.  Where that check was being called, a new call has been inserted in its place which checks the bisect limit and the optnone attribute.  A new function call has been added for module and SCC passes that behaves in a similar way.

Differential Revision: http://reviews.llvm.org/D19172



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267022 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 17:58:54 +00:00
Nicolai Haehnle
a7af0d6280 Split IntrReadArgMem into IntrReadMem and IntrArgMemOnly
Summary:
IntrReadWriteArgMem simply becomes IntrArgMemOnly.

So there are fewer intrinsic properties that express their orthogonality
better, and correspond more closely to the corresponding IR attributes.

Suggested by: Philip Reames

Reviewers: joker.eph, reames, tstellarAMD

Subscribers: jholewinski, arsenm, llvm-commits

Differential Revision: http://reviews.llvm.org/D19291

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267021 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 17:48:02 +00:00
Philip Reames
343a61115e [unordered] unordered loads from null are still unreachable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267019 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 17:45:05 +00:00
Marcin Koscielnicki
8ac661cafb [PowerPC] [SSP] Fix stack guard load for 32-bit.
r266809 incorrectly used LD to load the stack guard, it should be LWZ.

Differential Revision: http://reviews.llvm.org/D19358

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267017 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 17:36:05 +00:00
Adam Nemet
e69bdcfeab [LoopUtils] Fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267016 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 17:33:22 +00:00
Adam Nemet
07c165335d [LoopUtils] Add asserts to findStringMetadataForLoop. NFC
These ensure that operand array has at least one element and it is the
self-reference.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267015 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 17:33:20 +00:00
Adam Nemet
b4a76b3222 [LoopUtils] Move def of findStringMetadataForLoop to LoopUtils.cpp. NFC
The decl is in LoopUtils.h.  I think that this was added to
LoopVersioningLICM.cpp by mistake.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267014 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 17:33:17 +00:00
Adam Nemet
94253c1835 [LoopUtils] Rename {check->find}StringMetadata{Into->For}Loop. NFC
"Into" was misleading.  I am also planning to use this helper to look
for loop metadata and return the argument, so find seems like a better
name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267013 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 17:33:12 +00:00
Philip Reames
58cd23c522 [instcombine][unordered] Implement *-load forwarding for unordered atomics
This builds on 266999 which made FindAvailableValue do the right thing.  Tests included show the newly enabled transforms and those which disabled either due to conservatism or correctness requirements.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267006 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 17:03:33 +00:00
Amjad Aboud
1268621b54 Fixed Dwarf debug info emission to skip DILexicalBlockFile entries.
Before this fix, DILexicalBlockFile entries were skipped only in some cases and were not in other cases.

Differential Revision: http://reviews.llvm.org/D18724


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267004 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 16:58:49 +00:00
Philip Reames
6159d86c30 [unordered] Add tests and conservative handling in support of future changes [NFCI]
This change adds a couple of test cases to make sure FindAvailableLoadedValue does the right thing.  At the moment, the code added is dead, but separating it makes follow on changes far more obvious.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266999 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 16:51:08 +00:00
Chad Rosier
615a6cf40a Address Philip's post-commit feedback for r266987. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266998 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 16:18:02 +00:00
Philip Reames
dbd967b016 Minor comment cleanup [NFC]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266997 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 16:15:19 +00:00
Rafael Espindola
8b7f4165b2 Fix recursive -only-needed.
We were assuming that only linkonce_odr GVs were lazy linked.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266995 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 14:56:33 +00:00
Zoran Jovanovic
42fa9840cf [mips][microMIPS] Implement ldpc instruction
Differential Revision: http://reviews.llvm.org/D15009


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266990 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 14:32:12 +00:00
Zoran Jovanovic
161372b940 [mips][microMIPS] Add R_MICROMIPS_PC19_S2 relocation
Differential Revision: http://reviews.llvm.org/D14915


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266988 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 14:09:35 +00:00
Chad Rosier
88419b2ef3 Refactor implied condition logic from ValueTracking directly into CmpInst. NFC.
Differential Revision: http://reviews.llvm.org/D19330

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266987 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 14:04:54 +00:00
Zoran Jovanovic
ddc504898c [mips][microMIPS] Add R_MICROMIPS_PC26_S1 relocation
Differential Revision: http://reviews.llvm.org/D14822


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266985 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 13:43:26 +00:00
Sam Kolton
02026c0953 [AMDGPU] Assembler: prevent parseDPPCtrlOps from eating invalid tokens
Reviewers: nhaustov, tstellarAMD

Subscribers: arsenm

Differential Revision: http://reviews.llvm.org/D19317

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266984 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 13:14:24 +00:00
Rafael Espindola
b18e50cc39 Add a CachedHash structure.
A DenseMap doesn't store the hashes, so it needs to recompute them when
the table is resized.

In some applications the hashing cost is noticeable. That is the case
for example in lld for symbol names (StringRef).

This patch adds a templated structure that can wraps any value that can
go in a DenseMap and caches the hash.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266981 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 12:16:21 +00:00
Zlatko Buljan
d591d40268 [mips][microMIPS] Implement TLBP, TLBR, TLBWI and TLBWR instructions
Differential Revision: http://reviews.llvm.org/D18855


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266980 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 11:32:40 +00:00
Zlatko Buljan
b6b7c4881a [mips][microMIPS] Implement LL, SC, MOVEP, ROTR, ROTRV and SYSCALL instructions and add tests for LWM32 and SWM32
Differential Revision: http://reviews.llvm.org/D19150


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266977 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 11:01:51 +00:00
Evgeny Astigeevich
02f5473ab0 Updated a test not to produce an empty s-file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266971 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 09:36:49 +00:00
Evgeny Astigeevich
5a1084cae7 [AArch64][CodeGen] Fix of PR27158: incorrect peephole optimization in AArch64InstrInfo::optimizeCompareInstr
AArch64InstrInfo::optimizeCompareInstr has bug PR27158 which causes generation of incorrect code.
A compare instruction is substituted with another instruction which does not
produce the same flags as the original compare instruction.
This patch contains:
1. Fix of the bug.
2. A regression test in MIR.
3. A new test to check that SUBS is replaced by SUB.

Differential Revision: http://reviews.llvm.org/D18838


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266969 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 08:54:08 +00:00
Craig Topper
0e2baf6d6d [AVX512] Add CTTZ support for v8i64 and v16i32 vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266968 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 07:30:06 +00:00
Craig Topper
33683f1c2e [X86] Fix vector-tzcnt-512 test to disable CDI while enabling BWI for one of the runs. Update check patterns accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266967 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 07:30:03 +00:00
Craig Topper
1c6fe69c28 Fix test command line to explicitly disable CDI instructions for one test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266966 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 07:29:59 +00:00
Mehdi Amini
2a866dbec6 CachePruning: early exit if no path supplied
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266965 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 06:43:45 +00:00
Mehdi Amini
01d402f667 ThinLTO: initialize variables
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266964 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 06:43:41 +00:00
Craig Topper
56e5e84ae0 [AVX512] Add support for lowering CTTZ v64i8 and v32i16 with BWI instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266963 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 06:39:34 +00:00
Craig Topper
ccd4d204e9 [X86] Remove redundant calls to setOperationAction for EXTRACT_VECTOR_ELT/INSERT_VECTOR_ELT from SSE41 block. They were already done in an earlier block. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266962 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 06:39:32 +00:00
Craig Topper
28de30a831 [X86] Remove some operations from the default Expand all vector ops loop. Instead let them stay Legal and mark them Expand for specific types where needed. Reduces overall number of calls to setOperationAction. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266961 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 06:39:29 +00:00
Craig Topper
803d96cd64 [X86] Remove old leftover MMX code that sets various 64-bit vector operations to Expand. These vector types aren't legal so these operations would never make it far enough to need to expand. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266960 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 06:39:26 +00:00