[LLVMdev] LLVM Inliner

Duncan Sands baldrick at free.fr
Mon Nov 29 01:17:05 PST 2010


Hi David,

> Interesting -- LLVM does perform on the fly cleanups during inlining
> transformation -- this will make summary update precise. One thing I notice from
> the debug pass dump is that the 'deduce function attribute' pass happens before
> the clean up -- Is it intended?

you are correct.  This is due to a limitation of the pass manager: it would
clearly be better to run the function attributes pass after the per-function
passes that follow the inliner, but currently if you try what happens is that
first the inliner and on the fly cleanups get run on every function, and only
when they have finished the function attributes pass gets run on every
function.  That means that function attributes of callees will not have been
calculated when the inliner (and the subsequent function passes) process a
function, which is bad.  I think the pass manager should be fixed to not do
this, at which point the function attributes pass could be moved later.

Ciao,

Duncan.



More information about the llvm-dev mailing list