Commit Graph

110845 Commits

Author SHA1 Message Date
Craig Topper
4fca0dd75f Just use the Module unique_ptr object directly in many places instead of separate pointer that's kept in sync with it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224004 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-11 07:04:52 +00:00
Craig Topper
11043f9faf Use unique_ptr to remove an explicit delete. Change return type to pass the unique_ptr to caller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224003 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-11 07:04:46 +00:00
Duncan P. N. Exon Smith
8f616165e4 IR: Canonicalize metadata formatting, NFC
Canonicalize formatting of metadata to make it easier to upgrade via
scripts -- in particular, one line per metadata definition makes it more
`sed`-able.

This is preparation for changing the assembly syntax for metadata [1].

[1]: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141208/248449.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224002 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-11 06:32:29 +00:00
Ekaterina Romanova
e9afc33de5 Reverting commit 223981, because the test that I added (incorrect-variable-debugloc1.ll) failed for llvm-ppc64.
The test is failing for llvm-ppc64 because for this platform the location list is not being generated at all (most likely because of the bug in PPC code optimization or generation). I will file a bug agains PPC compiler, but meanwhile, until PPC bug is fixed, I will have to revert my change.  



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224000 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-11 06:22:35 +00:00
Craig Topper
99873cb2d2 Make MultiClass::DefPrototypes own their Records to fix memory leaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223998 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-11 05:25:33 +00:00
Craig Topper
50083146f0 Replace std::map<K, V*> with std::map<K, std::unique_ptr<V>> to handle ownership and deletion of the values.
Ideally we would store the MultiClasses by value directly in the maps, but I had some trouble with that before and this at least fixes the leak.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223997 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-11 05:25:30 +00:00
Ahmed Bougacha
0aac0703f8 [X86] Add back AVX2 VR256 PMOVX patterns.
We can't reach those from zext, but other parts of the backend (the shuffle
lowering) generate 256-bit VZEXT nodes.

Fixes PR21876.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223996 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-11 04:32:17 +00:00
Nick Lewycky
efddacd5d6 Fix LLVMContext to match what MDKind names that the LL parser permits. Fixes PR21799!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223995 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-11 02:10:28 +00:00
Philip Reames
5e62b8471d GCStrategy should not own GCFunctionInfo
This change moves the ownership and access of GCFunctionInfo (the object which describes the safepoints associated with a safepoint under GCRoot) to GCModuleInfo. Previously, this was owned by GCStrategy which was in turned owned by GCModuleInfo. This made GCStrategy module specific which is 'surprising' given it's name and other purposes.

There's a few more changes needed, but we're getting towards the point we can reuse GCStrategy for gc.statepoint as well.

p.s. The style of this code ends up being a mess. I was trying to move code around without otherwise changing much. Once I get the ownership structure rearranged, I will go through and fixup spacing, naming, comments etc.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223994 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-11 01:47:23 +00:00
Duncan P. N. Exon Smith
a40cc0b50c IR: Add 'invalid-' to test names for invalid assembly
Take the opportunity to sort these by `metadata`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223993 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-11 01:34:46 +00:00
Matthias Braun
1bfcc2d56f LiveInterval: Use range based for loops for subregister ranges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223991 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-11 00:59:06 +00:00
Justin Bogner
d1db29860c Try again at sorting entries in CODE_OWNERS
I apparently fail at the alphabet, E is not after G, and G isn't even
close to C. Sorry for the noise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223990 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-11 00:52:59 +00:00
Justin Bogner
901ba4eb0a Fix some incorrectly sorted entries in CODE_OWNERS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223989 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-11 00:41:15 +00:00
Justin Bogner
763f09f62d Add code owners for profiling and coverage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223988 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-11 00:37:25 +00:00
Tim Northover
19734e7811 ARM: correctly expand LDR-lit based globals.
Quite a major error here: the expansions for the Pseudos with and without
folded load were mixed up. Fortunately it only affects ARM-mode, when not using
movw/movt, on Darwin. I'm guessing no-one actually uses that combination.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223986 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 23:40:50 +00:00
Ekaterina Romanova
de68a563bc A fix for PR21176.
DW_OP_const <const> doesn't describe a constant value, but a value at a constant address.
The proper way to describe a constant value is DW_OP_constu <const>, DW_OP_stack_value.

