Commit Graph

23624 Commits

Author SHA1 Message Date
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
Devang Patel 99ad4ba227 Disable dom info verifier by default.
llvm-svn: 52983
2008-07-01 21:36:11 +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
Bill Wendling c362465dad Remove warning about initialization order.
llvm-svn: 52980
2008-07-01 21:00:31 +00:00
Devang Patel 67c79a4992 Fix typos in comments.
Thanks for the feedback!

llvm-svn: 52978
2008-07-01 19:50:56 +00:00
Dan Gohman e61e120c17 Prune a few dependencies on MachineFunction.h.
llvm-svn: 52976
2008-07-01 18:15:35 +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
Devang Patel 9dbe4d15ec Add dom info verifier.
llvm-svn: 52967
2008-07-01 17:44:24 +00:00
Owen Anderson 3684013910 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
Duncan Sands b55e5ece96 Highlight that getMergeValues optimization is
being suppressed here.

llvm-svn: 52952
2008-07-01 08:00:49 +00:00
Owen Anderson 2a3a1127e2 Properly handle cases where a predecessor of the block being queried on is unreachable.
This fixes PR2503, though we should also fix other passes not to emit this kind of code.

llvm-svn: 52946
2008-07-01 00:40:58 +00:00
Owen Anderson 49cce257ae 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 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 9cedf2b7c6 Don't use ISD namespace opcodes for MachineInstrs.
llvm-svn: 52932
2008-06-30 22:23:08 +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 4246cf8eea Update comments to new-style syntax.
llvm-svn: 52925
2008-06-30 21:00:56 +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
Devang Patel 81ea3bb55c Move dominator info printer into tool/opt/GraphPrinters.cpp
llvm-svn: 52907
2008-06-30 17:32:58 +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
Duncan Sands 1ae6ef83ee Revert the SelectionDAG optimization that makes
it impossible to create a MERGE_VALUES node with
only one result: sometimes it is useful to be able
to create a node with only one result out of one of
the results of a node with more than one result, for
example because the new node will eventually be used
to replace a one-result node using ReplaceAllUsesWith,
cf X86TargetLowering::ExpandFP_TO_SINT.  On the other
hand, most users of MERGE_VALUES don't need this and
for them the optimization was valuable.  So add a new
utility method getMergeValues for creating MERGE_VALUES
nodes which by default performs the optimization.
Change almost everywhere to use getMergeValues (and
tidy some stuff up at the same time).

llvm-svn: 52893
2008-06-30 10:19:09 +00:00
Evan Cheng da3db11db3 - Re-apply 52748 and friends with fix. GetConstantStringInfo() returns an empty string for ConstantAggregateZero case which surprises selectiondag.
- Correctly handle memcpy from constant string which is zero-initialized.

llvm-svn: 52891
2008-06-30 07:31:25 +00:00
Chris Lattner 9d3740ed1c Implement split and scalarize for SELECT_CC, fixing PR2504
llvm-svn: 52887
2008-06-30 02:43:01 +00:00
Nick Lewycky 48b1fd74dc Add a value range analysis that lazily computes ranges using ScalarEvolutions.
llvm-svn: 52885
2008-06-30 00:04:21 +00:00
Anton Korobeynikov a7c583d584 Revert (52748 and friends):
Move GetConstantStringInfo to lib/Analysis. Remove
string output routine from Constant. Update all
callers. Change debug intrinsic api slightly to
accomodate move of routine, these now return values
instead of strings.

This unbreaks llvm-gcc bootstrap.

llvm-svn: 52884
2008-06-29 17:57:03 +00:00
Anton Korobeynikov 2e052a81fd Start refactoring of asmprinters: provide a TAI hook, which will select a 'section kind' for a global.
llvm-svn: 52868
2008-06-28 13:45:57 +00:00
Anton Korobeynikov 3c21b05225 Unbreak
llvm-svn: 52866
2008-06-28 11:10:06 +00:00
Anton Korobeynikov a54216acf3 Temporary rever invalid commit
llvm-svn: 52865
2008-06-28 11:09:48 +00:00
Anton Korobeynikov ab9ff5a44f Move printing of module-level GVs into dedicated helper
llvm-svn: 52864
2008-06-28 11:09:32 +00:00
Anton Korobeynikov 9c53d0f0df Use common naming convention
llvm-svn: 52863
2008-06-28 11:09:17 +00:00