[PATCH] D157689: [GuardWidening] Refactor to work with the list of checks to widen/hoist
    Anna Thomas via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Aug 24 07:46:06 PDT 2023
    
    
  
anna added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/GuardWidening.cpp:127
 /// safest way to do it is to expand the new condition at WC's block.
 static Instruction *findInsertionPointForWideCondition(Instruction *Guard) {
+  if (isGuard(Guard))
----------------
================
Comment at: llvm/lib/Transforms/Scalar/GuardWidening.cpp:215
   /// Common helper used by \c widenGuard and \c isWideningCondProfitable.  Try
   /// to generate an expression computing the logical AND of \p Cond0 and Cond1.
   /// Return true if the expression computing the AND is only as
----------------
Pls update comment.
================
Comment at: llvm/lib/Transforms/Scalar/GuardWidening.cpp:270
 
   /// Parse \p CheckCond into a conjunction (logical-and) of range checks; and
   /// append them to \p Checks.  Returns true on success, may clobber \c Checks
----------------
Fix comment.
================
Comment at: llvm/lib/Transforms/Scalar/GuardWidening.cpp:291
 
   /// Can we compute the logical AND of \p Cond0 and \p Cond1 for the price of
   /// computing only one of the two expressions?
----------------
Fix comment pls.
================
Comment at: llvm/lib/Transforms/Scalar/GuardWidening.cpp:300
 
   /// Widen \p ToWiden to fail if \p NewCondition is false
+  void widenGuard(SmallVectorImpl<Value *> &ChecksToHoist,
----------------
Update comment.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157689/new/
https://reviews.llvm.org/D157689
    
    
More information about the llvm-commits
mailing list