[LLVMdev] Can I get the binary address of a for-loop statement?

John Criswell criswell at illinois.edu
Thu May 12 07:29:31 PDT 2011


On 5/12/11 5:14 AM, Alexander Potapenko wrote:
>> Another thing that might work would be to insert inline assembly
>> statements that define symbols before and after the loop.  The LLVM
>> optimizations shouldn't move loop code around these inline assembly
>> statements (if the statements are labeled as modifying memory in a
>> volatile manner), but optimizations between the inline assembly
>> statements should remain unfettered.
> By the way, is it possible to insert additional labels using the
> inline assembly statements?
> I understand this may degrade the optimization quality, but it could
> be done at the last optimization stage.

I think so but have never tried it.

-- John T.

> Alexander Potapenko




More information about the llvm-dev mailing list