bytecode stripping from clang -emit-llvm

Hi Devs,

I’m developing a tool that relies on semantic information in bytecode labels (i.e. block names).

I’ve discovered that clang is stripping these named labels (along with some virtual register names) when I run on a virtual machine. Well, I’m using VirtualBox, and have tried two different versions of Ubuntu and some different clang builds.

Can someone point me in the right direction to understand why the IR would be emitted differently because clang is running on a VM?

Many thanks – Geof

It's probably not VM related, but non-asserts builds of LLVM don't
produce named values. It's only the +Asserts builds of LLVM that
produce value (& block, I guess) names.

This is an optimization to avoid the extra work when we're just doing
the actual work of compiling anyway.

It'd be best to build your tool to not rely on these names.

David, thank you for responding to my question

David, thank you for responding to my question

It's probably not VM related, but non-asserts builds of LLVM don't
produce named values. It's only the +Asserts builds of LLVM that
produce value (& block, I guess) names.

  Unfortunately, I do have asserts enabled in my build (LLVM 3.2) and am
getting this described name stripping.

Any other ideas shared about avoiding this problem will be greatly
appreciated.

Nothing else rings a bell - a small example might be helpful, if you have
one.

This is an optimization to avoid the extra work when we're just doing
the actual work of compiling anyway.

It'd be best to build your tool to not rely on these names.

Yes, this should be done in the future, I imagine. I guess that the
information I need to preserve will have to be stored in metadata? Not
worried about this now as long as I can keep the label / block names for
now.

*nod*