[llvm] 9955876 - [Statepoint] Reduce intendation and change a variable name [NFC]

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 7 16:19:14 PDT 2020


Author: Philip Reames
Date: 2020-07-07T16:19:05-07:00
New Revision: 9955876d74a51659791fd72f8acb1fba27deacb0

URL: https://github.com/llvm/llvm-project/commit/9955876d74a51659791fd72f8acb1fba27deacb0
DIFF: https://github.com/llvm/llvm-project/commit/9955876d74a51659791fd72f8acb1fba27deacb0.diff

LOG: [Statepoint] Reduce intendation and change a variable name [NFC]

Added: 
    

Modified: 
    llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
index d63fedda3bd1..c3a23d67306b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
@@ -988,23 +988,23 @@ void SelectionDAGBuilder::LowerCallSiteWithDeoptBundle(
 void SelectionDAGBuilder::visitGCResult(const GCResultInst &CI) {
   // The result value of the gc_result is simply the result of the actual
   // call.  We've already emitted this, so just grab the value.
-  const GCStatepointInst *I = CI.getStatepoint();
-
-  if (I->getParent() != CI.getParent()) {
-    // Statepoint is in 
diff erent basic block so we should have stored call
-    // result in a virtual register.
-    // We can not use default getValue() functionality to copy value from this
-    // register because statepoint and actual call return types can be
-    // 
diff erent, and getValue() will use CopyFromReg of the wrong type,
-    // which is always i32 in our case.
-    Type *RetTy = I->getActualReturnType();
-    SDValue CopyFromReg = getCopyFromRegs(I, RetTy);
-
-    assert(CopyFromReg.getNode());
-    setValue(&CI, CopyFromReg);
-  } else {
-    setValue(&CI, getValue(I));
+  const GCStatepointInst *SI = CI.getStatepoint();
+
+  if (SI->getParent() == CI.getParent()) {
+    setValue(&CI, getValue(SI));
+    return;
   }
+  // Statepoint is in 
diff erent basic block so we should have stored call
+  // result in a virtual register.
+  // We can not use default getValue() functionality to copy value from this
+  // register because statepoint and actual call return types can be
+  // 
diff erent, and getValue() will use CopyFromReg of the wrong type,
+  // which is always i32 in our case.
+  Type *RetTy = SI->getActualReturnType();
+  SDValue CopyFromReg = getCopyFromRegs(SI, RetTy);
+  
+  assert(CopyFromReg.getNode());
+  setValue(&CI, CopyFromReg);
 }
 
 void SelectionDAGBuilder::visitGCRelocate(const GCRelocateInst &Relocate) {


        


More information about the llvm-commits mailing list