[PATCH] D66338: [CGP] Drop no op intrinsic calls

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 23:19:37 PDT 2019


bjope added a comment.

(just sharing my thoughts after seeing this patch)

Is CGP a "mandatory" pass always expected to be executed before ISel? In other words, can we remove logic from SelectionDAGBuilder when rewriting intrinsics here (simply assert that we no longer find intrinsics that should be eliminated by CGP)?

Is it allowed to add passes between CGP and ISel? In other words, could there for example be forks of LLVM that is using llvm.var.annotation between CGP and ISel? Then perhaps we need to describe this strategy better in some way (LangRef isn't that precise in telling when the intrinsics are removed right now, and I doubt it would be much details mentioning exactly when it happens in the LangRef, but I guess one would assume that it hangs around until ISel. But maybe CodegenPrepare should be seen more or less as part of ISel (such as being mandatory before SelectionDAGBuilder).

If we rewrite llvm.var.annotation in CGP, then I guess we shoud rewrite llvm.ptr.annotation and llvm.annotation as well?
To me it seems a little bit strange not to eliminate these at the same point in time. Although, unless we also can remove logic for handling these in ISel it just adds the logic for how to eliminate them one more time.

Some day I hope the pass description for CGP is updated. It is still saying that the pass "should eventually be removed.", but still we add more and more stuff here.


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

https://reviews.llvm.org/D66338





More information about the llvm-commits mailing list