[llvm] cd9e6a9 - [NFC][InstCombine] `visitCallInst()`: make comment more understandable

Roman Lebedev via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 4 15:16:05 PST 2022


Author: Roman Lebedev
Date: 2022-02-05T02:15:07+03:00
New Revision: cd9e6a9c10ef6b1b22e30dff8bf1921595d3a934

URL: https://github.com/llvm/llvm-project/commit/cd9e6a9c10ef6b1b22e30dff8bf1921595d3a934
DIFF: https://github.com/llvm/llvm-project/commit/cd9e6a9c10ef6b1b22e30dff8bf1921595d3a934.diff

LOG: [NFC][InstCombine] `visitCallInst()`: make comment more understandable

Added: 
    

Modified: 
    llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
index 05b28328afbf3..e77017afe0488 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -949,8 +949,8 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
   if (isFreeCall(&CI, &TLI))
     return visitFree(CI);
 
-  // If the caller function is nounwind, mark the call as nounwind, even if the
-  // callee isn't.
+  // If the caller function (i.e. us, the function that contains this CallInst)
+  // is nounwind, mark the call as nounwind, even if the callee isn't.
   if (CI.getFunction()->doesNotThrow() && !CI.doesNotThrow()) {
     CI.setDoesNotThrow();
     return &CI;


        


More information about the llvm-commits mailing list