[LLVMdev] Out of range address

Chris Lattner
Tue, 03 Oct 2006 20:42:13 -0000

On Tue, 3 Oct 2006, Fernando Magno Quintao Pereira
wrote:
>     I am having some problems when compiling huge programs (like gcc).
> I have a machine pass to destroy critical edges, and I have to add
> new basic blocks, but sometimes the program is too big, and the new
> basic block gets out of addressing range. What is the proper way to
> address this problem? I am producing code for the PowerPC, and I had
> to implement the insert go-to method. I am adding:
> BuildMI(MBB, MBB.end(), PPC::B, 1).addMBB(&TMBB);

Make sure to run your pass before the PPC branch selection pass.  The
branch selection pass is the one that makes sure that out-of-range
branches are handled.  If you run after that, you have to do this
yourself.

-Chris

--