Mercurial > projects > ldc
comparison gen/irstate.h @ 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 | 4dca8ed9d8b7 |
children | ad7f2f1862d6 |
comparison
equal
deleted
inserted
replaced
1503:cc5fee7836dc | 1508:e1e93343fc11 |
---|---|
180 }; | 180 }; |
181 | 181 |
182 template <typename InputIterator> | 182 template <typename InputIterator> |
183 llvm::CallSite IRState::CreateCallOrInvoke(LLValue* Callee, InputIterator ArgBegin, InputIterator ArgEnd, const char* Name) | 183 llvm::CallSite IRState::CreateCallOrInvoke(LLValue* Callee, InputIterator ArgBegin, InputIterator ArgEnd, const char* Name) |
184 { | 184 { |
185 llvm::BasicBlock* pad = func()->landingPad; | 185 llvm::BasicBlock* pad = func()->gen->landingPad; |
186 if(pad) | 186 if(pad) |
187 { | 187 { |
188 // intrinsics don't support invoking and 'nounwind' functions don't need it. | 188 // intrinsics don't support invoking and 'nounwind' functions don't need it. |
189 LLFunction* funcval = llvm::dyn_cast<LLFunction>(Callee); | 189 LLFunction* funcval = llvm::dyn_cast<LLFunction>(Callee); |
190 if (funcval && (funcval->isIntrinsic() || funcval->doesNotThrow())) | 190 if (funcval && (funcval->isIntrinsic() || funcval->doesNotThrow())) |