diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2017-12-15 16:33:45 +0000 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2017-12-15 16:33:45 +0000 |
commit | 0b5bdceabfeaf67c91e5ccfed0320a82781f555c (patch) | |
tree | a69055b06a17fc2cbebac494e14e7852e1cefca0 /llvm/lib/CodeGen/MIRPrinter.cpp | |
parent | b952e639d9dc0cf9c7d46231d080e436fae5f9e4 (diff) | |
download | bcm5719-llvm-0b5bdceabfeaf67c91e5ccfed0320a82781f555c.tar.gz bcm5719-llvm-0b5bdceabfeaf67c91e5ccfed0320a82781f555c.zip |
[CodeGen] Print stack object references as %(fixed-)stack.0 in both MIR and debug output
Work towards the unification of MIR and debug output by printing
`%stack.0` instead of `<fi#0>`, and `%fixed-stack.0` instead of
`<fi#-4>` (supposing there are 4 fixed stack objects).
Only debug syntax is affected.
Differential Revision: https://reviews.llvm.org/D41027
llvm-svn: 320827
Diffstat (limited to 'llvm/lib/CodeGen/MIRPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MIRPrinter.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp index 8cc9ad28c2a..7c4e098b564 100644 --- a/llvm/lib/CodeGen/MIRPrinter.cpp +++ b/llvm/lib/CodeGen/MIRPrinter.cpp @@ -758,13 +758,8 @@ void MIPrinter::printStackObjectReference(int FrameIndex) { assert(ObjectInfo != StackObjectOperandMapping.end() && "Invalid frame index"); const FrameIndexOperand &Operand = ObjectInfo->second; - if (Operand.IsFixed) { - OS << "%fixed-stack." << Operand.ID; - return; - } - OS << "%stack." << Operand.ID; - if (!Operand.Name.empty()) - OS << '.' << Operand.Name; + MachineOperand::printStackObjectReference(OS, Operand.ID, Operand.IsFixed, + Operand.Name); } void MIPrinter::printOffset(int64_t Offset) { |