[PATCH] D46315: [RegUsageInfoCollector] Fix handling of callee saved registers with CSR optimization.
Jonas Paulsson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 24 07:22:27 PDT 2018
jonpa requested review of this revision.
jonpa added inline comments.
================
Comment at: lib/CodeGen/RegUsageInfoCollector.cpp:149
+ << " function optimized for not having CSR.\n");
}
----------------
qcolombet wrote:
> jonpa wrote:
> > qcolombet wrote:
> > > This logging is not very useful now. I would get rid of it.
> > Do you want to remove this entire clause of just the dbgs() output?
> >
> > I might object a little to removing this, since I have made SystemZ tests that checks for this, for instance to check that the return register is saved even on such a function:
> >
> > ```
> > ; DBG: fun3 function optimized for not having CSR
> > ; CHECK-LABEL: fun3
> > ; CHECK: stmg %r14, %r15, 112(%r15)
> > ; CHECK: lr %r14
> > ; CHECK: a %r14
> > ; CHECK: lmg %r14, %r15, 112(%r15)
> > ; CHECK: br %r14
> >
> > ```
> > It also seems useful to IPRA to have the statistic around...
> >
> To me the logging is not useful anymore because there is no change of behavior in the past itself based on isSafeForNoCSROpt.
> It looks to me that we are printing this because we expect determineCalleeSaved to do the right thing with it, but that's a big assumption :).
Unless you object, I'll keep it there, since I think this should be reported in the logs at least somewhere (and not by every backend).
https://reviews.llvm.org/D46315
More information about the llvm-commits
mailing list