[LLVMdev] bytecode stripping from clang -emit-llvm

Geof Sawaya fredericflintstone at gmail.com
Mon Apr 27 17:51:04 PDT 2015


David, thank you for responding to my question

On Thu, Apr 16, 2015 at 6:09 PM, David Blaikie <dblaikie at gmail.com> wrote:

> 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.

>
> 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.

Thanks -- Geof



>
> On Thu, Apr 16, 2015 at 1:43 PM, Geof Sawaya
> <fredericflintstone at gmail.com> wrote:
> > 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
> >
> > _______________________________________________
> > LLVM Developers mailing list
> > LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150427/629d1075/attachment.html>


More information about the llvm-dev mailing list