oota-llvm.git
16 years agoUse a simpler but equivalent form of RecordSource.
Dan Gohman [Mon, 30 Jun 2008 22:21:03 +0000 (22:21 +0000)]
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

16 years agoAdd timing report for various sub-passes under SelectionDAGISel.
Evan Cheng [Mon, 30 Jun 2008 22:10:09 +0000 (22:10 +0000)]
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

16 years agostd::ostream and std::string microoptimizations for asm printing.
Dan Gohman [Mon, 30 Jun 2008 22:03:41 +0000 (22:03 +0000)]
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

16 years agoMake SmallVector's grow use memcpy in common cases
Dan Gohman [Mon, 30 Jun 2008 21:45:13 +0000 (21:45 +0000)]
Make SmallVector's grow use memcpy in common cases
instead of std::uninitialized_copy, which uses memmove.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52928 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse plain operator new instead of new char[].
Dan Gohman [Mon, 30 Jun 2008 21:33:02 +0000 (21:33 +0000)]
Use plain operator new instead of new char[].

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52927 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse reserve.
Dan Gohman [Mon, 30 Jun 2008 21:04:06 +0000 (21:04 +0000)]
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

16 years agoUpdate comments to new-style syntax.
Dan Gohman [Mon, 30 Jun 2008 21:00:56 +0000 (21:00 +0000)]
Update comments to new-style syntax.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52925 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRename ISD::LOCATION to ISD::DBG_STOPPOINT to better reflect its
Dan Gohman [Mon, 30 Jun 2008 20:59:49 +0000 (20:59 +0000)]
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

16 years agoSplit scheduling from instruction selection.
Evan Cheng [Mon, 30 Jun 2008 20:45:06 +0000 (20:45 +0000)]
Split scheduling from instruction selection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52923 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded some comments and some cleanups.
Ted Kremenek [Mon, 30 Jun 2008 20:41:22 +0000 (20:41 +0000)]
Added some comments and some cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52922 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoNo need to align the stack if there are no stack
Dale Johannesen [Mon, 30 Jun 2008 20:40:16 +0000 (20:40 +0000)]
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

16 years agoRemove unneeded include.
Evan Cheng [Mon, 30 Jun 2008 20:38:22 +0000 (20:38 +0000)]
Remove unneeded include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52920 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReorder the fields in TargetLowering to require less padding.
Dan Gohman [Mon, 30 Jun 2008 20:36:26 +0000 (20:36 +0000)]
Reorder the fields in TargetLowering to require less padding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52919 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoChange bools to 1-bit bitfields to shrink ArgListEntry slightly.
Dan Gohman [Mon, 30 Jun 2008 20:33:57 +0000 (20:33 +0000)]
Change bools to 1-bit bitfields to shrink ArgListEntry slightly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52918 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReplace some std::vectors that showed up in heap profiling with
Dan Gohman [Mon, 30 Jun 2008 20:31:15 +0000 (20:31 +0000)]
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

16 years agoAdd an isReachableFromEntry method.
Owen Anderson [Mon, 30 Jun 2008 20:28:02 +0000 (20:28 +0000)]
Add an isReachableFromEntry method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52916 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCorrect the allocation size for CCState's UsedRegs member, which
Dan Gohman [Mon, 30 Jun 2008 20:25:31 +0000 (20:25 +0000)]
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

16 years agoRename new lto2 tool as lto.
Devang Patel [Mon, 30 Jun 2008 18:15:01 +0000 (18:15 +0000)]
Rename new lto2 tool as lto.
lto2->lto

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52912 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded ImmutableList, a companion ADT to ImmutableSet and ImmutableMap that is used...
Ted Kremenek [Mon, 30 Jun 2008 18:07:38 +0000 (18:07 +0000)]
Added ImmutableList, a companion ADT to ImmutableSet and ImmutableMap that is used to represent a purely functional list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52911 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove old LTO interface.
Devang Patel [Mon, 30 Jun 2008 18:05:29 +0000 (18:05 +0000)]
Remove old LTO interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52910 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove old LTO interface.
Devang Patel [Mon, 30 Jun 2008 18:04:55 +0000 (18:04 +0000)]
Remove old LTO interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52909 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd convenience 'constructors'
Chris Lattner [Mon, 30 Jun 2008 18:02:44 +0000 (18:02 +0000)]
add convenience 'constructors'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52908 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove dominator info printer into tool/opt/GraphPrinters.cpp
Devang Patel [Mon, 30 Jun 2008 17:32:58 +0000 (17:32 +0000)]
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

