[PATCH] D55143: [PowerPC][NFC] Set isPseudo in base class PostRAPseudo
Jinsong Ji via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 3 20:32:25 PST 2018
jsji marked an inline comment as done.
jsji added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCInstrFormats.td:2165
+class PostRAPseudo<dag OOL, dag IOL, string asmstr, list<dag> pattern>
+ : Pseudo<OOL, IOL, asmstr, pattern> {
----------------
steven.zhang wrote:
> steven.zhang wrote:
> > The logic here is quite weird. Maybe, we could set the isPseudo inside the Pseudo and use the Pseudo as the base class instead of creating a new one. For those places that didn't want the isPseudo to be set, just add a let to clear it. (i.e. when usesCustomInserter is used )
> It doesn't make sense to me to not to set the isPseudo for the class Pseudo.
> ```
> //===----------------------------------------------------------------------===//
> class Pseudo<dag OOL, dag IOL, string asmstr, list<dag> pattern>
> : I<0, OOL, IOL, asmstr, NoItinerary> {
> let isCodeGenOnly = 1;
> let PPC64 = 0;
> let Pattern = pattern;
> let Inst{31-0} = 0;
> let hasNoSchedulingInfo = 1;
> }
> ```
As I mentioned in description, there are several "Pseudo", isPseudo flag is only for Post RA Pseudo. While Pseudo<>class are for Code Emitter, so setting isPseudo on Pseudo will causing issues. I don't see any advantage of setting it in base class, then unset it...
Adding PostRAPseudo class is to indicate the difference of Pseudo and PostRAPseudo.
one more comments about "isPseudo is set for PoseRA Pseudo only" may help?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55143/new/
https://reviews.llvm.org/D55143
More information about the llvm-commits
mailing list