[PATCH] D123178: [RISCV] Store/restore RISCVMachineFunctionInfo into MIR YAML file
Kito Cheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 6 20:41:22 PDT 2022
kito-cheng marked 5 inline comments as done.
kito-cheng added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVMachineFunctionInfo.h:29
+ int VarArgsSaveSize;
+ int MoveF64FrameIndex;
+
----------------
craig.topper wrote:
> Why is `MoveF64FrameIndex` in here but never referenced anywhere else.
I was try to serialize that, but I realize that is not necessary soon, however I forgot to remove that...
================
Comment at: llvm/lib/Target/RISCV/RISCVTargetMachine.cpp:241
+ const auto &YamlMFI =
+ reinterpret_cast<const yaml::RISCVMachineFunctionInfo &>(MFI);
+ MachineFunction &MF = PFS.MF;
----------------
craig.topper wrote:
> craig.topper wrote:
> > What makes this need a reinterpret_cast instead of a static_cast? I see that other targets are also using reinterpret_cast but I don't understand them either.
> I pushed a fix to use static_cast on the other targets.
Thanks, actually that's copy and paste from AArch64...:P
================
Comment at: llvm/test/CodeGen/RISCV/machine-function-info.mir:97
+machineFunctionInfo:
+ varArgsFrameIndex: -1
+ varArgsSaveSize: 64
----------------
frasercrmck wrote:
> I guess we should be checking that `machineFunctionInfo` is serialized back out again successfully? Seems like `update_mir_test_checks.py` isn't doing that for us.
Thanks, check added!
================
Comment at: llvm/test/CodeGen/RISCV/machine-function-info.mir:137
+
+...
----------------
arsenm wrote:
> MIR print/parser tests should go under test/CodeGen/MIR/RISCV, not test/CodeGen/RISCV
Moved :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123178/new/
https://reviews.llvm.org/D123178
More information about the llvm-commits
mailing list