[JITLink][RISCV] Adjust offsets of non-relaxable edges
The relaxation algorithm used to only update offsets of relaxable edges. This caused non-relaxable edges that appear after a relaxed instruction to have an incorrect offset and be applied at the wrong location. This patch fixes this by updating the offsets of all edges. Note that this bug was caused by an incorrect translation of LLD's relaxation algorithm. LLD always uses all edges during relaxation while I decided to filter-out relaxable edges to prevent having to iterate non-relaxable edges at each step. However, this had the side-effect of only updating offsets of relaxable edges. This patch leaves the filtering of relaxable edges as-is but iterates all edges when updating offsets. Reviewed By: StephenFan Differential Revision: https://reviews.llvm.org/D153515
Loading
Please sign in to comment