[PATCH] D49144: [FunctionAttrs] Infer the speculatable attribute

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 10 15:37:37 PDT 2018


Meinersbur added a comment.

> My assumption here is that we need to assume that any loads performed by the function, and any incoming arguments, might be poison. As a result, we can't have any branches, PHIs, or stores (even to local static allocas) - because doing any of these things with poison values is UB. Is that correct?

Control flow that might lead to infinite loops might be a problem, but why not allow at least acyclic control flow?

If the value stored to an alloca is thrown away after the `ret`, why is it a problem to be executed speculatively?


Repository:
  rL LLVM

https://reviews.llvm.org/D49144





More information about the llvm-commits mailing list