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

SCM Repository

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

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

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

revision 3765, Mon Apr 18 16:13:13 2016 UTC revision 3766, Mon Apr 18 16:13:31 2016 UTC
# Line 70  Line 70 
70        | RMul        | RMul
71        | RDiv        | RDiv
72        | RNeg        | RNeg
       | VAdd of int  
       | VSub of int  
       | VScale of int  
       | VMul of int  
       | VNeg of int  
       | VSum of int  
       | VProj of int * int  
       | TensorIndex of ty * shape  
       | ProjectLast of ty * shape  
73        | LT of ty        | LT of ty
74        | LTE of ty        | LTE of ty
75        | EQ of ty        | EQ of ty
# Line 91  Line 82 
82        | Min of ty        | Min of ty
83        | Clamp of ty        | Clamp of ty
84        | Lerp of ty        | Lerp of ty
85          | VAdd of int
86          | VSub of int
87          | VScale of int
88          | VMul of int
89          | VNeg of int
90          | VSum of int
91          | VProj of int * int
92          | TensorIndex of ty * shape
93          | ProjectLast of ty * shape
94        | EigenVecs2x2        | EigenVecs2x2
95        | EigenVecs3x3        | EigenVecs3x3
96        | EigenVals2x2        | EigenVals2x2
# Line 150  Line 150 
150        | resultArity RMul = 1        | resultArity RMul = 1
151        | resultArity RDiv = 1        | resultArity RDiv = 1
152        | resultArity RNeg = 1        | resultArity RNeg = 1
       | resultArity (VAdd _) = 1  
       | resultArity (VSub _) = 1  
       | resultArity (VScale _) = 1  
       | resultArity (VMul _) = 1  
       | resultArity (VNeg _) = 1  
       | resultArity (VSum _) = 1  
       | resultArity (VProj _) = 1  
       | resultArity (TensorIndex _) = 1  
       | resultArity (ProjectLast _) = 1  
153        | resultArity (LT _) = 1        | resultArity (LT _) = 1
154        | resultArity (LTE _) = 1        | resultArity (LTE _) = 1
155        | resultArity (EQ _) = 1        | resultArity (EQ _) = 1
# Line 171  Line 162 
162        | resultArity (Min _) = 1        | resultArity (Min _) = 1
163        | resultArity (Clamp _) = 1        | resultArity (Clamp _) = 1
164        | resultArity (Lerp _) = 1        | resultArity (Lerp _) = 1
165          | resultArity (VAdd _) = 1
166          | resultArity (VSub _) = 1
167          | resultArity (VScale _) = 1
168          | resultArity (VMul _) = 1
169          | resultArity (VNeg _) = 1
170          | resultArity (VSum _) = 1
171          | resultArity (VProj _) = 1
172          | resultArity (TensorIndex _) = 1
173          | resultArity (ProjectLast _) = 1
174        | resultArity EigenVecs2x2 = 1        | resultArity EigenVecs2x2 = 1
175        | resultArity EigenVecs3x3 = 1        | resultArity EigenVecs3x3 = 1
176        | resultArity EigenVals2x2 = 1        | resultArity EigenVals2x2 = 1
# Line 230  Line 230 
230        | arity RMul = 2        | arity RMul = 2
231        | arity RDiv = 2        | arity RDiv = 2
232        | arity RNeg = 1        | arity RNeg = 1
       | arity (VAdd _) = 2  
       | arity (VSub _) = 2  
       | arity (VScale _) = 2  
       | arity (VMul _) = 2  
       | arity (VNeg _) = 2  
       | arity (VSum _) = 1  
       | arity (VProj _) = 1  
       | arity (TensorIndex _) = 1  
       | arity (ProjectLast _) = 1  
233        | arity (LT _) = 2        | arity (LT _) = 2
234        | arity (LTE _) = 2        | arity (LTE _) = 2
235        | arity (EQ _) = 2        | arity (EQ _) = 2
# Line 251  Line 242 
242        | arity (Min _) = 2        | arity (Min _) = 2
243        | arity (Clamp _) = 3        | arity (Clamp _) = 3
244        | arity (Lerp _) = 3        | arity (Lerp _) = 3
245          | arity (VAdd _) = 2
246          | arity (VSub _) = 2
247          | arity (VScale _) = 2
248          | arity (VMul _) = 2
249          | arity (VNeg _) = 2
250          | arity (VSum _) = 1
251          | arity (VProj _) = 1
252          | arity (TensorIndex _) = 1
253          | arity (ProjectLast _) = 1
254        | arity EigenVecs2x2 = 1        | arity EigenVecs2x2 = 1
255        | arity EigenVecs3x3 = 1        | arity EigenVecs3x3 = 1
256        | arity EigenVals2x2 = 1        | arity EigenVals2x2 = 1
# Line 317  Line 317 
317        | same (RMul, RMul) = true        | same (RMul, RMul) = true
318        | same (RDiv, RDiv) = true        | same (RDiv, RDiv) = true
319        | same (RNeg, RNeg) = true        | same (RNeg, RNeg) = true
       | same (VAdd(a0), VAdd(b0)) = sameint(a0, b0)  
       | same (VSub(a0), VSub(b0)) = sameint(a0, b0)  
       | same (VScale(a0), VScale(b0)) = sameint(a0, b0)  
       | same (VMul(a0), VMul(b0)) = sameint(a0, b0)  
       | same (VNeg(a0), VNeg(b0)) = sameint(a0, b0)  
       | same (VSum(a0), VSum(b0)) = sameint(a0, b0)  
       | same (VProj(a0,a1), VProj(b0,b1)) = sameint(a0, b0) andalso sameint(a1, b1)  
       | same (TensorIndex(a0,a1), TensorIndex(b0,b1)) = samety(a0, b0) andalso sameshape(a1, b1)  
       | same (ProjectLast(a0,a1), ProjectLast(b0,b1)) = samety(a0, b0) andalso sameshape(a1, b1)  
