Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/MLRISC/alpha/instructions/alphaPeephole.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/alpha/instructions/alphaPeephole.sml

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

revision 957, Thu Oct 11 15:47:53 2001 UTC revision 958, Fri Oct 12 03:54:43 2001 UTC
# Line 1  Line 1 
1  (* WARNING: this is generated by running 'nowhere alphaPeephole.peep'.  (* WARNING: this is generated by running 'nowhere alphaPeephole.peep'.
2   * Do not edit this file directly.   * Do not edit this file directly.
3   * Version 1.1   * Version 1.2
4   *)   *)
5    
6  (*#line 8.1 "alphaPeephole.peep"*)  (*#line 8.1 "alphaPeephole.peep"*)
# Line 11  Line 11 
11     structure I = AlphaInstr     structure I = AlphaInstr
12    
13  (*#line 11.4 "alphaPeephole.peep"*)  (*#line 11.4 "alphaPeephole.peep"*)
14     structure C = I.C     structure CB = CellsBasis
15    
16  (*#line 14.4 "alphaPeephole.peep"*)  (*#line 14.4 "alphaPeephole.peep"*)
17     fun peephole instrs =     fun peephole instrs =
18         let         let
19  (*#line 15.8 "alphaPeephole.peep"*)  (*#line 15.8 "alphaPeephole.peep"*)
20             fun isZero (I.LABop le) = (I.LabelExp.valueOf le) = 0             fun isZero (I.LABop le) = (I.LabelExp.valueOf le) = 0
21               | isZero (I.REGop r) = (C.registerNum r) = 31               | isZero (I.REGop r) = (CB.registerNum r) = 31
22               | isZero (I.IMMop i) = i = 0               | isZero (I.IMMop i) = i = 0
23               | isZero _ = false               | isZero _ = false
24    
# Line 30  Line 30 
30                         let val ra = v_0                         let val ra = v_0
31                             and rb = v_1                             and rb = v_1
32                             and rc = v_2                             and rc = v_2
33                         in (C.sameColor (ra, rc)) andalso (isZero rb)                         in (CB.sameColor (ra, rc)) andalso (isZero rb)
34                         end                         end
35                 in                 in
36                    let val v_10 = v_11                    let val v_10 = v_11
# Line 50  Line 50 
50                            let val b = v_7                            let val b = v_7
51                                and d = v_6                                and d = v_6
52                                and r = v_5                                and r = v_5
53                            in (isZero d) andalso (C.sameColor (r, b))                            in (isZero d) andalso (CB.sameColor (r, b))
54                            end                            end
55                         end                         end
56                       | I.OPERATE v_4 =>                       | I.OPERATE v_4 =>
# Line 75  Line 75 
75               | symmetric _ = false               | symmetric _ = false
76    
77  (*#line 32.8 "alphaPeephole.peep"*)  (*#line 32.8 "alphaPeephole.peep"*)
78             fun sameOperand (I.REGop r1, I.REGop r2) = C.sameColor (r1, r2)             fun sameOperand (I.REGop r1, I.REGop r2) = CB.sameColor (r1, r2)
79               | sameOperand (I.IMMop i1, I.IMMop i2) = i1 = i2               | sameOperand (I.IMMop i1, I.IMMop i2) = i1 = i2
80               | sameOperand (I.LABop l1, I.LABop l2) = (I.LabelExp.valueOf l1) = (I.LabelExp.valueOf l2)               | sameOperand (I.LABop l1, I.LABop l2) = (I.LabelExp.valueOf l1) = (I.LabelExp.valueOf l2)
81               | sameOperand _ = false               | sameOperand _ = false
# Line 122  Line 122 
122                                            and rest = v_3                                            and rest = v_3
123                                            and st = v_0                                            and st = v_0
124                                            and stOp = v_2                                            and stOp = v_2
125                                        in (if ((((symmetric (stOp, ldOp)) andalso (C.sameColor (r1, r2))) andalso (C.sameColor (b1, b2))) andalso (sameOperand (d1,                                        in (if ((((symmetric (stOp, ldOp)) andalso (CB.sameColor (r1, r2))) andalso (CB.sameColor (b1, b2))) andalso (sameOperand (d1,
126                                              d2)))                                              d2)))
127                                              then (loop (rest, st :: instrs))                                              then (loop (rest, st :: instrs))
128                                              else (state_7 (v_0, v_1)))                                              else (state_7 (v_0, v_1)))

Legend:
Removed from v.957  
changed lines
  Added in v.958

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