16 years agoExpungeNode is only needed for new nodes! This
Duncan Sands [Mon, 30 Jun 2008 16:43:45 +0000 (16:43 +0000)]
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

16 years agoSupport for VAARG. As noted in a comment, this is
Duncan Sands [Mon, 30 Jun 2008 13:55:15 +0000 (13:55 +0000)]
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

16 years agoSupport for promoting select_cc operands.
Duncan Sands [Mon, 30 Jun 2008 11:50:11 +0000 (11:50 +0000)]
Support for promoting select_cc operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52895 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd loopVR files.
Cedric Venet [Mon, 30 Jun 2008 10:31:41 +0000 (10:31 +0000)]
Add loopVR files.
Users of VS need to manually force rebuild the X86 projet to use the last version of tablegen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52894 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRevert the SelectionDAG optimization that makes
Duncan Sands [Mon, 30 Jun 2008 10:19:09 +0000 (10:19 +0000)]
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

16 years agoEliminate TargetRegisterDesc::ImmSubRegs. It's no longer in use.
Evan Cheng [Mon, 30 Jun 2008 07:32:56 +0000 (07:32 +0000)]
Eliminate TargetRegisterDesc::ImmSubRegs. It's no longer in use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52892 91177308-0d34-0410-b5e6-96231b3b80d8

16 years ago- Re-apply 52748 and friends with fix. GetConstantStringInfo() returns an empty strin...
Evan Cheng [Mon, 30 Jun 2008 07:31:25 +0000 (07:31 +0000)]
- 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

16 years agocheck in anton's patch to make inlining happen in a determinstic order
Chris Lattner [Mon, 30 Jun 2008 03:02:03 +0000 (03:02 +0000)]
check in anton's patch to make inlining happen in a determinstic order
and fix the bug that it uncovers: inlining a pattern fragment could bring
in other pattern fragments if the inlinee hadn't already been inlined.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52888 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplement split and scalarize for SELECT_CC, fixing PR2504
Chris Lattner [Mon, 30 Jun 2008 02:43:01 +0000 (02:43 +0000)]
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

16 years agoBecause of the laziness, the required passes must exist even after
Nick Lewycky [Mon, 30 Jun 2008 01:04:39 +0000 (01:04 +0000)]
Because of the laziness, the required passes must exist even after
LoopVR::runOnFunction runs.

This should accomplish that, but it doesn't. I think that's a PassManager bug,
but without a consumer of LoopVR in the tree, I can't give steps to reproduce.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52886 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a value range analysis that lazily computes ranges using ScalarEvolutions.
Nick Lewycky [Mon, 30 Jun 2008 00:04:21 +0000 (00:04 +0000)]
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

16 years agoRevert (52748 and friends):
Anton Korobeynikov [Sun, 29 Jun 2008 17:57:03 +0000 (17:57 +0000)]
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

16 years agoStart refactoring of asmprinters: provide a TAI hook, which will select a 'section...
Anton Korobeynikov [Sat, 28 Jun 2008 13:45:57 +0000 (13:45 +0000)]
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

16 years agoUnbreak
Anton Korobeynikov [Sat, 28 Jun 2008 11:10:06 +0000 (11:10 +0000)]
Unbreak

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52866 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTemporary rever invalid commit
Anton Korobeynikov [Sat, 28 Jun 2008 11:09:48 +0000 (11:09 +0000)]
Temporary rever invalid commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52865 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove printing of module-level GVs into dedicated helper
Anton Korobeynikov [Sat, 28 Jun 2008 11:09:32 +0000 (11:09 +0000)]
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

