[PATCH] D55143: [PowerPC][NFC] Set isPseudo in base class PostRAPseudo

Qing Shan Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 3 20:01:08 PST 2018


steven.zhang 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:
> 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;
}
```


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