Commit Graph

40528 Commits

Author SHA1 Message Date
Anton Korobeynikov
4578862dcc Provide convenient helpers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54451 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-07 09:51:54 +00:00
Anton Korobeynikov
5b794b98ce Switch Sparc to new section handling stuff. Refactor printing of module-level GVs significantly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54450 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-07 09:51:25 +00:00
Anton Korobeynikov
84e160e265 Add hook for constant pool section selection for darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54449 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-07 09:51:02 +00:00
Anton Korobeynikov
93cacf131d Select section for constant pool entries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54448 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-07 09:50:34 +00:00
Matthijs Kooijman
d829e6fdee Remove trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54447 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-07 09:00:46 +00:00
Chris Lattner
e2c5ecd46a Don't verify passes when assertions are disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54446 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-07 07:34:50 +00:00
Dan Gohman
e3d920699c Re-enable elimination of unnecessary SUBREG_TO_REG instructions in
LowerSubregs, and fix an x86-64 isel bug that this exposed.

SUBREG_TO_REG for x86-64 implicit zero extension is only safe for
isel to generate when the source is known to always have zeros in
the high 32 bits. The EXTRACT_SUBREG instruction does not clear
the high 32 bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54444 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-07 02:54:50 +00:00
Dan Gohman
865db4566e Add an extra example that shouldn't get an and instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54443 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-07 02:23:06 +00:00
Dale Johannesen
dd947ea3c5 Rewrite JIT handling of GlobalVariables so they
are allocated in the same buffer as the code,
jump tables, etc.

The default JIT memory manager does not handle buffer
overflow well.  I didn't introduce this and I'm not
attempting to fix it here, but it is more likely to
be hit now since we're putting more stuff in the
buffer.  This affects one test that I know of so far,
MultiSource/Benchmarks/NPB-serial/is.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54442 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-07 01:30:15 +00:00
Evan Cheng
39fd6e81b1 Factor code that finalize PHI nodes, jump tables, etc. out of SelectBasicBlock. No functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54438 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-07 00:43:25 +00:00
Owen Anderson
9200e81a18 SDISel's constant branch folding can fold away self-loops, which doesn't result in any dead blocks, but
rather an incorrect phi input.  Add code to UnreachableMachineBlockElim to get rid of these entries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54432 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-06 23:16:52 +00:00
Owen Anderson
883771f86a Correct handle cases where two phis are coalesced together, and correct break up the case where two different
phis want to coalesce with the same vreg.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54426 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-06 22:08:58 +00:00
Owen Anderson
aa111080df Oops, didn't mean to commit this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54425 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-06 20:58:38 +00:00
Ted Kremenek
35a8a03165 Add libDriver.vcproj to solution file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54424 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-06 20:57:07 +00:00
Owen Anderson
9860b71b6a We don't need to try to coalesce input vregs that are the same as the output vreg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54422 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-06 20:29:20 +00:00
Owen Anderson
9b49120408 Only trim a live interval if the register is not used after the PHI node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54421 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-06 18:36:17 +00:00
Owen Anderson
788d04152a Only remap each VNInfo once when doing renumbering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54420 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-06 18:35:45 +00:00
Dan Gohman
8a1510d192 Re-introduce the 8-bit subreg zext-inreg patterns for x86-32,
this time using MOV32to32_ and MOV16to16_. Thanks to Evan for
suggesting this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54418 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-06 18:27:21 +00:00
Dan Gohman
4ce9627e97 Fix a shufflevector instcombine that was emitting invalid masks indices
when it meant to be emitting undef indices.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54417 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-06 18:17:32 +00:00
Evan Cheng
d756f8820a PR2535, not PR2355.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54416 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-06 18:06:48 +00:00
Evan Cheng
f5e25f32c7 Fix PR2355: bug in ChangeCompareStride. When the loop termination compare is the only use of its iv stride, the stride can be eliminated by moving it to another stride. If the scale is negative, swap the predicate instead of using a inverse predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54415 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-06 18:04:43 +00:00
Dan Gohman
165660e417 xchg does not modify FLAGS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54411 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-06 15:52:50 +00:00
Dan Gohman
6da38a05f6 Clarify "node" vs. "value" in some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54409 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-06 15:18:10 +00:00
Chris Lattner
46bbad217b optimize a common idiom generated by clang for bitfield access, PR2638.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54408 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-06 07:35:52 +00:00
Bruno Cardoso Lopes
bbe51362d5 Added support for fp callee saved registers.
Added fp register clobbering during calls.
Added AsmPrinter support for "fmask", a bitmask that indicates where on the 
stack the fp callee saved registers are.

