[PATCH] D65531: [ArgPromo][Tests] Examples to show missing 'tail' marker removal

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 31 14:09:01 PDT 2019


jdoerfert added a subscriber: reames.
jdoerfert added a comment.

In D65531#1609064 <https://reviews.llvm.org/D65531#1609064>, @vsk wrote:

> This looks reasonable to me. I wonder whether the verifier could be extended to ensure that pointer arguments to tail-calling sites don't point within an alloca? It could be useful to enforce even in control-dependent cases ('%Data2 = select %cond, <global>, <alloca>; tail call foo(%Data2)').


The control dependent case you mentioned is not statically verifiable. @reames is building a dynamic poison checker which could include a test for this. Though, I'm unsure if we have the cycles to do this in the near future.

I will now propose a set of "rewrite" patches for the argument promotion pass to improve functionality and fix all the problems, including PR42852, PR42850, PR42683, and PR42039. At the moment, we promote only very few arguments due to lack of functionality (e.g., bitcasts), placement in the pipeline (very late), lack of attribute support (no dereferenceable is derive by default), and conservative limits (unpack structs with <= 3 members only).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65531





More information about the llvm-commits mailing list