[llvm] r265025 - Minor code cleanup /NFC
Xinliang David Li via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 31 09:22:17 PDT 2016
Author: davidxl
Date: Thu Mar 31 11:22:17 2016
New Revision: 265025
URL: http://llvm.org/viewvc/llvm-project?rev=265025&view=rev
Log:
Minor code cleanup /NFC
Modified:
llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
Modified: llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp?rev=265025&r1=265024&r2=265025&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp Thu Mar 31 11:22:17 2016
@@ -333,11 +333,13 @@ struct PGOIndirectCallSiteVisitor
PGOIndirectCallSiteVisitor() {}
void visitCallSite(CallSite CS) {
- Instruction *I = CS.getInstruction();
- CallInst *CI = dyn_cast<CallInst>(I);
- if (CS.getCalledFunction() || !CS.getCalledValue() ||
- (CI && CI->isInlineAsm()))
+ if (CS.getCalledFunction() || !CS.getCalledValue())
return;
+ Instruction *I = CS.getInstruction();
+ if (CallInst *CI = dyn_cast<CallInst>(I)) {
+ if (CI->isInlineAsm())
+ return;
+ }
IndirectCallInsts.push_back(I);
}
};
More information about the llvm-commits
mailing list