[llvm] r361794 - [InlineCost] Fix a couple comments. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue May 28 00:25:27 PDT 2019
Author: ctopper
Date: Tue May 28 00:25:27 2019
New Revision: 361794
URL: http://llvm.org/viewvc/llvm-project?rev=361794&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/Analysis/InlineCost.cpp
Modified: llvm/trunk/lib/Analysis/InlineCost.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InlineCost.cpp?rev=361794&r1=361793&r2=361794&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InlineCost.cpp (original)
+++ llvm/trunk/lib/Analysis/InlineCost.cpp Tue May 28 00:25:27 2019
@@ -708,7 +708,7 @@ bool CallAnalyzer::visitIntToPtr(IntToPt
}
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
}))
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;
More information about the llvm-commits
mailing list