oota-llvm.git
9 years agoAsmParser: Refactor duplicate code, NFC
Duncan P. N. Exon Smith [Tue, 20 Jan 2015 02:39:21 +0000 (02:39 +0000)]
AsmParser: Refactor duplicate code, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226538 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PM] Replace the Pass argument in MergeBasicBlockIntoOnlyPred with
Chandler Carruth [Tue, 20 Jan 2015 01:37:09 +0000 (01:37 +0000)]
[PM] Replace the Pass argument in MergeBasicBlockIntoOnlyPred with
a DominatorTree argument as that is the analysis that it wants to
update.

This removes the last non-loop utility function in Utils/ which accepts
a raw Pass argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226537 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Delete GenericDwarfNode during teardown
Duncan P. N. Exon Smith [Tue, 20 Jan 2015 01:18:32 +0000 (01:18 +0000)]
IR: Delete GenericDwarfNode during teardown

Fix a leak in `LLVMContextImpl` teardown that the leak sanitizer tracked
down [1].  I've just switched to automatic dispatch here (since I'll
inevitably forget again with the next class).

[1]: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/811/steps/check-llvm%20asan/logs/stdio

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226536 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoBitcode: Simplify MDNode subclass dispatch, NFC
Duncan P. N. Exon Smith [Tue, 20 Jan 2015 01:03:09 +0000 (01:03 +0000)]
Bitcode: Simplify MDNode subclass dispatch, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226535 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoBitcode: WriteMDNode() => WriteMDTuple(), NFC
Duncan P. N. Exon Smith [Tue, 20 Jan 2015 01:01:53 +0000 (01:01 +0000)]
Bitcode: WriteMDNode() => WriteMDTuple(), NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226534 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoBitcode: Add ValueEnumerator::getMetadataOrNullID(), NFC
Duncan P. N. Exon Smith [Tue, 20 Jan 2015 01:00:23 +0000 (01:00 +0000)]
Bitcode: Add ValueEnumerator::getMetadataOrNullID(), NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226533 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Canonicalize GenericDwarfNode empty headers to null
Duncan P. N. Exon Smith [Tue, 20 Jan 2015 00:58:46 +0000 (00:58 +0000)]
IR: Canonicalize GenericDwarfNode empty headers to null

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226532 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Detect whether to call recalculateHash() via SFINAE, NFC
Duncan P. N. Exon Smith [Tue, 20 Jan 2015 00:57:33 +0000 (00:57 +0000)]
IR: Detect whether to call recalculateHash() via SFINAE, NFC

Rather than relying on updating switch statements correctly, detect
whether `setHash()` exists in the subclass.  If so, call
`recalculateHash()` and `setHash(0)` appropriately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226531 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Introduce GenericDwarfNode
Duncan P. N. Exon Smith [Tue, 20 Jan 2015 00:01:43 +0000 (00:01 +0000)]
IR: Introduce GenericDwarfNode

As part of PR22235, introduce `DwarfNode` and `GenericDwarfNode`.  The
former is a metadata node with a DWARF tag.  The latter matches our
current (generic) schema of a header with string (and stringified
integer) data and an arbitrary number of operands.

This doesn't move it into place yet; that change will require a large
number of testcase updates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226529 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAsmParser: Abstract more of MDLocation parser, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 23:44:41 +0000 (23:44 +0000)]
AsmParser: Abstract more of MDLocation parser, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226527 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAsmParser: Split up ParseMDFieldsImpl(), NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 23:39:32 +0000 (23:39 +0000)]
AsmParser: Split up ParseMDFieldsImpl(), NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226526 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[dsymutil] Add the detected target triple to the debug map.
Frederic Riss [Mon, 19 Jan 2015 23:33:14 +0000 (23:33 +0000)]
[dsymutil] Add the detected target triple to the debug map.

It will be needed to instantiate the Target object that we will
use to create all the MC objects for the dwarf emission.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226525 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAsmParser: Fix error location for missing fields
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 23:32:36 +0000 (23:32 +0000)]
AsmParser: Fix error location for missing fields

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226524 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Cleanup MDNode field use, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 23:18:34 +0000 (23:18 +0000)]
IR: Cleanup MDNode field use, NFC

