[LLVMdev] How to prevent an instruction to be executed more than once?
arplynn at gmail.com
Thu Jun 24 05:09:42 PDT 2010
Doing control-flow (jumps and/or labels) in inline asm is a really bad idea. What are you trying to achieve?
On 24 Jun 2010, at 12:54, Xinfinity wrote:
> 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
> | |
> | |
> | |
> 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 ?
> 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.
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev