[LLVMdev] NO-OP

Fernando Magno Quintao Pereira fernando at CS.UCLA.EDU
Fri Jul 13 09:34:55 PDT 2007


>>      I am in need of a no-op instruction: an instruction that does not do
>> anything, and has no operands. Does LLVM predefine such an instruction? I
>> want to transform the program so that there is  no empty basic block.
>
> You can never have an empty basic block. All BBs must have a TerminatorInst.
>

I've built a pass to split critical edges of machine functions, and I have 
to insert new basic blocks. Some of them will have MBB->begin() == 
MBB->end().

Fernando



More information about the llvm-dev mailing list