aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-06-20 16:41:17 +0000
committerDan Gohman <gohman@apple.com>2008-06-20 16:41:17 +0000
commitaa7b780b7dca70b66ee584abe773ad7bde8c0bd6 (patch)
tree545cfee5c5fcd2b2fcdd03dec1ccf3cf15a30f09 /lib
parent78b2c395a31ad30dea1bbee7a09134673314975f (diff)
downloadexternal_llvm-aa7b780b7dca70b66ee584abe773ad7bde8c0bd6.zip
external_llvm-aa7b780b7dca70b66ee584abe773ad7bde8c0bd6.tar.gz
external_llvm-aa7b780b7dca70b66ee584abe773ad7bde8c0bd6.tar.bz2
Tidy up some commments and use the getAggregateOperand and
getInsertedValueOperand accessors. Thanks Matthijs! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52543 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Scalar/SCCP.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp
index 3ca03b3..ff88137 100644
--- a/lib/Transforms/Scalar/SCCP.cpp
+++ b/lib/Transforms/Scalar/SCCP.cpp
@@ -705,9 +705,9 @@ void SCCPSolver::visitGetResultInst(GetResultInst &GRI) {
}
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::visitExtractValueInst(ExtractValueInst &EVI) {
}
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 @@ void SCCPSolver::visitInsertValueInst(InsertValueInst &IVI) {
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 @@ CallOverdefined:
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;
}
}