Hazard recognizers & basic blocks

I am working on a target which has some structural hazards.
To detect these hazards, I implemented a sub-class of PostRAHazardRecognizer.

PostRAHazardRecognizer resets the hazard state on a basic block basis.
So, how to detect hazards that may occur between the end of a basic block and the beginning of another basic block ?

Thanks !

To be more specific, let’s consider the following (imcomplete) C code (OK, this is not good C style :wink: )


goto label0;

goto label1;

// some C code for basic block starting at label0

// some C code for basic block starting at label1


In the previous example, the last instruction of basic block0 (starting at label0) is not a jump. There might be a structural hazard between this instruction and the first instruction of basic block1 (starting at label1).

Did you have to deal with this kind of hazards ?


Ooops, you are right. Just forgot to CC the mailing list.

Thanks for noticing it,