Swap usage of `SubclassData32` and `MDNodeSubclassData`, and rename
`MDNodeSubclassData` to `NumUnresolved`.  Small drive-by cleanup to
`countUnresolvedOperands()` since otherwise the name clash with local
vars named `NumUnresolved` would be confusing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226523 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Move replaceWithUniqued(), etc., to source file, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 23:17:09 +0000 (23:17 +0000)]
IR: Move replaceWithUniqued(), etc., to source file, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226522 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Cleanup MDNode::MDNode(), NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 23:15:21 +0000 (23:15 +0000)]
IR: Cleanup MDNode::MDNode(), NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226521 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Merge UniquableMDNode back into MDNode, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 23:13:14 +0000 (23:13 +0000)]
IR: Merge UniquableMDNode back into MDNode, NFC

As pointed out in r226501, the distinction between `MDNode` and
`UniquableMDNode` is confusing.  When we need subclasses of `MDNode`
that don't use all its functionality it might make sense to break it
apart again, but until then this makes the code clearer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226520 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Extract MDNodeOpsKey, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:53:18 +0000 (22:53 +0000)]
IR: Extract MDNodeOpsKey, NFC

Make the MDTuple operand hashing logic reusable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226519 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Simplify uniquifyImpl(), NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:52:07 +0000 (22:52 +0000)]
IR: Simplify uniquifyImpl(), NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226518 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Simplify erasing from uniquing store, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:47:08 +0000 (22:47 +0000)]
IR: Simplify erasing from uniquing store, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226517 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove dead code, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:45:41 +0000 (22:45 +0000)]
Remove dead code, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226516 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUtils: Simplify MapMetadata(), NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:44:32 +0000 (22:44 +0000)]
Utils: Simplify MapMetadata(), NFC

Extract out the operand remapping loops, which are now very similar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226515 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSkip upcast, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:41:14 +0000 (22:41 +0000)]
Skip upcast, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226514 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][AVX] Missing AVX1 memory folding float instructions
Simon Pilgrim [Mon, 19 Jan 2015 22:40:45 +0000 (22:40 +0000)]
[X86][AVX] Missing AVX1 memory folding float instructions

Now that we can create much more exhaustive X86 memory folding tests, this patch adds the missing AVX1/F16C floating point instruction stack foldings we can easily test for including the scalar intrinsics (add, div, max, min, mul, sub), conversions float/int to double, half precision conversions, rounding, dot product and bit test. The patch also adds a couple of obviously missing SSE instructions (more to follow once we have full SSE testing).

Now that scalar folding is working it broke a very old test (2006-10-07-ScalarSSEMiscompile.ll) - this test appears to make no sense as its trying to ensure that a scalar subtraction isn't folded as it 'would zero the top elts of the loaded vector' - this test just appears to be wrong to me.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226513 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix whitespace, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:40:25 +0000 (22:40 +0000)]
Fix whitespace, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226512 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUtils: Simplify MapMetadata(), NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:39:07 +0000 (22:39 +0000)]
Utils: Simplify MapMetadata(), NFC

Take advantage of the new ability of temporary nodes to mutate to
distinct and uniqued nodes to greatly simplify the `MapMetadata()`
helper functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226511 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Allow temporary nodes to become uniqued or distinct
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:24:52 +0000 (22:24 +0000)]
IR: Allow temporary nodes to become uniqued or distinct

Add `MDNode::replaceWithUniqued()` and `MDNode::replaceWithDistinct()`,
which mutate temporary nodes to become uniqued or distinct.  On uniquing
collisions, the unique version is returned and the node is deleted.

This takes advantage of temporary nodes being folded back in, and should
let me clean up some awkward logic in `MapMetadata()`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226510 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Remove templates from TempMDNodeDeleter, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:21:15 +0000 (22:21 +0000)]
IR: Remove templates from TempMDNodeDeleter, NFC

r226504 added `TempMDNodeDeleter` to help with `std::unique_ptr<>`-izing
the `MDNode::getTemporary()` interface.  It doesn't need to be
templated, though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226509 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Split out countUnresolvedOperands(), NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:18:29 +0000 (22:18 +0000)]
IR: Split out countUnresolvedOperands(), NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226508 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCleanup whitespace, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:16:01 +0000 (22:16 +0000)]
Cleanup whitespace, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226507 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Return unique_ptr from MDNode::getTemporary()
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 21:30:18 +0000 (21:30 +0000)]
IR: Return unique_ptr from MDNode::getTemporary()

Change `MDTuple::getTemporary()` and `MDLocation::getTemporary()` to
return (effectively) `std::unique_ptr<T, MDNode::deleteTemporary>`, and
clean up call sites.  (For now, `DIBuilder` call sites just call
`release()` immediately.)

