[PATCH] D81237: Correctly report modified status for SimplifyCFG and LoopSimplify
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 5 06:34:28 PDT 2020
foad added inline comments.
================
Comment at: llvm/include/llvm/Transforms/Utils/Local.h:256-260
/// If this basic block is ONLY a setcc and a branch, and if a predecessor
/// branches to us and one of our successors, fold the setcc into the
/// predecessor and use logical operations to pick the right destination.
bool FoldBranchToCommonDest(BranchInst *BI, MemorySSAUpdater *MSSAU = nullptr,
+ bool* Modified = nullptr, unsigned BonusInstThreshold = 1);
----------------
Needs a comment to explain what's going on: "returns true on success, but note that even on failure we might have changed some IR, in which case *Modified is set to true" or similar.
Alternatively, rearrange things so that we don't make any changes until we know we're going to succeed.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81237/new/
https://reviews.llvm.org/D81237
More information about the llvm-commits
mailing list