Open Tomal-kuet opened 7 months ago
@llvm/issue-subscribers-backend-arm
Author: MD Armanuzzaman (Tomal-kuet)
Hi - could you move the pass to before ConstantIslandPass? (Or possibly during it).
As you explain, nothing should be increasing the distance between instructions after that point. You may be able to insert psuedo's before ConstantIslandPass with a known-maximum size, and replace the after. The code produced can be sub-optimal though.
I added my custom instrumentation backend pass for ARM cortex-m33 CPU at the end of the
addPreEmitPass2()
function which is afterARMConstantIslandPass
. In my custom pass, I do some instrumentation so the function size increases. My guess is as the function size increases the constant addresses go out of range for instructions such asvldr d11, [pc, #1008]
. The highestpc
relative access I found is 1008 without instrumentation and with my instrumentation it will be higher than 1020 (maximum limit?).As a result, I am getting error: out of range pc-relative fixup value. Can you please suggest to me how this is fixable?