There's an accompanying change in each of clang and polly to use the new
API.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226504 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd r224985 back with fixes.
Rafael Espindola [Mon, 19 Jan 2015 21:11:14 +0000 (21:11 +0000)]
Add r224985 back with fixes.

The fixes are to note that AArch64 has additional restrictions on when local
relocations can be used. In particular, ld64 requires that relocations to
cstring/cfstrings use linker visible symbols.

Original message:

In an assembly expression like

bar:
  .long L0 + 1

the intended semantics is that bar will contain a pointer one byte past L0.

In sections that are merged by content (strings, 4 byte constants, etc), a
single position in the section doesn't give the linker enough information.
For example, it would not be able to tell a relocation must point to the
end of a string, since that would look just like the start of the next.

The solution used in ELF to use relocation with symbols if there is a non-zero
addend.

In MachO before this patch we would just keep all symbols in some sections.

This would miss some cases (only cstrings on x86_64 were implemented) and was
inefficient since most relocations have an addend of 0 and can be represented
without the symbol.

This patch implements the non-zero addend logic for MachO too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226503 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Add MDLocation::getTemporary()
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 20:37:44 +0000 (20:37 +0000)]
IR: Add MDLocation::getTemporary()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226502 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Remove MDNodeFwdDecl
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 20:36:39 +0000 (20:36 +0000)]
IR: Remove MDNodeFwdDecl

Remove `MDNodeFwdDecl` (as promised in r226481).  Aside from API
changes, there's no real functionality change here.
`MDNode::getTemporary()` now forwards to `MDTuple::getTemporary()`,
which returns a tuple with `isTemporary()` equal to true.

The main point is that we can now add temporaries of other `MDNode`
subclasses, needed for PR22235 (I introduced `MDNodeFwdDecl` in the
first place because I didn't recognize this need, and thought they were
only needed to handle forward references).

A few things left out of (or highlighted by) this commit:

  - I've had to remove the (few) uses of `std::unique_ptr<>` to deal
    with temporaries, since the destructor is no longer public.
    `getTemporary()` should probably return the equivalent of
    `std::unique_ptr<T, MDNode::deleteTemporary>`.
  - `MDLocation::getTemporary()` doesn't exist yet (worse, it actually
    does exist, but does the wrong thing: `MDNode::getTemporary()` is
    inherited and returns an `MDTuple`).
  - `MDNode` now only has one subclass, `UniquableMDNode`, and the
    distinction between them is actually somewhat confusing.

I'll fix those up next.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226501 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Updating muxir/ri/ii intrinsics. Setting predicate registers as compatible...
Colin LeMahieu [Mon, 19 Jan 2015 20:31:18 +0000 (20:31 +0000)]
[Hexagon] Updating muxir/ri/ii intrinsics.  Setting predicate registers as compatible with i32 rather than doing custom type conversion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226500 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Extract out and reuse `storeImpl()`, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 20:18:13 +0000 (20:18 +0000)]
IR: Extract out and reuse `storeImpl()`, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226499 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Extract out getUniqued(), NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 20:16:50 +0000 (20:16 +0000)]
IR: Extract out getUniqued(), NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226498 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Reuse `getImpl()` for `getDistinct()`, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 20:14:15 +0000 (20:14 +0000)]
IR: Reuse `getImpl()` for `getDistinct()`, NFC

Merge `getDistinct()`'s implementation with those of `get()` and
`getIfExists()` for both `MDTuple` and `MDLocation`.  This will make it
easier to scale to supporting temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226497 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Move replaceAllUsesWith() back up to MDNode
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:35:21 +0000 (19:35 +0000)]
IR: Move replaceAllUsesWith() back up to MDNode

Move `MDNodeFwdDecl::replaceAllUsesWith()` back up to `MDNode`, but
assert `isTemporary()`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226495 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Be specific about what MDNode::get() returns, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:32:27 +0000 (19:32 +0000)]
IR: Be specific about what MDNode::get() returns, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226494 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove dead code, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:31:09 +0000 (19:31 +0000)]
Remove dead code, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226493 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Simplify MDNode::setOperand(), NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:29:25 +0000 (19:29 +0000)]
IR: Simplify MDNode::setOperand(), NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226492 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Simplify handleChangedOperand() fast path, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:28:28 +0000 (19:28 +0000)]
IR: Simplify handleChangedOperand() fast path, NFC

