[LLVMdev] Crash on accessing deleted MBBs (new backend)

Andreas Fredriksson deplinenoise at gmail.com
Fri Sep 28 13:37:00 PDT 2007


Replying to my self here. It seems I was missing an isTerminator = 1
on the branch instruction in question, so LLVM didn't know that the
instruction terminated a basic block. Does that make sense, or is just
masking some other problem?

Thanks,
Andreas

On 9/28/07, Andreas Fredriksson <deplinenoise at gmail.com> wrote:
> Hi,
> I'm trying to write up my little m68k backend things have been going
> smoothly. I've been working with the x86 backend as a template, fixing
> things as I go.
>
> Now I've run into branches and I have a crash I don't really
> understand. Here's the sample IR I'm running llc on to generate
> assembly:
> <snip>
> llc crashes at this point because the target branch of the BLT (branch
> if lower than) has gone away. On my win32 box it's filled with
> 0xfeeefeee (deleted data).
>
> I've verified that the block is actually removed by the branch
> folding, but for some reason this poor BLT instruction never hears
> about that. What can I do to fix this?
>
> Thanks,
> Andreas
>



More information about the llvm-dev mailing list