[LLVMdev] Splitting basic block results in unknown instruction type assertion

Tim Northover t.p.northover at gmail.com
Tue Jul 8 00:23:03 PDT 2014


Hi Tyler,

On 7 July 2014 20:45, Tyler Denniston <tyler at csail.mit.edu> wrote:
> Is this due to some mistake on my part, or is this a bug?

I suspect the problem is that you're modifying control-flow during
iteration. I don't think the InstVisitor is written to cope with that
(I wouldn't even bet on it working if you added or removed
instructions in a single basic block).

I think passes often build up a list of instructions they want to
change and then deal with them in a second phase.

Cheers.

Tim.



More information about the llvm-dev mailing list