halide/Halide — pull request #454 by dsharletg (2014-09-08 15:51:22+00:00)
Title: Runtime debug

Sorry for forking the discussion/pull request #450 like this, I didn't plan ahead with my commits... I should have branched from the debug_runtime branch, I wanted to PR this into that branch. I suggest that unless the comment is strictly related to this specific pull request, that we keep the discussion in #450.

This is a different attempt to include -g in the runtime. This pull request does it by creating a new debug configuration of the runtime, controlled by a target flag. Some notes about this:

- If there are any performance concerns with -g, this should eliminate them. -g is only on when the 'debug' target feature is set.
- This adds a global 'DEBUG' preprocessor flag that we can use anywhere in the runtime, not just modules that have a separate 'debug' version of that module (e.g. GPU modules).
- It checks and removes the debug flag when using the old JIT to avoid the pseudo instruction assert in LLVM.
- Added -O3 to the non-debug runtime (per Zalman's point).