Add some alignment info where LLVM might otherwise be more pessimistic.

In particular, %.nest_arg is always aligned even though it's bitcast from i8*.

Pointers in vtables are also guaranteed to be stored at aligned addresses.
This commit is contained in:
Frits van Bommel
2009-04-12 21:56:43 +02:00
parent 751f528969
commit 071bad95dc
4 changed files with 37 additions and 16 deletions

View File

@@ -1331,7 +1331,7 @@ LLValue* DtoVirtualFunctionPointer(DValue* inst, FuncDeclaration* fdecl)
// index vtbl
funcval = DtoGEPi(funcval, 0, fdecl->vtblIndex, fdecl->toChars());
// load funcptr
funcval = DtoLoad(funcval);
funcval = DtoAlignedLoad(funcval);
if (Logger::enabled())
Logger::cout() << "funcval: " << *funcval << '\n';