[llvm] [RISCV][MC] Implement evaluateBranch for auipc+jalr pairs (PR #65480)

Job Noorman via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 3 03:52:41 PDT 2023


mtvec wrote:

> That seems better than expected and might be acceptable. However, I think using a bitset that can be zeroed with a single store should bring it down to near zero and will not add much complexity.

I implemented this and to my surprise, the overhead is still around 1%. After some digging, I noticed that the increase in runtime seems almost entirely due to the increased output size (total size increase is about 2% on the clang benchmark, the functions contributing the most to the increased runtime are output-related ones like `llvm::sys::unicode::columnWidthUTF8`).

Since this overhead is unavoidable, do you still feel it's worthwhile to implement the optimization?

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


More information about the llvm-commits mailing list