Mercurial > projects > ldc
comparison gen/llvmhelpers.h @ 940:39519a1ff603
Changed the way LDC determines if a template instantiation needs to get a definition, seems to speed up compile times quite a bit in some cases.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Wed, 04 Feb 2009 18:48:03 +0100 |
parents | 2ebac4750adb |
children | 4d366a75d95f |
comparison
equal
deleted
inserted
replaced
939:cac9895be400 | 940:39519a1ff603 |
---|---|
59 DValue* DtoCast(Loc& loc, DValue* val, Type* to); | 59 DValue* DtoCast(Loc& loc, DValue* val, Type* to); |
60 | 60 |
61 // return the same val as passed in, modified to the target type, if possible, otherwise returns a new DValue | 61 // return the same val as passed in, modified to the target type, if possible, otherwise returns a new DValue |
62 DValue* DtoPaintType(Loc& loc, DValue* val, Type* to); | 62 DValue* DtoPaintType(Loc& loc, DValue* val, Type* to); |
63 | 63 |
64 // is template instance check | 64 // is template instance check, returns module where instantiated |
65 bool DtoIsTemplateInstance(Dsymbol* s); | 65 Module* DtoIsTemplateInstance(Dsymbol* s); |
66 | 66 |
67 // these are all basically drivers for the codegeneration called by the main loop | 67 // these are all basically drivers for the codegeneration called by the main loop |
68 void DtoResolveDsymbol(Dsymbol* dsym); | 68 void DtoResolveDsymbol(Dsymbol* dsym); |
69 void DtoDeclareDsymbol(Dsymbol* dsym); | 69 void DtoDeclareDsymbol(Dsymbol* dsym); |
70 void DtoDefineDsymbol(Dsymbol* dsym); | 70 void DtoDefineDsymbol(Dsymbol* dsym); |
106 void findDefaultTarget(); | 106 void findDefaultTarget(); |
107 | 107 |
108 // fixup an overloaded intrinsic name string | 108 // fixup an overloaded intrinsic name string |
109 void DtoOverloadedIntrinsicName(TemplateInstance* ti, TemplateDeclaration* td, std::string& name); | 109 void DtoOverloadedIntrinsicName(TemplateInstance* ti, TemplateDeclaration* td, std::string& name); |
110 | 110 |
111 // return true if the symbol should be defined in the current module, not just declared | |
112 bool mustDefineSymbol(Dsymbol* s); | |
113 | |
114 // returns true if the symbol needs template linkage, or just external | |
115 bool needsTemplateLinkage(Dsymbol* s); | |
116 | |
111 //////////////////////////////////////////// | 117 //////////////////////////////////////////// |
112 // gen/tocall.cpp stuff below | 118 // gen/tocall.cpp stuff below |
113 //////////////////////////////////////////// | 119 //////////////////////////////////////////// |
114 | 120 |
115 /// convert DMD calling conv to LLVM | 121 /// convert DMD calling conv to LLVM |