[PATCH] D142330: [AssumptionCache] caches @llvm.experimental.guard's
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 25 15:19:06 PST 2023
nikic added a comment.
@anna Thanks for the example, I understand it now. We can only use the backwards reasoning with assume because assume violation is undefined behavior, while for guards we just exit this control flow path.
@caojoshua I think this depends a lot on when we can expect support for guard intrinsics to be removed. The LangRef note that this mechanism is obsolete has been there for more than 3 years, and as far as I can tell, there hasn't been any (upstream) movement to remove guard intrinsics in that time. If removing these intrinsics is just a vague plan for the future (rather than something people are actively working on right now), then I think it still makes sense to reapply a fixed version of this patch.
It sounds like a big part of the motivation for removing them is that they require special handling everywhere -- but with this patch, this is not really the case anymore, because they get handled as a side-effect of existing assume handling.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142330/new/
https://reviews.llvm.org/D142330
More information about the llvm-commits
mailing list