Commit Graph

23610 Commits

Author SHA1 Message Date
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
Anton Korobeynikov 76b8828c25 Factor out stuff into helper function
llvm-svn: 52862
2008-06-28 11:09:01 +00:00
Anton Korobeynikov 7d345eb4b1 Cleanup
llvm-svn: 52861
2008-06-28 11:08:44 +00:00
Anton Korobeynikov 016d1d0470 Remove X86SharedAsmPrinter
llvm-svn: 52860
2008-06-28 11:08:27 +00:00
Anton Korobeynikov 5643cb7ecc whitespace cleanup
llvm-svn: 52859
2008-06-28 11:08:09 +00:00
Anton Korobeynikov 4e9dfe8391 Make intel asmprinter child of generic asmprinter, not x86 shared asm printer. This leads to some code duplication, which will be resolved later.
llvm-svn: 52858
2008-06-28 11:07:54 +00:00
Anton Korobeynikov bc7cce6b74 Cleanup
llvm-svn: 52857
2008-06-28 11:07:35 +00:00
Anton Korobeynikov 44e99f47ad Whitespace cleanup
llvm-svn: 52856
2008-06-28 11:07:18 +00:00
Chris Lattner 3cffa471d9 Really fix the bootstrap failure.
llvm-svn: 52854
2008-06-28 06:24:50 +00:00
Chris Lattner 1701328675 Add back the capability to include nul characters in strings with
GetConstantStringInfo.  This will hopefully restore llvm-gcc to 
happy bootstrap land.

llvm-svn: 52851
2008-06-28 05:33:32 +00:00
Chris Lattner ebf1f67193 Tighten up checking.
llvm-svn: 52850
2008-06-28 04:37:04 +00:00
Dan Gohman 6f7b5a6392 When folding a bitcast into a load or store, preserve the alignment
information of the original load or store, which is checked to be
at least as good, and possibly better.

llvm-svn: 52849
2008-06-28 00:45:22 +00:00
Seo Sanghyeon 8f7291387f Fix GetMainExecutable. Patch by Sam Bishop.
llvm-svn: 52847
2008-06-27 22:55:30 +00:00
Evan Cheng 9a357637ef Looks like this condition is inverted.
llvm-svn: 52841
2008-06-27 22:11:49 +00:00
Chris Lattner 36b4e8f2fe implement some fixme's by making "autorenaming" in the value symbol table not
thrash the heap with string stuff (e.g. utostr).

llvm-svn: 52838
2008-06-27 21:26:26 +00:00