[LLVMdev] Query regarding Inline Assembly

Luke Dalessandro luked at cs.rochester.edu
Sat Sep 6 07:55:04 PDT 2008


kapil anand wrote:
> Hi all,
> 
> I am using the inline assembly expressions( which are different from
> Module Level Inline Assembly) and have some doubts about how do the
> assembly expressions affect the optimization passes.
> 
> I inserted an inline assembly for a particular instruction and I
> assume that this instruction affects the Data Flow. Thus I want to
> make sure that no pass should move any instruction across this
> assembly expression. I tried by making the side-effect flag of
> assembly instruction to be true but still the passes were moving
> instruction across this assembly expression. Is there any other way to
> specify stricter constraint for assembly expressions?

Setting "memory" in the clobber flags and making the assembly volatile 
should prevent code motion across the instruction.

Luke

> 
> Thanks
> 
> Kapil
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list