Use `isUniqued()` instead of `isStoredDistinctInContext()`, and remove
an assertion that won't be valid once temporaries are merged back in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226491 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Remove direct comparisons against Metadata::Storage, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:26:24 +0000 (19:26 +0000)]
IR: Remove direct comparisons against Metadata::Storage, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226490 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Assert that resolve() is only called on uniqued nodes, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:25:33 +0000 (19:25 +0000)]
IR: Assert that resolve() is only called on uniqued nodes, NFC

Add an assertion in `UniquableMDNode::resolve()` to prevent temporaries
from being resolved (once they're merged back in).  Needed to shuffle
order of `resolve()` and `storeDistinctInContext()` to prevent it from
firing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226489 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Remove isa<UniquableMDNode>, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:10:14 +0000 (19:10 +0000)]
IR: Remove isa<UniquableMDNode>, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226488 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Simplify DIBuilder::trackIfUnresolved(), NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:09:14 +0000 (19:09 +0000)]
IR: Simplify DIBuilder::trackIfUnresolved(), NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226487 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Remove isa<MDNodeFwdDecl>, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:06:41 +0000 (19:06 +0000)]
IR: Remove isa<MDNodeFwdDecl>, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226486 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Unify code for MDNode::isResolved(), NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:03:18 +0000 (19:03 +0000)]
IR: Unify code for MDNode::isResolved(), NFC

Unify the definitions of `MDNode::isResolved()` and
`UniquableMDNode::isResolved()`.  Previously, `UniquableMDNode` could
answer this question more efficiently, but now that RAUW support has
been unified with `MDNodeFwdDecl`, `MDNode` doesn't need any casts to
figure out the answer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226485 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Store RAUW support and Context in the same pointer, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:02:06 +0000 (19:02 +0000)]
IR: Store RAUW support and Context in the same pointer, NFC

Add an `LLVMContext &` to `ReplaceableMetadataImpl`, create a class that
either holds a reference to an `LLVMContext` or owns a
`ReplaceableMetadataImpl`, and use the new class in `MDNode`.

  - This saves a pointer in `UniquableMDNode` at the cost of a pointer
    in `ValueAsMetadata` (which didn't used to store the `LLVMContext`).
    There are far more of the former.
  - Unifies RAUW support between `MDNodeFwdDecl` (which is going away,
    see r226481) and `UniquableMDNode`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226484 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Converting intrinsics combine imm/imm, simple shifts and extends.
Colin LeMahieu [Mon, 19 Jan 2015 18:56:19 +0000 (18:56 +0000)]
[Hexagon] Converting intrinsics combine imm/imm, simple shifts and extends.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226483 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Add isUniqued() and isTemporary()
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 18:45:35 +0000 (18:45 +0000)]
IR: Add isUniqued() and isTemporary()

Change `MDNode::isDistinct()` to only apply to 'distinct' nodes (not
temporaries), and introduce `MDNode::isUniqued()` and
`MDNode::isTemporary()` for the other two possibilities.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226482 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Use an enum to describe Metadata storage, NFC
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 18:36:18 +0000 (18:36 +0000)]
IR: Use an enum to describe Metadata storage, NFC

More clearly describe the type of storage used for `Metadata`.

  - `Uniqued`: uniqued, stored in the context.
  - `Distinct`: distinct, stored in the context.
  - `Temporary`: not owned by anyone.

This is the first in a series of commits to fix a design problem with
`MDNodeFwdDecl` that I need to solve for PR22235.  While `MDNodeFwdDecl`
works well as a forward declaration, we use `MDNode::getTemporary()` for
more than forward declarations -- we also need to create early versions
of nodes (with fields not filled in) that we'll fill out later (see
`DIBuilder::finalize()` and `CGDebugInfo::finalize()` for examples).
This was a blind spot I had when I introduced `MDNodeFwdDecl` (which
David Blaikie (indirectly) highlighted in an unrelated review [1]).

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

In general, we need `MDTuple::getTemporary()` to give a temporary tuple
(like `MDNodeFwdDecl`), `MDLocation::getTemporary()` to give a temporary
location, and (the problem at hand) `GenericDebugMDNode::getTemporary()`
to give a temporary generic debug node.

