[llvm] f98a918 - [TrivialDeadness] Update function comment

Anna Thomas via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 1 09:09:30 PDT 2021


Author: Anna Thomas
Date: 2021-10-01T12:09:26-04:00
New Revision: f98a918d34959264f54757e9e559b5630b7bfa52

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

LOG: [TrivialDeadness] Update function comment

isInstructionTriviallyDead also works for certain side-effecting
instructions.
Update incorrect comment (as suggested in D109917).

Added: 
    

Modified: 
    llvm/include/llvm/Transforms/Utils/Local.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Transforms/Utils/Local.h b/llvm/include/llvm/Transforms/Utils/Local.h
index 97686d7d5f2fa..3c529abce85a2 100644
--- a/llvm/include/llvm/Transforms/Utils/Local.h
+++ b/llvm/include/llvm/Transforms/Utils/Local.h
@@ -78,7 +78,8 @@ bool ConstantFoldTerminator(BasicBlock *BB, bool DeleteDeadConditions = false,
 //
 
 /// Return true if the result produced by the instruction is not used, and the
-/// instruction has no side effects.
+/// instruction will return. Certain side-effecting instructions are also
+/// considered dead if there are no uses of the instruction.
 bool isInstructionTriviallyDead(Instruction *I,
                                 const TargetLibraryInfo *TLI = nullptr);
 


        


More information about the llvm-commits mailing list