Evan Cheng
22957164aa
Change CalculateHeights and CalculateDepths to be non-recursive.
...
llvm-svn: 37934
2007-07-06 01:37:28 +00:00
Dan Gohman
cd6f6a0a58
Make the debug string for ISD::MERGE_VALUES consistent with the others.
...
llvm-svn: 37922
2007-07-05 20:15:43 +00:00
Dan Gohman
90c6b87b31
Add a parameter to getCopyToParts and getCopyFromParts to specify whether
...
endian swapping should be done, and update the code to use it. This fixes
some register ordering issues on big-endian systems, such as PowerPC,
introduced by the recent illegal by-val arguments changes.
llvm-svn: 37921
2007-07-05 20:12:34 +00:00
Gabor Greif
5f705671e4
Here is the bulk of the sanitizing.
...
Almost all occurrences of "bytecode" in the sources have been eliminated.
llvm-svn: 37913
2007-07-05 17:07:56 +00:00
Duncan Sands
eca2fa295b
Make sure only one copy of a filter is placed in the
...
exception handling table if we encounter it multiple
times. Filters could be folded harder than this, but
that would mean a lot more work for not much gain.
llvm-svn: 37908
2007-07-05 15:15:01 +00:00
Evan Cheng
0c037f4ee0
Better assertion messages.
...
llvm-svn: 37890
2007-07-05 07:05:38 +00:00
Duncan Sands
4441eff1ac
Extend eh.selector to support both catches and filters.
...
Drop the eh.filter intrinsic.
llvm-svn: 37875
2007-07-04 20:52:51 +00:00
Dan Gohman
d2d18267e6
Fix several over-aggressive folds for undef nodes in dagcombine, to
...
follow the rules for undef used in instcombine.
llvm-svn: 37851
2007-07-03 14:03:57 +00:00
Dale Johannesen
7af19491d3
Fix for PR 1505 (and 1489). Rewrite X87 register
...
model to include f32 variants. Some factoring
improvments forthcoming.
llvm-svn: 37847
2007-07-03 00:53:03 +00:00
Dan Gohman
68f0cbccfb
Replace ExpandScalarFormalArgs and ExpandScalarCallArgs with the newly
...
refactored getCopyFromParts and getCopyToParts, which are more general.
This effectively adds support for lowering illegal by-val vector call
arguments.
llvm-svn: 37843
2007-07-02 16:18:06 +00:00
Dan Gohman
5fe8266d04
Teach GetNegatedExpression to negate 0-B to B in UnsafeFPMath mode, and
...
visitFSUB to fold 0-B to -B in UnsafeFPMath mode. Also change visitFNEG
to use isNegatibleForFree/GetNegatedExpression instead of doing a subset
of the same thing manually.
This fixes test/CodeGen/X86/negative-sin.ll.
llvm-svn: 37842
2007-07-02 15:48:56 +00:00
Evan Cheng
a1a06d1763
Only do FNEG xform when the vector type is a floating point type.
...
llvm-svn: 37818
2007-06-29 21:44:35 +00:00
David Greene
75e58e2207
Remove unused variables.
...
llvm-svn: 37816
2007-06-29 21:42:03 +00:00
Evan Cheng
a6add260b3
Fix a vector FP constant CSE bug.
...
llvm-svn: 37814
2007-06-29 21:36:04 +00:00
David Greene
0942edd414
Remove unnecessary attributions in comments.
...
llvm-svn: 37799
2007-06-29 03:42:23 +00:00
David Greene
df6a87ea1c
Fix reference to cached end iterator invalidated by an erase operation.
...
Uncovered by _GLIBCXX_DEBUG.
llvm-svn: 37795
2007-06-29 02:49:11 +00:00
David Greene
244fb44f6b
Remove the "special tie breaker" because it resulted in inconsistent
...
ordering and thus violated the strict weak ordering requirement of
priority_queue. Uncovered by _GLIBCXX_DEBUG.
llvm-svn: 37794
2007-06-29 02:48:09 +00:00
David Greene
ad230f223f
Fix misue of iterator pointing to erased object. Uncovered by
...
_GLIBCXX_DEBUG.
llvm-svn: 37793
2007-06-29 02:45:24 +00:00
Dan Gohman
ad9cbaba40
Fix an assertion failure in legalizing bitcast operators on targets where
...
vectors are split down to single elements as part of legalization.
llvm-svn: 37785
2007-06-29 00:09:08 +00:00
Dan Gohman
c6bdcfa8c0
Add new TargetLowering code to provide the final register type that an
...
illegal value type will be transformed to, for code that needs the
register type after all transformations instead of just after the first
transformation.
Factor out the code that uses this information to do copy-from-regs and
copy-to-regs for various purposes into separate functions so that they
are done consistently.
llvm-svn: 37781
2007-06-28 23:29:44 +00:00
Evan Cheng
e67385d712
If a livein is not used in the block. It's live through.
...
llvm-svn: 37764
2007-06-27 18:47:28 +00:00
Evan Cheng
26542e347a
Partial fix for PR1502: If a EH register is needed in a successor of landing pad, add it as livein to all the blocks in the paths between the landing pad and the specified block.
...
llvm-svn: 37763
2007-06-27 18:45:32 +00:00
Dan Gohman
cb89e19a6d
Rename ("shrinkify") MVT::isExtendedValueType to MVT::isExtendedVT.
...
llvm-svn: 37758
2007-06-27 16:08:04 +00:00
Dan Gohman
c1c4b0972f
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.
llvm-svn: 37755
2007-06-27 14:34:07 +00:00
Dan Gohman
69a6154359
Make the comment for ScalarizeVectorOp mention that it is only for use
...
with single-element vectors.
llvm-svn: 37752
2007-06-27 14:06:22 +00:00
Duraid Madina
d32d8b9726
ok, this is something of a dirty hack, but it seems to work. (fixes e.g.
...
the SPASS miscompilation)
llvm-svn: 37750
2007-06-27 09:01:14 +00:00
Duraid Madina
73b0d188c8
ok, this much doesn't seem to bork anything
...
llvm-svn: 37749
2007-06-27 08:31:07 +00:00
Duraid Madina
94cd67290b
revert evan's fixes (and my doofusness) since they had a huge code
...
quality hit. will look at this soon.
llvm-svn: 37748
2007-06-27 08:11:59 +00:00
Duraid Madina
c0d3c96333
pull evan's fixes - should help the nightly tester (but there are still
...
some issues)
llvm-svn: 37747
2007-06-27 07:07:13 +00:00
Evan Cheng
480cd89fa1
Replace std::set with SmallPtrSet.
...
llvm-svn: 37746
2007-06-27 05:23:00 +00:00
Evan Cheng
f74e333161
Fix an obvious bug. Old code only worked for the entry block.
...
llvm-svn: 37743
2007-06-27 01:16:36 +00:00
Evan Cheng
5c0f03bce4
Correctly handle implcit def / use operands.
...
llvm-svn: 37740
2007-06-26 21:05:13 +00:00
Evan Cheng
0eaa723739
Properly handle kills of a physical register which has sub-registers that are read by later instructions.
...
llvm-svn: 37739
2007-06-26 21:03:35 +00:00
Duraid Madina
c4b17f9a08
tidy this file up a bit
...
llvm-svn: 37725
2007-06-26 00:21:58 +00:00
Duraid Madina
1d8c70bf83
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.
llvm-svn: 37724
2007-06-25 23:46:54 +00:00
Dan Gohman
354f02e03d
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.
llvm-svn: 37719
2007-06-25 16:23:39 +00:00
Dan Gohman
a62327ea40
Move ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBits from
...
TargetLowering to SelectionDAG so that they have more convenient
access to the current DAG, in preparation for the ValueType routines
being changed from standalone functions to members of SelectionDAG for
the pre-legalize vector type changes.
llvm-svn: 37704
2007-06-22 14:59:07 +00:00
Duraid Madina
fe6e41b4f9
check in the BigBlock local register allocator
...
llvm-svn: 37703
2007-06-22 08:27:12 +00:00
Evan Cheng
85169b9b40
std::set is really really terrible. Switch to SmallPtrSet to reduce compile time. For Duraid's example. The overall isel time is reduced from 0.6255 sec to 0.1876 sec.
...
llvm-svn: 37701
2007-06-22 01:35:51 +00:00
Dan Gohman
72af1305fb
Tidy up ValueType names in comments.
...
llvm-svn: 37688
2007-06-21 14:48:26 +00:00
Dan Gohman
1815e9bdb3
Rename TargetLowering::getNumElements and friends to
...
TargetLowering::getNumRegisters and similar, to avoid confusion with
the actual number of elements for vector types.
llvm-svn: 37687
2007-06-21 14:42:22 +00:00
Evan Cheng
f26fc091ac
Xforms:
...
(add (select cc, 0, c), x) -> (select cc, x, (add, x, c))
(sub x, (select cc, 0, c)) -> (select cc, x, (sub, x, c))
llvm-svn: 37685
2007-06-21 07:39:16 +00:00
Evan Cheng
5e2aabd3ad
Avoid if-converting simple block that ends with unconditional branch or fallthrough unless it branches / falls to the 'false' block. Not profitable, may end up increasing code size.
...
llvm-svn: 37660
2007-06-19 21:45:13 +00:00
Dan Gohman
485cb57eab
Pass a SelectionDAG into SDNode::dump everywhere it's used, in prepration
...
for needing the DAG node to print pre-legalize extended value types, and
to get better debug messages with target-specific nodes.
llvm-svn: 37656
2007-06-19 14:13:56 +00:00
Chris Lattner
653c0ccfbe
document and hide two options.
...
llvm-svn: 37651
2007-06-19 05:47:49 +00:00
Dan Gohman
b60d8a92c9
Replace M_REMATERIALIZIBLE and the newly-added isOtherReMaterializableLoad
...
with a general target hook to identify rematerializable instructions. Some
instructions are only rematerializable with specific operands, such as loads
from constant pools, while others are always rematerializable. This hook
allows both to be identified as being rematerializable with the same
mechanism.
llvm-svn: 37644
2007-06-19 01:48:05 +00:00
Evan Cheng
12b3002673
Replace TargetInstrInfo::CanBeDuplicated() with a M_NOT_DUPLICABLE bit.
...
llvm-svn: 37643
2007-06-19 01:26:51 +00:00
Chris Lattner
68f9f9fa3b
add isVarArg to CCState
...
llvm-svn: 37640
2007-06-19 00:11:09 +00:00
Evan Cheng
b752a87db1
Fix some fragile code wrt CFG edge updating.
...
llvm-svn: 37634
2007-06-18 22:44:57 +00:00
Evan Cheng
978058bcd7
Move CorrectExtraCFGEdges() from BranchFolding.cpp to a MachineBasicBlock method.
...
llvm-svn: 37633
2007-06-18 22:43:58 +00:00