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

Vivek Pandya via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 24 10:31:38 PDT 2018


vivekvpandya added a comment.

Coge change looks good but I have few questions on lit test cases.

1. in llvm/test/CodeGen/PowerPC/ipra-odr.ll IPRA is not called on bar() then it should follow calling convention so in foo() why registers are getting restored between calls to bar() because without IPRA bar() is expected to save callee-saved-registers as per ABI.
2. llvm/test/CodeGen/X86/ipra-external-linkage.ll same question as above applies. As foo() will save callee-saved-registers as per ABI why around foo() call in bar() it should save/restore callee-saved-register.



================
Comment at: llvm/test/CodeGen/X86/ipra-external-linkage.ll:9
+; When IPRA is enabled we should have the same behaviour as NOIPRA because
+; this is an external function that we cannot optimize with IRPA.
+; CHECK-LABEL: foo:
----------------
For function definition that has external linkage IPRA is applicable but LLVM can't optimize it to have NoCSROpt.
So check is correct but comment needs to be accurate.


https://reviews.llvm.org/D45308





More information about the llvm-commits mailing list