DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
- Run a single impalad instance if you're not already. It's generally easy to manage and reason about. (start-impala-cluster.py -s 1)
- Check that the query executes successfully with codegen disabled. If not, it's probably a bug in cross-compiled code.
- Inspect the generated IR
- Every LLVM Value* object (including Function*) has a dump() method that will print human-readable IR to stderr.
- This is useful for printing instructions, e.g. when LLVM complains about a calling a function with the wrong args, dump the offending instruction.
- If you'd like to dump an object to a string instead of stderr, use LlvmCodegen::Print().
- The -dump_ir impalad process flag will make the impalad call dump() on every generated function (see LlvmCodegen::FinalizeFunction()). When using start-impala-cluster.py, use the flags "--impalad_args -dump_ir". Output goes to the INFO log file in $IMPALA_HOME/logs/cluster/impalad.<something>.INFO.<timestamp>. Look for "Dump of Function" in the log.
- The -opt_module_dir process flag takes an already-created directory and will write every optimized module to that directory (there's a similar -unopt_module_dir flag for the unoptimized module, but usually -dump_ir is sufficient). However, the unoptimized IR is usually more useful (especially since the optimized module does not include any unused functions, including inlined functions, usually leaving you with one or two giant unreadable functions).
- The -asm_module_dir is similar to -opt_module_dir, except it outputs assembly for generated functions.
- Every LLVM Value* object (including Function*) has a dump() method that will print human-readable IR to stderr.
- By default we don't build a debug version of LLVM. If you want, you can manually build a debug version to link against so you can introspect LLVM functions in gdb. I generally find this not very helpful though, it's faster and more effective to add liberal dump() calls.
...