Do not compute dominance information when not in SSA (#1176)

This commit is contained in:
Ficture Seven 2020-05-02 01:15:55 +04:00 committed by GitHub
parent a0c06103c9
commit 71dbb38b9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,8 +22,11 @@ namespace ARMeilleure.Translation
{
Logger.StartPass(PassName.Dominance);
Dominance.FindDominators(cfg);
Dominance.FindDominanceFrontiers(cfg);
if ((options & CompilerOptions.SsaForm) != 0)
{
Dominance.FindDominators(cfg);
Dominance.FindDominanceFrontiers(cfg);
}
Logger.EndPass(PassName.Dominance);