[LLVMdev] set builder's insert point to the last of a couple of instructions

Frank Winter fwinter at jlab.org
Fri Jul 10 08:35:32 PDT 2015


I have a couple of instructions (say 4) in a SetVector<Value*> which 
belong to a single basic block (they are in no particular order with 
respect to the BB). I'd like to tell the IRBuilder that the insert point 
is right after the last of these 4 instructions ('last' with respect to 
the order in the BB). How would I do that?
I can set the insert point with an BB::iterator, but then it boils down 
to get that. Can this be done without iterating over all instructions in 
the BB until the last one is found? (That would take too long)

Thanks,
Frank




More information about the llvm-dev mailing list