320        | same (LT(a0), LT(b0)) = samety(a0, b0)        | same (LT(a0), LT(b0)) = samety(a0, b0)
321        | same (LTE(a0), LTE(b0)) = samety(a0, b0)        | same (LTE(a0), LTE(b0)) = samety(a0, b0)
322        | same (EQ(a0), EQ(b0)) = samety(a0, b0)        | same (EQ(a0), EQ(b0)) = samety(a0, b0)
# Line 338  Line 329 
329        | same (Min(a0), Min(b0)) = samety(a0, b0)        | same (Min(a0), Min(b0)) = samety(a0, b0)
330        | same (Clamp(a0), Clamp(b0)) = samety(a0, b0)        | same (Clamp(a0), Clamp(b0)) = samety(a0, b0)
331        | same (Lerp(a0), Lerp(b0)) = samety(a0, b0)        | same (Lerp(a0), Lerp(b0)) = samety(a0, b0)
332          | same (VAdd(a0), VAdd(b0)) = sameint(a0, b0)
333          | same (VSub(a0), VSub(b0)) = sameint(a0, b0)
334          | same (VScale(a0), VScale(b0)) = sameint(a0, b0)
335          | same (VMul(a0), VMul(b0)) = sameint(a0, b0)
336          | same (VNeg(a0), VNeg(b0)) = sameint(a0, b0)
337          | same (VSum(a0), VSum(b0)) = sameint(a0, b0)
338          | same (VProj(a0,a1), VProj(b0,b1)) = sameint(a0, b0) andalso sameint(a1, b1)
339          | same (TensorIndex(a0,a1), TensorIndex(b0,b1)) = samety(a0, b0) andalso sameshape(a1, b1)
340          | same (ProjectLast(a0,a1), ProjectLast(b0,b1)) = samety(a0, b0) andalso sameshape(a1, b1)
341        | same (EigenVecs2x2, EigenVecs2x2) = true        | same (EigenVecs2x2, EigenVecs2x2) = true
342        | same (EigenVecs3x3, EigenVecs3x3) = true        | same (EigenVecs3x3, EigenVecs3x3) = true
343        | same (EigenVals2x2, EigenVals2x2) = true        | same (EigenVals2x2, EigenVals2x2) = true
# Line 398  Line 398 
398        | hash RMul = 0w29        | hash RMul = 0w29
399        | hash RDiv = 0w31        | hash RDiv = 0w31
400        | hash RNeg = 0w37        | hash RNeg = 0w37
401        | hash (VAdd(a0)) = 0w41 + hashint a0        | hash (LT(a0)) = 0w41 + hashty a0
402        | hash (VSub(a0)) = 0w43 + hashint a0        | hash (LTE(a0)) = 0w43 + hashty a0
403        | hash (VScale(a0)) = 0w47 + hashint a0        | hash (EQ(a0)) = 0w47 + hashty a0
404        | hash (VMul(a0)) = 0w53 + hashint a0        | hash (NEQ(a0)) = 0w53 + hashty a0
405        | hash (VNeg(a0)) = 0w59 + hashint a0        | hash (GT(a0)) = 0w59 + hashty a0
406        | hash (VSum(a0)) = 0w61 + hashint a0        | hash (GTE(a0)) = 0w61 + hashty a0
407        | hash (VProj(a0,a1)) = 0w67 + hashint a0 + hashint a1        | hash Not = 0w67
408        | hash (TensorIndex(a0,a1)) = 0w71 + hashty a0 + hashshape a1        | hash (Abs(a0)) = 0w71 + hashty a0
409        | hash (ProjectLast(a0,a1)) = 0w73 + hashty a0 + hashshape a1        | hash (Max(a0)) = 0w73 + hashty a0
410        | hash (LT(a0)) = 0w79 + hashty a0        | hash (Min(a0)) = 0w79 + hashty a0
411        | hash (LTE(a0)) = 0w83 + hashty a0        | hash (Clamp(a0)) = 0w83 + hashty a0
412        | hash (EQ(a0)) = 0w89 + hashty a0        | hash (Lerp(a0)) = 0w89 + hashty a0
413        | hash (NEQ(a0)) = 0w97 + hashty a0        | hash (VAdd(a0)) = 0w97 + hashint a0
414        | hash (GT(a0)) = 0w101 + hashty a0        | hash (VSub(a0)) = 0w101 + hashint a0
415        | hash (GTE(a0)) = 0w103 + hashty a0        | hash (VScale(a0)) = 0w103 + hashint a0
416        | hash Not = 0w107        | hash (VMul(a0)) = 0w107 + hashint a0
417        | hash (Abs(a0)) = 0w109 + hashty a0        | hash (VNeg(a0)) = 0w109 + hashint a0
418        | hash (Max(a0)) = 0w113 + hashty a0        | hash (VSum(a0)) = 0w113 + hashint a0
419        | hash (Min(a0)) = 0w127 + hashty a0        | hash (VProj(a0,a1)) = 0w127 + hashint a0 + hashint a1
420        | hash (Clamp(a0)) = 0w131 + hashty a0        | hash (TensorIndex(a0,a1)) = 0w131 + hashty a0 + hashshape a1
421        | hash (Lerp(a0)) = 0w137 + hashty a0        | hash (ProjectLast(a0,a1)) = 0w137 + hashty a0 + hashshape a1
422        | hash EigenVecs2x2 = 0w139        | hash EigenVecs2x2 = 0w139
423        | hash EigenVecs3x3 = 0w149        | hash EigenVecs3x3 = 0w149
424        | hash EigenVals2x2 = 0w151        | hash EigenVals2x2 = 0w151
# Line 478  Line 478 
478        | toString RMul = "RMul"        | toString RMul = "RMul"
479        | toString RDiv = "RDiv"        | toString RDiv = "RDiv"
480        | toString RNeg = "RNeg"        | toString RNeg = "RNeg"
       | toString (VAdd(a0)) = concat["VAdd<", intToString a0, ">"]  
       | toString (VSub(a0)) = concat["VSub<", intToString a0, ">"]  
       | toString (VScale(a0)) = concat["VScale<", intToString a0, ">"]  
       | toString (VMul(a0)) = concat["VMul<", intToString a0, ">"]  
       | toString (VNeg(a0)) = concat["VNeg<", intToString a0, ">"]  
       | toString (VSum(a0)) = concat["VSum<", intToString a0, ">"]  
       | toString (VProj(a0,a1)) = concat["VProj<", intToString a0, ",", intToString a1, ">"]  
       | toString (TensorIndex(a0,a1)) = concat["TensorIndex<", tyToString a0, ",", shapeToString a1, ">"]  
       | toString (ProjectLast(a0,a1)) = concat["ProjectLast<", tyToString a0, ",", shapeToString a1, ">"]  
