Open Quuxplusone opened 7 years ago
Bugzilla Link | PR33657 |
Status | NEW |
Importance | P enhancement |
Reported by | Charles Saternos (charles.saternos@gmail.com) |
Reported on | 2017-06-30 08:33:56 -0700 |
Last modified on | 2019-01-16 12:56:07 -0800 |
Version | trunk |
Hardware | PC Linux |
CC | ditaliano@apple.com, llvm-bugs@lists.llvm.org, tejohnson@google.com, xkspr7@gmail.com |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
Looks like we'll need to get some index-based interprocedural constant prop to get things lik the deletion of "c".
For "b", we should already be marking for internalization during the thin link, unless we decide to import jj() into the module with main(), which of course means it then has external references. However, there are a couple of possibilities that we have talked about for handling situations like this. One is that when we have a function like jj() that is only referenced by one other module, we may want to mark it for import as a local copy, rather than import as available_externally. Then we can mark it for internalization in its original module, where it can be deleted. That still leaves "b" exported, however. But with the existing ThinLTO index call graph, we can see that "b" is only referenced by its defining module (before the export due to jj() being imported), and if we have read/write info on the reference edges we would see it is only written once where it is defined, and could mark it for import as a local copy as well (marking the original for internalization). Another possibility is handling "b" via interprocedural constant prop, by marking the write reference with the constant value, and propagating this via the index.
Hi all,
It looks interesting to me. I will be happy to work on this.
Thanks,
Akshat Garg