So I need to fold the idea of "temporary" nodes back into
`UniquableMDNode`.  (More commits to follow as I refactor.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226481 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Converting remaining ALU32/ALU intrinsics.
Colin LeMahieu [Mon, 19 Jan 2015 18:33:58 +0000 (18:33 +0000)]
[Hexagon] Converting remaining ALU32/ALU intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226480 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Converting ALU32/ALU intrinsics to new patterns.
Colin LeMahieu [Mon, 19 Jan 2015 18:22:19 +0000 (18:22 +0000)]
[Hexagon] Converting ALU32/ALU intrinsics to new patterns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226478 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove support for DIVariable's FlagIndirectVariable and expect
Adrian Prantl [Mon, 19 Jan 2015 17:57:29 +0000 (17:57 +0000)]
Remove support for DIVariable's FlagIndirectVariable and expect
frontends to use a DIExpression with a DW_OP_deref instead.

This is not only a much more natural place for this informationl; there
is also a technical reason: The FlagIndirectVariable is used to mark a
variable that is turned into a reference by virtue of the calling
convention; this happens for example to aggregate return values.
The inliner, for example, may actually need to undo this indirection to
correctly represent the value in its new context. This is impossible to
implement because the DIVariable can't be safely modified. We can however
safely construct a new DIExpression on the fly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226476 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AArch64] Implement GHC calling convention
Greg Fitzgerald [Mon, 19 Jan 2015 17:40:05 +0000 (17:40 +0000)]
[AArch64] Implement GHC calling convention

Original patch by Luke Iannini.  Minor improvements and test added by
Erik de Castro Lopo.

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

From: Erik de Castro Lopo <erikd@mega-nerd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226473 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Converting halfword to double accumulating multiply intrinsics.
Colin LeMahieu [Mon, 19 Jan 2015 17:36:32 +0000 (17:36 +0000)]
[Hexagon] Converting halfword to double accumulating multiply intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226472 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoProduce errors when an assignment expression would use a common symbol.
Rafael Espindola [Mon, 19 Jan 2015 17:30:24 +0000 (17:30 +0000)]
Produce errors when an assignment expression would use a common symbol.

An assignment will produce a symbol with a given section and offset. There is
no way to represent something like "1 byte after a common symbol".

This matches the behavior of GNU as.

Part of PR22217.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226470 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ARM] SSAT/USAT with an 'asr #32' shift should result in an undefined encoding rather...
Bradley Smith [Mon, 19 Jan 2015 16:37:17 +0000 (16:37 +0000)]
[ARM] SSAT/USAT with an 'asr #32' shift should result in an undefined encoding rather than unpredictable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226469 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ARM] Fixup sign extend instruction availability w.r.t. DSP extension
Bradley Smith [Mon, 19 Jan 2015 16:36:02 +0000 (16:36 +0000)]
[ARM] Fixup sign extend instruction availability w.r.t. DSP extension

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226468 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoBring r226038 back.
Rafael Espindola [Mon, 19 Jan 2015 15:16:06 +0000 (15:16 +0000)]
Bring r226038 back.

No change in this commit, but clang was changed to also produce trivial comdats when
needed.

Original message:

Don't create new comdats in CodeGen.

This patch stops the implicit creation of comdats during codegen.

Clang now sets the comdat explicitly when it is required. With this patch clang and gcc
now produce the same result in pr19848.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226467 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PM] Replace the Pass argument to SplitEdge with specific analyses used
Chandler Carruth [Mon, 19 Jan 2015 12:36:53 +0000 (12:36 +0000)]
[PM] Replace the Pass argument to SplitEdge with specific analyses used
and updated.

This may appear to remove handling for things like alias analysis when
splitting critical edges here, but in fact no callers of SplitEdge
relied on this. Similarly, all of them wanted to preserve LCSSA if there
was any update of the loop info. That makes the interface much simpler.

With this, all of BasicBlockUtils.h is free of Pass arguments and
prepared for the new pass manager. This is tho majority of utilities
that relied on pass arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226459 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PM] Cleanup a dead option to critical edge splitting that I noticed
Chandler Carruth [Mon, 19 Jan 2015 12:12:00 +0000 (12:12 +0000)]
[PM] Cleanup a dead option to critical edge splitting that I noticed
while refactoring this API for the new pass manager.

No functionality changed here, the code didn't actually support this
option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226457 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PM] Remove the Pass argument from all of the critical edge splitting
Chandler Carruth [Mon, 19 Jan 2015 12:09:11 +0000 (12:09 +0000)]
[PM] Remove the Pass argument from all of the critical edge splitting
APIs and replace it and numerous booleans with an option struct.

The critical edge splitting API has a really large surface of flags and
so it seems worth burning a small option struct / builder. This struct
can be constructed with the various preserved analyses and then flags
can be flipped in a builder style.

The various users are now responsible for directly passing along their
analysis information. This should be enough for the critical edge
splitting to work cleanly with the new pass manager as well.

