[llvm-commits] [llvm] r142684 - in /llvm/trunk: lib/Transforms/Utils/CloneFunction.cpp test/Transforms/Inline/blockaddress.ll

Duncan Sands baldrick at free.fr
Fri Oct 21 21:40:43 PDT 2011


Hi Eli,

> +    // It is only legal to clone a function if a block address within that
> +    // function is never referenced outside of the function.

is this documented anywhere?  The description of CloneFunction doesn't mention
it.  Do callers of CloneFunction actually check for this?  Note that it is
perfectly valid to use a block address in a different function, for example
storing it in some variable, passing it around - it just isn't legal to branch
to it from a different function.  In short, is this fix really correct?

Ciao, Duncan.



More information about the llvm-commits mailing list