Open Bug 1741395 Opened 3 years ago Updated 3 years ago

Add debug printing for the MIR-to-LIR conversion pass (lowering)

Categories

(Core :: JavaScript Engine: JIT, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: jseward, Assigned: jseward)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Debugging/changing the MIR-to-LIR conversion pass would be easier,
especially in the presence of the emit-at-uses machinery, if there were
a way to print the LIR generated from each MIR. That would make it
completely obvious which LIRs originate from which MIRs.

Blocks: sm-opt-jits

Example output from initial patch. This makes it clear

  • that MIRs 3 to 6 generate no LIRs, presumably as a result of emit-at-uses
  • how phi nodes are handled in LIR generation, which is otherwise something
    of a mystery to the uninitiated
===== BEGIN LIRGenerator::generator =====
  0:wasmparameter
    'f138+=  WasmParameter
  1:wasmparameter
    'f138+=  WasmParameter
  2:wasmparameter
    'f138+=  WasmParameter
  3:constant 0x4d2
  4:wasmbinarybitwise (0:wasmparameter) (1:wasmparameter)
  5:constant 0x0
  6:compare (4:wasmbinarybitwise) (5:constant 0x0)
  7:test (6:compare)
    'f138+=  BitAndAndBranch
  --
  8:constant 0x11d7
  [lowering input #0 for: 11:phi (8:constant 0x11d7) (3:constant 0x4d2)]
    'f178+=  Integer
  9:goto
    'f178+=  Goto
  --
  [lowering input #1 for: 11:phi (8:constant 0x11d7) (3:constant 0x4d2)]
    'f1b8+=  Integer
  10:goto
    'f1b8+=  Goto
  --
  11:phi (8:constant 0x11d7) (3:constant 0x4d2)
    [phis generate no LIRs]
  12:wasmreturn (11:phi) (2:wasmparameter)
    'f1f8+=  WasmReturn
===== END LIRGenerator::generator =====

WIP patch. Needs multiple #ifdef JS_JITSPEW adding.

I think each LIR had a mirRaw pointer?

Updated to current (2022 Sept 09) m-c.

Attachment #9251085 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: