Clear the FunctionLoweringInfo object before doing other things that
don't need it.
llvm-svn: 101262
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 1438fe2..4682c29 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -216,15 +216,15 @@
SelectAllBasicBlocks(Fn, *MF, TII);
+ // Release function-specific state. SDB and CurDAG are already cleared
+ // at this point.
+ FuncInfo->clear();
+
// If the first basic block in the function has live ins that need to be
// copied into vregs, emit the copies into the top of the block before
// emitting the code for the block.
RegInfo->EmitLiveInCopies(MF->begin(), TRI, TII);
- // Release function-specific state. SDB and CurDAG are already cleared
- // at this point.
- FuncInfo->clear();
-
return true;
}