[llvm-dev] [RFC] Add IR level interprocedural outliner for code size.

Meador Inge via llvm-dev llvm-dev at lists.llvm.org
Mon Jul 24 14:16:40 PDT 2017

> Firstly, as previously mentioned, we don’t know how an instruction will be lowered. So, if we say that each IR instruction has a cost of “1 somethings”, we haven’t really solved a *code size problem*, but more of a *code reduction problem*. That is, we’ve performed a reduction to the overall structure of the program, but we don’t know that that overall structural reduction will produce an equivalent code size reduction. I personally would be inclined to figure out how far off such a cost model could be, given a known architecture.

“code size” vs. “code reduction” seems like a really nice way to think about this.  I don’t know a lot about the areas in discussion, but one thing that occurred to me while reading this was: a code reduction couldn’t produce a worse code size than without the reduction, right?

— Meador

More information about the llvm-dev mailing list