130579 Commits

Author SHA1 Message Date
Zachary Turner
d192551402 Fix for case sensitive filename failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267066 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 22:08:27 +00:00
Mike Aizatsky
de4d323c44 Fixed flag description
Summary:
asan-use-after-return control feature we call use-after-return or
stack-use-after-return.

Reviewers: kcc, aizatsky, eugenis

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267064 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 22:00:13 +00:00
Amaury Sechet
48c9c5be8d Remove various warnings. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267061 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 21:36:11 +00:00
Derek Bruening
3494767094 [esan] EfficiencySanitizer instrumentation pass
Summary:
Adds an instrumentation pass for the new EfficiencySanitizer ("esan")
performance tuning family of tools.  Multiple tools will be supported
within the same framework.  Preliminary support for a cache fragmentation
tool is included here.

The shared instrumentation includes:
+ Turn mem{set,cpy,move} instrinsics into library calls.
+ Slowpath instrumentation of loads and stores via callouts to
  the runtime library.
+ Fastpath instrumentation will be per-tool.
+ Which memory accesses to ignore will be per-tool.

Reviewers: eugenis, vitalybuka, aizatsky, filcab

Subscribers: filcab, vkalintiris, pcc, silvas, llvm-commits, zhaoqin, kcc

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267058 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 21:30:22 +00:00
Amaury Sechet
b50527515a Add utility function to manipulate attributes on CallSite. NFC
Summary: As per title. This will help work on the C API.

Reviewers: Wallbraker, whitequark, joker.eph, echristo, rafael

Subscribers: joker.eph, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267057 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 21:29:10 +00:00
Kevin Enderby
1164632966 Fix a typo in an error message. Caught by Sean Silva!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267056 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 21:20:40 +00:00
Vedant Kumar
089f755c04 [ProfileData] Report errors from InstrProfSymtab::create
InstrProfSymtab::create can fail with instrprof_error::malformed, but
this error is silently dropped. Propagate the error up to the caller so
we fail early.

Eventually, I'd like to transition ProfileData over to the new Error
class so we can't ignore hard failures like this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267055 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 21:07:25 +00:00
Sanjay Patel
bf8e161bd9 add tests for disguised fabs/fneg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267053 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 21:02:25 +00:00
Quentin Colombet
f2cd15729a [MachineBasicBlock] Make the pass argument truly mandatory when
splitting edges.

MachineBasicBlock::SplitCriticalEdges will crash if a nullptr would have
been passed for the Pass argument. Do not allow that by turning this
argument into a reference.
The alternative would have been to make the Pass a truly optional
argument, but although this is easy to do, I was afraid users using it
like this would not be aware the livness information, dominator tree and
such would silently be broken.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267052 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 21:01:13 +00:00
Sanjay Patel
d993f1c024 use FileCheck; add test for disguised fabs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267051 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 20:58:58 +00:00
Zachary Turner
6efffd31d2 Add natvis visualizers for endian types.
This allows ulittle* and ubig* types to be visualized properly
in VS.

Differential Revision: http://reviews.llvm.org/D19339
Reviewed By: Aaron Ballman

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267050 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 20:58:41 +00:00
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