[llvm-commits] [llvm] r52543 - /llvm/trunk/lib/Transforms/Scalar/SCCP.cpp

Dan Gohman gohman at apple.com
Fri Jun 20 09:41:18 PDT 2008


Author: djg
Date: Fri Jun 20 11:41:17 2008
New Revision: 52543

URL: http://llvm.org/viewvc/llvm-project?rev=52543&view=rev
Log:
Tidy up some commments and use the getAggregateOperand and
getInsertedValueOperand accessors. Thanks Matthijs!

Modified:
    llvm/trunk/lib/Transforms/Scalar/SCCP.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SCCP.cpp?rev=52543&r1=52542&r2=52543&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SCCP.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Fri Jun 20 11:41:17 2008
@@ -705,9 +705,9 @@
 }
 
 void SCCPSolver::visitExtractValueInst(ExtractValueInst &EVI) {
-  Value *Aggr = EVI.getOperand(0);
+  Value *Aggr = EVI.getAggregateOperand();
 
-  // If the operand to the getresult is an undef, the result is undef.
+  // If the operand to the extractvalue is an undef, the result is undef.
   if (isa<UndefValue>(Aggr))
     return;
 
@@ -746,10 +746,10 @@
 }
 
 void SCCPSolver::visitInsertValueInst(InsertValueInst &IVI) {
-  Value *Aggr = IVI.getOperand(0);
-  Value *Val = IVI.getOperand(1);
+  Value *Aggr = IVI.getAggregateOperand();
+  Value *Val = IVI.getInsertedValueOperand();
 
-  // If the operand to the getresult is an undef, the result is undef.
+  // If the operands to the insertvalue are undef, the result is undef.
   if (isa<UndefValue>(Aggr) && isa<UndefValue>(Val))
     return;
 
@@ -785,8 +785,8 @@
   if (It != TrackedMultipleRetVals.end())
     mergeInValue(It->second, F, getValueState(Val));
 
-  // Mark the aggregate result of the IVI overdefined; any tracking that we do will
-  // be done on the individual member values.
+  // Mark the aggregate result of the IVI overdefined; any tracking that we do
+  // will be done on the individual member values.
   markOverdefined(&IVI);
 }
 
@@ -1269,13 +1269,13 @@
          UI != E; ++UI) {
       if (GetResultInst *GRI = dyn_cast<GetResultInst>(*UI)) {
         mergeInValue(GRI, 
-                     TrackedMultipleRetVals[std::make_pair(F, GRI->getIndex())]);
+                TrackedMultipleRetVals[std::make_pair(F, GRI->getIndex())]);
         continue;
       }
       if (ExtractValueInst *EVI = dyn_cast<ExtractValueInst>(*UI)) {
         if (EVI->getNumIndices() == 1) {
           mergeInValue(EVI, 
-                       TrackedMultipleRetVals[std::make_pair(F, *EVI->idx_begin())]);
+                  TrackedMultipleRetVals[std::make_pair(F, *EVI->idx_begin())]);
           continue;
         }
       }





More information about the llvm-commits mailing list