Commit Graph

23703 Commits

Author SHA1 Message Date
Owen Anderson
25995093e7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52981 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-01 21:16:27 +00:00
Bill Wendling
836ba9d7e7 Remove warning about initialization order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52980 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-01 21:00:31 +00:00
Devang Patel
844a3d163b Fix typos in comments.
Thanks for the feedback!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52978 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-01 19:50:56 +00:00
Dan Gohman
2dad0250f6 Prune a few dependencies on MachineFunction.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52976 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-01 18:15:35 +00:00
Evan Cheng
f1a792bc59 Do run ComputeLiveOutVRegInfo with -fast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52975 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-01 18:15:04 +00:00
Evan Cheng
4576f6d7a9 Do not use computationally expensive scheduling heuristics with -fast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52971 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-01 18:05:03 +00:00
Evan Cheng
ebffb660a6 Apply Chris' suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52970 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-01 17:59:20 +00:00
Devang Patel
5b57e720c8 Add dom info verifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52967 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-01 17:44:24 +00:00
Owen Anderson
605041e5a8 Make the subregister hashtable output more readable by wrapping the lines,
and mark it const along with the associated changes to TargetRegisterInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52966 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-01 17:34:38 +00:00
Duncan Sands
d9ad8abc8e Highlight that getMergeValues optimization is
being suppressed here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52952 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-01 08:00:49 +00:00
Owen Anderson
c4b871c650 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52946 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-01 00:40:58 +00:00
Owen Anderson
f4f9c4f1cf 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52945 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-01 00:18:52 +00:00
Dan Gohman
528bc02877 Minimize duplicated code in AsmPrinter::printLabel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52944 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-01 00:16:26 +00:00
Dan Gohman
4406604047 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52943 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-01 00:05:16 +00:00
Evan Cheng
ee4dc16d75 Suppress compiler warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52934 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 22:33:56 +00:00
Evan Cheng
9ef4c5302e Don't run stack slot coloring if -fast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52933 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 22:33:16 +00:00
Dan Gohman
cbe615f7eb Don't use ISD namespace opcodes for MachineInstrs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52932 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 22:23:08 +00:00
Dan Gohman
99fe47bc81 Use a simpler but equivalent form of RecordSource.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52931 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 22:21:03 +00:00
Evan Cheng
f667480d84 Add timing report for various sub-passes under SelectionDAGISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52930 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 22:10:09 +00:00
Dan Gohman
d19a53ba1d std::ostream and std::string microoptimizations for asm printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52929 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 22:03:41 +00:00
Dan Gohman
cf8462f300 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52926 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 21:04:06 +00:00
Dan Gohman
87060f55f2 Update comments to new-style syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52925 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 21:00:56 +00:00
Dan Gohman
7f460203b0 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52924 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 20:59:49 +00:00
Evan Cheng
db8d56b825 Split scheduling from instruction selection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52923 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 20:45:06 +00:00
Dale Johannesen
edec8d89df No need to align the stack if there are no stack
objects.  Fixes a couple of tests on Linux.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52921 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 20:40:16 +00:00
Evan Cheng
fdb99838a3 Remove unneeded include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52920 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 20:38:22 +00:00
Dan Gohman
a44b674a42 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52917 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 20:31:15 +00:00
Dan Gohman
117b64b3f8 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52915 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 20:25:31 +00:00
Devang Patel
687e03b2fa Move dominator info printer into tool/opt/GraphPrinters.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52907 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 17:32:58 +00:00
Duncan Sands
6f7e1cddf6 ExpungeNode is only needed for new nodes! This
fixes CodeGen/PowerPC/2008-06-19-LegalizerCrash.ll
when using the new LegalizeTypes infrastructure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52903 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 16:43:45 +00:00
Duncan Sands
d3ca9fc998 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52898 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 13:55:15 +00:00
Duncan Sands
7fc8ab81f5 Support for promoting select_cc operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52895 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 11:50:11 +00:00
Duncan Sands
f9516208e5 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52893 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 10:19:09 +00:00
Evan Cheng
0ff39b3feb - 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52891 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 07:31:25 +00:00
Chris Lattner
80c1a5622a Implement split and scalarize for SELECT_CC, fixing PR2504
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52887 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 02:43:01 +00:00
Nick Lewycky
a11e2eb845 Add a value range analysis that lazily computes ranges using ScalarEvolutions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52885 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 00:04:21 +00:00
Anton Korobeynikov
6d116bc7ce 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52884 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-29 17:57:03 +00:00
Anton Korobeynikov
28a2b54580 Start refactoring of asmprinters: provide a TAI hook, which will select a 'section kind' for a global.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52868 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-28 13:45:57 +00:00
Anton Korobeynikov
4d580651b3 Unbreak
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52866 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-28 11:10:06 +00:00
Anton Korobeynikov
f0302cd1ae Temporary rever invalid commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52865 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-28 11:09:48 +00:00
Anton Korobeynikov
e51ab444f4 Move printing of module-level GVs into dedicated helper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52864 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-28 11:09:32 +00:00
Anton Korobeynikov
31f98154a7 Use common naming convention
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52863 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-28 11:09:17 +00:00
Anton Korobeynikov
1ecf0eedc4 Factor out stuff into helper function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52862 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-28 11:09:01 +00:00
Anton Korobeynikov
36a5701ad7 Cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52861 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-28 11:08:44 +00:00
Anton Korobeynikov
75b6882d3c Remove X86SharedAsmPrinter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52860 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-28 11:08:27 +00:00
Anton Korobeynikov
9136438b08 whitespace cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52859 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-28 11:08:09 +00:00
Anton Korobeynikov
1c4b5eaa46 Make intel asmprinter child of generic asmprinter, not x86 shared asm printer. This leads to some code duplication, which will be resolved later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52858 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-28 11:07:54 +00:00
Anton Korobeynikov
271329af24 Cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52857 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-28 11:07:35 +00:00
Anton Korobeynikov
b131b44443 Whitespace cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52856 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-28 11:07:18 +00:00
Chris Lattner
03a5707955 Really fix the bootstrap failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52854 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-28 06:24:50 +00:00