nir/algebraic: Clean up some __str__ cruft
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 8 Nov 2018 20:00:07 +0000 (14:00 -0600)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 5 Dec 2018 21:02:52 +0000 (15:02 -0600)
Both of these things are already handled in the Value base class so we
don't need to handle them explicitly in Constant.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/compiler/nir/nir_algebraic.py

index efd6e52cdb9bc4c1932a836807b4dfc73cc505b3..d75a7ce27c9e1ea9089a3eb7ea138291f2d5d9d6 100644 (file)
@@ -185,7 +185,6 @@ class Constant(Value):
    def __init__(self, val, name):
       Value.__init__(self, val, name, "constant")
 
-      self.in_val = str(val)
       if isinstance(val, (str)):
          m = _constant_re.match(val)
          self.value = ast.literal_eval(m.group('value'))
@@ -251,9 +250,6 @@ class Variable(Value):
 
       self.index = varset[self.var_name]
 
-   def __str__(self):
-      return self.in_val
-
    def type(self):
       if self.required_type == 'bool':
          return "nir_type_bool"