Mercurial > projects > ldc
comparison gen/aa.cpp @ 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 |
---|---|
84 | 84 |
85 // pkey param | 85 // pkey param |
86 LLValue* pkey = to_pkey(key); | 86 LLValue* pkey = to_pkey(key); |
87 pkey = DtoBitCast(pkey, funcTy->getParamType(3)); | 87 pkey = DtoBitCast(pkey, funcTy->getParamType(3)); |
88 | 88 |
89 // build arg vector | |
90 LLSmallVector<LLValue*, 4> args; | |
91 args.push_back(aaval); | |
92 args.push_back(keyti); | |
93 args.push_back(valsize); | |
94 args.push_back(pkey); | |
95 | |
96 // call runtime | 89 // call runtime |
97 LLValue* ret = gIR->ir->CreateCall(func, args.begin(), args.end(), "aa.index"); | 90 LLValue* ret = gIR->ir->CreateCall4(func, aaval, keyti, valsize, pkey, "aa.index"); |
98 | 91 |
99 // cast return value | 92 // cast return value |
100 const LLType* targettype = getPtrToType(DtoType(type)); | 93 const LLType* targettype = getPtrToType(DtoType(type)); |
101 if (ret->getType() != targettype) | 94 if (ret->getType() != targettype) |
102 ret = DtoBitCast(ret, targettype); | 95 ret = DtoBitCast(ret, targettype); |
129 | 122 |
130 // pkey param | 123 // pkey param |
131 LLValue* pkey = to_pkey(key); | 124 LLValue* pkey = to_pkey(key); |
132 pkey = DtoBitCast(pkey, funcTy->getParamType(2)); | 125 pkey = DtoBitCast(pkey, funcTy->getParamType(2)); |
133 | 126 |
134 // build arg vector | |
135 LLSmallVector<LLValue*, 3> args; | |
136 args.push_back(aaval); | |
137 args.push_back(keyti); | |
138 args.push_back(pkey); | |
139 | |
140 // call runtime | 127 // call runtime |
141 LLValue* ret = gIR->ir->CreateCall(func, args.begin(), args.end(), "aa.in"); | 128 LLValue* ret = gIR->ir->CreateCall3(func, aaval, keyti, pkey, "aa.in"); |
142 | 129 |
143 // cast return value | 130 // cast return value |
144 const LLType* targettype = DtoType(type); | 131 const LLType* targettype = DtoType(type); |
145 if (ret->getType() != targettype) | 132 if (ret->getType() != targettype) |
146 ret = DtoBitCast(ret, targettype); | 133 ret = DtoBitCast(ret, targettype); |