This API is still pretty crufty and could be cleaned up a lot, but I've
focused on this change just threading an option struct rather than
a pass through the API.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226456 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[NFC] Update createMachineScheduler() comment
Sergey Dmitrouk [Mon, 19 Jan 2015 12:02:25 +0000 (12:02 +0000)]
[NFC] Update createMachineScheduler() comment

It became invalid after signature changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226455 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSuppress the newly added Clang warning for the inaccessible base in this
Chandler Carruth [Mon, 19 Jan 2015 10:43:00 +0000 (10:43 +0000)]
Suppress the newly added Clang warning for the inaccessible base in this
test. Do that after we suppress the warnings for unknown pragmas as this
warning flag is quite new in Clang and so old Clang's would warn all the
time on this file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226444 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PM] Relax asserts and always try to reconstruct loop simplify form when
Chandler Carruth [Mon, 19 Jan 2015 10:23:00 +0000 (10:23 +0000)]
[PM] Relax asserts and always try to reconstruct loop simplify form when
we can while splitting critical edges.

The only code which called this and didn't require simplified loops to
be preserved is polly, and the code behaves correctly there anyways.
Without this change, it becomes really hard to share this code with the
new pass manager where things like preserving loop simplify form don't
make any sense.

If anyone discovers this code behaving incorrectly, what it *should* be
testing for is whether the loops it needs to be in simplified form are
in fact in that form. It should always be trying to preserve that form
when it exists.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226443 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSLPVectorizer: limit the number of alias checks to reduce the runtime.
Erik Eckstein [Mon, 19 Jan 2015 09:33:38 +0000 (09:33 +0000)]
SLPVectorizer: limit the number of alias checks to reduce the runtime.

In case of blocks with many memory-accessing instructions, alias checking can take lot of time
(because calculating the memory dependencies has quadratic complexity).
I chose a limit which resulted in no changes when running the benchmarks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226439 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PowerPC] Minor correction to r226432
Hal Finkel [Mon, 19 Jan 2015 07:44:45 +0000 (07:44 +0000)]
[PowerPC] Minor correction to r226432

We don't need to exclude patchpoints from the implicit r2 dependence in
FastISel because it is added as an implicit operand and, thus, should not
confuse that StackMap code.

By inspection / no test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226434 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[MIScheduler] Slightly better handling of constrainLocalCopy when both source and...
Michael Kuperstein [Mon, 19 Jan 2015 07:30:47 +0000 (07:30 +0000)]
[MIScheduler] Slightly better handling of constrainLocalCopy when both source and dest are local
This fixes PR21792.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226433 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PowerPC] Add r2 as an operand for all calls under both PPC64 ELF V1 and V2
Hal Finkel [Mon, 19 Jan 2015 07:20:27 +0000 (07:20 +0000)]
[PowerPC] Add r2 as an operand for all calls under both PPC64 ELF V1 and V2

Our PPC64 ELF V2 call lowering logic added r2 as an operand to all direct call
instructions in order to represent the dependency on the TOC base pointer
value. Restricting this to ELF V2, however, does not seem to make sense: calls
under ELF V1 have the same dependence, and indirect calls have an r2 dependence
just as direct ones. Make sure the dependence is noted for all calls under both
ELF V1 and ELF V2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226432 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[x86] Change AVX512 intrinsics to take a 8-bit immediate for the comparision kind...
Craig Topper [Mon, 19 Jan 2015 06:07:27 +0000 (06:07 +0000)]
[x86] Change AVX512 intrinsics to take a 8-bit immediate for the comparision kind instead of a 32-bit immediate. This better aligns with the emitted instruction. It also matches SSE and AVX1 equivalents. Also add auto upgrade support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226430 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[tinyptrvector] Add in a MutableArrayRef implicit conversion operator to complement...
Michael Gottesman [Mon, 19 Jan 2015 03:25:33 +0000 (03:25 +0000)]
[tinyptrvector] Add in a MutableArrayRef implicit conversion operator to complement the ArrayRef implicit conversion operator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226428 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PM] Lift the analyses into the interface for
Chandler Carruth [Mon, 19 Jan 2015 03:03:39 +0000 (03:03 +0000)]
[PM] Lift the analyses into the interface for
SplitLandingPadPredecessors and remove the Pass argument from its
interface.

Another step to the utilities being usable with both old and new pass
managers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226426 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoChange using => typedef to please the MSVC bots.
Michael Gottesman [Mon, 19 Jan 2015 02:38:16 +0000 (02:38 +0000)]
Change using => typedef to please the MSVC bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226425 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoHide the state of TinyPtrVector and remove the single element constructor.
Michael Gottesman [Mon, 19 Jan 2015 02:09:54 +0000 (02:09 +0000)]
Hide the state of TinyPtrVector and remove the single element constructor.

