Mercurial > projects > ldc
comparison gen/functions.cpp @ 1508:e1e93343fc11
Move function codegen data from IrFunction to new FuncGen.
This change reduces memory consumption significantly by releasing the
memory held by the STL containers that are now inside FuncGen.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 20 Jun 2009 19:11:44 +0200 |
parents | 2292878925f4 |
children | b6b6afc2dfc7 |
comparison
equal
deleted
inserted
replaced
1503:cc5fee7836dc | 1508:e1e93343fc11 |
---|---|
772 new llvm::StoreInst(fd->ir.irFunc->_arguments, argumentsmem, gIR->scopebb()); | 772 new llvm::StoreInst(fd->ir.irFunc->_arguments, argumentsmem, gIR->scopebb()); |
773 fd->ir.irFunc->_arguments = argumentsmem; | 773 fd->ir.irFunc->_arguments = argumentsmem; |
774 } | 774 } |
775 | 775 |
776 // output function body | 776 // output function body |
777 irfunction->gen = new FuncGen; | |
777 fd->fbody->toIR(gIR); | 778 fd->fbody->toIR(gIR); |
779 delete irfunction->gen; | |
780 irfunction->gen = 0; | |
778 | 781 |
779 // TODO: clean up this mess | 782 // TODO: clean up this mess |
780 | 783 |
781 // std::cout << *func << std::endl; | 784 // std::cout << *func << std::endl; |
782 | 785 |