Apparently this pass used to have liveness analysis but it was removed for scompile time reasons. This workaround prevents the LOH from being emitted unless the ADD and LDR are adjacent.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AArch64/AArch64CollectLOH.cpp | ||
---|---|---|
444 | I think AddMI->getIterator() == EndIt shouldn't be possible, otherwise we won't have a load in MI2. I haven't looked at that code for a long time but I think that when you'll look for a proper fix, you should be able to use handleClobber to accumulate the registers that are clobbered between two instructions. You may actually use that right now to still only issue this LOH when all the possible optimizations are safe. |
I think AddMI->getIterator() == EndIt shouldn't be possible, otherwise we won't have a load in MI2.
I haven't looked at that code for a long time but I think that when you'll look for a proper fix, you should be able to use handleClobber to accumulate the registers that are clobbered between two instructions.
You may actually use that right now to still only issue this LOH when all the possible optimizations are safe.