[llvm-bugs] [Bug 50908] New: Optimize bind opcode generation

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jun 26 22:04:30 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50908

            Bug ID: 50908
           Summary: Optimize bind opcode generation
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: MachO
          Assignee: unassignedbugs at nondot.org
          Reporter: jezreel at gmail.com
                CC: gkm at fb.com, jezreel at gmail.com,
                    llvm-bugs at lists.llvm.org, smeenai at fb.com

We currently encode significantly more bind opcodes than ld64. I estimate a
roughly 5x (!) overhead when encoding the same number of bind & rebase entries.

Some ideas:
* Make sure we use BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB for encoding
rebases of the GOT
* Sort the GOT entries by dylib, so to minimize the number of
BIND_OPCODE_SET_DYLIB_ORDINAL_* opcodes

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210627/8170b573/attachment.html>


More information about the llvm-bugs mailing list