[PATCH] D55143: [PowerPC][NFC] Sorting out Pseudo related classes to avoid confusion

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 7 05:34:31 PST 2018


nemanjai added a comment.

I am definitely on board with this refactoring since it makes the purpose of the various pseudo instructions more clear.
However, I really don't like the name `PhonyInst`. These will lead to real instructions being emitted during emit time. I think we should name these according to when we expect to expand these (similarly to what you did for the custom inserter ones).
The names should reflect the uses:

- Custom inserter
- Post-RA expansion
- Emit-time expansion
- Asm parser expansion (`PPCAsmPseudo`)

As such, I think it would be nice for them to use a common naming format and to be defined adjacent to one another in the same file. Perhaps something like:

  PPCCustomInserterPseudo
  PPCPostRAExpPseudo
  PPCEmitTimePseudo
  PPCAsmPseudo

And in a subsequent orthogonal patch, we may want to consider target flags to indicate the first three of these so that we can add asserts in the code ensuring some of these did not survive past the point where they're supposed to survive (i.e. we shouldn't have any `PPCPostRAExpPseudo` instructions at emit time).


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

https://reviews.llvm.org/D55143





More information about the llvm-commits mailing list