Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/mid-ir/mid-ir.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/mid-ir/mid-ir.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3482, Sat Dec 5 14:43:53 2015 UTC revision 3483, Sat Dec 5 15:02:33 2015 UTC
# Line 63  Line 63 
63        | IDiv        | IDiv
64        | IMod        | IMod
65        | INeg        | INeg
       | Abs of ty  
66        | LT of ty        | LT of ty
67        | LTE of ty        | LTE of ty
68        | EQ of ty        | EQ of ty
# Line 71  Line 70 
70        | GT of ty        | GT of ty
71        | GTE of ty        | GTE of ty
72        | Not        | Not
73        | Max        | Abs of ty
74        | Min        | Max of ty
75          | Min of ty
76        | Clamp of ty        | Clamp of ty
77        | Lerp of ty        | Lerp of ty
78        | Normalize of int        | Normalize of int
# Line 117  Line 117 
117        | resultArity IDiv = 1        | resultArity IDiv = 1
118        | resultArity IMod = 1        | resultArity IMod = 1
119        | resultArity INeg = 1        | resultArity INeg = 1
       | resultArity (Abs _) = 1  
120        | resultArity (LT _) = 1        | resultArity (LT _) = 1
121        | resultArity (LTE _) = 1        | resultArity (LTE _) = 1
122        | resultArity (EQ _) = 1        | resultArity (EQ _) = 1
# Line 125  Line 124 
124        | resultArity (GT _) = 1        | resultArity (GT _) = 1
125        | resultArity (GTE _) = 1        | resultArity (GTE _) = 1
126        | resultArity Not = 1        | resultArity Not = 1
127        | resultArity Max = 1        | resultArity (Abs _) = 1
128        | resultArity Min = 1        | resultArity (Max _) = 1
129          | resultArity (Min _) = 1
130        | resultArity (Clamp _) = 1        | resultArity (Clamp _) = 1
131        | resultArity (Lerp _) = 1        | resultArity (Lerp _) = 1
132        | resultArity (Normalize _) = 1        | resultArity (Normalize _) = 1
# Line 171  Line 171 
171        | arity IDiv = 2        | arity IDiv = 2
172        | arity IMod = 2        | arity IMod = 2
173        | arity INeg = 1        | arity INeg = 1
       | arity (Abs _) = 1  
174        | arity (LT _) = 2        | arity (LT _) = 2
175        | arity (LTE _) = 2        | arity (LTE _) = 2
176        | arity (EQ _) = 2        | arity (EQ _) = 2
# Line 179  Line 178 
178        | arity (GT _) = 2        | arity (GT _) = 2
179        | arity (GTE _) = 2        | arity (GTE _) = 2
180        | arity Not = 1        | arity Not = 1
181        | arity Max = 2        | arity (Abs _) = 1
182        | arity Min = 2        | arity (Max _) = 2
183          | arity (Min _) = 2
184        | arity (Clamp _) = 3        | arity (Clamp _) = 3
185        | arity (Lerp _) = 3        | arity (Lerp _) = 3
186        | arity (Normalize _) = 1        | arity (Normalize _) = 1
# Line 234  Line 234 
234        | same (IDiv, IDiv) = true        | same (IDiv, IDiv) = true
235        | same (IMod, IMod) = true        | same (IMod, IMod) = true
236        | same (INeg, INeg) = true        | same (INeg, INeg) = true
       | same (Abs(a0), Abs(b0)) = samety(a0, b0)  
