[PATCH] D105751: WIP/RFC: Introduce GenericMachineInstr classes and derivatives for idiomatic LLVM RTTI.
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 12 09:59:27 PDT 2021
aemerson added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/GenericMachineInstrs.h:24
+/// A base class for all GenericMachineInstrs.
+class GenericMachineInstr : public MachineInstr {
+public:
----------------
tschuett wrote:
> Does this need to be `public`?
Yes, all the public members of MachineInstr need to be accessible.
================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/GenericMachineInstrs.h:29
+ /// Access the Idx'th operand as a register and return it.
+ Register getReg(unsigned Idx) { return getOperand(Idx).getReg(); }
+
----------------
tschuett wrote:
> Can this be `protected`?
Likewise, this also needs to be accessible outside.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105751/new/
https://reviews.llvm.org/D105751
More information about the llvm-commits
mailing list