mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
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:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user