[PATCH] D105516: [clang][PassManager] Add -falways-mem2reg to run mem2reg at -O0

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 19 21:31:33 PDT 2021


jrtc27 added a comment.

In D105516#2889411 <https://reviews.llvm.org/D105516#2889411>, @efriedma wrote:

> The part I'm most uncomfortable with is sticking "mem2reg" in a public, documented driver option.  I don't want to promise that the mem2reg pass will exist forever.  We should be focused on making sure the options we add are stable, and compose effectively, not just being convenient for some specific use.
>
> I'd be less concerned if it were just a -cc1 option; if it's for our internal use, and we can throw it away if we come up with a better solution, this seems okay.

I'd be ok with having it just be a -cc1 option (I didn't even actually add a driver test for the non-cc1 form...). I also thought about doing something like `-falways-regalloc` to not tie it to the pass name, but names like that are misleading since machine register allocation does still happen, just not on things that it doesn't know could be promoted from memory to registers.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105516



More information about the llvm-commits mailing list