[LLVMdev] Being able to know the jitted code-size before emitting

Chris Lattner sabre at nondot.org
Fri Apr 4 13:07:58 PDT 2008


On Fri, 4 Apr 2008, Jonathan S. Shapiro wrote:
> Evan: please explain how span-dependent branches are resolved in your
> method. You don't need to compute the bits that will be emitted, but you
> do need to compute the length of those bits. In most real
> implementations, the two steps are therefore inseparable.

I think the important point here is that llvm explicitly represent short 
and long branches as two different instructions.  We don't leave it up to 
the assembler to determine whether a short or long branch is to be used. 
The PPC and ARM backend have branch shortening passes to know what sort of 
branch to us, for example.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list