Duncan Sands
04fb6bf468
Linux also does not require exception handling
...
moves in order to get correct debug info. Since
I can't imagine how any target could possibly
be any different, I've just stripped out the
option: now all the world's like Darwin!
llvm-svn: 53134
2008-07-04 09:55:48 +00:00
Bill Wendling
4bb9089db7
Don't return std::vector by value, but pass it in by reference to be filled.
...
llvm-svn: 53123
2008-07-03 23:13:02 +00:00
Bill Wendling
2e50689435
Revert my previous check-in that split up MachineModuleInfo. It turns out to
...
slow the compiler down at -O0 some 30% or more. Ooops.
llvm-svn: 53120
2008-07-03 22:53:42 +00:00
Evan Cheng
fad8be450d
Backed out 53031.
...
llvm-svn: 53110
2008-07-03 18:20:14 +00:00
Evan Cheng
7d98a48f15
- Remove calls to copyKillDeadInfo which is an N^2 function. Instead, propagate kill / dead markers as new instructions are constructed in foldMemoryOperand, convertToThressAddress, etc.
...
- Also remove LiveVariables::instructionChanged, etc. Replace all calls with cheaper calls which update VarInfo kill list.
llvm-svn: 53097
2008-07-03 09:09:37 +00:00
Dan Gohman
b261292917
Reapply r52988, "Simplify addRegisterKilled and addRegisterDead." The
...
254.gap failure was not due to this mod.
llvm-svn: 53068
2008-07-03 01:18:51 +00:00
Dan Gohman
f3c4d7f877
Avoid unnecessarily copying APInt objects.
...
llvm-svn: 53065
2008-07-03 00:52:03 +00:00
Evan Cheng
9f8b66f3f1
Use std::replace instead of std::find and push_back.
...
llvm-svn: 53063
2008-07-03 00:28:27 +00:00
Evan Cheng
7a265d83bf
- Add LiveVariables::replaceKillInstruction. This does a subset of instructionChanged. That is, it only update the VarInfo.kills if the new instruction is known to have the correct dead and kill markers.
...
- CommuteInstruction copies kill / dead markers over to new instruction. So use replaceKillInstruction instead.
llvm-svn: 53061
2008-07-03 00:07:19 +00:00
Owen Anderson
30cc028e4a
Make LiveVariables even more optional, by making it optional in the call to TargetInstrInfo::convertToThreeAddressInstruction
...
Also, if LV isn't around, then TwoAddr doesn't need to be updating flags, since they won't have been set in the first place.
llvm-svn: 53058
2008-07-02 23:41:07 +00:00
Dan Gohman
22e9707480
Replace a few uses of SelectionDAG::getTargetNode with
...
SelectionDAG::SelectNodeTo in the instruction selector. This
updates existing nodes in place instead of creating new ones.
Go back to selecting ISD::DBG_LABEL nodes into
TargetInstrInfo::DBG_LABEL nodes instead of leaving them
unselected, now that SelectNodeTo allows us to update them
in place.
llvm-svn: 53057
2008-07-02 23:23:19 +00:00
Dan Gohman
1b46bfecfe
Revert r52988. It broke 254.gap on x86-64.
...
llvm-svn: 53050
2008-07-02 22:12:55 +00:00
Owen Anderson
8c10c2482a
TwoAddressInstructionPass doesn't really require LiveVariables, it just needs to update it if it's already around.
...
llvm-svn: 53049
2008-07-02 21:28:58 +00:00
Duncan Sands
739a0548c4
Add a new getMergeValues method that does not need
...
to be passed the list of value types, and use this
where appropriate. Inappropriate places are where
the value type list is already known and may be
long, in which case the existing method is more
efficient.
llvm-svn: 53035
2008-07-02 17:40:58 +00:00
Mon P Wang
4b7c1acf26
Fixed problem in EmitStackConvert where the source and target type
...
have different alignment by creating a stack slot with the max
alignment of source and target type.
llvm-svn: 53031
2008-07-02 17:07:12 +00:00
Chris Lattner
6b2c4f6143
instead of aborting on shifts of i1, just implicitly fold them.
...
The dag combiner can produce a shift of i1 when folding icmp i1's.
llvm-svn: 53030
2008-07-02 17:01:57 +00:00
Duncan Sands
d353c265ff
Fix typo compounded by a cut-and-pasto.
...
llvm-svn: 53012
2008-07-02 10:03:53 +00:00
Duncan Sands
ed283c49d5
Let AnalyzeNewNode take care of calling ExpungeNode.
...
This makes sure that all new nodes are expunged, not
just those the top node of a new subtree.
llvm-svn: 53011
2008-07-02 09:56:41 +00:00
Evan Cheng
7e4abde27c
- Use a faster priority comparison function if -fast.
...
- Code clean up.
llvm-svn: 53010
2008-07-02 09:23:51 +00:00
Chris Lattner
bedd1b2427
Add a new (simple) StringMap::clear method, patch by Pratik
...
Solanki!
llvm-svn: 53008
2008-07-02 05:26:32 +00:00
Bill Wendling
536fb95321
Use the canonical form for getting an empty structure.
...
llvm-svn: 53003
2008-07-02 00:50:02 +00:00
Bill Wendling
82a9321f56
Sorry. I couldn't sleep at night knowing I put these ugly casts into the source tree.
...
llvm-svn: 53001
2008-07-02 00:35:47 +00:00
Bill Wendling
b7bd02be57
Darwin doesn't need exception handling information for the "move" info when
...
debug information is being output, because it's leet!
llvm-svn: 52994
2008-07-01 23:34:48 +00:00
Evan Cheng
c963f6c14b
Avoid creating expensive comment string if it's not going to be printed.
...
llvm-svn: 52992
2008-07-01 23:18:29 +00:00
Owen Anderson
501f207bdf
No need to use std::distance. We can just count the number of operands
...
much more cheaply.
llvm-svn: 52990
2008-07-01 22:34:11 +00:00
Evan Cheng
f3202a6375
Simplify addRegisterKilled and addRegisterDead.
...
llvm-svn: 52988
2008-07-01 22:21:21 +00:00
Bill Wendling
c8cdb883df
- Update comments.
...
- Don't use GlobalVariable::LinkageTypes when unsigned works.
llvm-svn: 52987
2008-07-01 22:08:01 +00:00
Dale Johannesen
ad6b3a6ed2
Fix longstanding thinko: don't exclude
...
predessors of exit blocks from tail merging
consideration.
llvm-svn: 52985
2008-07-01 21:50:14 +00:00
Evan Cheng
4c609abd90
Eliminate a compile time warning.
...
llvm-svn: 52982
2008-07-01 21:35:46 +00:00
Owen Anderson
1d952533c2
Add a version of AsmPrinter::EOL that takes a const char* so that we don't have to do as many implicit std::string constructions.
...
Unfortunately, this doesn't appear to translate to a real speedup in practice.
llvm-svn: 52981
2008-07-01 21:16:27 +00:00
Evan Cheng
33696cd9cf
Do run ComputeLiveOutVRegInfo with -fast.
...
llvm-svn: 52975
2008-07-01 18:15:04 +00:00
Evan Cheng
2c9773155a
Do not use computationally expensive scheduling heuristics with -fast.
...
llvm-svn: 52971
2008-07-01 18:05:03 +00:00
Evan Cheng
fb2573554c
Apply Chris' suggestion.
...
llvm-svn: 52970
2008-07-01 17:59:20 +00:00
Dan Gohman
b58aff4858
Minimize duplicated code in AsmPrinter::printLabel.
...
llvm-svn: 52944
2008-07-01 00:16:26 +00:00
Dan Gohman
fb19f9402b
Split ISD::LABEL into ISD::DBG_LABEL and ISD::EH_LABEL, eliminating
...
the need for a flavor operand, and add a new SDNode subclass,
LabelSDNode, for use with them to eliminate the need for a label id
operand.
Change instruction selection to let these label nodes through
unmodified instead of creating copies of them. Teach the MachineInstr
emitter how to emit a MachineInstr directly from an ISD label node.
This avoids the need for allocating SDNodes for the label id and
flavor value, as well as SDNodes for each of the post-isel label,
label id, and label flavor.
llvm-svn: 52943
2008-07-01 00:05:16 +00:00
Evan Cheng
819b770868
Suppress compiler warning.
...
llvm-svn: 52934
2008-06-30 22:33:56 +00:00
Evan Cheng
6a323e16f2
Don't run stack slot coloring if -fast.
...
llvm-svn: 52933
2008-06-30 22:33:16 +00:00
Dan Gohman
e09a1c88cf
Use a simpler but equivalent form of RecordSource.
...
llvm-svn: 52931
2008-06-30 22:21:03 +00:00
Evan Cheng
0d3628946f
Add timing report for various sub-passes under SelectionDAGISel.
...
llvm-svn: 52930
2008-06-30 22:10:09 +00:00
Dan Gohman
6896901e2c
std::ostream and std::string microoptimizations for asm printing.
...
llvm-svn: 52929
2008-06-30 22:03:41 +00:00
Dan Gohman
a76e60a77a
Use reserve.
...
SelectionDAG::allnodes_size is linear, but that doesn't appear to
outweigh the benefit of reducing heap traffic. If it does become a
problem, we should teach SelectionDAG to keep a count of how many
nodes are live, because there are several other places where that
information would be useful as well.
llvm-svn: 52926
2008-06-30 21:04:06 +00:00
Dan Gohman
5c73a886b4
Rename ISD::LOCATION to ISD::DBG_STOPPOINT to better reflect its
...
purpose, and give it a custom SDNode subclass so that it doesn't
need to have line number, column number, filename string, and
directory string, all existing as individual SDNodes to be the
operands.
This was the only user of ISD::STRING, StringSDNode, etc., so
remove those and some associated code.
This makes stop-points considerably easier to read in
-view-legalize-dags output, and reduces overhead (creating new
nodes and copying std::strings into them) on code containing
debugging information.
llvm-svn: 52924
2008-06-30 20:59:49 +00:00
Evan Cheng
0711d68fa7
Split scheduling from instruction selection.
...
llvm-svn: 52923
2008-06-30 20:45:06 +00:00
Dale Johannesen
659aeb6186
No need to align the stack if there are no stack
...
objects. Fixes a couple of tests on Linux.
llvm-svn: 52921
2008-06-30 20:40:16 +00:00
Evan Cheng
d206e2ac2a
Remove unneeded include.
...
llvm-svn: 52920
2008-06-30 20:38:22 +00:00
Dan Gohman
31c8123d07
Replace some std::vectors that showed up in heap profiling with
...
SmallVectors. Change the signature of TargetLowering::LowerArguments
to avoid returning a vector by value, and update the two targets
which still use this directly, Sparc and IA64, accordingly.
llvm-svn: 52917
2008-06-30 20:31:15 +00:00
Dan Gohman
328e26d0ac
Correct the allocation size for CCState's UsedRegs member, which
...
only needs one bit for each register. UsedRegs is a SmallVector
sized at 16, so this eliminates a heap allocation/free for every
call and return processed by Legalize on most targets.
llvm-svn: 52915
2008-06-30 20:25:31 +00:00
Duncan Sands
9e08148f29
ExpungeNode is only needed for new nodes! This
...
fixes CodeGen/PowerPC/2008-06-19-LegalizerCrash.ll
when using the new LegalizeTypes infrastructure.
llvm-svn: 52903
2008-06-30 16:43:45 +00:00
Duncan Sands
36410f6cde
Support for VAARG. As noted in a comment, this is
...
wrong for types like x86 long double and i1, but
no worse than what is done in LegalizeDAG.
llvm-svn: 52898
2008-06-30 13:55:15 +00:00
Duncan Sands
dd5354df89
Support for promoting select_cc operands.
...
llvm-svn: 52895
2008-06-30 11:50:11 +00:00