[PATCH] D106299: [Local] Flag to decide if a trap should be placed before unreachable
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 19 12:24:56 PDT 2021
lebedev.ri added a comment.
In D106299#2888142 <https://reviews.llvm.org/D106299#2888142>, @jdoerfert wrote:
> In D106299#2888120 <https://reviews.llvm.org/D106299#2888120>, @lebedev.ri wrote:
>
>> I think `TrapBeforeUnreachableChoice` should be a TTI hook, overrided by GPU targets.
>
> While I don't mind that in general, I figured "always" is a nice debugging option and should be exposed. Not sure what a nice way would be to get both things.
That's another reason why i'm not really in favor of this approach.
Even ignoring the subset of users that will want this for hardening reasons,
i'd really expect that `always` really means `before each unreachable`,
but clearly it won't appear before the already-`unreachable` terminators.
>> I think `shouldUseTrapBeforeUnreachable()` should be sunk into `changeToUnreachable()`, and `UseLLVMTrap` renamed into `PreferToUseLLVMTrap`, with an appropriate documentation opdate.
>
> I can do that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106299/new/
https://reviews.llvm.org/D106299
More information about the llvm-commits
mailing list