From 3d29e6afd3fa5eca07b98773a7a5056cdd8445a3 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 28 May 2019 07:25:27 +0000 Subject: [PATCH] [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361794 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/InlineCost.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Analysis/InlineCost.cpp b/lib/Analysis/InlineCost.cpp index 7fcfc76ea62..ced30d6e3b9 100644 --- a/lib/Analysis/InlineCost.cpp +++ b/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 &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; -- 2.50.1