Clear the FunctionLoweringInfo object before doing other things that
authorDan Gohman <gohman@apple.com>
Wed, 14 Apr 2010 17:13:16 +0000 (17:13 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 14 Apr 2010 17:13:16 +0000 (17:13 +0000)
don't need it.

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

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index 1438fe2b5d439af81410bd6c094adc07d734aff5..4682c294b98be26406adddd6d18e4d38e47b8b1d 100644 (file)
@@ -216,15 +216,15 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
 
   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;
 }