[llvm] [MIR] Serialize virtual register flags (PR #110228)
Akshat Oke via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 7 21:59:31 PDT 2024
================
@@ -315,10 +316,21 @@ printStackObjectDbgInfo(const MachineFunction::VariableDbgInfo &DebugVar,
}
}
-void MIRPrinter::convert(yaml::MachineFunction &MF,
+static void printRegFlags(Register Reg,
+ std::vector<yaml::FlowStringValue> &RegisterFlags,
+ const MachineFunction &MF,
+ const TargetRegisterInfo *TRI) {
+ auto FlagValues = TRI->getVRegFlagsOfReg(Reg, MF);
+ for (auto &Flag : FlagValues) {
+ RegisterFlags.push_back(yaml::FlowStringValue(Flag.str().str()));
+ }
----------------
Akshat-Oke wrote:
SmallString -> StringReg -> std::string, because yaml::StringValue holds an `std::string`
https://github.com/llvm/llvm-project/pull/110228
More information about the llvm-commits
mailing list