fragments = [
'"%s\\0" /* %s */' % (
te[0].encode('string_escape'),
- ', '.join(str(idx) for idx in te[2])
+ ', '.join(str(idx) for idx in sorted(te[2]))
)
for te in self.table
]
from __future__ import print_function
import ast
+from collections import OrderedDict
import itertools
import struct
import sys
class AlgebraicPass(object):
def __init__(self, pass_name, transforms):
- self.xform_dict = {}
+ self.xform_dict = OrderedDict()
self.pass_name = pass_name
error = False
# Authors:
# Jason Ekstrand (jason@jlekstrand.net)
+from collections import OrderedDict
import nir_algebraic
import itertools
'options->lower_unpack_snorm_4x8'),
]
-invert = {'feq': 'fne', 'fne': 'feq', 'fge': 'flt', 'flt': 'fge' }
+invert = OrderedDict([('feq', 'fne'), ('fne', 'feq'), ('fge', 'flt'), ('flt', 'fge')])
for left, right in list(itertools.combinations(invert.keys(), 2)) + zip(invert.keys(), invert.keys()):
optimizations.append((('inot', ('ior(is_used_once)', (left, a, b), (right, c, d))),
# Authors:
# Ian Romanick <idr@us.ibm.com>
+from collections import OrderedDict
from decimal import Decimal
import xml.etree.ElementTree as ET
import re, sys, string
class gl_api(object):
def __init__(self, factory):
- self.functions_by_name = {}
+ self.functions_by_name = OrderedDict()
self.enums_by_name = {}
self.types_by_name = {}