oota-llvm.git
14 years agoRemove empty processFunctionBeforeFrameFinalized(). The default
Jim Grosbach [Fri, 6 Aug 2010 18:57:24 +0000 (18:57 +0000)]
Remove empty processFunctionBeforeFrameFinalized(). The default
implementation of the function is equivalent, so no need to provide
the target-specific version until/unless it needs to do something.

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

14 years agoKeep the MachiuneFunctionPass pointer around. It is useful for verification.
Jakob Stoklund Olesen [Fri, 6 Aug 2010 18:47:06 +0000 (18:47 +0000)]
Keep the MachiuneFunctionPass pointer around. It is useful for verification.

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

14 years agoAdd LiveInterval::RenumberValues - Garbage collection for VNInfos.
Jakob Stoklund Olesen [Fri, 6 Aug 2010 18:46:59 +0000 (18:46 +0000)]
Add LiveInterval::RenumberValues - Garbage collection for VNInfos.

After heavy editing of a live interval, it is much easier to simply renumber the
live values instead of trying to keep track of the unused ones.

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

14 years agoReapply r110396, with fixes to appease the Linux buildbot gods.
Owen Anderson [Fri, 6 Aug 2010 18:33:48 +0000 (18:33 +0000)]
Reapply r110396, with fixes to appease the Linux buildbot gods.

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

14 years agoImplement a proper getModRefInfo for va_arg.
Dan Gohman [Fri, 6 Aug 2010 18:24:38 +0000 (18:24 +0000)]
Implement a proper getModRefInfo for va_arg.

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

14 years agospelling
Jim Grosbach [Fri, 6 Aug 2010 18:24:36 +0000 (18:24 +0000)]
spelling

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

14 years agoBe more conservative in the face of volatile.
Dan Gohman [Fri, 6 Aug 2010 18:11:28 +0000 (18:11 +0000)]
Be more conservative in the face of volatile.

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

14 years agoFix a comment.
Dan Gohman [Fri, 6 Aug 2010 18:10:45 +0000 (18:10 +0000)]
Fix a comment.

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

14 years agoAdd more verification of LiveIntervals.
Jakob Stoklund Olesen [Fri, 6 Aug 2010 18:04:19 +0000 (18:04 +0000)]
Add more verification of LiveIntervals.

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

14 years agoFix swapped COPY operands.
Jakob Stoklund Olesen [Fri, 6 Aug 2010 18:04:17 +0000 (18:04 +0000)]
Fix swapped COPY operands.

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

14 years agoDon't try to verify LiveIntervals for physical registers.
Jakob Stoklund Olesen [Fri, 6 Aug 2010 18:04:14 +0000 (18:04 +0000)]
Don't try to verify LiveIntervals for physical registers.

When a physical register is in use, some alias of that register has a live
interval with a relevant live range. That is the sad state of intervals after
physreg coalescing of subregs, and it is good enough for correct register
allocation.

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

14 years agoFix eabi calling convention when a 64 bit value shadows r3.
Rafael Espindola [Fri, 6 Aug 2010 15:35:32 +0000 (15:35 +0000)]
Fix eabi calling convention when a 64 bit value shadows r3.

Without this what was happening was:

* R3 is not marked as "used"
* ARM backend thinks it has to save it to the stack because of vaarg
* Offset computation correctly ignores it
* Offsets are wrong

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

14 years agoFix uninitialized variable warning.
Nick Lewycky [Fri, 6 Aug 2010 07:43:46 +0000 (07:43 +0000)]
Fix uninitialized variable warning.
Also move 'default' case next to a real case to help compiler optimize in
non-Debug builds.
No functionality change.

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

14 years agoWork in progress, cleaning up MergeFuncs.
Nick Lewycky [Fri, 6 Aug 2010 07:21:30 +0000 (07:21 +0000)]
Work in progress, cleaning up MergeFuncs.
Further clean up the comparison function by removing overly generalized
"domains".
Remove all understanding of ELF aliases and simplify folding code and comments.

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

14 years agoUpdate CMake build.
Ted Kremenek [Fri, 6 Aug 2010 04:05:21 +0000 (04:05 +0000)]
Update CMake build.

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

