aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2019-05-28 07:25:27 +0000
committerCraig Topper <craig.topper@intel.com>2019-05-28 07:25:27 +0000
commitab53c5e5ab42c9456bc7eb48532f41aebb2f4a40 (patch)
tree82e85d6eaccfa450c185c4ea89645dc85af75b56 /llvm/lib/Analysis/InlineCost.cpp
parent102b4b2486cad450fcfa317156a772586278bd2c (diff)
downloadllvm-ab53c5e5ab42c9456bc7eb48532f41aebb2f4a40.zip
llvm-ab53c5e5ab42c9456bc7eb48532f41aebb2f4a40.tar.gz
llvm-ab53c5e5ab42c9456bc7eb48532f41aebb2f4a40.tar.bz2
[InlineCost] Fix a couple comments. NFC
Replace "unary operator" with "unary instruction" in visitUnaryInstruction since we now have a UnaryOperator class which might needs its own visit function. Fix a copy/paste in visitCastInst that appears to have been copied from visitPtrToInt. llvm-svn: 361794
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r--llvm/lib/Analysis/InlineCost.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index 7fcfc76..ced30d6 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -708,7 +708,7 @@ bool CallAnalyzer::visitIntToPtr(IntToPtrInst &I) {
}
bool CallAnalyzer::visitCastInst(CastInst &I) {
- // Propagate constants through ptrtoint.
+ // Propagate constants through casts.
if (simplifyInstruction(I, [&](SmallVectorImpl<Constant *> &COps) {
return ConstantExpr::getCast(I.getOpcode(), COps[0], I.getType());
}))
@@ -744,7 +744,7 @@ bool CallAnalyzer::visitUnaryInstruction(UnaryInstruction &I) {
}))
return true;
- // Disable any SROA on the argument to arbitrary unary operators.
+ // Disable any SROA on the argument to arbitrary unary instructions.
disableSROA(Operand);
return false;