Make GVN aware of instructions that write to CPU flags.

This commit is contained in:
Dan Gohman
2017-10-19 12:57:55 -07:00
parent bce3c38042
commit cc0bb70c5d
4 changed files with 29 additions and 1 deletions

View File

@@ -242,3 +242,10 @@ class Operand(object):
dependency.
"""
return self.kind is not VALUE and self.kind is not VARIABLE_ARGS
def is_cpu_flags(self):
# type: () -> bool
"""
Is this a CPU flags operand?
"""
return self.kind is VALUE and self.typevar.name in ['iflags', 'fflags']