The BGV file format that Seafoam usually deals with is Graal's HIR (higher intermediate representation.) HIR is used for partial evaluation and most compiler phases. Graal's LIR (lower intermediate representation) is used for scheduling, register allocation, instruction selection, and code generation. The LIR equivalent of BGV files is CFG files.
CFG files can be viewed using the c1visualiser but it's unmaintained and it's a complex Netbeans application.
Instead of trying to use a disassembler from within Graal, maybe it's simpler to just use the CFG files, and add support for them to Seafoam.
The BGV file format that Seafoam usually deals with is Graal's HIR (higher intermediate representation.) HIR is used for partial evaluation and most compiler phases. Graal's LIR (lower intermediate representation) is used for scheduling, register allocation, instruction selection, and code generation. The LIR equivalent of BGV files is CFG files.
CFG files can be viewed using the c1visualiser but it's unmaintained and it's a complex Netbeans application.
Instead of trying to use a disassembler from within Graal, maybe it's simpler to just use the CFG files, and add support for them to Seafoam.
Initial work in https://github.com/Shopify/seafoam/tree/cfg2asm. The idea is there would be a command like
Then we'd drop https://github.com/oracle/graal/pull/2094.
You can get new CFG files using
--vm.Dgraal.Dump --vm.Dgraal.PrintBackendCFG=true
(see https://github.com/oracle/graal/pull/2983.)