[PATCH] D134557: [BranchRelaxation] Fall through only if block has no unconditional branches
Brendon Cahoon via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 3 18:55:26 PDT 2022
bcahoon added inline comments.
================
Comment at: llvm/lib/CodeGen/BranchRelaxation.cpp:455
+ }
+ return false;
+ };
----------------
Do you need this to return true/false. Doesn't seem like the return value is checked?
================
Comment at: llvm/lib/CodeGen/BranchRelaxation.cpp:509
+ if (!FailToAnalyze && !FBB) {
+ if (TBB && TBB == DestBB) {
+ RemoveBranch(PrevBB);
----------------
No need for braces for the single statement body.
================
Comment at: llvm/lib/CodeGen/BranchRelaxation.cpp:487
+ if (auto *FT = PrevBB->getFallThrough()) {
+ assert(FT == DestBB);
+ TII->insertUnconditionalBranch(*PrevBB, FT, DebugLoc());
----------------
Is it possible to add the assert to your change? Unless it's not needed anymore.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134557/new/
https://reviews.llvm.org/D134557
More information about the llvm-commits
mailing list