481        | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]        | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]
482        | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]        | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]
483        | toString (EQ(a0)) = concat["EQ<", tyToString a0, ">"]        | toString (EQ(a0)) = concat["EQ<", tyToString a0, ">"]
# Line 499  Line 490 
490        | toString (Min(a0)) = concat["Min<", tyToString a0, ">"]        | toString (Min(a0)) = concat["Min<", tyToString a0, ">"]
491        | toString (Clamp(a0)) = concat["Clamp<", tyToString a0, ">"]        | toString (Clamp(a0)) = concat["Clamp<", tyToString a0, ">"]
492        | toString (Lerp(a0)) = concat["Lerp<", tyToString a0, ">"]        | toString (Lerp(a0)) = concat["Lerp<", tyToString a0, ">"]
493          | toString (VAdd(a0)) = concat["VAdd<", intToString a0, ">"]
494          | toString (VSub(a0)) = concat["VSub<", intToString a0, ">"]
495          | toString (VScale(a0)) = concat["VScale<", intToString a0, ">"]
496          | toString (VMul(a0)) = concat["VMul<", intToString a0, ">"]
497          | toString (VNeg(a0)) = concat["VNeg<", intToString a0, ">"]
498          | toString (VSum(a0)) = concat["VSum<", intToString a0, ">"]
499          | toString (VProj(a0,a1)) = concat["VProj<", intToString a0, ",", intToString a1, ">"]
500          | toString (TensorIndex(a0,a1)) = concat["TensorIndex<", tyToString a0, ",", shapeToString a1, ">"]
501          | toString (ProjectLast(a0,a1)) = concat["ProjectLast<", tyToString a0, ",", shapeToString a1, ">"]
502        | toString EigenVecs2x2 = "EigenVecs2x2"        | toString EigenVecs2x2 = "EigenVecs2x2"
503        | toString EigenVecs3x3 = "EigenVecs3x3"        | toString EigenVecs3x3 = "EigenVecs3x3"
504        | toString EigenVals2x2 = "EigenVals2x2"        | toString EigenVals2x2 = "EigenVals2x2"

Legend:
Removed from v.3765  
changed lines
  Added in v.3766

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