This is an archive of the discontinued LLVM Phabricator instance.

JIT: Print debug location of inline asm and ignore DBG_VALUE instructions
ClosedPublic

Authored by yaron.keren on Apr 18 2014, 12:17 AM.

Details

Summary

Two small enhancements for the JIT.

When JITting a large project such as Boost it's quite hard to figure out the problematic inline asm without debug location. This patch provides debug location printout before the JIT aborts due to inline asm. printDebugLoc() was exposed from MachineInstr.cpp and reused here.

If the JIT run with debug info, don't bomb on DBG_VALUE but ignore them.

Diff Detail

Event Timeline

You'll possibly want dbg_declare there too.

I think I'd like printDebugLoc to be somewhere else if we use it, but why not just print out the entire inline asm MachineInstr?

Also, you should probably move to MCJIT :)

yaron.keren updated this revision to Diff 9021.May 1 2014, 1:40 PM
yaron.keren edited edge metadata.

Printing the instruction is not needed as you'd usually want just the debug location to workaround.

Using dump() does the patch trivial not using printDebugLoc().

TargetOpcode has DBG_VALUE but not DBG_DECLARE ? how to add this?

Hi, is this patch good to commit now?

echristo accepted this revision.May 14 2014, 3:30 PM
echristo added a reviewer: echristo.

Sadly looks like I was wrong about printing out the instruction - nothing else does it.

LGTM with that pulled back out.

This revision is now accepted and ready to land.May 14 2014, 3:30 PM
yaron.keren updated this revision to Diff 9410.May 15 2014, 1:02 AM
yaron.keren edited edge metadata.

Meanwhile, DebugLoc gained a new print() method in r208177, so we can reuse it.

Ping? just few lines.

yaron.keren closed this revision.Jun 4 2014, 10:45 AM

Committed r210201.