[llvm-commits] [llvm] r55734 - in /llvm/trunk: include/llvm/LinkAllPasses.h include/llvm/Transforms/IPO.h lib/Transforms/IPO/PartialSpecialization.cpp

Matthijs Kooijman matthijs at stdin.nl
Thu Sep 4 09:23:34 PDT 2008


> I can slightly refactor so you could inherit the class and just
> specify the function for finding interesting arguments and a function
> for approving specialization on certain constant/argument pairs.  I
> hesitate to  make the policy a separate pass, but I would be willing
> (esp when I add the code to remove the need to run IPSCCP and DAE
> (which is simply a matter of using cloneFunction more efficiently)),
> to move the mechanism into common code.
Yeah, I think this is what the inlining code does as well, right?

> // Find all calls to F which have the Constant arguments in the
> positions indicated by vals
> // and replace those calls with a call to a version of F specialized
> on those constants.
> Function* specializeFunction(Function& F, SmallVector<pair<int,
> Constant*> >& vals);
> 
> help you?  I.E. make this more like function cloning than function
> inlining in terms of policy/mechanism separation.
This is slightly different from what you propose above, I think? Or am I
misunderstanding you?

Anyway, I think this would also help simplifying my code, though I can't be
sure until I saw my own code again (which will be next Monday at the
earliest).

Gr.

Matthijs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20080904/64ce0127/attachment.sig>


More information about the llvm-commits mailing list