There is no reason for this state to be exposed as public. The single element
constructor was superfulous in light of the single element ArrayRef
constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226424 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReorder.
NAKAMURA Takumi [Mon, 19 Jan 2015 00:35:33 +0000 (00:35 +0000)]
Reorder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226419 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] examples/Kaleidoscope: Prune redundant libdeps.
NAKAMURA Takumi [Mon, 19 Jan 2015 00:35:25 +0000 (00:35 +0000)]
[CMake] examples/Kaleidoscope: Prune redundant libdeps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226418 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] Update libdeps in examples/Kaleidoscope/Chapter4.
NAKAMURA Takumi [Mon, 19 Jan 2015 00:35:18 +0000 (00:35 +0000)]
[CMake] Update libdeps in examples/Kaleidoscope/Chapter4.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226417 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agounique_ptrify the RelInfo parameter to TargetRegistry::createMCSymbolizer
David Blaikie [Sun, 18 Jan 2015 20:45:48 +0000 (20:45 +0000)]
unique_ptrify the RelInfo parameter to TargetRegistry::createMCSymbolizer

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226416 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAttempt to fix the MSVC build by working around a layering issue
David Blaikie [Sun, 18 Jan 2015 20:43:57 +0000 (20:43 +0000)]
Attempt to fix the MSVC build by working around a layering issue

Since MCStreamer isn't part of Support, the dtor can't be called from
here - so just pass by reference instead. This is rather imperfect, but
will hopefully suffice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226415 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agostd::unique_ptrify the MCStreamer argument to createAsmPrinter
David Blaikie [Sun, 18 Jan 2015 20:29:04 +0000 (20:29 +0000)]
std::unique_ptrify the MCStreamer argument to createAsmPrinter

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226414 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600: Remove redundant test
Matt Arsenault [Sun, 18 Jan 2015 19:30:32 +0000 (19:30 +0000)]
R600: Remove redundant test

This is already covered in ftrunc.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226412 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips] 'CHECK :' is not a valid check directive. Fixed.
Daniel Sanders [Sun, 18 Jan 2015 18:43:10 +0000 (18:43 +0000)]
[mips] 'CHECK :' is not a valid check directive. Fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226409 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips] Make whitespace in disassembler tests more consistent. NFC.
Daniel Sanders [Sun, 18 Jan 2015 18:38:36 +0000 (18:38 +0000)]
[mips] Make whitespace in disassembler tests more consistent. NFC.

The tests for the ISA's should now be approximately diffable. That is, the
output of 'diff valid-mips1.txt valid-mips2.txt' should be emit the lines
for instructions that were added/removed to/from MIPS-I by MIPS-II. This
doesn't work perfectly at the moment due to ordering differences but it
should be close.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226408 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips] Make whitespace of disassembler tests more consistent by removing blank lines...
Daniel Sanders [Sun, 18 Jan 2015 18:21:19 +0000 (18:21 +0000)]
[mips] Make whitespace of disassembler tests more consistent by removing blank lines. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226407 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][SSE] Added scalar min/max folding tests. NFC.
Simon Pilgrim [Sun, 18 Jan 2015 18:06:23 +0000 (18:06 +0000)]
[X86][SSE] Added scalar min/max folding tests. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226406 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][SSE] Added float extract and xmm extract/insert stack folding tests. NFC.
Simon Pilgrim [Sun, 18 Jan 2015 17:04:32 +0000 (17:04 +0000)]
[X86][SSE] Added float extract and xmm extract/insert stack folding tests. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226405 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][SSE] Added scalar conversion stack folding tests. NFC.
Simon Pilgrim [Sun, 18 Jan 2015 16:22:15 +0000 (16:22 +0000)]
[X86][SSE] Added scalar conversion stack folding tests. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226404 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PowerPC] Don't hard-code R2 as register when processing TOC relocations
Hal Finkel [Sun, 18 Jan 2015 15:59:44 +0000 (15:59 +0000)]
[PowerPC] Don't hard-code R2 as register when processing TOC relocations

