[PATCH] D21395: Fix for Bug 28144 and print register preserved in comments in asm files

Vivek Pandya via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 19:42:19 PDT 2016


vivekvpandya marked 2 inline comments as done.

================
Comment at: lib/CodeGen/RegUsageInfoCollector.cpp:119
@@ +118,3 @@
+
+  for (MachineBasicBlock &MBB : MF) {
+    for (MachineInstr &MI : MBB) {
----------------
mehdi_amini wrote:
> vivekvpandya wrote:
> > I have added this code after marking callee saved registers as preserved because if any callee inside the MF body is using the register , which has marked safe above then that will be correct register usage information.
> Can you take an example? I don't make sense of it.
@mehdi_amini This is not real example but this is what I have thought of when writing this code. Consider foo() sets R15 as per the calling convention as preserved register but one of its callee lat say bar() actually clobbers R15 then foo() will mark R15 as clobbered. I think you may have better reason.


http://reviews.llvm.org/D21395





More information about the llvm-commits mailing list