Simplified and HTML lowered statement dumps

Initial import, adaptation, and cleanup of statement simplification, HTML dump. Original code by @zingales. This needs a review.
Those should default to the target, not the jit target. I.e. use
get_target_from_environment()

I'm OK with the overloads. I think it would be annoying to pass an empty
std::map just because you want to specify a target.


On Thu, Jul 24, 2014 at 9:45 AM, Giuseppe Zingales <notifications@github.com
> wrote:

> In src/Func.h:
>
> >      EXPORT void compile_to_lowered_stmt(const std::string &filename,
> >                                          const Target &target = get_target_from_environment());
> >
> > +    /** Write out an internal representation of lowered code as above
> > +     * but simplified using the provided realization bounds and other
> > +     * concrete parameter values. Emits HTML if the filename ends in
> > +     * .html, plain text otherwise. */
> > +    EXPORT void compile_to_simplified_lowered_stmt(const std::string &filename, Realization dst, std::map<std::string, Expr> additional_replacements, const Target &t = get_jit_target_from_environment());
> > +
> > +    EXPORT void compile_to_simplified_lowered_stmt(const std::string &filename, Realization dst, const Target &t = get_jit_target_from_environment());
> > +
> > +    template<typename T>
>
> I wanted compile_to_simplified_lowered_stmt to be analogous to realize.
> Furthermore, i was told it was bad practice to have two default arguments
> in a row in c++.
> If this project doesn't mind having two default arguments in a row you
> could easily merge the two functions at 570 and 572 into one (and such
> similar pairs functions) without loosing anything.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/halide/Halide/pull/389/files#r15357733>.
>