[PATCH] D49974: [GuardWidening] Widen guards with conditions of frequently taken dominated branches
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 2 15:47:51 PDT 2018
reames added inline comments.
================
Comment at: lib/Transforms/Scalar/GuardWidening.cpp:408
+ // Only erase guard intrinsics. Do nothing about branches.
+ if (IntrinsicInst *GI = dyn_cast<IntrinsicInst>(GuardInst))
+ GI->eraseFromParent();
----------------
mkazantsev wrote:
> reames wrote:
> > Better to move this check into the caller.
> No, it is here because we should not remove `br` instructions. We don't want the caller to know about possible types of guards.
I was suggesting that we only call this function for guards, not for branches. Calling a function called "eliminateGuard" on a branch seems a bit odd.
https://reviews.llvm.org/D49974
More information about the llvm-commits
mailing list