Matthijs Kooijman
287cca11b3
Fix SRETPromotion, it was generating functions without returns statements since
...
r53941 (but this was not noticed due to the lack of a basic test for
SRETPromotion).
llvm-svn: 54467
2008-08-07 15:58:09 +00:00
Matthijs Kooijman
9ff5c484cf
Add some debug output to SRETPromotion.
...
llvm-svn: 54464
2008-08-07 15:14:04 +00:00
Anton Korobeynikov
212df90ce5
Remove dead forward decl
...
llvm-svn: 54461
2008-08-07 09:55:25 +00:00
Anton Korobeynikov
52d0ff92cc
Print section flags ok on platforms, which use '@' as comment string. Fix test.
...
llvm-svn: 54460
2008-08-07 09:55:06 +00:00
Anton Korobeynikov
5fa19dc20a
Add assertion for easy debugging of missing stuff
...
llvm-svn: 54459
2008-08-07 09:54:40 +00:00
Anton Korobeynikov
0c8d06f030
Switch ARM to new section handling stuff
...
llvm-svn: 54458
2008-08-07 09:54:23 +00:00
Anton Korobeynikov
b75c98436a
Switch Alpha to new section handling stuff
...
llvm-svn: 54457
2008-08-07 09:53:57 +00:00
Anton Korobeynikov
61a8f92b2c
Use EmitAlignment consistently
...
llvm-svn: 54456
2008-08-07 09:53:38 +00:00
Anton Korobeynikov
a7b288b4d8
Cleanup
...
llvm-svn: 54455
2008-08-07 09:53:13 +00:00
Anton Korobeynikov
bb99d4b900
Cleanup
...
llvm-svn: 54454
2008-08-07 09:52:54 +00:00
Anton Korobeynikov
2755fabf07
Switch IA64 to new section-handling stuff
...
llvm-svn: 54453
2008-08-07 09:52:35 +00:00
Anton Korobeynikov
9d8232ec1d
Cleanup
...
llvm-svn: 54452
2008-08-07 09:52:13 +00:00
Anton Korobeynikov
d3009663dd
Provide convenient helpers
...
llvm-svn: 54451
2008-08-07 09:51:54 +00:00
Anton Korobeynikov
912a2a8114
Switch Sparc to new section handling stuff. Refactor printing of module-level GVs significantly.
...
llvm-svn: 54450
2008-08-07 09:51:25 +00:00
Anton Korobeynikov
ebd773939c
Add hook for constant pool section selection for darwin.
...
llvm-svn: 54449
2008-08-07 09:51:02 +00:00
Anton Korobeynikov
d37daa2aeb
Select section for constant pool entries
...
llvm-svn: 54448
2008-08-07 09:50:34 +00:00
Chris Lattner
863d710738
Don't verify passes when assertions are disabled.
...
llvm-svn: 54446
2008-08-07 07:34:50 +00:00
Dan Gohman
74fa421281
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.
llvm-svn: 54444
2008-08-07 02:54:50 +00:00
Dale Johannesen
a4de0fa539
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.
llvm-svn: 54442
2008-08-07 01:30:15 +00:00
Evan Cheng
f8a801a9b8
Factor code that finalize PHI nodes, jump tables, etc. out of SelectBasicBlock. No functionality changes.
...
llvm-svn: 54438
2008-08-07 00:43:25 +00:00
Owen Anderson
2975ced4df
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.
llvm-svn: 54432
2008-08-06 23:16:52 +00:00
Owen Anderson
655eb1a3bc
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.
llvm-svn: 54426
2008-08-06 22:08:58 +00:00
Owen Anderson
33cf898dff
Oops, didn't mean to commit this.
...
llvm-svn: 54425
2008-08-06 20:58:38 +00:00
Owen Anderson
5929d57f67
We don't need to try to coalesce input vregs that are the same as the output vreg.
...
llvm-svn: 54422
2008-08-06 20:29:20 +00:00
Owen Anderson
482d679301
Only trim a live interval if the register is not used after the PHI node.
...
llvm-svn: 54421
2008-08-06 18:36:17 +00:00
Owen Anderson
e95b75bed2
Only remap each VNInfo once when doing renumbering.
...
llvm-svn: 54420
2008-08-06 18:35:45 +00:00
Dan Gohman
cc784f1662
Re-introduce the 8-bit subreg zext-inreg patterns for x86-32,
...
this time using MOV32to32_ and MOV16to16_. Thanks to Evan for
suggesting this.
llvm-svn: 54418
2008-08-06 18:27:21 +00:00
Dan Gohman
4ad77e1ca2
Fix a shufflevector instcombine that was emitting invalid masks indices
...
when it meant to be emitting undef indices.
llvm-svn: 54417
2008-08-06 18:17:32 +00:00
Evan Cheng
c5cc2cb4aa
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.
...
llvm-svn: 54415
2008-08-06 18:04:43 +00:00
Dan Gohman
99d70043f9
xchg does not modify FLAGS.
...
llvm-svn: 54411
2008-08-06 15:52:50 +00:00
Chris Lattner
55b99a6739
optimize a common idiom generated by clang for bitfield access, PR2638.
...
llvm-svn: 54408
2008-08-06 07:35:52 +00:00
Bruno Cardoso Lopes
fa0a8e3e2b
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.
llvm-svn: 54403
2008-08-06 06:14:43 +00:00
Chris Lattner
cae04940bd
Zap sitofp/fptoui pairs. In all cases when the sign difference
...
matters, the result is undefined anyway.
llvm-svn: 54396
2008-08-06 05:13:06 +00:00
Nick Lewycky
0bf3c812d2
Reinstate this optimization, but without the miscompile. Thanks to Bill for
...
tracking down that this was breaking llvm-gcc bootstrap on Linux.
llvm-svn: 54394
2008-08-06 04:54:03 +00:00
Dan Gohman
3e389ed424
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.
llvm-svn: 54385
2008-08-05 23:36:35 +00:00
Dan Gohman
8377e7019f
Pass the computed iteration count value to RewriteLoopExitValues
...
instead of having it call getIterationCount again.
llvm-svn: 54380
2008-08-05 22:34:21 +00:00
Owen Anderson
e9c3ae9fe4
Fix breakage on ARM/2008-04-10-ScavengerAssert.ll.
...
llvm-svn: 54378
2008-08-05 22:24:40 +00:00
Evan Cheng
f4d1119fbd
Fix PR2620: Fix X86cmppd selection code so it expects operands to be v2f64.
...
llvm-svn: 54376
2008-08-05 22:19:15 +00:00
Evan Cheng
a07795a0c3
Fix PR2596: out of bound reference.
...
llvm-svn: 54375
2008-08-05 21:51:46 +00:00
Owen Anderson
acd5487eb9
Correctly handle replacement and removal of PHIs with one incoming register.
...
llvm-svn: 54374
2008-08-05 21:40:45 +00:00
Bill Wendling
3882f060ef
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.
llvm-svn: 54372
2008-08-05 21:23:45 +00:00
Owen Anderson
11731063b9
Oops, we were already checking for dead phis. Handle this the proper way, then.
...
llvm-svn: 54371
2008-08-05 21:18:51 +00:00
Owen Anderson
dacdf44612
We don't need to update live intervals for dead PHIs.
...
llvm-svn: 54369
2008-08-05 20:51:26 +00:00
Owen Anderson
667d9c95c2
Remove the -disable-correct-folding option, which was ugly and is no longer needed.
...
llvm-svn: 54361
2008-08-05 18:27:54 +00:00
Dan Gohman
51a5eb52c5
Fix the AsmWriter to not print extra spaces after parameter attributes.
...
llvm-svn: 54351
2008-08-05 15:51:44 +00:00
Dan Gohman
1238bf634b
Trim #includes.
...
llvm-svn: 54350
2008-08-05 15:32:23 +00:00
Dan Gohman
de163bb39d
Fix several const-correctness issues, resolving some -Wcast-qual warnings.
...
llvm-svn: 54349
2008-08-05 14:45:15 +00:00
Evan Cheng
1b731b8504
Remove #if 0.
...
llvm-svn: 54347
2008-08-05 07:20:57 +00:00
Evan Cheng
754148a2ec
Fix PR2568: Fix bug that cause redudant kill marker after its live interval has been extended due to coalescing.
...
llvm-svn: 54346
2008-08-05 07:10:38 +00:00
Owen Anderson
7b5fe60440
Remove unneeded iteration. Thanks to Dan for the feedback.
...
llvm-svn: 54337
2008-08-05 00:30:10 +00:00