[llvm-commits] [llvm] r51833 - /llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Sat May 31 20:49:40 PDT 2008


Author: bruno
Date: Sat May 31 22:49:39 2008
New Revision: 51833

URL: http://llvm.org/viewvc/llvm-project?rev=51833&view=rev
Log:
Fixed flag issue that was generating infinite loop while in list scheduling. 

Modified:
    llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp

Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=51833&r1=51832&r2=51833&view=diff

==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Sat May 31 22:49:39 2008
@@ -365,6 +365,12 @@
   Chain  = DAG.getNode(MipsISD::JmpLink, NodeTys, &Ops[0], Ops.size());
   InFlag = Chain.getValue(1);
 
+  Chain = DAG.getCALLSEQ_END(Chain,
+                             DAG.getConstant(NumBytes, getPointerTy()),
+                             DAG.getConstant(0, getPointerTy()),
+                             InFlag);
+  InFlag = Chain.getValue(1);
+
   // Create a stack location to hold GP when PIC is used. This stack 
   // location is used on function prologue to save GP and also after all 
   // emited CALL's to restore GP. 
@@ -391,14 +397,10 @@
       Chain = GPLoad.getValue(1);
       Chain = DAG.getCopyToReg(Chain, DAG.getRegister(Mips::GP, MVT::i32), 
                                GPLoad, SDOperand(0,0));
+      InFlag = Chain.getValue(1);
   }      
 
   // Create the CALLSEQ_END node.
-  Chain = DAG.getCALLSEQ_END(Chain,
-                             DAG.getConstant(NumBytes, getPointerTy()),
-                             DAG.getConstant(0, getPointerTy()),
-                             InFlag);
-  InFlag = Chain.getValue(1);
 
   // Handle result values, copying them out of physregs into vregs that we
   // return.





More information about the llvm-commits mailing list