Fixed the stack frame layout for Mips, now the callee saved regs 
are in the right stack location (a little documentation about how this
stack frame must look like is present in MipsRegisterInfo.cpp).
This was done using the method MipsRegisterInfo::adjustMipsStackFrame
To be more clear, these are examples of what is solves :  

1) FP and RA are also callee saved, and despite they aren't in CSI they 
   must be saved before the fp callee saved registers. 
2) The ABI requires that local varibles are allocated before the callee 
   saved register area, the opposite behavior from the default allocation.
3) CPU and FPU saved register area must be aligned independent of each
   other.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54403 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-06 06:14:43 +00:00
Chris Lattner
01924d00c7 stacker is really gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54400 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-06 05:57:58 +00:00
Chris Lattner
2a3cea1a6d remove stacker
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54398 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-06 05:56:52 +00:00
Chris Lattner
5af5f463e1 Zap sitofp/fptoui pairs. In all cases when the sign difference
matters, the result is undefined anyway.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54396 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-06 05:13:06 +00:00
Nick Lewycky
b30591ec64 Reinstate this optimization, but without the miscompile. Thanks to Bill for
tracking down that this was breaking llvm-gcc bootstrap on Linux.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54394 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-06 04:54:03 +00:00
Bill Wendling
5226698f67 Just grep for through the LL code instead of the ASM code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54389 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-06 00:10:32 +00:00
Bill Wendling
a37599bc7a Add ARM to the targets to build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54386 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 23:52:28 +00:00
Dan Gohman
1eac4e0844 Use strcpy instead of sprintf here. This avoids a GCC 4.3 format-string
warning. There wasn't actually a problem here, because the contents of
the string are known.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54385 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 23:36:35 +00:00
Bill Wendling
201bf25f83 Add default architecture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54384 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 23:36:00 +00:00
Dan Gohman
5a6c448a7e Pass the computed iteration count value to RewriteLoopExitValues
instead of having it call getIterationCount again.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54380 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 22:34:21 +00:00
Bill Wendling
837f39b839 It's "a static", not "an static"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54379 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 22:29:16 +00:00
Owen Anderson
24d79ba2ef Fix breakage on ARM/2008-04-10-ScavengerAssert.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54378 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 22:24:40 +00:00
Bill Wendling
0b101b0399 Testcase for PR2629.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54377 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 22:23:59 +00:00
Evan Cheng
e9d5035838 Fix PR2620: Fix X86cmppd selection code so it expects operands to be v2f64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54376 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 22:19:15 +00:00
Evan Cheng
e3b8a48d32 Fix PR2596: out of bound reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54375 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 21:51:46 +00:00
Owen Anderson
5d2f8072d4 Correctly handle replacement and removal of PHIs with one incoming register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54374 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 21:40:45 +00:00
Bill Wendling
021507be82 Revert r53282. This was causing a miscompile on Linux. Also, the transformation
looks bogus. Please see PR2629 for details on why this is breaking things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54372 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 21:23:45 +00:00
Owen Anderson
71ac0be6bb Oops, we were already checking for dead phis. Handle this the proper way, then.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54371 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 21:18:51 +00:00
Owen Anderson
e7b8205e6e We don't need to update live intervals for dead PHIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54369 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 20:51:26 +00:00
Chris Lattner
d3eda89f4c Expand acronyms, suggested by Walter Pawley
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54362 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 18:29:16 +00:00
Owen Anderson
3bc9c6f3e7 Remove the -disable-correct-folding option, which was ugly and is no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54361 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 18:27:54 +00:00
Chris Lattner
ebec678055 Capitalize LLVM, suggested by Walt Pawley
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54360 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 18:21:08 +00:00
Owen Anderson
b6634e9e27 Update the remaining tests not to use -disable-correct-folding, and remove two
that couldn't be updated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54359 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 18:19:14 +00:00
Owen Anderson
551ddf718c One more -disable-correct-folding case removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54358 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 18:08:56 +00:00
Owen Anderson
2a1f07ea6a Remove another -disable-correct-folding use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54357 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 18:05:58 +00:00
Owen Anderson
d6db225800 Eliminate another use of -disable-correct-folding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54356 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 18:03:01 +00:00