Commit Graph

33269 Commits

Author SHA1 Message Date
Owen Anderson
68cb52e468 Use cached information that has already been computed to make clean() simpler and faster. This is a small speedup on most cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37761 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 17:38:29 +00:00
Evan Cheng
5e4f292e53 One additional field in TargetRegisterDesc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37760 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 17:09:34 +00:00
Owen Anderson
7b317d2f59 Fold a lot of code into two cases: binary instructions and ternary instructions.
This saves many lines of code duplication.  No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37759 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 17:03:03 +00:00
Dan Gohman
6595cb3000 Rename ("shrinkify") MVT::isExtendedValueType to MVT::isExtendedVT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37758 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 16:08:04 +00:00
Dan Gohman
c56b9e9f55 Document the encoding of MVT::ValueType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37757 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 15:28:26 +00:00
Dan Gohman
6445f61806 Remove a redundant newline in the asm output for ELF .rodata sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37756 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 15:09:47 +00:00
Dan Gohman
8c8c5fcbd7 Use getVectorTypeBreakdown in FunctionLoweringInfo::CreateRegForValue
to compute the number and type of registers needed for vector values
instead of computing it manually. This fixes PR1529.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37755 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 14:34:07 +00:00
Dan Gohman
0ce4b8eda3 Allow DOUT to be used outside of the llvm namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37753 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 14:09:38 +00:00
Dan Gohman
89b20c07e9 Make the comment for ScalarizeVectorOp mention that it is only for use
with single-element vectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37752 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 14:06:22 +00:00
Zhou Sheng
0d7d3656f3 Fix a bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37751 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 09:50:26 +00:00
Duraid Madina
df82c93f2a ok, this is something of a dirty hack, but it seems to work. (fixes e.g.
the SPASS miscompilation)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37750 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 09:01:14 +00:00
Duraid Madina
b2efabd571 ok, this much doesn't seem to bork anything
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37749 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 08:31:07 +00:00
Duraid Madina
4e378c6504 revert evan's fixes (and my doofusness) since they had a huge code
quality hit. will look at this soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37748 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 08:11:59 +00:00
Duraid Madina
669f7382be pull evan's fixes - should help the nightly tester (but there are still
some issues)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37747 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 07:07:13 +00:00
Evan Cheng
041040717d Replace std::set with SmallPtrSet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37746 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 05:23:00 +00:00
Owen Anderson
62cf8babdb Add support for performing GVNPRE on the three vector-specific operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37745 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 04:10:46 +00:00
Owen Anderson
cc389e016c Add tests for performing GVNPRE on the three vector-specific instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37744 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 04:06:32 +00:00
Evan Cheng
75611fb4e6 Fix an obvious bug. Old code only worked for the entry block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37743 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 01:16:36 +00:00
Owen Anderson
6032a5ba64 1. Correct some comments and clean up some dead code.
2. When calculating ANTIC_IN, only iterate the changed blocks.  For most average
inputs this is a small speedup, but for cases with unusual CFGs, this can be a significant win.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37742 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 23:29:41 +00:00
Evan Cheng
c33aa47130 Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37741 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 21:19:07 +00:00
Evan Cheng
7ac19afbb1 Correctly handle implcit def / use operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37740 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 21:05:13 +00:00
Evan Cheng
4efe74129f Properly handle kills of a physical register which has sub-registers that are read by later instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37739 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 21:03:35 +00:00
Evan Cheng
c4f2fe0694 Add immediate sub-registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37738 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 20:59:16 +00:00
Evan Cheng
e2446c6076 Silence a warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37737 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 18:31:22 +00:00
Reid Spencer
c9a15d5091 Update for Subversion conversion:
1. Fix comments for -usesvn and -svnurl options.
2. Fix default URL for SVN access.
3. Fix paths to accommodate "trunk" when checking out from SVN.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37736 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 17:08:16 +00:00
Dan Gohman
4d2a0f5bd6 Replace ?: with if statements, for clarity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37735 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 16:19:08 +00:00
Dan Gohman
25aceacb29 Simplify the expression for MVT::isExtendedValueType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37733 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 15:20:04 +00:00
Dan Gohman
71d7794856 Simplify the expression for TargetLowering::isTypeLegal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37732 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 15:16:27 +00:00
Dan Gohman
acaf32e236 Use utostr from StringExtras.h instead of ostringstream from <sstream>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37731 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 15:14:48 +00:00
Dan Gohman
798cb2ab82 Renumber the SimpleValueType values to fill in the hole left by
removing MVT::Vector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37730 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 14:28:59 +00:00
Dan Gohman
d45eddd214 Revert the earlier change that removed the M_REMATERIALIZABLE machine
instruction flag, and use the flag along with a virtual member function
hook for targets to override if there are instructions that are only
trivially rematerializable with specific operands (i.e. constant pool
loads).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37728 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 00:48:07 +00:00
Dan Gohman
9a0930dbd9 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37727 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 00:43:18 +00:00
Dan Gohman
bc9d89e6a2 Add a convenince member function for appending strings to a module's
module-level asm string data.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37726 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 00:38:49 +00:00
Duraid Madina
837a600a90 tidy this file up a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37725 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 00:21:58 +00:00
Duraid Madina
2e0930cf37 A bunch of fixes to the BigBlock allocator improve compile-time by ~20%
and code quality by ~2% on my tests.

