Improve alias analysis of upvalues using a disambiguation hash value.
All upvalue objects hold a disambiguation hash value now. It's built from the parent prototype and the slot number. Different hash values imply the upvalues cannot alias. Same hash values don't imply anything (collision or different closures). Upvalue disambiguation makes use of a reduced hash due to IR contraints.
This commit is contained in:
@@ -397,6 +397,8 @@ local function dump_ir(tr, dumpsnap, dumpreg)
|
||||
local litn = litname[op]
|
||||
if litn and litn[op2] then
|
||||
out:write(" ", litn[op2])
|
||||
elseif op == "UREFO " or op == "UREFC " then
|
||||
out:write(format(" #%-3d", shr(op2, 8)))
|
||||
else
|
||||
out:write(format(" #%-3d", op2))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user