[LLVMdev] PHI node operads

Carlos Sánchez de La Lama carlos.delalama at urjc.es
Mon Oct 10 08:42:42 PDT 2011

Hi Duncan,

thanks for your answer.

> > I have a pass that duplicates all instructions and keeps a "reference
> > map" of duplicated values, which is later used to update all the
> > references, thus creating a whole copy of a previous function.
> ...
> why don't you just call something like CloneFunction?

Because I do not want to replicate the whole function, just some BBs
(you might think of it as replicating a subgraph of a given function). I
suppose I could "extract" the required BBs to functions, clone and
re-inline, but I find that a little too messy.



More information about the llvm-dev mailing list