This is a first attempt at fixing and re-enabling the arm-promote-constant optimisation. The original version of this patch was written by John (thanks John!) when he ran into problems with the bugs here. This fixes things in the constant island pass by not cloning constant pool entries that are pointed to by LEA's, but converting them to a LDR to the original pool entry.
Details
Details
- Reviewers
- None
Diff Detail
Diff Detail
Event Timeline
Comment Actions
This involves adding a new ARMConstantPoolIndexAddress so as to point the newly created constant entry at the symbol name of the other. The reference counting can get a bit gnarly, and the testing here could do with being improved. It passes the various bootstraps I throw at it, but there might well be some combination of options/conditions that make things fail. Any ideas of better ways to test this?
So it seems like a workable solution, but does make constant island pass slightly more complex. What do people think?