[llvm] [MIR] Serialize virtual register flags (PR #110228)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 4 01:59:16 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()));
+  }
----------------
arsenm wrote:

Why do you need .str().str()? 

https://github.com/llvm/llvm-project/pull/110228


More information about the llvm-commits mailing list