I am trying to implement support for an if-conversion pass in a backend for the ADRES CGRA architecture.
From studying the existing IfConversion pass, I observed the following:
- The PredicateInstruction method is meant to insert guards into conditional instructions.
- This method assumes that one will be able to get the predicate from the conditional branch instruction
on which the conditional instruction depends.
- So implicitly, this method assumes that the conditional branch instruction is a brcond-like instruction
(which has a predicate operand), not a br_cc-like instruction (which does not have a predicate operand).
- As far as I can see, no generic method is available to insert a predicate generating instruction that will
replace the br_cc instruction.
Is that correct?
If so, what would be the best place in the code to implement and invoke functionality for inserting such an
Bjorn De Sutter
Computer Systems Lab