[PATCH] D103205: [MIRPrinter] Add machine metadata support.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 27 12:27:07 PDT 2021
arsenm added a comment.
Thanks for doing this, this has been painful forever.
Can you add some plain mir tests in test/CodeGen/MIR?
================
Comment at: llvm/include/llvm/CodeGen/MIRYamlMapping.h:707
MachineJumpTable JumpTableInfo;
+ std::vector<StringValue> MachineMetadataNodes;
BlockStringValue Body;
----------------
Is this just for the metadata nodes attached to the function itself?
================
Comment at: llvm/unittests/CodeGen/MachineMetadata.cpp:123
+ ASSERT_TRUE(MO.isMetadata());
+ ASSERT_TRUE(MO.getMetadata() == Node);
+
----------------
EXPECT_EQ
================
Comment at: llvm/unittests/CodeGen/MachineMetadata.cpp:155
+ ASSERT_TRUE(MO.isMetadata());
+ ASSERT_TRUE(MO.getMetadata() == MachineNode);
+
----------------
EXPECT_EQ
================
Comment at: llvm/unittests/CodeGen/MachineMetadata.cpp:327-328
+ auto &MI = MBB->back();
+ ASSERT_FALSE(MI.memoperands_empty());
+ ASSERT_TRUE(MI.hasOneMemOperand());
+
----------------
Only need the hasOneMemOperand
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103205/new/
https://reviews.llvm.org/D103205
More information about the llvm-commits
mailing list