summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/CodeGen/MachineOperandTest.cpp
diff options
context:
space:
mode:
authorPeng Guo <peng_guo@apple.com>2020-01-08 17:13:24 -0800
committerDaniel Sanders <daniel_l_sanders@apple.com>2020-01-08 18:48:02 -0800
commit3ef05d85be8c3666ebfa3ad986eb334da5195a47 (patch)
treef1ac7e0462a99fab6c9692722fbf2cf78db9d639 /llvm/unittests/CodeGen/MachineOperandTest.cpp
parent5ab6fa7b7011b00e8955168c5bbcb46e9712afa9 (diff)
downloadbcm5719-llvm-3ef05d85be8c3666ebfa3ad986eb334da5195a47.tar.gz
bcm5719-llvm-3ef05d85be8c3666ebfa3ad986eb334da5195a47.zip
[MIR] Target specific MIR formating and parsing
Summary: Added MIRFormatter for target specific MIR formating and parsing with immediate and custom pseudo source values. Target machine can subclass MIRFormatter and implement custom logic for printing and parsing immediate and custom pseudo source values for better readability. * Target specific immediate mnemonic need to start with "." follows by identifier string. When MIR parser sees immediate it will call target specific parsing function. * Custom pseudo source value need to start with custom follows by double-quoted string. MIR parser will pass the quoted string to target specific PSV parsing function. * MIRFormatter have 2 helper functions to facilitate LLVM value printing and parsing for custom PSV if they refers LLVM values. Patch by Peng Guo Reviewers: dsanders, arsenm Reviewed By: dsanders Subscribers: wdng, jvesely, nhaehnle, hiraditya, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69836
Diffstat (limited to 'llvm/unittests/CodeGen/MachineOperandTest.cpp')
-rw-r--r--llvm/unittests/CodeGen/MachineOperandTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/CodeGen/MachineOperandTest.cpp b/llvm/unittests/CodeGen/MachineOperandTest.cpp
index faa471f2260..7e60fab2815 100644
--- a/llvm/unittests/CodeGen/MachineOperandTest.cpp
+++ b/llvm/unittests/CodeGen/MachineOperandTest.cpp
@@ -310,7 +310,7 @@ TEST(MachineOperandTest, PrintMetadata) {
std::string str;
// Print a MachineOperand containing a metadata node.
raw_string_ostream OS(str);
- MO.print(OS, MST, LLT{}, /*PrintDef=*/false, /*IsStandalone=*/false,
+ MO.print(OS, MST, LLT{}, /*OpIdx*/~0U, /*PrintDef=*/false, /*IsStandalone=*/false,
/*ShouldPrintRegisterTies=*/false, 0, /*TRI=*/nullptr,
/*IntrinsicInfo=*/nullptr);
ASSERT_TRUE(OS.str() == "!0");
OpenPOWER on IntegriCloud