[PATCH] D142330: [AssumptionCache] caches @llvm.experimental.guard's
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 23 03:02:00 PST 2023
nikic added a comment.
In D142330#4072524 <https://reviews.llvm.org/D142330#4072524>, @caojoshua wrote:
> An additional though: I have a lot of asserts that checks `is assume || is guard`. I'd like to add a helper in IntrinsicInst, but there is already a `isAssumeLikeIntrinsic()`, which is completely unrelated to this change. Maybe we can add `isCondGuard()`?
I would recommend adding an extra instruction type next to here: https://github.com/llvm/llvm-project/blob/ea6e8d4f5913e89a1a6951f017b6509ed32c6be9/llvm/include/llvm/IR/IntrinsicInst.h#L1518 Given that the term "assume-like" is already taken, this could be `AssumeOrGuardInst`.
This will allow you to retain the more specific type information where currently `AssumeInst` is used.
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