[PATCH] D52829: [AArch64] Fix verifier error when outlining indirect calls

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 4 10:04:08 PDT 2018


paquette added a comment.

In https://reviews.llvm.org/D52829#1254842, @olista01 wrote:

> I don't think adding a special case to the verifier makes sense, when it's easy enough to generate code which is valid by the normal rules.


I think this is probably really the only thing the outliner does that upsets the verifier. So, from that perspective, I think that this is fine.

OTOH, having a function flag or something like @rengolin suggested is probably a bit cleaner in the long term. I slightly prefer this position since it seems like it should be the verifier's responsibility to understand what to do with an outlined function. Also, if it does turn out that there are other weird cases, it'd be kind of overkill to add special outlining instructions everywhere just to appease the verifier.

So, if it's not too much overhead, I think that adding an outlined function flag or something would probably be better, but for the short-term I'm fine with this.

In https://reviews.llvm.org/D52829#1254842, @olista01 wrote:

> I did consider the alternative of just generating a BR instruction directly, since the outliner runs very late so the isCall/isReturn flags are unlikely to be used in a later pass, but I'm not sure if the verifier would like that either.


That's how it used to be, and the verifier didn't like that because the BR doesn't count as a terminator. :(


Repository:
  rL LLVM

https://reviews.llvm.org/D52829





More information about the llvm-commits mailing list