From 0af3f47ba01b9634f75a1aee38e318d74dab53d0 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Mon, 2 Jul 2012 23:47:12 +0200 Subject: Add allocation sinking and store sinking optimization. --- src/jit/dump.lua | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/jit') diff --git a/src/jit/dump.lua b/src/jit/dump.lua index 3d62c4ea..98933971 100644 --- a/src/jit/dump.lua +++ b/src/jit/dump.lua @@ -374,10 +374,13 @@ local function dump_snap(tr) end -- Return a register name or stack slot for a rid/sp location. -local function ridsp_name(ridsp) +local function ridsp_name(ridsp, ins) if not disass then disass = require("jit.dis_"..jit.arch) end - local rid = band(ridsp, 0xff) - if ridsp > 255 then return format("[%x]", shr(ridsp, 8)*4) end + local rid, slot = band(ridsp, 0xff), shr(ridsp, 8) + if rid == 253 or rid == 254 then + return slot == 0 and " {sink" or format(" {%04d", ins-slot) + end + if ridsp > 255 then return format("[%x]", slot*4) end if rid < 128 then return disass.regname(rid) end return "" end @@ -458,13 +461,15 @@ local function dump_ir(tr, dumpsnap, dumpreg) end elseif op ~= "NOP " and op ~= "CARG " and (dumpreg or op ~= "RENAME") then + local rid = band(ridsp, 255) if dumpreg then - out:write(format("%04d %-5s ", ins, ridsp_name(ridsp))) + out:write(format("%04d %-6s", ins, ridsp_name(ridsp, ins))) else out:write(format("%04d ", ins)) end out:write(format("%s%s %s %s ", - band(ot, 128) == 0 and " " or ">", + (rid == 254 or rid == 253) and "}" or + (band(ot, 128) == 0 and " " or ">"), band(ot, 64) == 0 and " " or "+", irtype[t], op)) local m1, m2 = band(m, 3), band(m, 3*4) -- cgit v1.2.3-55-g6feb