[PATCH] D66132: [CodeGen] Add `isSpeculativeExecutionForbidden()` to `TargetTransformInfo` (PRR42405)

Anton Afanasyev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 13 06:34:51 PDT 2019


anton-afanasyev added a comment.

In D66132#1626902 <https://reviews.llvm.org/D66132#1626902>, @lebedev.ri wrote:

> After reading through https://bugs.llvm.org/show_bug.cgi?id=42405 i'm not confident that this is the correct solution.
>  It reads to me as-if this speculative execution in PRE being done with no proper legality checks.
>  In particular, i'd think you want to check a white-list in `MachineCSE::isPRECandidate()`,
>  much like `llvm::isSafeToSpeculativelyExecute()` is for middle-end.
>
> Unless i'm really looking in the wrong place, there is no such thing here?


`isPRECandidate()` checks `hasUnmodelledSideEffects()` and `mayRaiseFloatingPointException()` serving as `isSafeToSpeculativelyExecute()`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66132/new/

https://reviews.llvm.org/D66132





More information about the llvm-commits mailing list