Bill Wendling
d910182ca9
Remove tabs.
...
llvm-svn: 54707
2008-08-12 23:15:44 +00:00
Dale Johannesen
4dc25a234c
Make x86-64 JIT changes Darwin-specific.
...
llvm-svn: 54700
2008-08-12 21:02:08 +00:00
Dan Gohman
37da9e9dbd
Extend ScalarEvolution's executesAtLeastOnce logic to be able to
...
continue past the first conditional branch when looking for a
relevant test. This helps it avoid using MAX expressions in
loop trip counts in more cases.
llvm-svn: 54697
2008-08-12 20:17:31 +00:00
Jim Grosbach
df52e6897d
Whitespace cleanup. Test commit.
...
llvm-svn: 54695
2008-08-12 18:34:45 +00:00
Dale Johannesen
74bf5907fa
In the absence of a linker to build the GOT, use the 32-bit
...
non_lazy_ptr mechanism on x86-64 Darwin JIT. Fixes a bunch
of last night's failures.
llvm-svn: 54692
2008-08-12 18:23:48 +00:00
Dan Gohman
f927e9615f
Correct the filename in the top-of-file comment.
...
llvm-svn: 54688
2008-08-12 17:42:33 +00:00
Dan Gohman
74ac3fddee
Avoid repeatedly reallocating the FoldingSetNodeID when searching
...
through multiple nodes in a bucket.
llvm-svn: 54687
2008-08-12 17:40:22 +00:00
Devang Patel
d0aabe5ce6
Use SmallVector instead of std::vector
...
llvm-svn: 54685
2008-08-12 15:44:31 +00:00
Devang Patel
670f3a9e03
Use DenseMap to keep track of last users.
...
Use inversed map for faster queries.
llvm-svn: 54662
2008-08-12 00:26:16 +00:00
Dale Johannesen
718fcee02d
Some fixes for x86-64 JIT. Make it use small code
...
model, except for external calls; this makes
addressing modes PC-relative. Incomplete.
The assertion at the top of Emitter::runOnMachineFunction
was obviously bogus (always true) so I removed it.
If someone knows what the correct test should be to cover
all the various targets, please fix.
llvm-svn: 54656
2008-08-11 23:46:25 +00:00
Chris Lattner
0e03352a9f
add a helper method to sys::Path for clang, patch by
...
Kovarththanan Rajaratnam!
llvm-svn: 54655
2008-08-11 23:39:47 +00:00
Chris Lattner
ae09ade343
Implement support for simplifying vector comparisons by 0.0 and 1.0 like we
...
do for scalars. Patch contributed by Nicolas Capens
This also generalizes the previous xforms to work on long double, now that
isExactlyValue works for long double.
llvm-svn: 54653
2008-08-11 22:06:05 +00:00
Devang Patel
404762f720
Keep track of analysis usage information for passes. Avoid invoking
...
getAnalysisUsage() repeatedly.
llvm-svn: 54650
2008-08-11 21:13:39 +00:00
Dan Gohman
a27ed39f05
Take the FrameOffset into account when computing the alignment
...
of stack objects. This fixes PR2656.
llvm-svn: 54646
2008-08-11 18:27:03 +00:00
Nate Begeman
9be47adde4
Implement ISD::TRAP support on PPC
...
llvm-svn: 54644
2008-08-11 17:36:31 +00:00
Chris Lattner
6e083dfadd
move some more stuff out of my email into readme.txt
...
llvm-svn: 54603
2008-08-10 01:14:08 +00:00
Chris Lattner
7673a468dc
add a note
...
llvm-svn: 54602
2008-08-10 00:47:21 +00:00
Chris Lattner
89120a8e63
"This patch adds a virtual call to AbstractLatticeFunction to derive a
...
type lattice value for an Argument*, giving clients the opportunity to
use something other than Top for it if they choose to."
Patch by John McCall!
llvm-svn: 54589
2008-08-09 17:23:35 +00:00
Gordon Henriksen
051f7c07a9
Fix some typos. Apparently I think C needs a power-of operator.
...
llvm-svn: 54574
2008-08-09 03:48:46 +00:00
Gordon Henriksen
78a53c516d
Delete a redundant binding, LLVMHasInitializer.
...
Please use !LLVMIsDeclaration instead.
llvm-svn: 54572
2008-08-09 02:13:58 +00:00
Gordon Henriksen
b0ee2172b0
Fix the LLVMCreateJITCompiler C binding.
...
Evan broke it in r54523 by adding a parameter in the implementation without
updating the header correspondingly.
llvm-svn: 54555
2008-08-08 20:49:28 +00:00
Eric Christopher
dcd4752642
Have IRBuilder take a template argument on whether or not to preserve
...
names. This can save a lot of allocations if you aren't going to be
looking at the output.
llvm-svn: 54546
2008-08-08 19:39:37 +00:00
Dan Gohman
c3d40ae243
Canonicalize nested AddRecs in by nesting them in order of loop depth.
...
llvm-svn: 54545
2008-08-08 18:33:12 +00:00
Dan Gohman
ac992cdc1c
Add an EXTRACTPSmr pattern to match the pattern that
...
X86ISelLowering creates.
llvm-svn: 54544
2008-08-08 18:30:21 +00:00
Anton Korobeynikov
62d8837ed2
Properly print flags on Sparc
...
llvm-svn: 54543
2008-08-08 18:26:10 +00:00
Anton Korobeynikov
14142919d0
Generalize
...
llvm-svn: 54542
2008-08-08 18:25:52 +00:00
Anton Korobeynikov
72fd63636e
Use mergeable strings sections on sparc
...
llvm-svn: 54541
2008-08-08 18:25:29 +00:00
Anton Korobeynikov
8d77445753
Handle visibility printing with all generality. Remove bunch of duplicate code.
...
llvm-svn: 54540
2008-08-08 18:25:07 +00:00
Anton Korobeynikov
6a25f6a8fb
Use chars, where possible
...
llvm-svn: 54539
2008-08-08 18:24:10 +00:00
Anton Korobeynikov
44f1a1f536
Convert PPC/Linux to new section printing stuff
...
llvm-svn: 54538
2008-08-08 18:23:49 +00:00
Anton Korobeynikov
cad3e8517c
Switch PPC/Darwin to new section handling stuff
...
llvm-svn: 54537
2008-08-08 18:23:25 +00:00
Anton Korobeynikov
83610e2072
Cleanup
...
llvm-svn: 54536
2008-08-08 18:22:59 +00:00
Owen Anderson
8eab9e50dc
Reduce the entries in a phi before testing it for deadness, because removing the entries might make it dead.
...
llvm-svn: 54535
2008-08-08 18:00:05 +00:00
Evan Cheng
804e157031
Undo most of r54519.
...
llvm-svn: 54534
2008-08-08 17:56:50 +00:00
Chris Lattner
a4e876cf8a
Don't call getAnalysisUsage unless -debug-pass is enabled. This speeds
...
up the passmgr by avoiding useless work.
llvm-svn: 54528
2008-08-08 15:14:09 +00:00
Evan Cheng
054bbb0dd8
Add new parameter Fast to createJIT to enable the fast codegen path.
...
llvm-svn: 54523
2008-08-08 08:11:34 +00:00
Evan Cheng
cc7944b919
Add skeleton of simple basic block instruction selector.
...
llvm-svn: 54522
2008-08-08 07:27:28 +00:00
Evan Cheng
4708df4776
It's not legal to output a GV in a coalesced section if it's used in an ARM PIC relative constantpool.
...
llvm-svn: 54519
2008-08-08 06:56:16 +00:00
Evan Cheng
290a9fa171
Fix indentation.
...
llvm-svn: 54518
2008-08-08 06:43:59 +00:00
Nick Lewycky
19a341cf57
Don't crash printing the asm for a ConstantExpr PtrToInt just because the int
...
is narrower than the pointer. This testcase emits:
.byte (((17) - 16) & 255)
llvm-svn: 54517
2008-08-08 06:34:07 +00:00
Bruno Cardoso Lopes
f8906a40ab
Support added for ctlz intrinsic, test case added.
...
llvm-svn: 54516
2008-08-08 06:16:31 +00:00
Chris Lattner
c1ca63307d
Speed up the passmgr by avoiding heap thrashing on vectors.
...
llvm-svn: 54515
2008-08-08 05:33:04 +00:00
Bruno Cardoso Lopes
883eb4e6fa
Match raw "psp" triple target, as done by the homebrew toolchain.
...
llvm-svn: 54514
2008-08-08 04:49:42 +00:00
Bruno Cardoso Lopes
2eb245ee91
Added Mips support for DYNAMIC_STACKALLOC
...
Fixed bug in adjustMipsStackFrame, which was breaking
while trying to access a dead stack object index. Also added
one more alignment before fixing the callee saved registers
stack offset adjustment.
llvm-svn: 54485
2008-08-07 19:08:11 +00:00
Bruno Cardoso Lopes
2284374fcc
Add the remaining fp_round libcalls:
...
FPROUND_F80_F32, FPROUND_PPCF128_F32,
FPROUND_F80_F64, FPROUND_PPCF128_F64
Support for soften float fp_round operands is added, Mips
needs this to round f64->f32.
Also added support to soften float FABS result, Mips doesn't
support double fabs results while in 'single float only' mode.
llvm-svn: 54484
2008-08-07 19:01:24 +00:00
Owen Anderson
1893d0f813
Do a dominator walk when scheduling copies, rather than a DFS on the CFG. Also, fix a few problems when creating
...
live intervals for temporaries created by phi elimination.
llvm-svn: 54483
2008-08-07 18:28:07 +00:00
Matthijs Kooijman
d62ee008d1
Let SRETPromotion properly preserve the function name instead of (implicitly)
...
postfixing it with a number.
llvm-svn: 54468
2008-08-07 16:01:23 +00:00
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
Owen Anderson
32ae9380f1
This option doesn't need to be a target option. It can be in SDISel instead.
...
llvm-svn: 54336
2008-08-05 00:27:28 +00:00
Owen Anderson
84fbc312d4
- Fix SelectionDAG to generate correct CFGs.
...
- Add a basic machine-level dead block eliminator.
These two have to go together, since many other parts of the code generator are unable to handle the unreachable blocks otherwise created.
llvm-svn: 54333
2008-08-04 23:54:43 +00:00
Eli Friedman
ef366a16a2
PR2621: Improvements to the SCEV AddRec binomial expansion. This
...
version uses a new algorithm for evaluating the binomial coefficients
which is significantly more efficient for AddRecs of more than 2 terms
(see the comments in the code for details on how the algorithm works).
It also fixes some bugs: it removes the arbitrary length restriction for
AddRecs, it fixes the silent generation of incorrect code for AddRecs
which require a wide calculation width, and it fixes an issue where we
were incorrectly truncating the iteration count too far when evaluating
an AddRec expression narrower than the induction variable.
There are still a few related issues I know of: I think there's
still an issue with the SCEVExpander expansion of AddRec in terms of
the width of the induction variable used. The hack to avoid generating
too-wide integers shouldn't be necessary; instead, the callers should be
considering the cost of the expansion before expanding it (in addition
to not expanding too-wide integers, we might not want to expand
expressions that are really expensive, especially when optimizing for
size; calculating an length-17 32-bit AddRec currently generates about 250
instructions of straight-line code on X86). Also, for long 32-bit
AddRecs on X86, CodeGen really sucks at scheduling the code. I'm planning on
filing follow-up PRs for these issues.
llvm-svn: 54332
2008-08-04 23:49:06 +00:00
Dan Gohman
60ea311ec8
Fix SDISel lowering of PHI nodes to use ComputeValueVTs.
...
This allows it to work correctly on aggregate values.
This fixes PR2623.
llvm-svn: 54331
2008-08-04 23:42:46 +00:00
Dan Gohman
af429b3e52
Fix SDISel lowering of zeroinitializer and undef to use ComputeValueVTs.
...
This allows it to work correctly on nested aggregate values.
This fixes PR2625.
llvm-svn: 54330
2008-08-04 23:30:41 +00:00
Dan Gohman
5d0df78ae0
Add an assert to catch invalid VECTOR_SHUFFLE mask indices.
...
llvm-svn: 54329
2008-08-04 23:09:15 +00:00
Bruno Cardoso Lopes
34f2582096
Mips ISelLowering cleanup : Removed old LowerCALL and FORMAL_ARGS helpers, they
...
aren't used anyway, they also used to broke compiling when fastcc was specified for a
function, but not anymore.
llvm-svn: 54316
2008-08-04 07:12:52 +00:00
Bruno Cardoso Lopes
463f306553
Handle i32->f32 bitconvert results.
...
llvm-svn: 54315
2008-08-04 06:44:31 +00:00
Andrew Lenharth
377c046675
Add atomic sub for other sizes
...
llvm-svn: 54314
2008-08-03 20:17:34 +00:00
Chris Lattner
9aaf1f7650
Emit saveri with the correct operand order, patch by Richard Pennington!
...
llvm-svn: 54313
2008-08-03 18:16:14 +00:00
Bruno Cardoso Lopes
e9f5a77b11
Fix PR2615
...
llvm-svn: 54312
2008-08-03 15:37:43 +00:00
Bruno Cardoso Lopes
b13d663126
Improved asm inline for hi,lo results
...
Added hi,lo registers to be used,def implicitly. This provides better handle of
instructions which use hi/lo.
Fixes a small BranchAnalysis bug
llvm-svn: 54274
2008-08-02 19:42:36 +00:00
Bruno Cardoso Lopes
402c28e400
Apply the same pattern used in 'and' lowering for 'or'
...
llvm-svn: 54273
2008-08-02 19:37:33 +00:00
Duncan Sands
573c01d5da
Fix comment typos.
...
llvm-svn: 54266
2008-08-01 12:23:49 +00:00
Bruno Cardoso Lopes
9cb1f636b4
Expand fcopysign
...
llvm-svn: 54250
2008-07-31 18:50:54 +00:00
Bruno Cardoso Lopes
01c39058e8
Handle more SELECT corner cases considering legalize types, probabily wont work with
...
the default legalizer.
llvm-svn: 54249
2008-07-31 18:31:28 +00:00
Dale Johannesen
f669e7c14f
Add a flag to disable jump table generation (all
...
switches use the binary search algorithm) for
environments that don't support it. PPC64 JIT
is such an environment; turn the flag on for that.
llvm-svn: 54248
2008-07-31 18:13:12 +00:00
Dan Gohman
f691fc703d
Improve dagcombining for sext-loads and sext-in-reg nodes.
...
llvm-svn: 54239
2008-07-31 00:50:31 +00:00
Bruno Cardoso Lopes
9181910033
Added pattern for floating point zero immediate (avoiding a constant pool
...
access).
Added pattern to match bitconvert node.
Fixed MTC1 asm string bug.
llvm-svn: 54229
2008-07-30 19:00:31 +00:00
Dan Gohman
926a91d664
Move SelectionDAG::viewGraph() out of line; as an inline function
...
it isn't always visible to gdb.
llvm-svn: 54228
2008-07-30 18:48:53 +00:00
Dan Gohman
4ca56a8993
Don't look for leaf values to store when lowering stores of
...
empty structs. This fixes PR2612.
llvm-svn: 54226
2008-07-30 18:36:51 +00:00
Owen Anderson
4e5db8d80f
Use existing LiveInterval methods to simplify live interval merging. Thanks to Evan for pointing these out.
...
llvm-svn: 54225
2008-07-30 18:27:35 +00:00
Dan Gohman
efb5d2ce6e
Reapply r54147 with a constraint to only use the 8-bit
...
subreg form on x86-64, to avoid the problem with x86-32
having GPRs that don't have 8-bit subregs.
Also, change several 16-bit instructions to use
equivalent 32-bit instructions. These have a smaller
encoding and avoid partial-register updates.
llvm-svn: 54223
2008-07-30 18:09:17 +00:00
Owen Anderson
e6dca3efcb
Value numbers whose def index is a special sentinel value should not be remapped.
...
llvm-svn: 54218
2008-07-30 17:42:47 +00:00
Bruno Cardoso Lopes
df5916fff6
Fixed bug in global address lowering for functions and in Brcond lowering
...
llvm-svn: 54215
2008-07-30 17:06:13 +00:00
Bruno Cardoso Lopes
e130052d1d
Removed small section flag for mips, the assembler doesnt support this flag
...
llvm-svn: 54214
2008-07-30 17:04:04 +00:00
Bruno Cardoso Lopes
f2a6400d3e
Added new features to represent specific instructions groups
...
llvm-svn: 54213
2008-07-30 17:01:06 +00:00
Bruno Cardoso Lopes
53fdaf7763
Instruction definition cleanup
...
llvm-svn: 54212
2008-07-30 16:58:59 +00:00
Mon P Wang
fb483982f5
Added support for overloading intrinsics (atomics) based on pointers
...
to different address spaces. This alters the naming scheme for those
intrinsics, e.g., atomic.load.add.i32 => atomic.load.add.i32.p0i32
llvm-svn: 54195
2008-07-30 04:36:53 +00:00
Eli Friedman
a750724150
Another SCEV issue from PR2607; essentially the same issue, but this
...
time applying to the implicit comparison in smin expressions. The
correct way to transform an inequality into the opposite
inequality, either signed or unsigned, is with a not expression.
I looked through the SCEV code, and I don't think there are any more
occurrences of this issue.
llvm-svn: 54194
2008-07-30 04:36:32 +00:00
Owen Anderson
377ad6cb31
More fixes for corner cases when remapping live range indices.
...
llvm-svn: 54186
2008-07-30 00:22:56 +00:00
Owen Anderson
6147af0f8c
When merging live intervals, we also need to merge in any live ranges that are inputs to two-address instructions
...
that themselves define a range we already care about.
llvm-svn: 54185
2008-07-30 00:21:16 +00:00
Eli Friedman
81169f2e1b
Fix for PR2607: SCEV miscomputing the loop count for loops with an
...
SGT exit condition. Essentially, the correct way to flip an inequality
in 2's complement is the not operator, not the negation operator.
That said, the difference only affects cases involving INT_MIN.
Also, enhance the pre-test search logic to be a bit smarter about
inequalities flipped with a not operator, so it can eliminate the smax
from the iteration count for simple loops.
llvm-svn: 54184
2008-07-30 00:04:08 +00:00
Owen Anderson
ab575176fc
When merging a PHI operand's live interval into the PHI's live interval, we need to merge over all liveranges in
...
the operand's interval that share the relevant value number, not just the range that immediately precedes the PHI.
llvm-svn: 54174
2008-07-29 21:17:08 +00:00
Owen Anderson
bebb8e5d20
Don't decrement the BB remap when we don't need to.
...
llvm-svn: 54173
2008-07-29 21:15:44 +00:00
Duncan Sands
c3d73fbfc0
Fix PR2609. If a label is deleted, then it needs
...
to be marked invalid regardless of whether it is
a debug, an exception handling or (hopefully) a
GC label.
llvm-svn: 54172
2008-07-29 20:56:02 +00:00
Bruno Cardoso Lopes
2188281cd4
Changed some methods order.
...
llvm-svn: 54169
2008-07-29 19:29:50 +00:00
Nate Begeman
f76a814673
Fix broken CellSPU lowering, re-instate braces in Legalize
...
llvm-svn: 54168
2008-07-29 19:07:27 +00:00
Bruno Cardoso Lopes
9d91fab260
Added floating point lowering for select.
...
llvm-svn: 54167
2008-07-29 19:05:28 +00:00
Nate Begeman
20b060cd54
Disable a fix in the previous patch, since it breaks CellSPU.
...
The CellSPU codegen is broken, but needs to be fixed before we can
put this back in.
llvm-svn: 54164
2008-07-29 18:28:31 +00:00
Nate Begeman
9a71580e21
Add vector shifts to the IR, patch by Eli Friedman.
...
CodeGen & Clang work coming next.
llvm-svn: 54161
2008-07-29 15:49:41 +00:00
Matthijs Kooijman
7199907f50
Add -unroll-allow-partial command line option that enabled the loop unroller to
...
partially unroll a loop when fully unrolling would not fit under the threshold.
Patch by Mikael Lepistö.
llvm-svn: 54160
2008-07-29 13:21:23 +00:00
Matthijs Kooijman
77948dbbc2
Restructure ArgumentPromotion a bit. Instead of just having a single boolean
...
that says "unconditional loads from this argument are safe", we now keep track
of the safety per set of indices from which loads happen. This prevents
ArgPromotion from promoting loads that aren't really valid. As an added effect,
this will now disregard the the type of the indices passed to a GEP, so
"load GEP %A, i32 1" and "load GEP %A, i64 1" will result in a single argument,
not two.
This fixes PR2598, for which a testcase has been added as well.
llvm-svn: 54159
2008-07-29 10:00:13 +00:00
Matthijs Kooijman
6ef5a25c7f
Add a GetElementPtrInst::getIndexedType that accepts uint64_t's instead of just Value*'s.
...
llvm-svn: 54157
2008-07-29 08:46:11 +00:00
Evan Cheng
10d4254f45
Fix for PR2578. Do not split off a block whose size is less than FreeRangeHeader::getMinBlockSize(). Patch by Damien.
...
llvm-svn: 54152
2008-07-29 07:38:32 +00:00
Dan Gohman
ebe629a4b2
Revert 54147.
...
llvm-svn: 54148
2008-07-29 01:02:18 +00:00
Dan Gohman
1816900fd1
Add x86 isel patterns to match what would be a ZERO_EXTEND_INREG operation,
...
which is represented in codegen as an 'and' operation. This matches them
with movz instructions, instead of leaving them to be matched by and
instructions with an immediate field.
llvm-svn: 54147
2008-07-28 22:18:25 +00:00
Dan Gohman
9653b21dc2
Fold the useful features of alist and alist_node into ilist, and
...
a new ilist_node class, and remove them. Unlike alist_node,
ilist_node doesn't attempt to manage storage itself, so it avoids
the associated problems, including being opaque in gdb.
Adjust the Recycler class so that it doesn't depend on alist_node.
Also, change it to use explicit Size and Align parameters, allowing
it to work when the largest-sized node doesn't have the greatest
alignment requirement.
Change MachineInstr's MachineMemOperand list from a pool-backed
alist to a std::list for now.
llvm-svn: 54146
2008-07-28 21:51:04 +00:00
Owen Anderson
d2cc2655af
Don't remove volatile loads. Thanks to Duncan for noticing this one.
...
llvm-svn: 54144
2008-07-28 20:52:42 +00:00
Bruno Cardoso Lopes
4223351620
Disable gp_rel relocation for constant pools access for now.
...
llvm-svn: 54142
2008-07-28 19:26:25 +00:00
Duncan Sands
3df25c8758
Since build_vector is a variadic node, the number
...
of operands should be -1 not 0.
llvm-svn: 54141
2008-07-28 19:17:21 +00:00
Bruno Cardoso Lopes
67af9a72f4
Added floating point lowering for setcc and brcond.
...
Fixed COMM asm directive usage.
ConstantPool using custom FourByteConstantSection.
llvm-svn: 54139
2008-07-28 19:11:24 +00:00
Dan Gohman
f6391108c6
Fix a typo in a comment.
...
llvm-svn: 54136
2008-07-28 18:43:51 +00:00