Added DW_OP_stack_value to the stack.

-This line, and those below, will be ignored--

M    lib/CodeGen/AsmPrinter/DwarfDebug.cpp
A    test/DebugInfo/incorrect-variable-debugloc1.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223981 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 23:19:56 +00:00
Matthias Braun
218d20a48b LiveInterval: Use more range based for loops for value numbers and segments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223978 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 23:07:54 +00:00
Mark Heffernan
1e9d355499 Fix PR21694. r219517 added a use of SCEV divide in HowFarToZero computation. This divide can produce incorrect results as we are using an unsigned divide for what should be a modular divide. This change reverts back to a more conservative computation using trailing zeros.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223974 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 22:53:52 +00:00
Colin LeMahieu
b1fac191b2 [Hexagon] Adding combine ri/ir instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223971 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 22:23:07 +00:00
David Majnemer
3e04c3e253 ConstantFold: Clean up X * undef code
No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223970 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 21:58:17 +00:00
David Majnemer
72c6bdbf70 ConstantFold, InstSimplify: undef >>a x can be either -1 or 0, choose 0
Zero is usually a nicer constant to have than -1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223969 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 21:58:15 +00:00
David Majnemer
ea9bcfc707 ConstantFold: an undef shift amount results in undef
X shifted by undef results in undef because the undef value can
represent values greater than the width of the operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223968 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 21:38:05 +00:00
Colin LeMahieu
f6492bc6b2 [Hexagon] Adding encodings for JR class instructions. Updating complier usages.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223967 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 21:24:10 +00:00
Rafael Espindola
c0e334099c Move three methods only used by MCJIT to MCJIT.
These methods are only used by MCJIT and are very specific to it. In fact, they
are also fairly specific to the fact that we have a dynamic linker of
relocatable objects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223964 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 20:46:55 +00:00
Juergen Ributzka
446f01b1d5 [AArch64] MachO large code-model: Materialize FP constants in code.
In the large code model we have to first get the address of the GOT entry, load
the address of the constant, and then load the constant itself.

To avoid these loads and the GOT entry alltogether this commit changes the way
how FP constants are materialized in the large code model. The constats are now
materialized in a GPR and then bitconverted/moved into the FPR.

Reviewed by Tim Northover

Fixes rdar://problem/16572564.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223941 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 19:43:32 +00:00
Marek Olsak
a98fd8b640 R600/SI: Use getTargetConstant in AdjustRegClass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223940 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 19:25:31 +00:00
Colin LeMahieu
9f3b3bca89 [Hexagon] Adding JR class predicated call reg instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223933 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 18:24:16 +00:00
Stepan Dyatkovskiy
4912640253 Added documentation for MergeFunctions pass:
Pass looks for equivalent functions that are mergable and folds them.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223931 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 17:42:01 +00:00
Sanjay Patel
3cd5b83bb8 Match new shuffle codegen for MOVHPD patterns
Add patterns to match SSE (shufpd) and AVX (vpermilpd) shuffle codegen
when storing the high element of a v2f64. The existing patterns were
only checking for an unpckh type of shuffle. 

http://llvm.org/bugs/show_bug.cgi?id=21791

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223929 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 16:58:54 +00:00
Aaron Ballman
7e1839ff01 Silencing a -Wsequence-point warning, and the resulting undefined behavior. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223926 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 14:14:54 +00:00
David Majnemer
895316336e ConstantFold: div undef, 0 should fold to undef, not zero
Dividing by zero yields an undefined value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223924 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 09:14:55 +00:00
David Majnemer
6578f1beb1 InstSimplify: [al]shr exact undef, %X -> undef
Exact shifts always keep the non-zero bits of their input.  This means
it keeps it's undef bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223923 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 09:14:52 +00:00
Michael Kuperstein
89db49fb9b [X86] Make a code path in EltsFromConsecutiveLoads work only on vectors it expects
EltsFromConsecutiveLoads was apparently only ever called for 128-bit vectors, and assumed this implicitly. r223518 started calling it for AVX-sized vectors, causing the code path that had this assumption to crash.
This adds a check to make this path fire only for 128-bit vectors.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223922 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 08:46:12 +00:00
David Majnemer
1297775557 InstSimplify: div %X, 0 -> undef
We already optimized rem %X, 0 to undef, we should do the same for div.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223919 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 07:52:18 +00:00
Craig Topper
f492c9e612 Use unique_ptr instead of DeleteContainerSeconds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223918 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 06:18:57 +00:00
Eric Fiselier
bd11260981 [LIT] Add support for UNSUPPORTED tag to TestRunner.parseIntegratedTestScript
Summary:
This patch gives me just enough to leverage the existing functionality in `TestRunner` for use in `libc++` and `libc++abi` .

