Stream: git-cranelift

Topic: cranelift / Issue #836 Redundant SSA parameter


view this post on Zulip GitHub (Feb 28 2020 at 23:26):

alexcrichton transferred Issue #836:

@sunfishcode, we were discussing redundant SSA parameters. Here's a simple example. It's possible that the return block is a special case and that this is not what you were thinking about when you said redundant parameters should not occur.

Using the SpiderMonkey embedding here. Wat source:

(module
  (func (export "f") (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) (result i32)
    (i32.div_s (local.get 5) (local.get 1))))

IR code:

$ RUST_LOG=debug dist/bin/js --wasm-compiler=cranelift ~/moz/manyparam.js
...
function u0:0(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64 vmctx) -> i32 uext baldrdash {
                                ebb0(v0: i32, v1: i32, v2: i32, v3: i32, v4: i32, v5: i32, v6: i32, v7: i32, v8: i32, v9: i32, v10: i64):
@0041                               v12 = sdiv v5, v1
@0042                               jump ebb1(v12)

                                ebb1(v11: i32):
@0042                               fallthrough_return v11
}

(Will look for additional examples.)


Last updated: Nov 22 2024 at 16:03 UTC