[PATCH] D73941: GlobalISel: Allow CSE of G_IMPLICIT_DEF

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 5 05:43:37 PST 2020


arsenm added a comment.

In D73941#1859138 <https://reviews.llvm.org/D73941#1859138>, @nhaehnle wrote:

> Could this pessimize code generation? If you have multiple G_IMPLICIT_DEFs, you can push them down close to their respective user and just have different undef register sources in each of those places.
>
> With CSE'd G_IMPLICIT_DEF, they all end up using the same value, i.e. we potentially end up having to keep a register alive over a long interval.


Before scheduling/RA, these are all erased and the use instructions see a register with the undef flag so liveness shouldn't be a concern. There are a number of places where the instruction count matters, and I would expect this to help since it reduces that


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

https://reviews.llvm.org/D73941





More information about the llvm-commits mailing list