[PATCH] D94299: [NFC][AsmPrinter] Make comments for spill/reload more precise.
Hsiangkai Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 10 23:01:05 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5e476061deb8: [NFC][AsmPrinter] Make comments for spill/reload more precise. (authored by HsiangKai).
Changed prior to commit:
https://reviews.llvm.org/D94299?vs=315358&id=315707#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94299/new/
https://reviews.llvm.org/D94299
Files:
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Index: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -31,6 +31,7 @@
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/ConstantFolding.h"
#include "llvm/Analysis/EHPersonalities.h"
+#include "llvm/Analysis/MemoryLocation.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/BinaryFormat/COFF.h"
#include "llvm/BinaryFormat/Dwarf.h"
@@ -844,13 +845,21 @@
if ((Size = MI.getRestoreSize(TII))) {
CommentOS << *Size << "-byte Reload\n";
} else if ((Size = MI.getFoldedRestoreSize(TII))) {
- if (*Size)
- CommentOS << *Size << "-byte Folded Reload\n";
+ if (*Size) {
+ if (*Size == static_cast<unsigned>(MemoryLocation::UnknownSize))
+ CommentOS << "Unknown-size Folded Reload\n";
+ else
+ CommentOS << *Size << "-byte Folded Reload\n";
+ }
} else if ((Size = MI.getSpillSize(TII))) {
CommentOS << *Size << "-byte Spill\n";
} else if ((Size = MI.getFoldedSpillSize(TII))) {
- if (*Size)
- CommentOS << *Size << "-byte Folded Spill\n";
+ if (*Size) {
+ if (*Size == static_cast<unsigned>(MemoryLocation::UnknownSize))
+ CommentOS << "Unknown-size Folded Spill\n";
+ else
+ CommentOS << *Size << "-byte Folded Spill\n";
+ }
}
// Check for spill-induced copies
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94299.315707.patch
Type: text/x-patch
Size: 1446 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210111/9dbba6f7/attachment.bin>
More information about the llvm-commits
mailing list