Temporarily revert r60997. It was causing this failure:

Running /Users/void/llvm/llvm.src/test/CodeGen/Generic/dg.exp ...
FAIL: /Users/void/llvm/llvm.src/test/CodeGen/Generic/asm-large-immediate.ll
Failed with exit(1) at line 1
while running:  llvm-as < /Users/void/llvm/llvm.src/test/CodeGen/Generic/asm-large-immediate.ll |  llc | /usr/bin/grep 68719476738
Assertion failed: ((TypesNeedLegalizing || getTypeAction(VT) == Legal) && "Illegal type introduced after type legalization?"), function HandleOp, file /Users/void/llvm/llvm.src/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp, line 493.
0   llc               0x0085392e char const* std::find<char const*, char>(char const*, char const*, char const&) + 98
1   llc               0x00853e63 llvm::sys::PrintStackTraceOnErrorSignal() + 593
2   libSystem.B.dylib 0x96cac09b _sigtramp + 43
3   libSystem.B.dylib 0xffffffff _sigtramp + 1765097359
4   libSystem.B.dylib 0x96d24ec2 raise + 26
5   libSystem.B.dylib 0x96d3447f abort + 73
6   libSystem.B.dylib 0x96d26063 __assert_rtn + 101
7   llc               0x004f9018 llvm::cast_retty<llvm::SubprogramDesc, llvm::DebugInfoDesc*>::ret_type llvm::cast<llvm::Sub
...

llvm-svn: 61001
This commit is contained in:
Bill Wendling 2008-12-13 23:53:00 +00:00
parent 7cddec2a2f
commit 380fbdc9f8
3 changed files with 8 additions and 11 deletions

View File

@ -212,7 +212,7 @@ public:
///
/// Note that this is an involved process that may invalidate pointers into
/// the graph.
void Legalize(bool TypesNeedLegalizing);
void Legalize();
/// RemoveDeadNodes - This method deletes all unreachable nodes in the
/// SelectionDAG.

View File

@ -51,7 +51,6 @@ namespace {
class VISIBILITY_HIDDEN SelectionDAGLegalize {
TargetLowering &TLI;
SelectionDAG &DAG;
bool TypesNeedLegalizing;
// Libcall insertion helpers.
@ -128,7 +127,7 @@ class VISIBILITY_HIDDEN SelectionDAGLegalize {
}
public:
explicit SelectionDAGLegalize(SelectionDAG &DAG, bool TypesNeedLegalizing);
explicit SelectionDAGLegalize(SelectionDAG &DAG);
/// getTypeAction - Return how we should legalize values of this type, either
/// it is already legal or we need to expand it into multiple registers of
@ -349,8 +348,8 @@ SDNode *SelectionDAGLegalize::isShuffleLegal(MVT VT, SDValue Mask) const {
return TLI.isShuffleMaskLegal(Mask, VT) ? Mask.getNode() : 0;
}
SelectionDAGLegalize::SelectionDAGLegalize(SelectionDAG &dag, bool types)
: TLI(dag.getTargetLoweringInfo()), DAG(dag), TypesNeedLegalizing(types),
SelectionDAGLegalize::SelectionDAGLegalize(SelectionDAG &dag)
: TLI(dag.getTargetLoweringInfo()), DAG(dag),
ValueTypeActions(TLI.getValueTypeActions()) {
assert(MVT::LAST_VALUETYPE <= 32 &&
"Too many value types for ValueTypeActions to hold!");
@ -489,8 +488,6 @@ bool SelectionDAGLegalize::LegalizeAllNodesNotLeadingTo(SDNode *N, SDNode *Dest,
/// appropriate for its type.
void SelectionDAGLegalize::HandleOp(SDValue Op) {
MVT VT = Op.getValueType();
assert((TypesNeedLegalizing || getTypeAction(VT) == Legal) &&
"Illegal type introduced after type legalization?");
switch (getTypeAction(VT)) {
default: assert(0 && "Bad type action!");
case Legal: (void)LegalizeOp(Op); break;
@ -8605,9 +8602,9 @@ SDValue SelectionDAGLegalize::StoreWidenVectorOp(StoreSDNode *ST,
// SelectionDAG::Legalize - This is the entry point for the file.
//
void SelectionDAG::Legalize(bool TypesNeedLegalizing) {
void SelectionDAG::Legalize() {
/// run - This is the main entry point to this class.
///
SelectionDAGLegalize(*this, TypesNeedLegalizing).LegalizeDAG();
SelectionDAGLegalize(*this).LegalizeDAG();
}

View File

@ -620,9 +620,9 @@ void SelectionDAGISel::CodeGenAndEmitDAG() {
if (TimePassesIsEnabled) {
NamedRegionTimer T("DAG Legalization", GroupName);
CurDAG->Legalize(DisableLegalizeTypes);
CurDAG->Legalize();
} else {
CurDAG->Legalize(DisableLegalizeTypes);
CurDAG->Legalize();
}
DOUT << "Legalized selection DAG:\n";