How can I dump ALL Gimple trees?

2.2k Views Asked by At

I need to dump all Gimple trees (kind of -fdump-tree-whatever). I created a plugin for the purpose, but I am not sure how should I access Gimple trees in pass. Plugin is hooked into GIMPLE_PASS:

static struct opt_pass my_pass = 
 {
    .type = GIMPLE_PASS,
    ...

I tried to iterate over basic blocks using gsi (gimple_stmt_iterator), however, my dump is incomplete.

Can you help me, how should I access the Gimple trees, to get every single tree dumped?

2

There are 2 best solutions below

0
On

Use -fdump-tree-all to dump all passes for tree.

0
On

The most useful option is -fdump-tree-gimple