Displaying 2 results from an estimated 2 matches for "conflict_resolution_stub".
2015 Jun 01
0
[LLVMdev] Hash Table Virtual Calls with Conflict Resolution Stubs
...on of
> 'musttail' and varargs come close to satisfying this. The only issue
> is that it's not possible to forward a return value.
I'm not sure I understand what you mean by "forward a return value",
but running the following:
declare i32 @f(i32, i64)
define i32 @conflict_resolution_stub(i32 %t, i64 %arg0) {
%v = musttail call i32 @f(i32 %t, i64 %arg0)
ret i32 %v
}
through `llc -O3` gives (trimmed output):
_conflict_resolution_stub: ## @conflict_resolution_stub
pushq %rax
popq %rax
jmp _f ## TAILCALL
I'm not sure what the pushq and popq...
2015 May 31
4
[LLVMdev] Hash Table Virtual Calls with Conflict Resolution Stubs
...onflict resolution but the cheapest seems to be
setting a hidden value (such as a register) on the caller side to a
larger integer hash value (a large enough space in which collisions
are assumed not to occur) and then generating a 'conflict resolution
stub', which does something like:
conflict_resolution_stub:
cmp eax, <METHOD 1 HASH>
jne .method_2
.method_1:
jmp method_1
.method_2:
jmp method_2
So in this case 'eax' is being used for conflict resolution and a
simple comparison can distinguish the two methods. The nice aspect of
this app...