Mercurial > projects > ldc
annotate gen/tollvm.h @ 54:28e99b04a132 trunk
[svn r58] Fixed cond expression resulting in a non-basic type.
Fixed identity expression for dynamic arrays.
Revamped the system to keep track of lvalues and rvalues and their relations.
Typedef declaration now generate the custom typeinfo.
Other bugfixes.
author | lindquist |
---|---|
date | Wed, 24 Oct 2007 01:37:34 +0200 |
parents | 06ccc817acd4 |
children | 2c3cd3596187 |
rev | line source |
---|---|
1 | 1 // D -> LLVM helpers |
2 | |
3 struct StructInitializer; | |
4 | |
5 const llvm::Type* LLVM_DtoType(Type* t); | |
40 | 6 bool LLVM_DtoIsPassedByRef(Type* type); |
7 Type* LLVM_DtoDType(Type* t); | |
1 | 8 |
11
d3ee9efe20e2
[svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents:
9
diff
changeset
|
9 const llvm::Type* LLVM_DtoStructType(Type* t); |
51
61bc1b4ad3c4
[svn r55] Foreach was always generating code as if the value variable was 'ref'
lindquist
parents:
50
diff
changeset
|
10 llvm::Value* LLVM_DtoStructZeroInit(llvm::Value* v); |
61bc1b4ad3c4
[svn r55] Foreach was always generating code as if the value variable was 'ref'
lindquist
parents:
50
diff
changeset
|
11 llvm::Value* LLVM_DtoStructCopy(llvm::Value* dst, llvm::Value* src); |
40 | 12 llvm::Constant* LLVM_DtoConstStructInitializer(StructInitializer* si); |
1 | 13 |
11
d3ee9efe20e2
[svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents:
9
diff
changeset
|
14 const llvm::FunctionType* LLVM_DtoFunctionType(Type* t, const llvm::Type* thisparam = 0); |
d3ee9efe20e2
[svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents:
9
diff
changeset
|
15 const llvm::FunctionType* LLVM_DtoFunctionType(FuncDeclaration* fdecl); |
9 | 16 llvm::Function* LLVM_DtoDeclareFunction(FuncDeclaration* fdecl); |
1 | 17 |
11
d3ee9efe20e2
[svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents:
9
diff
changeset
|
18 const llvm::StructType* LLVM_DtoDelegateType(Type* t); |
1 | 19 llvm::Value* LLVM_DtoNullDelegate(llvm::Value* v); |
20 llvm::Value* LLVM_DtoDelegateCopy(llvm::Value* dst, llvm::Value* src); | |
53
06ccc817acd4
[svn r57] Added most basic TypeInfo (rebuild lphobos).
lindquist
parents:
51
diff
changeset
|
21 llvm::Value* LLVM_DtoCompareDelegate(TOK op, llvm::Value* lhs, llvm::Value* rhs); |
1 | 22 |
23 llvm::GlobalValue::LinkageTypes LLVM_DtoLinkage(PROT prot, uint stc); | |
24 unsigned LLVM_DtoCallingConv(LINK l); | |
25 | |
26 llvm::Value* LLVM_DtoPointedType(llvm::Value* ptr, llvm::Value* val); | |
27 llvm::Value* LLVM_DtoBoolean(llvm::Value* val); | |
28 | |
29 const llvm::Type* LLVM_DtoSize_t(); | |
30 | |
31 void LLVM_DtoMain(); | |
32 | |
33 void LLVM_DtoCallClassDtors(TypeClass* tc, llvm::Value* instance); | |
34 void LLVM_DtoInitClass(TypeClass* tc, llvm::Value* dst); | |
35 | |
40 | 36 llvm::Constant* LLVM_DtoConstInitializer(Type* type, Initializer* init); |
37 void LLVM_DtoInitializer(Initializer* init); | |
1 | 38 |
4
e116aa1488e6
[svn r8] changed backend includes to always use the gen/<foo>.h prefix
lindquist
parents:
1
diff
changeset
|
39 llvm::Function* LLVM_DeclareMemSet32(); |
e116aa1488e6
[svn r8] changed backend includes to always use the gen/<foo>.h prefix
lindquist
parents:
1
diff
changeset
|
40 llvm::Function* LLVM_DeclareMemSet64(); |
e116aa1488e6
[svn r8] changed backend includes to always use the gen/<foo>.h prefix
lindquist
parents:
1
diff
changeset
|
41 llvm::Function* LLVM_DeclareMemCpy32(); |
e116aa1488e6
[svn r8] changed backend includes to always use the gen/<foo>.h prefix
lindquist
parents:
1
diff
changeset
|
42 llvm::Function* LLVM_DeclareMemCpy64(); |
e116aa1488e6
[svn r8] changed backend includes to always use the gen/<foo>.h prefix
lindquist
parents:
1
diff
changeset
|
43 |
50
6fcc08a4d406
[svn r54] Added support for nested delegates referencing parent's stack variables.
lindquist
parents:
40
diff
changeset
|
44 llvm::Value* LLVM_DtoGEP(llvm::Value* ptr, llvm::Value* i0, llvm::Value* i1, const std::string& var, llvm::BasicBlock* bb=NULL); |
6fcc08a4d406
[svn r54] Added support for nested delegates referencing parent's stack variables.
lindquist
parents:
40
diff
changeset
|
45 llvm::Value* LLVM_DtoGEP(llvm::Value* ptr, const std::vector<unsigned>& src, const std::string& var, llvm::BasicBlock* bb=NULL); |
6fcc08a4d406
[svn r54] Added support for nested delegates referencing parent's stack variables.
lindquist
parents:
40
diff
changeset
|
46 llvm::Value* LLVM_DtoGEPi(llvm::Value* ptr, unsigned i0, const std::string& var, llvm::BasicBlock* bb=NULL); |
6fcc08a4d406
[svn r54] Added support for nested delegates referencing parent's stack variables.
lindquist
parents:
40
diff
changeset
|
47 llvm::Value* LLVM_DtoGEPi(llvm::Value* ptr, unsigned i0, unsigned i1, const std::string& var, llvm::BasicBlock* bb=NULL); |
6 | 48 |
29
253a5fc4033a
[svn r33] * Added support for assignment to function arguments
lindquist
parents:
11
diff
changeset
|
49 void LLVM_DtoGiveArgumentStorage(elem* e); |
253a5fc4033a
[svn r33] * Added support for assignment to function arguments
lindquist
parents:
11
diff
changeset
|
50 |
34 | 51 llvm::Value* LLVM_DtoRealloc(llvm::Value* ptr, const llvm::Type* ty); |
52 llvm::Value* LLVM_DtoRealloc(llvm::Value* ptr, llvm::Value* len); | |
53 | |
54 void LLVM_DtoAssert(llvm::Value* cond, llvm::Value* loc, llvm::Value* msg); | |
55 | |
40 | 56 llvm::Value* LLVM_DtoArgument(const llvm::Type* paramtype, Argument* fnarg, Expression* argexp); |
57 | |
50
6fcc08a4d406
[svn r54] Added support for nested delegates referencing parent's stack variables.
lindquist
parents:
40
diff
changeset
|
58 llvm::Value* LLVM_DtoNestedVariable(VarDeclaration* vd); |
6fcc08a4d406
[svn r54] Added support for nested delegates referencing parent's stack variables.
lindquist
parents:
40
diff
changeset
|
59 |
51
61bc1b4ad3c4
[svn r55] Foreach was always generating code as if the value variable was 'ref'
lindquist
parents:
50
diff
changeset
|
60 void LLVM_DtoAssign(Type* lhsType, llvm::Value* lhs, llvm::Value* rhs); |
61bc1b4ad3c4
[svn r55] Foreach was always generating code as if the value variable was 'ref'
lindquist
parents:
50
diff
changeset
|
61 |
54
28e99b04a132
[svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents:
53
diff
changeset
|
62 llvm::ConstantInt* LLVM_DtoConstSize_t(size_t); |
28e99b04a132
[svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents:
53
diff
changeset
|
63 llvm::ConstantInt* LLVM_DtoConstUint(unsigned i); |
28e99b04a132
[svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents:
53
diff
changeset
|
64 llvm::Constant* LLVM_DtoConstString(const char*); |
28e99b04a132
[svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents:
53
diff
changeset
|
65 |
1 | 66 #include "enums.h" |