comparison gen/tollvm.h @ 217:0806379a5eca trunk

[svn r233] Added: -oq command line option for writing fully qualified object names. Added: started support for x86 80bit floating point. Changed: aggregates passed by value now use the llvm 'byval' parameter attribute, also lays ground work for using other attributes. Changed: eliminated a lot more std::vectorS, these showed up pretty much at the top when profiling! Changed: performed other misc. cleanups. Changed: halt expression now call the new llvm trap intrinsic instead of an assert(0). Changed: dstress suite now passes -O0 by default, this only eliminates unreferenced globals, which speeds up linking quite a bit.
author lindquist
date Thu, 05 Jun 2008 06:38:36 +0200
parents 7816aafeea3c
children a95056b3c996
comparison
equal deleted inserted replaced
216:3d022aa016ae 217:0806379a5eca
5 #include "lexer.h" 5 #include "lexer.h"
6 #include "mtype.h" 6 #include "mtype.h"
7 #include "attrib.h" 7 #include "attrib.h"
8 #include "declaration.h" 8 #include "declaration.h"
9 9
10 #include "gen/structs.h"
11
10 // D->LLVM type handling stuff 12 // D->LLVM type handling stuff
11 const LLType* DtoType(Type* t); 13 const LLType* DtoType(Type* t);
12 bool DtoIsPassedByRef(Type* type); 14 bool DtoIsPassedByRef(Type* type);
15 bool DtoIsReturnedInArg(Type* type);
13 16
14 // resolve typedefs to their real type. 17 // resolve typedefs to their real type.
15 // TODO should probably be removed in favor of DMD's Type::toBasetype 18 // TODO should probably be removed in favor of DMD's Type::toBasetype
16 Type* DtoDType(Type* t); 19 Type* DtoDType(Type* t);
17 20
52 llvm::Function* LLVM_DeclareMemSet64(); 55 llvm::Function* LLVM_DeclareMemSet64();
53 llvm::Function* LLVM_DeclareMemCpy32(); 56 llvm::Function* LLVM_DeclareMemCpy32();
54 llvm::Function* LLVM_DeclareMemCpy64(); 57 llvm::Function* LLVM_DeclareMemCpy64();
55 58
56 // getelementptr helpers 59 // getelementptr helpers
57 LLValue* DtoGEP(LLValue* ptr, LLValue* i0, LLValue* i1, const std::string& var, llvm::BasicBlock* bb=NULL); 60 LLValue* DtoGEP(LLValue* ptr, LLValue* i0, LLValue* i1, const char* var, llvm::BasicBlock* bb=NULL);
58 LLValue* DtoGEP(LLValue* ptr, const std::vector<unsigned>& src, const std::string& var, llvm::BasicBlock* bb=NULL); 61 LLValue* DtoGEPi(LLValue* ptr, const DStructIndexVector& src, const char* var, llvm::BasicBlock* bb=NULL);
59 LLValue* DtoGEPi(LLValue* ptr, unsigned i0, const std::string& var, llvm::BasicBlock* bb=NULL); 62 LLValue* DtoGEPi(LLValue* ptr, unsigned i0, const char* var, llvm::BasicBlock* bb=NULL);
60 LLValue* DtoGEPi(LLValue* ptr, unsigned i0, unsigned i1, const std::string& var, llvm::BasicBlock* bb=NULL); 63 LLValue* DtoGEPi(LLValue* ptr, unsigned i0, unsigned i1, const char* var, llvm::BasicBlock* bb=NULL);
61 64
62 // dynamic memory helpers 65 // dynamic memory helpers
63 LLValue* DtoNew(Type* newtype); 66 LLValue* DtoNew(Type* newtype);
64 void DtoDeleteMemory(LLValue* ptr); 67 void DtoDeleteMemory(LLValue* ptr);
65 void DtoDeleteClass(LLValue* inst); 68 void DtoDeleteClass(LLValue* inst);