[llvm-dev] How to use bugpoint for backend native code generation?

Jie Zhou via llvm-dev llvm-dev at lists.llvm.org
Mon Mar 25 15:49:24 PDT 2019


Hello,

I’m writing machine function passes for programs running with ARMv7-M ISA. My pass adds some instructions to the original code, and now I got

fatal error: error in backend: out of range pc-relative fixup value

when llvm generates native code after running the transformation pass. I think it’s because my transformation pass increases the size of the original code and thus some branch instructions cannot reach their destination (for example, the beq instruction can only jump to a pc-relative destination within range -256 to 254 bytes).

It looks like bugpoint is a good tool to pinpoint which branch instruction caused the error. Unfortunately the blogs I found online are all about using bugpoint for IR passes but not for native code generation. Can anyone give me some help on this issue? (pointing to a good tutorial, or sharing some techniques to pinpoint the troublesome instructions, etc.)

Thanks very much.

- Jie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190325/add3a21f/attachment.html>


More information about the llvm-dev mailing list