[LLVMdev] How to prevent an instruction to be executed more than once?

Xinfinity xinfinity_a at yahoo.com
Thu Jun 24 04:54:38 PDT 2010


Hi LLVM-devs,

I am looking for a way to prevent an instruction to be executed more than
once, or duplicated .. I know that by default everything can be duplicated,
but is there a work-around?

The structure of the code is 
 BB1    BB2
   |          |
   |          |
   |          |
   |----------|
        |
        v
       BB3

where the first instruction in BB3 is inserting an inline assembly which
contains a newly defined label:

            call void asm "BB4_label:\0A", ""()

I want to find a way to have this instruction executed only once. The
problem is that in the optimisation steps, LLVM duplicates BB3 and
concatenates it with BB1 and with BB2, therefore the label is defined twice,
which gives an error.
        
Is it possible to do this, without having to modify the back-end of LLVM ?

Thanks,
Alexandra

-- 
View this message in context: http://old.nabble.com/How-to-prevent-an-instruction-to-be-executed-more-than-once--tp28981639p28981639.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.




More information about the llvm-dev mailing list