On Fri, 5 May 2006, Simon Burton wrote:> This leads me to my next question: as I make more and more functions > with the EE, it slows down. I am re-using the Module, ExistingModuleProvider, > and ExecutionEngine, and pumping the parser like so: > M = ParseAssemblyString(AsmString, M); > ISTM that there should be a way of creating multiple modules/EEs but I ran > into trouble when I tried that (some time ago).Can you quantify what you mean? How does it "slow down"? -Chris -- http://nondot.org/sabre/ http://llvm.org/
On Fri, 5 May 2006 01:19:08 -0500 (CDT) Chris Lattner <sabre at nondot.org> wrote:> > On Fri, 5 May 2006, Simon Burton wrote: > > This leads me to my next question: as I make more and more functions > > with the EE, it slows down. I am re-using the Module, ExistingModuleProvider, > > and ExecutionEngine, and pumping the parser like so: > > M = ParseAssemblyString(AsmString, M); > > ISTM that there should be a way of creating multiple modules/EEs but I ran > > into trouble when I tried that (some time ago). > > Can you quantify what you mean? How does it "slow down"?It slows in the construction phase, so one of these calls: M = ParseAssemblyString(AsmString, M); verifyModule( *M ) M->getNamedFunction(name); EE->getPointerToFunction It feels like there is a linear name lookup going on somewhere. (will be able to do report more thorough timings later) Simon. -- Simon Burton, B.Sc. Licensed PO Box 8066 ANU Canberra 2601 Australia Ph. 61 02 6249 6940 http://arrowtheory.com
On Fri, 5 May 2006 16:43:13 +1000 Simon Burton <simon at arrowtheory.com> wrote:> > It slows in the construction phase, so one of these calls: > M = ParseAssemblyString(AsmString, M); > verifyModule( *M ) > M->getNamedFunction(name); > EE->getPointerToFunction > > It feels like there is a linear name lookup going on somewhere.it's verifyModule (of course). As the module grows, it takes longer to verify. So, I will disable this for now. Simon. -- Simon Burton, B.Sc. Licensed PO Box 8066 ANU Canberra 2601 Australia Ph. 61 02 6249 6940 http://arrowtheory.com