Displaying 1 result from an estimated 1 matches for "pvfn1".
2010 Oct 11
4
[LLVMdev] Missed devirtualization opportunities
...ethod call is
devirtualized by -std-compile-opts
%puts = call i32 @puts(i8* getelementptr inbounds ([2 x i8]* @str, i32
0, i32 0))
; Call the virtual function.
; load the instance's vtbl pointer.
%pVtbl1 = load %classvtbltype.TestVirtual** %ppVtbl
; load the function pointer from the vtbl
%ppVfn1 = getelementptr %classvtbltype.TestVirtual* %pVtbl1, i64 0, i32 0
%pVfn1 = load void (%class.TestVirtual*)** %ppVfn1
; call the virtual method.
call void %pVfn1(class.TestVirtual* %pinstance)
; ...
}
(clang put in a bunch of bitcasts and stuck the vtbl itself into an
array; ripping all that out...