Instructions that have high-order TOC relocations always carry R2 as their base
register, so it does not matter whether we take the register from the
instruction or just hard-code it in PPCAsmPrinter. In the future, however, we
might want to apply these relocations to instructions using a different
register, so taking the register from the instruction is a better thing to do.
No change in functionality here, however.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226403 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PowerPC] Add some FIXMEs for fastcc and FPR <-> GPR moves
Hal Finkel [Sun, 18 Jan 2015 14:31:10 +0000 (14:31 +0000)]
[PowerPC] Add some FIXMEs for fastcc and FPR <-> GPR moves

So we don't forget, once we support FPR <-> GPR moves on the P8, we'll likely
want to re-visit this part of the calling convention.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226401 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAVX1 stack folding tests. NFC.
Simon Pilgrim [Sun, 18 Jan 2015 12:56:39 +0000 (12:56 +0000)]
AVX1 stack folding tests. NFC.

Begun adding more exhaustive tests - all floating point instructions should now be either tested or have placeholders. We do seem to have a number of missing instructions, I will add a patch for review once the remaining working instructions are added.

I'll then move on to SSE tests and then the integer instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226400 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PowerPC] Initial PPC64 calling-convention changes for fastcc
Hal Finkel [Sun, 18 Jan 2015 12:08:47 +0000 (12:08 +0000)]
[PowerPC] Initial PPC64 calling-convention changes for fastcc

The default calling convention specified by the PPC64 ELF (V1 and V2) ABI is
designed to work with both prototyped and non-prototyped/varargs functions. As
a result, GPRs and stack space are allocated for every argument, even those
that are passed in floating-point or vector registers.

GlobalOpt::OptimizeFunctions will transform local non-varargs functions (that
do not have their address taken) to use the 'fast' calling convention.

When functions are using the 'fast' calling convention, don't allocate GPRs for
arguments passed in other types of registers, and don't allocate stack space for
arguments passed in registers. Other changes for the fast calling convention
may be added in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226399 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PM] Pull the analyses used for another utility routine into its API
Chandler Carruth [Sun, 18 Jan 2015 09:21:15 +0000 (09:21 +0000)]
[PM] Pull the analyses used for another utility routine into its API
rather than relying on the pass object.

This one is a bit annoying, but will pay off. First, supporting this one
will make the next one much easier, and for utilities like LoopSimplify,
this is moving them (slowly) closer to not having to pass the pass
object around throughout their APIs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226396 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PM] Sink the specific analyses preserved by SplitBlock into its
Chandler Carruth [Sun, 18 Jan 2015 02:39:37 +0000 (02:39 +0000)]
[PM] Sink the specific analyses preserved by SplitBlock into its
interface, removing Pass from its interface.

This also makes those analyses optional so that passes which don't even
preserve these (or use them) can skip the logic entirely.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226394 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PM] Replace another Pass argument with specific analyses that are
Chandler Carruth [Sun, 18 Jan 2015 02:11:23 +0000 (02:11 +0000)]
[PM] Replace another Pass argument with specific analyses that are
optionally updated by MergeBlockIntoPredecessors.

No functionality changed, just refactoring to clear the way for the new
pass manager.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226392 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PM] Refactor how the LoopRotation pass access the DominatorTree.
Chandler Carruth [Sun, 18 Jan 2015 02:08:05 +0000 (02:08 +0000)]
[PM] Refactor how the LoopRotation pass access the DominatorTree.

Instead of querying the pass every where we need to, do that once and
cache a pointer in the pass object. This is both simpler and I'm about
to add yet another place where we need to dig out that pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226391 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PM] Lift the actual analyses used into the inferface rather than
Chandler Carruth [Sun, 18 Jan 2015 01:45:07 +0000 (01:45 +0000)]
[PM] Lift the actual analyses used into the inferface rather than
accepting a Pass and querying it for analyses.

This is necessary to allow the utilities to work both with the old and
new pass managers, and I also think this makes the interface much more
clear and helps the reader know what analyses the utility can actually
handle. I plan to repeat this process iteratively to clean up all the
pass utilities.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226386 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PM] Now that LoopInfo isn't in the Pass type hierarchy, it is much
Chandler Carruth [Sun, 18 Jan 2015 01:25:51 +0000 (01:25 +0000)]
[PM] Now that LoopInfo isn't in the Pass type hierarchy, it is much
cleaner to derive from the generic base.

Thise removes a ton of boiler plate code and somewhat strange and
pointless indirections. It also remove a bunch of the previously needed
friend declarations. To fully remove these, I also lifted the verify
logic into the generic LoopInfoBase, which seems good anyways -- it is
generic and useful logic even for the machine side.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226385 91177308-0d34-0410-b5e6-96231b3b80d8