A big thank you to Roman Levenstein for this patch! See
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070618/050717.html
for more details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37724 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-25 23:46:54 +00:00
Chris Lattner
ba6801e6e7 fix Transforms/Inline/2007-06-25-WeakInline.ll by not inlining functions
with weak linkage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37723 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-25 21:50:09 +00:00
Chris Lattner
4939debe2a new testcase, the inliner shouldn't inline this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37722 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-25 21:49:53 +00:00
Owen Anderson
9030d384c4 Use the built-in postorder iterators rather than computing a postorder walk by hand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37721 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-25 18:25:31 +00:00
Reid Spencer
c38adbb846 Fix PR1525:
Use a better determinator for identifying constant array initializers that
are or are not zero terminated and generate code appropriately.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37720 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-25 16:45:54 +00:00
Dan Gohman
7f32156bb9 Generalize MVT::ValueType and associated functions to be able to represent
extended vector types. Remove the special SDNode opcodes used for pre-legalize
vector operations, and the special MVT::Vector type used with them. Adjust
lowering and legalize to work with the normal SDNode kinds instead, and to
use the normal MVT functions to work with vector types instead of using the
two special operands that the pre-legalize nodes held.

This allows pre-legalize and post-legalize DAGs, and the code that operates
on them, to be more consistent. Pre-legalize vector operators can be handled
more consistently with scalar operators. And, -view-dag-combine1-dags and
-view-legalize-dags now look prettier for vector code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37719 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-25 16:23:39 +00:00
Dan Gohman
32791e06d8 Make minor adjustments to whitespace and comments to reduce differences
between SSE1 instructions and their respective SSE2 analogues.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37718 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-25 15:44:19 +00:00
Dan Gohman
01976307d2 Fix loadv2i32 to be loadv4i32, though it isn't actually used anywhere yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37717 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-25 15:19:03 +00:00
Dan Gohman
8bc49c2fe7 Say AT&T instead of Intel in the comments for AT&T support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37716 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-25 15:11:25 +00:00
Anton Korobeynikov
5248896635 Provide hook for alloca on VCPP. Patch by Scott Graham
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37715 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-25 07:12:14 +00:00
Owen Anderson
f62c44a38d 1) Fix an issue with non-deterministic iteration order in phi_translate
2) Remove some maximal-set computing code that is no longer used.
3) Use a post-order CFG traversal to compute ANTIC_IN instead of a postdom traversal.
This causes the ANTIC_IN calculation to converge much faster.  Thanks to Daniel Berlin for suggesting this.

With this patch, the time to optimize 403.gcc decreased from 17.5s to 7.5s, and Anton's huge
testcase decreased from 62 minutes to 38 seconds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37714 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-25 05:41:12 +00:00
Nick Lewycky
4390feb7ae Fix value ranges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37713 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-24 20:14:22 +00:00
Owen Anderson
79a6370133 Fix a silly mistake that was causing failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37712 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-24 08:42:24 +00:00
Owen Anderson
f107befaf1 Rename variables to expose the fact that this test is failing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37711 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-24 08:17:41 +00:00
Nick Lewycky
dea252689d Remove tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37710 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-24 04:40:16 +00:00
Nick Lewycky
984504b912 Remove use of ETForest. Also cleaned up issues around unreachable basic
blocks, and optimizing within one basic block.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37709 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-24 04:36:20 +00:00