Query regarding Inline Assembly

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?

Thanks

Kapil

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