14 years agoFix missing </a> tag error introduced by addition of LowerAtomic pass.
Peter Collingbourne [Fri, 6 Aug 2010 02:13:25 +0000 (02:13 +0000)]
Fix missing </a> tag error introduced by addition of LowerAtomic pass.
While at it, fix all other HTML validation errors in docs/Passes.html.

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

14 years agoPatterns to match AVX 256-bit horizontal arithmetic intrinsics
Bruno Cardoso Lopes [Fri, 6 Aug 2010 02:10:30 +0000 (02:10 +0000)]
Patterns to match AVX 256-bit horizontal arithmetic intrinsics

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

14 years agoAdd a comment.
Dan Gohman [Fri, 6 Aug 2010 02:04:07 +0000 (02:04 +0000)]
Add a comment.

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

14 years agoPatterns to match AVX 256-bit arithmetic intrinsics
Bruno Cardoso Lopes [Fri, 6 Aug 2010 01:52:29 +0000 (01:52 +0000)]
Patterns to match AVX 256-bit arithmetic intrinsics

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

14 years agoRevert r109901. The implementation of <rdar://problem/7405933> (r110423) doesn't
Bill Wendling [Fri, 6 Aug 2010 01:36:09 +0000 (01:36 +0000)]
Revert r109901. The implementation of <rdar://problem/7405933> (r110423) doesn't
need the Compare flag after all.

--- Reverse-merging r109901 into '.':
U    include/llvm/Target/TargetInstrDesc.h
U    include/llvm/Target/Target.td
U    utils/TableGen/InstrInfoEmitter.cpp
U    utils/TableGen/CodeGenInstruction.cpp
U    utils/TableGen/CodeGenInstruction.h

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

14 years agoAdd the Optimize Compares pass (disabled by default).
Bill Wendling [Fri, 6 Aug 2010 01:32:48 +0000 (01:32 +0000)]
Add the Optimize Compares pass (disabled by default).

This pass tries to remove comparison instructions when possible. For instance,
if you have this code:

   sub r1, 1
   cmp r1, 0
   bz  L1

and "sub" either sets the same flag as the "cmp" instruction or could be
converted to set the same flag, then we can eliminate the "cmp" instruction all
together. This is a important for ARM where the ALU instructions could set the
CPSR flag, but need a special suffix ('s') to do so.

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

14 years agoMoar words!
Eric Christopher [Fri, 6 Aug 2010 01:30:54 +0000 (01:30 +0000)]
Moar words!

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

14 years agoMove all the logic for function attributes and call attributes out of the
Dan Gohman [Fri, 6 Aug 2010 01:25:49 +0000 (01:25 +0000)]
Move all the logic for function attributes and call attributes out of the
AliasAnalysis base class and into BasicAliasAnalyais. This avoids confusion
about where such logic is happening when there are other AliasAnalysis
implementations present.

Move the logic for translating two-callsite getModRefInfo queries into
other AliasAnalysis queries out of BasicAliasAnalysis and into the
AliasAnalysis base class, as it is useful for other AliasAnalysis
implementations.

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

14 years agoAdd tablegen support for vdup_lane
Nate Begeman [Fri, 6 Aug 2010 01:24:11 +0000 (01:24 +0000)]
Add tablegen support for vdup_lane

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

14 years agoFix botched revert.
Owen Anderson [Fri, 6 Aug 2010 00:36:20 +0000 (00:36 +0000)]
Fix botched revert.

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

14 years agoWhile emitting DBG_VALUE for registers spilled at the end of a block do not use locat...
Devang Patel [Fri, 6 Aug 2010 00:26:18 +0000 (00:26 +0000)]
While emitting DBG_VALUE for registers spilled at the end of a block do not use location of MBB->end(). If a block does not have terminator then incoming iterator points to end().

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

14 years agoRevert r110396 to fix buildbots.
Owen Anderson [Fri, 6 Aug 2010 00:23:35 +0000 (00:23 +0000)]
Revert r110396 to fix buildbots.

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

14 years agoRemove unused AVX intrinsics
Bruno Cardoso Lopes [Fri, 6 Aug 2010 00:04:07 +0000 (00:04 +0000)]
Remove unused AVX intrinsics

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

