I spent quite a lot of time tracking down a miscompilation in LLVM lately but I’m pretty much back on track now. One fun thing is that I figured out how to add diagnostic options to OpenJDK, so when I eventually release Shark you’ll be able to debug it with the following exciting options:

-XX:SharkStartAt=N
Start compiling only after N compilation requests. (Use in conjunction with -XX:+PrintCompilation.)
-XX:SharkStopAfter=N
Stop compiling after N compilation requests.
-XX:SharkDumpModuleAfter=N
Dump all generated LLVM bitcode (to hotspot.bc) after N compilation requests.
-XX:SharkPrintTypeflowAfter=N
Print the results of the typeflow pass of the Nth compilation request.
-XX:+SharkTraceBytecodes
Print the name and bci of each bytecode compiled (Handy for crashes).

I tend to use them in pairs, eg -XX:Shark{StartAt,DumpModuleAfter}=17.

This list will probably get real old real quick, but they’ll all be listed in ports/hotspot/src/share/vm/shark/shark_globals.hpp.