[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
Sun Jun 10 10:25:05 PDT 2018


vivekvpandya added a comment.

@kbarton can you please validate below tablel?

| **LinkageType**      | NoCSROptAllowed **before** this change | NoCSROptAllowed **after **this change                      |
| WeakAny              | not allowed                            | not allowed                                                |
| LinkOnce             | not allowed                            | not allowed                                                |
| Common               | not allowed                            | not allowed                                                |
| ExternalWeak         | not allowed                            | not allowed                                                |
| External             | not allowed                            | **allowed**                                                |
| Appending            | not allowed                            | //allowed (but this linkage does not apply to function) // |
| Internal             | allowed                                | allowed                                                    |
| Private              | allowed                                | allowed                                                    |
| WeakODR              | not allowed                            | not allowed                                                |
| LinkOnceODR          | not allowed                            | not allowed                                                |
| Available Externally | not allowed                            | not allowed                                                |
|

Function with external linkage should not be allowed for noCSR opt. For the attached test-case created for external linkage type I think your change allows noCSROpt foo function as for foo I see following value in debugger.
(lldb) p F.isDefinitionExact()
(bool) $1 = true
(lldb) p F.hasLocalLinkage()
(bool) $2 = false

In Attached files external.ipra.s.1 is with your change and external.ipra.s is TOT.
F6339169: external.ipra.s.1 <https://reviews.llvm.org/F6339169>

F6339168: external.ipra.ll <https://reviews.llvm.org/F6339168>

F6339167: external.ipra.s <https://reviews.llvm.org/F6339167>


https://reviews.llvm.org/D45308





More information about the llvm-commits mailing list