[llvm-dev] How can I get the opcode length of an IR instruction in LLVM?
Tim Northover via llvm-dev
llvm-dev at lists.llvm.org
Mon Feb 27 07:52:26 PST 2017
On 27 February 2017 at 07:50, Bruce Hoult via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> Not possible, even in theory, because the size of some instructions -- such
> as relative branches -- are not known until link time, and that affects the
> offsets of instructions following them.
Which target's that for? You'd need function-internal relocations for
each BB to make that work, x86 branches only get relaxed at
compile-time as far as I was aware.
More information about the llvm-dev