Anton Korobeynikov
2bdec2a5ee
Fix use of declaration inside case block
...
llvm-svn: 41584
2007-08-29 23:18:48 +00:00
Evan Cheng
1ad4a6117b
Change LiveRange so it keeps a pointer to the VNInfo rather than an index.
...
Changes related modules so VNInfo's are not copied. This decrease
copy coalescing time by 45% and overall compilation time by 10% on siod.
llvm-svn: 41579
2007-08-29 20:45:00 +00:00
Anton Korobeynikov
830b1cb4e9
Lower FRAME_TO_ADDR_OFFSET to zero by default (if not custom lowered)
...
llvm-svn: 41578
2007-08-29 19:28:29 +00:00
Dan Gohman
81b62e1218
Add an option, -view-sunit-dags, for viewing the actual SUnit DAGs used by
...
scheduling.
llvm-svn: 41556
2007-08-28 20:32:58 +00:00
Evan Cheng
a5b10b334f
Recover most of the compile time regression due to recent live interval changes.
...
1. Eliminate the costly live interval "swapping".
2. Change ValueNumberInfo container from SmallVector to std::vector. The former
performs slowly when the vector size is very large.
llvm-svn: 41536
2007-08-28 08:28:51 +00:00
Dan Gohman
9625d812c9
Make DAGCombiner's global alias analysis query more precise in the case
...
where both pointers have non-zero offsets.
llvm-svn: 41491
2007-08-27 16:32:11 +00:00
Dan Gohman
8dc0b93151
If the source and destination pointers in an llvm.memmove are known
...
to not alias each other, it can be translated as an llvm.memcpy.
llvm-svn: 41489
2007-08-27 16:26:13 +00:00
Duncan Sands
ef5a654216
There is an impedance matching problem between LLVM and
...
gcc exception handling: if an exception unwinds through
an invoke, then execution must branch to the invoke's
unwind target. We previously tried to enforce this by
appending a cleanup action to every selector, however
this does not always work correctly due to an optimization
in the C++ unwinding runtime: if only cleanups would be
run while unwinding an exception, then the program just
terminates without actually executing the cleanups, as
invoke semantics would require. I was hoping this
wouldn't be a problem, but in fact it turns out to be the
cause of all the remaining failures in the LLVM testsuite
(these also fail with -enable-correct-eh-support, so turning
on -enable-eh didn't make things worse!). Instead we need
to append a full-blown catch-all to the end of each
selector. The correct way of doing this depends on the
personality function, i.e. it is language dependent, so
can only be done by gcc. Thus this patch which generalizes
the eh.selector intrinsic so that it can handle all possible
kinds of action table entries (before it didn't accomodate
cleanups): now 0 indicates a cleanup, and filters have to be
specified using the number of type infos plus one rather than
the number of type infos. Related gcc patches will cause
Ada to pass a cleanup (0) to force the selector to always
fire, while C++ will use a C++ catch-all (null).
llvm-svn: 41484
2007-08-27 15:47:50 +00:00
Dan Gohman
032d89828e
Add explicit keywords and remove spurious trailing semicolons.
...
llvm-svn: 41482
2007-08-27 14:50:10 +00:00
Dale Johannesen
b6d2bec418
Revise per review comments.
...
llvm-svn: 41409
2007-08-26 01:18:27 +00:00
Dale Johannesen
2cfcf70f82
Add APFloat interface to ConstantFPSDNode. Change
...
over uses in DAGCombiner. Fix interfaces to work
with APFloats.
llvm-svn: 41407
2007-08-25 22:10:57 +00:00
Chris Lattner
2ed652f11d
Allow target constants to be illegal types. The target should
...
know how to handle them. This fixes
test/CodeGen/Generic/asm-large-immediate.ll
llvm-svn: 41388
2007-08-25 01:00:22 +00:00
Chris Lattner
dbfc4e4b07
Teach the dag scheduler to handle inline asm nodes with multi-value immediate operands.
...
llvm-svn: 41386
2007-08-25 00:53:07 +00:00
Bill Wendling
48597b4ff8
The personality function might need to be declared as:
...
.set Lset0,___gxx_personality_v0-.
.long Lset0
on some targets. Make it so!
llvm-svn: 41385
2007-08-25 00:51:55 +00:00
Chris Lattner
d8c9cb9182
rename isOperandValidForConstraint to LowerAsmOperandForConstraint,
...
changing the interface to allow for future changes.
llvm-svn: 41384
2007-08-25 00:47:38 +00:00
Dale Johannesen
bdea32d812
Poison APFloat::operator==. Replace existing uses with bitwiseIsEqual.
...
This means backing out the preceding change to Constants.cpp, alas.
llvm-svn: 41378
2007-08-24 22:09:56 +00:00
Dale Johannesen
7891d8edf0
Use APFloat internally for ConstantFPSDNode.
...
llvm-svn: 41372
2007-08-24 20:59:15 +00:00
Anton Korobeynikov
97cdac8d19
Perform correct codegen for eh_dwarf_cfa intrinsic.
...
llvm-svn: 41316
2007-08-23 07:21:06 +00:00
Andrew Lenharth
beb80a9832
move this check. ppc outputs .no_dead_strip properly
...
llvm-svn: 41286
2007-08-22 19:33:11 +00:00
Dan Gohman
54a187ea8b
Minor cleanups to reduce some spurious differences between different
...
scheduler implementations.
llvm-svn: 41191
2007-08-20 19:28:38 +00:00
Rafael Espindola
9c3d20d823
Partial implementation of calling functions with byval arguments:
...
*) The needed information is propagated to the DAG
*) The X86-64 backend detects it and aborts
llvm-svn: 41179
2007-08-20 15:18:24 +00:00
Evan Cheng
f5a23abf37
Fold C ? 0 : 1 to ~C or zext(~C) or trunc(~C) depending the types.
...
llvm-svn: 41163
2007-08-18 05:57:05 +00:00
Evan Cheng
cb6d65e1bf
Avoid issue on 64-bit hosts.
...
llvm-svn: 41143
2007-08-17 18:02:22 +00:00
David Greene
81db5acab0
Fix GLIBCXX_DEBUG error of comparing two singular iterators
...
llvm-svn: 41139
2007-08-17 15:13:55 +00:00
Evan Cheng
631ccc6144
If dynamic_stackalloc alignment is > stack alignment, first issue an instruction to align the stack ptr before the decrement.
...
llvm-svn: 41133
2007-08-16 23:50:06 +00:00
Evan Cheng
95667c532c
- If a dynamic_stackalloc alignment requirement is <= stack alignment, then the alignment argument is ignored.
...
- *Always* round up the size of the allocation to multiples of stack
alignment to ensure the stack ptr is never left in an invalid state after a dynamic_stackalloc.
llvm-svn: 41132
2007-08-16 23:46:29 +00:00
Evan Cheng
70c2de7bf1
Fix some kill info update bugs; add hidden option -disable-rematerialization to turn off remat for debugging.
...
llvm-svn: 41118
2007-08-16 07:24:22 +00:00
Lauro Ramos Venancio
a392cd2fde
Implement FPOWI ExpandOp.
...
Fix PR1287.
llvm-svn: 41112
2007-08-15 22:13:27 +00:00
Evan Cheng
958cf3d43e
If the source of a move is in spill slot, the reload may be folded to essentially a load from stack slot. It's ok to mark the stack slot value as available for reuse. But it should not be clobbered since the destination of the move is live.
...
llvm-svn: 41109
2007-08-15 20:20:34 +00:00
Evan Cheng
3f22fffe94
- If a def is dead, do not spill it.
...
- If the defs of a spilled rematerializable MI are dead after the spill store is deleted, delete
the def MI as well.
llvm-svn: 41086
2007-08-14 23:25:37 +00:00
Evan Cheng
94168a4ed0
Fix for PR1596: AdjustCopiesBackFrom() should conservatively check if any of its sub-registers may overlap with the interval of the copy that's being coalesced.
...
llvm-svn: 41084
2007-08-14 23:19:28 +00:00
Evan Cheng
6cb9fd7be5
If a MI's def is remat as well as spilled, and the store is later deemed dead, mark the def operand as isDead.
...
llvm-svn: 41083
2007-08-14 20:23:13 +00:00
Evan Cheng
234386509b
If a spilled value is being reused and the use is a kill, that means there are
...
no more uses within the MBB and the spilled value isn't live out of the MBB.
Then it's safe to delete the spill store.
llvm-svn: 41069
2007-08-14 09:11:18 +00:00
Evan Cheng
78a8806f4f
If a rematerializable def is not deleted, i.e. it is also spilled, check if the
...
spilled value is available for reuse.
llvm-svn: 41067
2007-08-14 05:42:54 +00:00
Evan Cheng
74c69f7588
Kill info update bugs.
...
llvm-svn: 41064
2007-08-14 01:56:58 +00:00
Evan Cheng
33820da1da
Re-implement trivial rematerialization. This allows def MIs whose live intervals that are coalesced to be rematerialized.
...
llvm-svn: 41060
2007-08-13 23:45:17 +00:00
Evan Cheng
5ca98c657d
Kill info update bugs.
...
llvm-svn: 41043
2007-08-13 07:12:23 +00:00
Evan Cheng
af21e9550e
No need to remove dead range from soon-to-be-dead live interval. Its val# may be out of whack.
...
llvm-svn: 41024
2007-08-12 01:26:19 +00:00
Evan Cheng
05cc486c7b
Code to maintain kill information during register coalescing.
...
llvm-svn: 41016
2007-08-11 00:59:19 +00:00
Christopher Lamb
e081928f49
Move isSubRegOf into MRegisterInfo. Fix a missed move elimination in LowerSubregs and add more debugging output there.
...
llvm-svn: 41005
2007-08-10 21:11:55 +00:00
Dan Gohman
a17799a3bd
Fix EXTRACT_ELEMENT, EXTRACT_SUBVECTOR, and EXTRACT_VECTOR_ELT to
...
use an intptr ValueType instead of i32 for the index operand in
getCopyToParts.
llvm-svn: 40987
2007-08-10 14:59:38 +00:00
Rafael Espindola
66011c17d5
propagate struct size and alignment of byval arguments to the DAG
...
llvm-svn: 40986
2007-08-10 14:44:42 +00:00
Chris Lattner
2b9fe84b07
unbreak the build
...
llvm-svn: 40976
2007-08-09 23:55:17 +00:00
Evan Cheng
1115a2b412
Bug fix. ~1U marks the val# dead.
...
llvm-svn: 40975
2007-08-09 23:14:39 +00:00
Dale Johannesen
c339e45274
Update per review comments.
...
llvm-svn: 40965
2007-08-09 17:27:48 +00:00
Dale Johannesen
ba1a98a4e0
long double 9 of N. This finishes up the X86-32 bits
...
(constants are still not handled). Adds ConvertActions
to control fp-to-fp conversions (these are currently
defaulted for all other targets, so no changes there).
llvm-svn: 40958
2007-08-09 01:04:01 +00:00
Scott Michel
9d09c5ccda
If a target really needs to custom lower constants, it should be allowed
...
to do so.
llvm-svn: 40955
2007-08-08 23:23:31 +00:00
Evan Cheng
d771b793fe
Adding kill info to val#.
...
llvm-svn: 40925
2007-08-08 07:03:29 +00:00
Evan Cheng
103947125c
Clean up and bug fix.
...
llvm-svn: 40921
2007-08-08 05:56:18 +00:00
Evan Cheng
a8c2f38617
- Each val# can have multiple kills.
...
- Fix some minor bugs related to special markers on val# def. ~0U means
undefined, ~1U means dead val#.
llvm-svn: 40916
2007-08-08 03:00:28 +00:00