[llvm-commits] Patch, enable reusing a module pass manager across multiple modules

Pedro Artigas partigas at apple.com
Tue Nov 13 17:00:06 PST 2012


Hello All,

I believe the decision of what to do is orthogonal from the data structure clean up mechanism, that is if some module pass wants to remember old modules and do fancy cross module optimizations it is always an option but the mechanism to refresh the module pass to go to a canonical state instead of freeing it is orthogonal.

My goal is to clean up all the redundant doInitialization/doFinalization for passes that, in the end, will not benefit from the idea, I am planning on doing that in subsequent commits.

Thanks

Pedro


On Nov 13, 2012, at 4:38 PM, Eric Christopher <echristo at gmail.com> wrote:

> 
> 
> 
> On Tue, Nov 13, 2012 at 4:28 PM, Owen Anderson <resistor at mac.com> wrote:
> 
> On Nov 13, 2012, at 4:17 PM, Eric Christopher <echristo at gmail.com> wrote:
> 
>> On Tue, Nov 13, 2012 at 4:05 PM, Pedro Artigas <partigas at apple.com> wrote:
>>  
>> The idea is that we will compile many modules together and save compile time by reusing the module passes data structures.
>> 
>> 
>> Isn't this what we have llvm-link for (or the library equivalent)? This is why I asked the question.
> 
> The intended use case is for a JIT or other long-running compilation process, where we will compile many distinct modules that were not all available to be linked together at the same time.  If we can reuse the PassManager structure across multiple module compilations, we can save the compile time cost of setting up the PassManager on all but the first module.
> 
> 
> With the (possible) assumption that all globals/functions/etc are going to be unique per additional module and not held over. Also how would this affect things like inlining or cross function optimization? In other words, are you going to just have the information and not the original module or are you going to keep a list of modules to the side and the passes remember in which module the code they care about resides?
> 
> -eric

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121113/92c3031e/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.txt
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121113/92c3031e/attachment.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121113/92c3031e/attachment-0001.html>


More information about the llvm-commits mailing list