Open aqjune opened 5 years ago
Internally, these are coming from gimple_cond_true_label
and gimple_cond_false_label
, which presumably are returning NULL
, and this is being handled at the Python level as None
.
I'm not sure how they could be NULL. When is your code running, compared to the various passes?
My callback function is registered before optimized
pass.
Just adding some information in case someone finds this. After CFG all direct control flows in the language (i.e goto
) are lowered to individual basic blocks with predecessors and successors, with an optional PHI node for input. The CFG step also deletes the labels for the cond
node so the only way to recover this is to inspect each basic block's edges.
I am scanning through GIMPLE instructions generated from this C code:
The generated GIMPLE is like this:
However, in Python, I'm getting gcc.GimpleCond which has true_label & false_label set to None.
Is there anything I'm missing or is it a bug?
Thanks