[lld] [llvm] Clean up / speed up ULEB128 decoding (PR #73585)

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 12:19:05 PST 2023


adrian-prantl wrote:

I manually pushed this in 
```
commit 80fc872a24c4dca4820d2e7885b5ee9195bec42a
Author: Adrian Prantl <aprantl at apple.com>
Date:   Mon Nov 27 14:46:57 2023 -0800

    [LEB128] Mark error condition with LLVM_UNLIKELY

commit 0cc2acc30b3d2f4e914fd49c599cfde8a17f26a6
Author: Adrian Prantl <aprantl at apple.com>
Date:   Mon Nov 27 14:15:12 2023 -0800

    [LEB128] Don't handle edge cases in every loop iteration
    
    Previously the overflow check was done for every byte even though it
    is only needed for the case where Shift == 63.

commit b96121c2e7de66154a70db5f202c9adce515aa45
Author: Adrian Prantl <aprantl at apple.com>
Date:   Mon Nov 27 14:15:06 2023 -0800

    [LEB128] Factor out redundant code

commit 545c8e009e2b649ef38f7e432ffbc06ba8a9b813
Author: Adrian Prantl <aprantl at apple.com>
Date:   Mon Nov 27 10:42:57 2023 -0800

    [LEB128] Don't initialize error on success
    
    This change removes an unnecessary branch from a hot path. It's also
    questionable API to override any previous error unconditonally.
```

https://github.com/llvm/llvm-project/pull/73585


More information about the llvm-commits mailing list