Dan Gohman
d263602463
Remove most of the uses of SDOperandPtr, usually replacing it with a
...
simple const SDOperand*, which is what's usually needed.
For AddNodeIDOperands, which is small, just duplicate the function to
accept an SDUse*.
For SelectionDAG::getNode - Add an overload that accepts SDUse* that
copies the operands into a temporary SDOperand array, but also has
special-case checks for 0 through 3 operands to avoid the copy in
the common cases.
llvm-svn: 53183
2008-07-07 18:26:29 +00:00
Dan Gohman
dd9c91e583
Remove uses of "llvm/Support/Debug.h" from LLVM include files, which
...
all happened be unnecessary.
llvm-svn: 53182
2008-07-07 18:14:29 +00:00
Dan Gohman
3755664b6d
Remove unnecessary static_casts.
...
llvm-svn: 53181
2008-07-07 18:08:20 +00:00
Dan Gohman
9112a5463e
Remove an unnecessary reinterpret_cast.
...
llvm-svn: 53180
2008-07-07 18:07:36 +00:00
Dan Gohman
955fdc7a4c
Add explicit keywords.
...
llvm-svn: 53179
2008-07-07 18:00:37 +00:00
Dan Gohman
c97817aac3
Make DenseMap's insert return a pair, to more closely resemble std::map.
...
llvm-svn: 53177
2008-07-07 17:46:23 +00:00
Ted Kremenek
1d321b8875
Removed ImmutableMap::SlimFind and replaced it with ImmutableMap::lookup. The new method does the same thing, except that it returns a pointer to the mapped data type, and not to an internal tree node.
...
llvm-svn: 53171
2008-07-07 16:20:55 +00:00
Duncan Sands
0caf597378
LegalizeTypes soft-float support for stores of a
...
float value.
llvm-svn: 53165
2008-07-07 00:08:12 +00:00
Anton Korobeynikov
47e1a76977
Add convenient helper for checking whether global is weak in linker sense
...
having weak or linkonce or common or extweak LLVM linkage.
llvm-svn: 53158
2008-07-05 23:48:30 +00:00
Nick Lewycky
e85e0b1bbc
80col
...
llvm-svn: 53153
2008-07-05 22:41:37 +00:00
Mon P Wang
a43d6758ac
Fixed generating incorrect aligned stores that I backout of r53031
...
that fixed problems 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: 53150
2008-07-05 20:40:31 +00:00
Duncan Sands
3ea6f15708
Rather than having a different custom legalization
...
hook for each way in which a result type can be
legalized (promotion, expansion, softening etc),
just use one: ReplaceNodeResults, which returns
a node with exactly the same result types as the
node passed to it, but presumably with a bunch of
custom code behind the scenes. No change if the
new LegalizeTypes infrastructure is not turned on.
llvm-svn: 53137
2008-07-04 11:47:58 +00:00
Duncan Sands
aac5c915ed
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
e3ad6f2249
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
2c9a84d788
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
Devang Patel
af72f3b02e
Provide a hook to set the code generation debug options to investigate lto failures.
...
llvm-svn: 53119
2008-07-03 22:53:14 +00:00
Evan Cheng
01e53a3406
Backed out 53031.
...
llvm-svn: 53110
2008-07-03 18:20:14 +00:00
Evan Cheng
1f6148a84c
- 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
9c78662057
Use operator new instead of new char[].
...
llvm-svn: 53067
2008-07-03 00:59:36 +00:00
Evan Cheng
7c3920e692
- 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
604f9f722d
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
741cda0ac8
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
Eric Christopher
4c3e39e220
Add a couple more helper functions to deal with
...
creating global constant strings and pointers
to global constant strings.
llvm-svn: 53051
2008-07-02 22:57:59 +00:00
Mon P Wang
f8524c5deb
Make the default min align of CreateStackTemporary to be 1
...
llvm-svn: 53036
2008-07-02 17:50:10 +00:00
Duncan Sands
21e2a711e3
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
Owen Anderson
dd29406f31
Have DenseSet::insert return a bool indicating whether the insertion succeeded or not.
...
llvm-svn: 53033
2008-07-02 17:29:59 +00:00
Mon P Wang
55f4371807
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
441571cc05
optimize StringMap::clear
...
llvm-svn: 53009
2008-07-02 05:30:45 +00:00
Chris Lattner
06545d1c4a
Add a new (simple) StringMap::clear method, patch by Pratik
...
Solanki!
llvm-svn: 53008
2008-07-02 05:26:32 +00:00
Bill Wendling
aa45e38a17
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
Ted Kremenek
41502657f7
Implemented operator!= for the ImmutableList iterator.
...
llvm-svn: 52998
2008-07-02 00:06:55 +00:00
Owen Anderson
1530481dd3
Add a version of AddString that takes a const char* so we can avoid extraneous
...
conversions to std::string.
llvm-svn: 52995
2008-07-01 23:49:59 +00:00
Bill Wendling
27c38cee90
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
5389352c98
Avoid creating expensive comment string if it's not going to be printed.
...
llvm-svn: 52992
2008-07-01 23:18:29 +00:00
Ted Kremenek
0b662363f9
Added partial specialization of FoldingSetTrait for pointers.
...
llvm-svn: 52989
2008-07-01 22:30:13 +00:00
Bill Wendling
c695823456
- Update comments.
...
- Don't use GlobalVariable::LinkageTypes when unsigned works.
llvm-svn: 52987
2008-07-01 22:08:01 +00:00
Devang Patel
51aec7ffb8
Fix dom tree compare. Don't forget to compare children!
...
llvm-svn: 52984
2008-07-01 21:41:00 +00:00
Owen Anderson
8564cd9dfe
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
Devang Patel
0fc2badc38
Fix typos in comments.
...
Thanks for the feedback!
llvm-svn: 52978
2008-07-01 19:50:56 +00:00
Evan Cheng
915253ddda
DAGSize should not be public.
...
llvm-svn: 52977
2008-07-01 18:49:06 +00:00
Dan Gohman
83c1b4cede
Prune a few dependencies on MachineFunction.h.
...
llvm-svn: 52976
2008-07-01 18:15:35 +00:00
Dan Gohman
ca864de95a
Make ilist_traits<MachineBasicBlock>'s Parent member private.
...
llvm-svn: 52974
2008-07-01 18:13:58 +00:00
Dan Gohman
9d5c1f8b60
Fix apostrophes in a comment.
...
llvm-svn: 52972
2008-07-01 18:12:31 +00:00
Evan Cheng
67ce381ffe
Do not use computationally expensive scheduling heuristics with -fast.
...
llvm-svn: 52971
2008-07-01 18:05:03 +00:00
Devang Patel
1e1f4a0bdd
Add dom info verifier.
...
llvm-svn: 52967
2008-07-01 17:44:24 +00:00
Owen Anderson
fe73cb09c8
Make the subregister hashtable output more readable by wrapping the lines,
...
and mark it const along with the associated changes to TargetRegisterInfo.
llvm-svn: 52966
2008-07-01 17:34:38 +00:00
Owen Anderson
9e88ac84bf
Implement suggestions from Chris:
...
- Use a more accurate heuristic for the size of the hashtable.
- Use bitwise and instead of modulo since the size is a power of two.
- Use new[] instead of malloc().
llvm-svn: 52951
2008-07-01 07:02:30 +00:00
Seo Sanghyeon
0b4c1205fb
Compilation fix
...
llvm-svn: 52950
2008-07-01 05:27:28 +00:00
Owen Anderson
059d64938b
Replace the dynamically computed std::set lookup method for subregisters with a hashtable-based
...
version that is computed by tblgen at the time LLVM is compiled.
llvm-svn: 52945
2008-07-01 00:18:52 +00:00
Dan Gohman
c8097f8c8c
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