[PATCH] D45308: [IPRA] Do not collect register usage information on functions that can be derefined

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 1 05:00:10 PDT 2018


jonpa added a comment.

With this patch, any called function which is not "definition exact" keeps the unmodified regmask on the call instruction, which assumes that the callee saved registers are saved if modified by callee.

I therefore think the check !F.hasLocalLinkage() in isSafeForNoCSROpt() should be replaced with !F.isDefinitionExact(), since the former check only covers a subset of the second one.

Otherwise, the saving of the CSRs might be skipped without this being reflected in the call regmask in caller, right?


https://reviews.llvm.org/D45308





More information about the llvm-commits mailing list