Turn the new SROA pass back on. Let's see if it sticks this time. =]

Again, let me know if anything breaks due to this!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164986 91177308-0d34-0410-b5e6-96231b3b80d8
Add default JIT LIT variable.

Patch by David Tweed!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164996 91177308-0d34-0410-b5e6-96231b3b80d8
Fix PR13991: legalizing an overflowing multiplication operation is harder than
the add/sub case since in the case of multiplication you also have to check that
the operation in the larger type did not overflow.


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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165019 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a silly coding error on my part. The whole point of the speculator
being separate was that it can grow the use list. As a consequence, we
can't use the iterator-pair interface, we need an index based interface.
Expose such an interface from the AllocaPartitioning, and use it in the
speculator.

This should at least fix a use-after-free bug found by Duncan, and may
fix some of the other crashers.

I don't have a nice deterministic test case yet, but if I get a good
one, I'll add it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165027 91177308-0d34-0410-b5e6-96231b3b80d8
Support for generating ELF objects on Windows.

This adds 'elf' as a recognized target triple environment value and overrides the default generated object format on Windows platforms if that value is present.  This patch also enables MCJIT tests on Windows using the new environment value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165030 91177308-0d34-0410-b5e6-96231b3b80d8
Fix another crasher in SROA, reported by Joel.

We require that the indices into the use lists are stable in order to
build fast lookup tables to locate a particular partition use from an
operand of a PHI or select. This is (obviously in hind sight)
incompatible with erasing elements from the array. Really, we don't want
to erase anyways. It is expensive, and a rare operation. Instead, simply
weaken the contract of the PartitionUse structure to allow null Use
pointers to represent dead uses. Now we can clear out the pointer to
mark things as dead, and all it requires is adding some 'continue'
checks to the various loops.

I'm still reducing a test case for this, as the test case I have is
huge. I think this one I can get a nice test case for though, as it was
much more deterministic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165032 91177308-0d34-0410-b5e6-96231b3b80d8
Improve overflow detection in StringRef::getAsUnsignedInteger().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165038 91177308-0d34-0410-b5e6-96231b3b80d8
Set the 'build clang only' flag when we're building only clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165042 91177308-0d34-0410-b5e6-96231b3b80d8
Remove the SavePoint infrastructure from fast isel, replace
with just an insert point from the MachineBasicBlock and let
the location be updated as we access it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165049 91177308-0d34-0410-b5e6-96231b3b80d8
Make the location a parameter since we may not want the next one
in the block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165050 91177308-0d34-0410-b5e6-96231b3b80d8
Use the existing DebugLoc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165051 91177308-0d34-0410-b5e6-96231b3b80d8
Don't use a debug location for frame setup instructions in the
prologue. Also skip frame setup instructions when looking for the
first location.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165052 91177308-0d34-0410-b5e6-96231b3b80d8
Clean-up of memory buffer and object ownership model in MCJIT

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165054 91177308-0d34-0410-b5e6-96231b3b80d8
Allow alternate instructions to silence bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165055 91177308-0d34-0410-b5e6-96231b3b80d8
Make sure the whole live range is covered when values are pruned twice.

JoinVals::pruneValues() calls LIS->pruneValue() to avoid conflicts when
overlapping two different values. This produces a set of live range end
points that are used to reconstruct the live range (with SSA update)
after joining the two registers.

When a value is pruned twice, the set of end points was insufficient:

  v1 = DEF
  v1 = REPLACE1
  v1 = REPLACE2
  KILL v1

The end point at KILL would only reconstruct the live range from
REPLACE2 to KILL, leaving the range REPLACE1-REPLACE2 dead.

Add REPLACE2 as an end point in this case so the full live range is
reconstructed.

This fixes PR13999.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165056 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-inline asm] Add basic support for wildcard MCParsedAsmOperands.  This type
of operand is specific to MS-style inline assembly and should not be generated
when parsing normal assembly.

The purpose of the wildcard operands are to allow the AsmParser to match
multiple instructions (i.e., MCInsts) to a given ms-style asm statement.  For
the time being the matcher just returns the first match.  This patch only
implements wildcard matches for memory operands.  Support for register
wildcards will be added in the near future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165057 91177308-0d34-0410-b5e6-96231b3b80d8
Handle reserved registers more accurately in handleMove().

Reserved register live ranges look like a set of dead defs - any uses of
reserved registers are ignored.

Instead of skipping the updating of reserved register operands entirely,
just ignore the use operands and treat the def operands normally.

No test case, handleMove() is not commonly used yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165060 91177308-0d34-0410-b5e6-96231b3b80d8
Remove the old coalescer algorithm.

The new algorithm has been enabled by default for almost a week now and
seems to be stable.

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