Minor code cleanup /NFC
authorXinliang David Li <davidxl@google.com>
Thu, 31 Mar 2016 16:22:17 +0000 (16:22 +0000)
committerXinliang David Li <davidxl@google.com>
Thu, 31 Mar 2016 16:22:17 +0000 (16:22 +0000)
llvm-svn: 265025

llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp

index c8f6bb2..50a65b9 100644 (file)
@@ -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);
   }
 };