14 years agoAdd an option to always emit realignment code for a particular module.
Eric Christopher [Thu, 5 Aug 2010 23:57:43 +0000 (23:57 +0000)]
Add an option to always emit realignment code for a particular module.

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

14 years agoBe more aggressive about removing joined physreg copies.
Jakob Stoklund Olesen [Thu, 5 Aug 2010 23:51:28 +0000 (23:51 +0000)]
Be more aggressive about removing joined physreg copies.

When a joined COPY changes subreg liveness, we keep it around as a KILL,
otherwise it is safe to delete.

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

14 years agoDon't verify LiveVariables if LiveIntervals is available.
Jakob Stoklund Olesen [Thu, 5 Aug 2010 23:51:26 +0000 (23:51 +0000)]
Don't verify LiveVariables if LiveIntervals is available.

LiveVariables becomes horribly wrong while the coalescer is running, but the
analysis is not zapped until after the coalescer pass has run. This causes tons
of false reports when calling verify form the coalescer.

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

14 years agoFix 80-column violations.
Dan Gohman [Thu, 5 Aug 2010 23:48:14 +0000 (23:48 +0000)]
Fix 80-column violations.

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

14 years agoMake AA private, since subclasses shouldn't (aren't don't) access it directly.
Dan Gohman [Thu, 5 Aug 2010 23:44:45 +0000 (23:44 +0000)]
Make AA private, since subclasses shouldn't (aren't don't) access it directly.

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

14 years agoDon't use PassInfo* as a type identifier for passes. Instead, use the address of...
Owen Anderson [Thu, 5 Aug 2010 23:42:04 +0000 (23:42 +0000)]
Don't use PassInfo* as a type identifier for passes.  Instead, use the address of the static
ID member as the sole unique type identifier.  Clean up APIs related to this change.

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

14 years agoRemove IntrWriteMem, as it's the default. Rename IntrWriteArgMem
Dan Gohman [Thu, 5 Aug 2010 23:36:21 +0000 (23:36 +0000)]
Remove IntrWriteMem, as it's the default. Rename IntrWriteArgMem
to IntrReadWriteArgMem, as it's for reading as well as writing.

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