237        | same (LT(a0), LT(b0)) = samety(a0, b0)        | same (LT(a0), LT(b0)) = samety(a0, b0)
238        | same (LTE(a0), LTE(b0)) = samety(a0, b0)        | same (LTE(a0), LTE(b0)) = samety(a0, b0)
239        | same (EQ(a0), EQ(b0)) = samety(a0, b0)        | same (EQ(a0), EQ(b0)) = samety(a0, b0)
# Line 242  Line 241 
241        | same (GT(a0), GT(b0)) = samety(a0, b0)        | same (GT(a0), GT(b0)) = samety(a0, b0)
242        | same (GTE(a0), GTE(b0)) = samety(a0, b0)        | same (GTE(a0), GTE(b0)) = samety(a0, b0)
243        | same (Not, Not) = true        | same (Not, Not) = true
244        | same (Max, Max) = true        | same (Abs(a0), Abs(b0)) = samety(a0, b0)
245        | same (Min, Min) = true        | same (Max(a0), Max(b0)) = samety(a0, b0)
246          | same (Min(a0), Min(b0)) = samety(a0, b0)
247        | same (Clamp(a0), Clamp(b0)) = samety(a0, b0)        | same (Clamp(a0), Clamp(b0)) = samety(a0, b0)
248        | same (Lerp(a0), Lerp(b0)) = samety(a0, b0)        | same (Lerp(a0), Lerp(b0)) = samety(a0, b0)
249        | same (Normalize(a0), Normalize(b0)) = sameint(a0, b0)        | same (Normalize(a0), Normalize(b0)) = sameint(a0, b0)
# Line 289  Line 289 
289        | hash IDiv = 0w11        | hash IDiv = 0w11
290        | hash IMod = 0w13        | hash IMod = 0w13
291        | hash INeg = 0w17        | hash INeg = 0w17
292        | hash (Abs(a0)) = 0w19 + hashty a0        | hash (LT(a0)) = 0w19 + hashty a0
293        | hash (LT(a0)) = 0w23 + hashty a0        | hash (LTE(a0)) = 0w23 + hashty a0
294        | hash (LTE(a0)) = 0w29 + hashty a0        | hash (EQ(a0)) = 0w29 + hashty a0
295        | hash (EQ(a0)) = 0w31 + hashty a0        | hash (NEQ(a0)) = 0w31 + hashty a0
296        | hash (NEQ(a0)) = 0w37 + hashty a0        | hash (GT(a0)) = 0w37 + hashty a0
297        | hash (GT(a0)) = 0w41 + hashty a0        | hash (GTE(a0)) = 0w41 + hashty a0
298        | hash (GTE(a0)) = 0w43 + hashty a0        | hash Not = 0w43
299        | hash Not = 0w47        | hash (Abs(a0)) = 0w47 + hashty a0
300        | hash Max = 0w53        | hash (Max(a0)) = 0w53 + hashty a0
301        | hash Min = 0w59        | hash (Min(a0)) = 0w59 + hashty a0
302        | hash (Clamp(a0)) = 0w61 + hashty a0        | hash (Clamp(a0)) = 0w61 + hashty a0
303        | hash (Lerp(a0)) = 0w67 + hashty a0        | hash (Lerp(a0)) = 0w67 + hashty a0
304        | hash (Normalize(a0)) = 0w71 + hashint a0        | hash (Normalize(a0)) = 0w71 + hashint a0
# Line 343  Line 343 
343        | toString IDiv = "IDiv"        | toString IDiv = "IDiv"
344        | toString IMod = "IMod"        | toString IMod = "IMod"
345        | toString INeg = "INeg"        | toString INeg = "INeg"
       | toString (Abs(a0)) = concat["Abs<", tyToString a0, ">"]  
346        | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]        | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]
347        | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]        | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]
348        | toString (EQ(a0)) = concat["EQ<", tyToString a0, ">"]        | toString (EQ(a0)) = concat["EQ<", tyToString a0, ">"]
# Line 351  Line 350 
350        | toString (GT(a0)) = concat["GT<", tyToString a0, ">"]        | toString (GT(a0)) = concat["GT<", tyToString a0, ">"]
351        | toString (GTE(a0)) = concat["GTE<", tyToString a0, ">"]        | toString (GTE(a0)) = concat["GTE<", tyToString a0, ">"]
352        | toString Not = "Not"        | toString Not = "Not"
353        | toString Max = "Max"        | toString (Abs(a0)) = concat["Abs<", tyToString a0, ">"]
354        | toString Min = "Min"        | toString (Max(a0)) = concat["Max<", tyToString a0, ">"]
355          | toString (Min(a0)) = concat["Min<", tyToString a0, ">"]
356        | toString (Clamp(a0)) = concat["Clamp<", tyToString a0, ">"]        | toString (Clamp(a0)) = concat["Clamp<", tyToString a0, ">"]
357        | toString (Lerp(a0)) = concat["Lerp<", tyToString a0, ">"]        | toString (Lerp(a0)) = concat["Lerp<", tyToString a0, ">"]
358        | toString (Normalize(a0)) = concat["Normalize<", intToString a0, ">"]        | toString (Normalize(a0)) = concat["Normalize<", intToString a0, ">"]

Legend:
Removed from v.3482  
changed lines
  Added in v.3483

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0