It does the following:
* Adds the `UNSUPPORTED` tag to `TestRunner.parseIntegratedTestScript`.
* Allows `parseIntegratedTestScript` to return an empty script if a script is not required by the caller.



Reviewers: ddunbar, EricWF

Reviewed By: EricWF

Subscribers: cfe-commits, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223915 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 03:42:09 +00:00
David Majnemer
fda17198fd DataLayout: Provide nicer diagnostics for malformed strings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223911 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 02:36:41 +00:00
David Majnemer
09df76443e AsmParser: Don't allow null bytes in BB labels
Since Value objects can't have null bytes in their name, we shouldn't
allow them in the labels of basic blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223907 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 02:10:35 +00:00
Duncan P. N. Exon Smith
0e6679635a IR: Move call to dropAllReferences() to MDNode subclasses
Don't call `dropAllReferences()` from `MDNode::~MDNode()`, call it
directly from `~MDNodeFwdDecl()` and `~GenericMDNode()`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223904 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 01:45:04 +00:00
David Majnemer
bf13927f3b DataLayout: Be more verbose when diagnosing problems in pointer specs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223903 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 01:38:28 +00:00
David Majnemer
0178ab55a5 I didn't intend to commit this with r223898
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223899 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 01:17:48 +00:00
David Majnemer
ef6e5490e3 DataLayout: Move asserts over to report_fatal_error
As indicated by the tests, it is possible to feed the AsmParser an
invalid datalayout string.  We should verify the result of parsing this
string regardless of whether or not we have assertions enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223898 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 01:17:08 +00:00
Matthias Braun
5e40bd7d5f MachineVerifier: Allow physreg use if just a subreg is defined.
We can't mark partially undefined registers, so we have to allow reading
a register in the machine verifier if just parts of a register are
defined.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223896 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 01:13:13 +00:00
Matthias Braun
8f08516992 MachineVerifier: Allow LiveInterval segments to end at a partial write.
In the subregister liveness tracking case we do not create implicit
reads on partial register writes anymore, still we need to produce a new
SSA value for partial writes so the live segment has to end.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223895 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 01:13:11 +00:00
Matthias Braun
8f08002f03 VirtRegMap: Improve block live-in info if subregister liveness is available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223894 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 01:13:08 +00:00
Matthias Braun
d7965336f9 MCRegisterInfo: Add MCSubRegIndexIterator.
This iterator iterates over subregister and their associated subregister indices
at the same time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223893 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 01:13:06 +00:00
Matthias Braun
668132490c VirtRegMap: No implicit defs/uses for super registers with subreg liveness tracking.
Adding the implicit defs/uses to the superregisters is semantically questionable
but was not dangerous before as the register allocator never assigned the same
register to two overlapping LiveIntervals even when the actually live
subregisters do not overlap. With subregister liveness tracking enabled this
does actually happen and leads to subsequent bugs if we don't stop adding
the superregister defs/uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223892 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 01:13:04 +00:00
Matthias Braun
0fc28990e4 LiveRegMatrix: Respect subregister liveness when allocating registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223891 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 01:13:01 +00:00
Matthias Braun
7b54b4de26 LiveIntervalUnion: Allow specification of liverange when unifying/extracting.
This allows it to add subregister ranges into the union.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223890 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 01:12:59 +00:00
Matthias Braun
84cc6ec889 Tablegen'erate lanemasks for register units.
Now we can relate lanemasks in a virtual register to register units.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223889 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10 01:12:56 +00:00