14 years agoSupport very basic (doesn't include ABI support in the front-end, varags, ...) 256...
Bruno Cardoso Lopes [Thu, 5 Aug 2010 23:35:51 +0000 (23:35 +0000)]
Support very basic (doesn't include ABI support in the front-end, varags, ...) 256-bit argument passing and return for AVX

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

14 years agoImplement AccessesArguments checking in the two-callsite form
Dan Gohman [Thu, 5 Aug 2010 23:34:50 +0000 (23:34 +0000)]
Implement AccessesArguments checking in the two-callsite form
of BasicAA::getModRefInfo. This allows BasicAA to say that two
memset calls to non-aliasing memory locations don't interfere.

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

14 years agoYes, we can do better, but this is not the place for it.
Dan Gohman [Thu, 5 Aug 2010 23:23:32 +0000 (23:23 +0000)]
Yes, we can do better, but this is not the place for it.

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

14 years agoAdd the beginnings of infrastructure for range tracking.
Owen Anderson [Thu, 5 Aug 2010 22:59:19 +0000 (22:59 +0000)]
Add the beginnings of infrastructure for range tracking.

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

14 years agoRevert my last commit, apparently it's a runtime issue.
Eric Christopher [Thu, 5 Aug 2010 22:48:32 +0000 (22:48 +0000)]
Revert my last commit, apparently it's a runtime issue.

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

14 years agoAdd basic verification of LiveIntervals.
Jakob Stoklund Olesen [Thu, 5 Aug 2010 22:32:21 +0000 (22:32 +0000)]
Add basic verification of LiveIntervals.

We verify that the LiveInterval is live at uses and defs, and that all
instructions have a SlotIndex.

Stuff we don't check yet:

- Is the LiveInterval minimal?
- Do all defs correspond to instructions or phis?
- Do all defs dominate all their live ranges?
- Are all live ranges continually reachable from their def?

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

14 years agoRemove unnecessary include.
Eric Christopher [Thu, 5 Aug 2010 22:28:22 +0000 (22:28 +0000)]
Remove unnecessary include.

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

14 years agoGive JumpThreading+LVI a long-form cl::opt so that it's easier to toggle the default.
Owen Anderson [Thu, 5 Aug 2010 22:11:31 +0000 (22:11 +0000)]
Give JumpThreading+LVI a long-form cl::opt so that it's easier to toggle the default.

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

14 years agoSplit the tag and value members of LVILatticeVal in preparation for expanding the...
Owen Anderson [Thu, 5 Aug 2010 22:10:46 +0000 (22:10 +0000)]
Split the tag and value members of LVILatticeVal in preparation for expanding the lattice to something that won't fit in two bits.

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

14 years agoFix memdep's code for reasoning about dependences between two calls. A Ref
Dan Gohman [Thu, 5 Aug 2010 22:09:15 +0000 (22:09 +0000)]
Fix memdep's code for reasoning about dependences between two calls. A Ref
response from getModRefInfo is not useful here. Instead, check for identical
calls only in the NoModRef case.

Reapply r110270, and strengthen it to compensate for the memdep changes.
When both calls are readonly, there is no dependence between them.

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

14 years agoremove the private hack from CallInst, it was not supposed to hit the branch anyway
Gabor Greif [Thu, 5 Aug 2010 21:25:49 +0000 (21:25 +0000)]
remove the private hack from CallInst, it was not supposed to hit the branch anyway

as a positive consequence the CallSite::getCallee() methods now can be rewritten to be
a bit more efficient

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

14 years agoGive ConstantRange an operator=
Owen Anderson [Thu, 5 Aug 2010 20:51:10 +0000 (20:51 +0000)]
Give ConstantRange an operator=

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

14 years agoDocument results of PR7762.
Eric Christopher [Thu, 5 Aug 2010 20:38:39 +0000 (20:38 +0000)]
Document results of PR7762.

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

14 years agoMove x86 specific tests into test/CodeGen/X86.
Devang Patel [Thu, 5 Aug 2010 20:25:37 +0000 (20:25 +0000)]
Move x86 specific tests into test/CodeGen/X86.

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

14 years agoHandle the memory barrier pseudo that goes to nothing for the JIT.
Eric Christopher [Thu, 5 Aug 2010 20:04:36 +0000 (20:04 +0000)]
Handle the memory barrier pseudo that goes to nothing for the JIT.

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

14 years agoSet hasSideEffects on the 64-bit no-sse memory barrier.
Eric Christopher [Thu, 5 Aug 2010 19:54:59 +0000 (19:54 +0000)]
Set hasSideEffects on the 64-bit no-sse memory barrier.

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

14 years agoFor local variables in functions with a frame pointer, use FP as a base
Jim Grosbach [Thu, 5 Aug 2010 19:27:37 +0000 (19:27 +0000)]
For local variables in functions with a frame pointer, use FP as a base
register for local access when it's closer to the stack slot being refererenced
than the stack pointer. Make sure to take into account any argument frame
SP adjustments that are in affect at the time.

rdar://8256090

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

14 years agoFix indentation.
Bob Wilson [Thu, 5 Aug 2010 19:00:21 +0000 (19:00 +0000)]
Fix indentation.

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

14 years agoRemove double-def checking from MachineVerifier, so a register does not have to
Jakob Stoklund Olesen [Thu, 5 Aug 2010 18:59:59 +0000 (18:59 +0000)]
Remove double-def checking from MachineVerifier, so a register does not have to
be killed before being redefined.

These checks are usually disabled, and usually fail when enabled. We de facto
allow live registers to be redefined without a kill, the corresponding
assertions in RegScavenger were removed long ago.

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

14 years agoAdd an ARM RSCrr instruction for disassembly only.
Bob Wilson [Thu, 5 Aug 2010 18:59:36 +0000 (18:59 +0000)]
Add an ARM RSCrr instruction for disassembly only.
Partial fix for PR7792.

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

14 years agoBe a little bit more specific about target for the memory barrier
Eric Christopher [Thu, 5 Aug 2010 18:36:20 +0000 (18:36 +0000)]
Be a little bit more specific about target for the memory barrier
instructions.

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

14 years agoHandle the pseudo in MCInstLower.
Eric Christopher [Thu, 5 Aug 2010 18:34:30 +0000 (18:34 +0000)]
Handle the pseudo in MCInstLower.

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

14 years agoAdd an ARM RSBrr instruction for disassembly only.
Bob Wilson [Thu, 5 Aug 2010 18:23:43 +0000 (18:23 +0000)]
Add an ARM RSBrr instruction for disassembly only.
Partial fix for PR7792.

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

14 years agoAvoid using a live std::multimap iterator while editing the map. It looks like
Jakob Stoklund Olesen [Thu, 5 Aug 2010 18:12:19 +0000 (18:12 +0000)]
Avoid using a live std::multimap iterator while editing the map. It looks like
we sometimes compare singular iterators, reported by ENABLE_EXPENSIVE_CHECKS.
This fixes PR7825.

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

14 years agoMove x86-specific tests out of test/Transforms/LoopStrengthReduce and
Dan Gohman [Thu, 5 Aug 2010 17:04:15 +0000 (17:04 +0000)]
Move x86-specific tests out of test/Transforms/LoopStrengthReduce and
into test/CodeGen/X86, so that they aren't run when the x86 target is
not enabled.

Fix uglygep.ll to not be x86-specific.

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

14 years agoRevert bugpoint change due to buildbot breakage.
Bob Wilson [Thu, 5 Aug 2010 16:26:32 +0000 (16:26 +0000)]
Revert bugpoint change due to buildbot breakage.

--- Reverse-merging r110333 into '.':
U    tools/bugpoint/BugDriver.h
U    tools/bugpoint/OptimizerDriver.cpp
U    tools/bugpoint/bugpoint.cpp
U    tools/bugpoint/BugDriver.cpp

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

14 years agotests: CodeGen/X86/GC tests require X86.
Daniel Dunbar [Thu, 5 Aug 2010 15:45:33 +0000 (15:45 +0000)]
tests: CodeGen/X86/GC tests require X86.

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

14 years agotests: Mark MC/AsmParser tests as requiring x86 for now -- almost all of them
Daniel Dunbar [Thu, 5 Aug 2010 15:44:15 +0000 (15:44 +0000)]
tests: Mark MC/AsmParser tests as requiring x86 for now -- almost all of them
rely on using a specific x86 triple to test what they want to test.

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

14 years agoRun opt instead of bugpoint itself.
Rafael Espindola [Thu, 5 Aug 2010 15:25:38 +0000 (15:25 +0000)]
Run opt instead of bugpoint itself.

Fixes PR753.

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

14 years agocheck-lit was failing again on F13 64 bits :-(
Rafael Espindola [Thu, 5 Aug 2010 03:35:01 +0000 (03:35 +0000)]
check-lit was failing again on F13 64 bits :-(

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

14 years agoSilence a GCC warning about && and || without explicit parentheses. This
Chandler Carruth [Thu, 5 Aug 2010 03:04:21 +0000 (03:04 +0000)]
Silence a GCC warning about && and || without explicit parentheses. This
preserves the existing behavior, as it seems a concious choice to allow RS to
be null and BigStack marked true.

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

14 years agoAdd const to compileProgram and to the various test functions in CrashDebugger.
Rafael Espindola [Thu, 5 Aug 2010 03:00:22 +0000 (03:00 +0000)]
Add const to compileProgram and to the various test functions in CrashDebugger.

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

14 years agoWhen building from git, add ref-id to PACKAGE_VERSION
Oscar Fuentes [Thu, 5 Aug 2010 02:22:51 +0000 (02:22 +0000)]
When building from git, add ref-id to PACKAGE_VERSION

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

14 years agoAdd a Module argument to the remaining runPasses methods and mark getContext
Rafael Espindola [Thu, 5 Aug 2010 02:16:32 +0000 (02:16 +0000)]
Add a Module argument to the remaining runPasses methods and mark getContext
const.

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

14 years agoNew system for choosing CRT type on MSVC.
Oscar Fuentes [Thu, 5 Aug 2010 01:25:48 +0000 (01:25 +0000)]
New system for choosing CRT type on MSVC.

Is setted on a per build type basis. This is useful for generators
that comprise several build types, i.e. VC++ solutions.

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

14 years agoRevert r110270 for now. It appears to uncover a memdep bug.
Dan Gohman [Thu, 5 Aug 2010 00:43:10 +0000 (00:43 +0000)]
Revert r110270 for now. It appears to uncover a memdep bug.

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

14 years agoARM "rrx" shift operands do not have an immediate. PR7790.
Bob Wilson [Thu, 5 Aug 2010 00:34:42 +0000 (00:34 +0000)]
ARM "rrx" shift operands do not have an immediate.  PR7790.

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

14 years agoMake EmitProgressBitcode const and add a Module argument to runPasses. Use
Rafael Espindola [Thu, 5 Aug 2010 00:29:04 +0000 (00:29 +0000)]
Make EmitProgressBitcode const and add a Module argument to runPasses. Use
that argument to simplify runPassesOn.

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

14 years agosvn:ignore
Dan Gohman [Wed, 4 Aug 2010 23:44:23 +0000 (23:44 +0000)]
svn:ignore

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

14 years agosvn:ignore
Dan Gohman [Wed, 4 Aug 2010 23:43:55 +0000 (23:43 +0000)]
svn:ignore

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

14 years agoThe trouble with testing for "ModRef" and "NoModRef" is that
Dan Gohman [Wed, 4 Aug 2010 23:37:55 +0000 (23:37 +0000)]
The trouble with testing for "ModRef" and "NoModRef" is that
one is a suffix of the other, and FileCheck accepts superstrings.
Adjust the output to avoid this problem.

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

14 years agoThe lower invoke pass needs to have unreachable code elimination run after it
Bill Wendling [Wed, 4 Aug 2010 23:36:02 +0000 (23:36 +0000)]
The lower invoke pass needs to have unreachable code elimination run after it
because it could create such things. This fixes a MingW buildbot test failure.

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

14 years agoDelete obsolete comments.
Dan Gohman [Wed, 4 Aug 2010 23:08:15 +0000 (23:08 +0000)]
Delete obsolete comments.

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

14 years agoMake x86-64 membarriers work without sse and clean up some of the
Eric Christopher [Wed, 4 Aug 2010 23:03:04 +0000 (23:03 +0000)]
Make x86-64 membarriers work without sse and clean up some of the
uses.

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

14 years agoThe two-callsite form of AliasAnalysis::getModRefInfo is documented
Dan Gohman [Wed, 4 Aug 2010 22:56:29 +0000 (22:56 +0000)]
The two-callsite form of AliasAnalysis::getModRefInfo is documented
to return Ref if the left callsite only reads memory read or written
by the right callsite; fix BasicAliasAnalysis to implement this.

Add AliasAnalysisEvaluator support for testing the two-callsite
form of getModRefInfo.

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

14 years agoand back in. false alarm on the tests from another unrelated local change.
Jim Grosbach [Wed, 4 Aug 2010 22:46:09 +0000 (22:46 +0000)]
and back in. false alarm on the tests from another unrelated local change.

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

14 years agoPR7814: Truncates cannot be ignored for signed comparisons.
Eli Friedman [Wed, 4 Aug 2010 22:40:58 +0000 (22:40 +0000)]
PR7814: Truncates cannot be ignored for signed comparisons.

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

14 years agoImplement target specific getDebugValueLocation().
Devang Patel [Wed, 4 Aug 2010 22:39:39 +0000 (22:39 +0000)]
Implement target specific getDebugValueLocation().

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

14 years agoCoalesce stack slot accesses that arise when spilling both sides of a COPY.
Jakob Stoklund Olesen [Wed, 4 Aug 2010 22:35:11 +0000 (22:35 +0000)]
Coalesce stack slot accesses that arise when spilling both sides of a COPY.
This helps avoid silly code:

    %R0<def = LOAD <fi#5>
    STORE <fi#5>, %R0<kill>

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

14 years agooops. revert for a moment to clean up tests first.
Jim Grosbach [Wed, 4 Aug 2010 22:12:43 +0000 (22:12 +0000)]
oops. revert for a moment to clean up tests first.

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

14 years agoReserve a stack slot if the function adjusts the stack but doesn't
Jim Grosbach [Wed, 4 Aug 2010 22:10:15 +0000 (22:10 +0000)]
Reserve a stack slot if the function adjusts the stack but doesn't
simplify the call frame pseudo instructions. In that situation, the
calculations for estimating the stack size will be way off, leading to
not having an emergency spill slot when we need one. It should be possible
to be more precise about tracking the adjustment values, but not really
necessary for correctness. Upcoming cleanups for PEI in general will
render that moot.

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

14 years agoCheckpoint SplitKit progress.
Jakob Stoklund Olesen [Wed, 4 Aug 2010 22:08:39 +0000 (22:08 +0000)]
Checkpoint SplitKit progress.

We are now at a point where we can split around simple single-entry, single-exit
loops, although still with some bugs.

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

14 years agoImplement target specific getDebugValueLocation().
Devang Patel [Wed, 4 Aug 2010 22:07:50 +0000 (22:07 +0000)]
Implement target specific getDebugValueLocation().

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

14 years agoUse location entry only of the location described by DBG_VALUE is valid.
Devang Patel [Wed, 4 Aug 2010 22:07:27 +0000 (22:07 +0000)]
Use location entry only of the location described by DBG_VALUE is valid.

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

14 years agoTest case for r110250. Radar 8264670. Test case by Fariborz Jahanian!
Stuart Hastings [Wed, 4 Aug 2010 22:05:38 +0000 (22:05 +0000)]
Test case for r110250.  Radar 8264670.  Test case by Fariborz Jahanian!

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

14 years agoTestcase for r110248.
Bill Wendling [Wed, 4 Aug 2010 21:56:30 +0000 (21:56 +0000)]
Testcase for r110248.

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

14 years agoThe EH prepare passes really want to be the last passes run before code-gen.
Bill Wendling [Wed, 4 Aug 2010 21:44:13 +0000 (21:44 +0000)]
The EH prepare passes really want to be the last passes run before code-gen.

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

14 years agoUse indirect calls in PowerPC JIT.
Torok Edwin [Wed, 4 Aug 2010 20:47:44 +0000 (20:47 +0000)]
Use indirect calls in PowerPC JIT.

See PR5201. There is no way to know if direct calls will be within the allowed
range for BL. Hence emit all calls as indirect when in JIT mode.
Without this long-running applications will fail to JIT on PowerPC with a
relocation failure.

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

14 years agoFix typo in comment.
Devang Patel [Wed, 4 Aug 2010 20:32:36 +0000 (20:32 +0000)]
Fix typo in comment.

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

14 years agoFix a minor bug which resulted in intermediate calculations
Dan Gohman [Wed, 4 Aug 2010 19:52:50 +0000 (19:52 +0000)]
Fix a minor bug which resulted in intermediate calculations
using wider types than are necessary.

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

14 years agoChange this llvm_unreachable to report_fatal_error, since it can
Dan Gohman [Wed, 4 Aug 2010 18:51:09 +0000 (18:51 +0000)]
Change this llvm_unreachable to report_fatal_error, since it can
be triggered by valid, if dubious, IR.

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

14 years agoTest case for combination of r110234 & r110235.
Devang Patel [Wed, 4 Aug 2010 18:42:46 +0000 (18:42 +0000)]
Test case for combination of r110234 & r110235.

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

14 years agoWhile spilling live registers at the end of block check whether they are used by...
Devang Patel [Wed, 4 Aug 2010 18:42:02 +0000 (18:42 +0000)]
While spilling live registers at the end of block check whether they are used by DBG_VALUE machine instructions or not. If a spilled register is used by DBG_VALUE machine instruction then insert a new DBG_VALUE machine instruction to encode variable's new location on stack.

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

14 years agoIf a variable is spilled by code generator then use DW_OP_fbreg to describe its locat...
Devang Patel [Wed, 4 Aug 2010 18:40:52 +0000 (18:40 +0000)]
If a variable is spilled by code generator then use DW_OP_fbreg to describe its location on stack.

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

14 years agoExperiments show that we can safely increase our unrolling threshold without unduly...
Owen Anderson [Wed, 4 Aug 2010 18:32:46 +0000 (18:32 +0000)]
Experiments show that we can safely increase our unrolling threshold without unduly impacting code size, particularly
since unrolling is not enabled at -Os.

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