[LLVMdev] interprocedural live value analysis

Gordon Haak gordon.haak at googlemail.com
Mon Nov 8 07:19:20 PST 2010


Hello,

I had a look at the global variable optimizer. In my opinion it
handles a few special cases, when global variables can be replaced by
local variables or be removed completely. Basically I think that this
problem could be solved with an interprocedural live value analysis
for global variables more generally. An assignment to a global
variable can be removed, if this global variable is dead at this
assignment. I know that this kind of analysis is not trivial to
implement and may have a significant performance impact. However it
might be useful.

What is your opinion about this analysis and transformation? Am I
right regarding the usefulness and the effort? What level of precision
would be reasonable (e.g. the depth of a calling context or no context
sensitivity at all)? What kind of fixpoint solver would be the best
choice for this purpose? Are their any reasons against my proposal?

Kind regards,
Gordon



More information about the llvm-dev mailing list