[LLVMdev] Associate IR instruction with corresponding assembly

Eric Christopher echristo at gmail.com
Mon May 19 09:17:24 PDT 2014


On Mon, May 19, 2014 at 8:34 AM, shruti padmanabha <shrutip27 at gmail.com> wrote:
> Oh, okay.
> Which was the last version of llc that worked with the pass? I could try
> working with an older version that is compatible.
>

Couldn't say, it would be a revision in svn, but I'm not sure what it
is. A lot of changes went into the format in 3.4.

> Is there something else I can hack up to serve my purpose of mapping
> assembly -> IR instructions?

Possibly not. It depends on accuracy. You could probably get the
instruction selector to put instructions as comments in the final IR,
but I don't necessarily think that's a small amount of work nor will
it be that accurate if it falls back to the DAG.

-eric

>
> Thanks for the help!
> Shruti
>
>
> On Mon, May 19, 2014 at 11:24 AM, Eric Christopher <echristo at gmail.com>
> wrote:
>>
>> Interesting. My guess is that the debug-ir pass wasn't updated when we
>> changed some version of the debug metadata and so isn't producing good
>> metadata.
>>
>> I'm not sure when I'll get to updating it though and it looks like
>> Daniel's address is bouncing.
>>
>> -eric
>>
>> On Mon, May 19, 2014 at 8:22 AM, shruti padmanabha <shrupad at umich.edu>
>> wrote:
>> > No. They're both from the 3.4 version of llvm.
>> > Thanks,
>> > Shruti
>> >
>> >
>> > On Mon, May 19, 2014 at 11:01 AM, Eric Christopher <echristo at gmail.com>
>> > wrote:
>> >>
>> >> On Sun, May 18, 2014 at 10:28 PM, Tobias Grosser <tobias at grosser.es>
>> >> wrote:
>> >> > On 19/05/2014 00:54, shruti padmanabha wrote:
>> >> >>
>> >> >> Hi,
>> >> >>
>> >> >> Thanks for the pointer. I am unfortunately running into llc problems
>> >> >> with
>> >> >> this pass.
>> >> >> I did
>> >> >> *opt  -debug-ir   hello.bc -o hello.deb.bc*
>> >> >>
>> >> >> *llc -march=arm -debug  -O0 hello.deb.bc  -o hello.deb.s*
>> >> >>
>> >> >>
>> >> >> This is aborting with the error: llc:
>> >> >> llvm-3.4/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1614: void
>> >> >> llvm::DwarfDebug::beginFunction(const llvm::MachineFunction*):
>> >> >> Assertion
>> >> >> `TheCU && "Unable to find compile unit!"' failed.
>> >> >> I'm assuming this is because llc found some errors in the metadata
>> >> >> that
>> >> >> debug-ir prints out. How do I find and correct this?
>> >> >
>> >> >
>> >> > This is indeed surprising. I have no idea where this is coming from.
>> >> > Does
>> >> > this only happen on ARM? Can you attach the debug.bc file? Or even
>> >> > better,
>> >> > open a bug report for that?
>> >> >
>> >> > I included Daniel who committed the -debug-ir pass as well as Eric
>> >> > who
>> >> > has
>> >> > better knowledge about debug info than me.
>> >> >
>> >>
>> >> Are you mixing versions of llc and opt? I.e. are they both built from
>> >> the same version?
>> >>
>> >> -eric
>> >
>> >
>
>
>
>
> --
> Shruti Padmanabha
> University of Michigan, Ann Arbor



More information about the llvm-dev mailing list