16 years agoUse common naming convention
Anton Korobeynikov [Sat, 28 Jun 2008 11:09:17 +0000 (11:09 +0000)]
Use common naming convention

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52863 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFactor out stuff into helper function
Anton Korobeynikov [Sat, 28 Jun 2008 11:09:01 +0000 (11:09 +0000)]
Factor out stuff into helper function

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52862 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCleanup
Anton Korobeynikov [Sat, 28 Jun 2008 11:08:44 +0000 (11:08 +0000)]
Cleanup

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52861 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove X86SharedAsmPrinter
Anton Korobeynikov [Sat, 28 Jun 2008 11:08:27 +0000 (11:08 +0000)]
Remove X86SharedAsmPrinter

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52860 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agowhitespace cleanup
Anton Korobeynikov [Sat, 28 Jun 2008 11:08:09 +0000 (11:08 +0000)]
whitespace cleanup

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52859 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake intel asmprinter child of generic asmprinter, not x86 shared asm printer. This...
Anton Korobeynikov [Sat, 28 Jun 2008 11:07:54 +0000 (11:07 +0000)]
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

16 years agoCleanup
Anton Korobeynikov [Sat, 28 Jun 2008 11:07:35 +0000 (11:07 +0000)]
Cleanup

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52857 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoWhitespace cleanup
Anton Korobeynikov [Sat, 28 Jun 2008 11:07:18 +0000 (11:07 +0000)]
Whitespace cleanup

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52856 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReally fix the bootstrap failure.
Chris Lattner [Sat, 28 Jun 2008 06:24:50 +0000 (06:24 +0000)]
Really fix the bootstrap failure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52854 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd back the capability to include nul characters in strings with
Chris Lattner [Sat, 28 Jun 2008 05:33:32 +0000 (05:33 +0000)]
Add back the capability to include nul characters in strings with
GetConstantStringInfo.  This will hopefully restore llvm-gcc to
happy bootstrap land.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52851 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTighten up checking.
Chris Lattner [Sat, 28 Jun 2008 04:37:04 +0000 (04:37 +0000)]
Tighten up checking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52850 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoWhen folding a bitcast into a load or store, preserve the alignment
Dan Gohman [Sat, 28 Jun 2008 00:45:22 +0000 (00:45 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52849 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix GetMainExecutable. Patch by Sam Bishop.
Seo Sanghyeon [Fri, 27 Jun 2008 22:55:30 +0000 (22:55 +0000)]
Fix GetMainExecutable. Patch by Sam Bishop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52847 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoLooks like this condition is inverted.
Evan Cheng [Fri, 27 Jun 2008 22:11:49 +0000 (22:11 +0000)]
Looks like this condition is inverted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52841 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a NextPowerOf2 function to calculate the next power of two greater than a given...
Owen Anderson [Fri, 27 Jun 2008 21:48:21 +0000 (21:48 +0000)]
Add a NextPowerOf2 function to calculate the next power of two greater than a given integer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52839 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoimplement some fixme's by making "autorenaming" in the value symbol table not
Chris Lattner [Fri, 27 Jun 2008 21:26:26 +0000 (21:26 +0000)]
implement some fixme's by making "autorenaming" in the value symbol table not
thrash the heap with string stuff (e.g. utostr).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52838 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosimplify some code to avoid string thrashing.
Chris Lattner [Fri, 27 Jun 2008 21:25:24 +0000 (21:25 +0000)]
simplify some code to avoid string thrashing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52837 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse StringSet instead of std::set<std::string>
Anton Korobeynikov [Fri, 27 Jun 2008 21:22:49 +0000 (21:22 +0000)]
Use StringSet instead of std::set<std::string>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52836 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd a helper.
Chris Lattner [Fri, 27 Jun 2008 21:15:25 +0000 (21:15 +0000)]
add a helper.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52835 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a new version of Module::getFunction that takes a const char* instead
Chris Lattner [Fri, 27 Jun 2008 21:09:10 +0000 (21:09 +0000)]
Add a new version of Module::getFunction that takes a const char* instead
of a std::string.  This avoids copying the string to the heap in common
cases.  Patch by Pratik Solanki!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52834 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTweak IRBuilder to explicitly call the setName(const char*) method on Value
Chris Lattner [Fri, 27 Jun 2008 18:49:21 +0000 (18:49 +0000)]
Tweak IRBuilder to explicitly call the setName(const char*) method on Value
instead of passing the name into the instruction ctors.  Since most
instruction ctors take their name as an std::string, this avoids copying the
string to the heap and a malloc and free.

Patch by Pratik Solanki!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52832 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd an include file needed for VS.
Cedric Venet [Fri, 27 Jun 2008 18:00:09 +0000 (18:00 +0000)]
Add an include file needed for VS.
Add two new file to codegen project (VS).
This unbreak the build for VS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52831 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd dominator info printer pass.
Devang Patel [Fri, 27 Jun 2008 16:43:21 +0000 (16:43 +0000)]
Add dominator info printer pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52829 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoProvide correct encoding for PPC LWARX instructions.
Anton Korobeynikov [Fri, 27 Jun 2008 16:10:20 +0000 (16:10 +0000)]
Provide correct encoding for PPC LWARX instructions.
Patch by Gary Benson!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52828 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSince we are using GCC to assemble the program, make sure the assembly syntax is...
Argyrios Kyrtzidis [Fri, 27 Jun 2008 15:08:59 +0000 (15:08 +0000)]
Since we are using GCC to assemble the program, make sure the assembly syntax is AT&T.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52827 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRegression test for PR2443.
Duncan Sands [Fri, 27 Jun 2008 14:22:20 +0000 (14:22 +0000)]
Regression test for PR2443.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52826 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse the c modifier to tell llvm-ar not to issue a
Duncan Sands [Fri, 27 Jun 2008 10:52:12 +0000 (10:52 +0000)]
Use the c modifier to tell llvm-ar not to issue a
warning when creating the archive (the warning
causes the test to fail).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52824 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReduce number of times .size() is called on a vector. Rename some variables to
Bill Wendling [Fri, 27 Jun 2008 07:13:44 +0000 (07:13 +0000)]
Reduce number of times .size() is called on a vector. Rename some variables to
match normal naming scheme.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52820 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse a SmallSet when we can to reduce memory allocations.
Owen Anderson [Fri, 27 Jun 2008 07:05:59 +0000 (07:05 +0000)]
Use a SmallSet when we can to reduce memory allocations.
This speeds up a particular testcase from 0.0302s to 0.0222s in LiveVariables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52819 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCache subregister relationships in a set in TargetRegisterInfo to allow faster lookups.
Owen Anderson [Fri, 27 Jun 2008 06:56:04 +0000 (06:56 +0000)]
Cache subregister relationships in a set in TargetRegisterInfo to allow faster lookups.
This speeds up LiveVariables from 0.6279s to 0.6165s on kimwitu++.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52818 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofix the regressions from Eric's patch by making GetConstantStringInfo
Chris Lattner [Fri, 27 Jun 2008 03:36:51 +0000 (03:36 +0000)]
fix the regressions from Eric's patch by making GetConstantStringInfo
tolerate a non-nul-terminated string, and handling a direct global
reference.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52813 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosimplify this check, GetConstantStringInfo validates that a
Chris Lattner [Fri, 27 Jun 2008 03:18:41 +0000 (03:18 +0000)]
simplify this check, GetConstantStringInfo validates that a
global is constant already.  No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52812 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agotest doesn't need eh info
Chris Lattner [Fri, 27 Jun 2008 03:14:20 +0000 (03:14 +0000)]
test doesn't need eh info

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52811 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agowhen linking globals, make sure to preserve the address space of the global.
Chris Lattner [Fri, 27 Jun 2008 03:10:24 +0000 (03:10 +0000)]
when linking globals, make sure to preserve the address space of the global.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52810 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMore cruft from revert...
Bill Wendling [Fri, 27 Jun 2008 01:37:37 +0000 (01:37 +0000)]
More cruft from revert...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52809 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCruft left from patch revert...sorry. :-(
Bill Wendling [Fri, 27 Jun 2008 01:32:08 +0000 (01:32 +0000)]
Cruft left from patch revert...sorry. :-(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52808 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReverting broken patch r52803.
Bill Wendling [Fri, 27 Jun 2008 01:27:56 +0000 (01:27 +0000)]
Reverting broken patch r52803.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52806 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDon't perform expensive queries checking for super and sub registers when we know...
Owen Anderson [Fri, 27 Jun 2008 01:22:50 +0000 (01:22 +0000)]
Don't perform expensive queries checking for super and sub registers when we know that there aren't any.
This speed up LiveVariables on instcombine at -O0 -g from 0.3855s to 0.3503s.  Look for more improvements in this area soon!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52804 91177308-0d34-0410-b5e6-96231b3b80d8

16 years ago- Remove a use of std::vector.
Bill Wendling [Fri, 27 Jun 2008 00:56:36 +0000 (00:56 +0000)]
- Remove a use of std::vector.
- Make sure that we're not recalculating the size of a vector
  that never changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52803 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRefactor the DebugInfoDesc stuff out of the MachineModuleInfo file. Clean up
Bill Wendling [Fri, 27 Jun 2008 00:09:40 +0000 (00:09 +0000)]
Refactor the DebugInfoDesc stuff out of the MachineModuleInfo file. Clean up
some uses of std::vector, where it's return std::vector by value. Yuck!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52800 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a note for Thunderbird users to the Developer Policy.
Gordon Henriksen [Thu, 26 Jun 2008 22:58:37 +0000 (22:58 +0000)]
Add a note for Thunderbird users to the Developer Policy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52797 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoallow updating the MPM, so that you can use one FunctionPAssManager with
Chris Lattner [Thu, 26 Jun 2008 22:26:45 +0000 (22:26 +0000)]
allow updating the MPM, so that you can use one FunctionPAssManager with
multiple ModuleProviders, e.g. with the JIT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52796 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoXFAIL for now.
Evan Cheng [Thu, 26 Jun 2008 22:09:29 +0000 (22:09 +0000)]
XFAIL for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52795 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove warnings about shadowed and unused variables.
Bill Wendling [Thu, 26 Jun 2008 18:11:45 +0000 (18:11 +0000)]
Remove warnings about shadowed and unused variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52791 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate VS project files. The clang executable now depends on the LLVM Analysis library.
Ted Kremenek [Thu, 26 Jun 2008 17:53:12 +0000 (17:53 +0000)]
Update VS project files.  The clang executable now depends on the LLVM Analysis library.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52789 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse a DenseMap instead of an std::map for mangled name lookup. This is
Owen Anderson [Thu, 26 Jun 2008 17:20:16 +0000 (17:20 +0000)]
Use a DenseMap instead of an std::map for mangled name lookup.  This is
improves AsmPrinter runtime on instcombine from 0.3920s to 0.3836s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52787 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoduncan points out that isOperationLegal includes a check for
Chris Lattner [Thu, 26 Jun 2008 17:16:00 +0000 (17:16 +0000)]
duncan points out that isOperationLegal includes a check for
type legality.  Thanks Duncan!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52786 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDon't create a whole new string just to copy the elements into it.
Owen Anderson [Thu, 26 Jun 2008 17:06:02 +0000 (17:06 +0000)]
Don't create a whole new string just to copy the elements into it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52785 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse the -enable-pre flag so this test doesn't fail.
Owen Anderson [Thu, 26 Jun 2008 17:03:28 +0000 (17:03 +0000)]
Use the -enable-pre flag so this test doesn't fail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52784 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake LLVM compile on DragonFly BSD (PR2499).
Matthijs Kooijman [Thu, 26 Jun 2008 10:36:58 +0000 (10:36 +0000)]
Make LLVM compile on DragonFly BSD (PR2499).

Patch by Hasso Tepper!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52781 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd missing semicolumn in my last commit.
Matthijs Kooijman [Thu, 26 Jun 2008 09:49:38 +0000 (09:49 +0000)]
Add missing semicolumn in my last commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52780 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImprove comments wrt createInternalize.
Matthijs Kooijman [Thu, 26 Jun 2008 09:48:11 +0000 (09:48 +0000)]
Improve comments wrt createInternalize.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52779 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCleanup for unitialized types. Patch by Jean-Daniel Dupas!
Bill Wendling [Thu, 26 Jun 2008 08:32:05 +0000 (08:32 +0000)]
Cleanup for unitialized types. Patch by Jean-Daniel Dupas!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52775 91177308-0d34-0410-b5e6-96231b3b80d8

16 years ago"An improved Mach-O file type detection for sys::IdentifyFileType()
Chris Lattner [Thu, 26 Jun 2008 05:17:18 +0000 (05:17 +0000)]
"An improved Mach-O file type detection for sys::IdentifyFileType()
This patch add supports for single architecture mach-o files (the current implementation only support Universal Binary), and solve the signature conflict between java class and Universal Binary magics.

Note that this function will always returned dynamic library for Universal Binaries (like the current implementation) because the binary type is not include in the file header."

Patch by Jean-Daniel Dupas!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52766 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReserve the size we'll need in advance.
Owen Anderson [Thu, 26 Jun 2008 04:47:41 +0000 (04:47 +0000)]
Reserve the size we'll need in advance.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52763 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAllow for rounding up of stack frame.
Dale Johannesen [Thu, 26 Jun 2008 01:55:32 +0000 (01:55 +0000)]
Allow for rounding up of stack frame.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52751 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixes the last x86-64 test failure in compat.exp:
Dale Johannesen [Thu, 26 Jun 2008 01:51:13 +0000 (01:51 +0000)]
Fixes the last x86-64 test failure in compat.exp:
<16 x float> is 64-byte aligned (for some reason),
which gets us into the stack realignment code.  The
computation changing FP-relative offsets to SP-relative
was broken, assiging a spill temp to a location
also used for parameter passing.  This
fixes it by rounding up the stack frame to a multiple
of the largest alignment (I concluded it wasn't fixable
without doing this, but I'm not very sure.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52750 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove unused function.
Eric Christopher [Thu, 26 Jun 2008 01:19:35 +0000 (01:19 +0000)]
Remove unused function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52749 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove GetConstantStringInfo to lib/Analysis. Remove
Eric Christopher [Thu, 26 Jun 2008 00:31:12 +0000 (00:31 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52748 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agowhen we know the signbit of an input to uint_to_fp is zero,
Chris Lattner [Thu, 26 Jun 2008 00:16:49 +0000 (00:16 +0000)]
when we know the signbit of an input to uint_to_fp is zero,
change it to sint_to_fp on targets where that is cheaper (and
visaversa of course).  This allows us to compile uint_to_fp to:

_test:
movl 4(%esp), %eax
shrl $23, %eax
cvtsi2ss %eax, %xmm0
movl 8(%esp), %eax
movss %xmm0, (%eax)
ret

instead of:

.align 3
LCPI1_0: ##  double
.long 0 ## double least significant word 4.5036e+15
.long 1127219200 ## double most significant word 4.5036e+15
.text
.align 4,0x90
.globl _test
_test:
subl $12, %esp
movl 16(%esp), %eax
shrl $23, %eax
movl %eax, (%esp)
movl $1127219200, 4(%esp)
movsd (%esp), %xmm0
subsd LCPI1_0, %xmm0
cvtsd2ss %xmm0, %xmm0
movl 20(%esp), %eax
movss %xmm0, (%eax)
addl $12, %esp
ret

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52747 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemember which MachineOperand we were processing, so we don't have to scan the list...
Owen Anderson [Wed, 25 Jun 2008 23:39:39 +0000 (23:39 +0000)]
Remember which MachineOperand we were processing, so we don't have to scan the list to find it again later.
This speeds up live intervals from 0.37s to 0.30s on instcombine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52745 91177308-0d34-0410-b5e6-96231b3b80d8