[PATCH] D79105: [LLD][ELF][RISCV] Linker relaxation support for R_RISCV_CALL

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 14:44:37 PDT 2020


jrtc27 added inline comments.


================
Comment at: lld/ELF/InputSection.cpp:175
+    // Count up the total distance to shift each relocation before shifting.
+    for (const auto &range : ranges) {
+      if (range.first < relocation.offset)
----------------
So this is still quadratic (O(nm)).


================
Comment at: lld/ELF/InputSection.cpp:192
+
+    for (const auto &range : ranges) {
+      const auto loc = range.first;
----------------
Also quadratic.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79105/new/

https://reviews.llvm.org/D79105





More information about the llvm-commits mailing list