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/mltree/mltree-rtl.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/mltree/mltree-rtl.sml

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

revision 656, Fri Jun 9 03:39:04 2000 UTC revision 657, Fri Jun 9 05:20:54 2000 UTC
# Line 321  Line 321 
321     in  #stm (Fold.fold{stm=stm,rexp=rexp, fexp=fexp, ccexp=ccexp}) rtl     in  #stm (Fold.fold{stm=stm,rexp=rexp, fexp=fexp, ccexp=ccexp}) rtl
322     end     end
323    
324       fun pin(T.RTL{attribs, hash, e}) =
325            T.RTL{attribs=attribs || A_PINNED, hash=hash, e=e}
326         | pin _ = error "pin"
327    
328     (* Query functions *)     (* Query functions *)
329     fun isOn(a,flag) = Word.andb(a,flag) <> 0w0     fun isOn(a,flag) = Word.andb(a,flag) <> 0w0
330    
331     fun can'tMoveUp(T.RTL{attribs, ...}) =     fun can'tMoveUp(T.RTL{attribs, ...}) =
332            isOn(attribs, A_SIDEEFFECT || A_TRAPPING)            isOn(attribs, A_SIDEEFFECT || A_TRAPPING || A_PINNED)
333       | can'tMoveUp(T.PHI _) = true       | can'tMoveUp(T.PHI _) = true
334       | can'tMoveUp(T.SOURCE _) = true       | can'tMoveUp(T.SOURCE _) = true
335       | can'tMoveUp(T.SINK _) = true       | can'tMoveUp(T.SINK _) = true
# Line 335  Line 339 
339       | can'tMoveDown(T.SOURCE _) = true       | can'tMoveDown(T.SOURCE _) = true
340       | can'tMoveDown(T.SINK _) = true       | can'tMoveDown(T.SINK _) = true
341       | can'tMoveDown(T.RTL{attribs, ...}) =       | can'tMoveDown(T.RTL{attribs, ...}) =
342            isOn(attribs, A_SIDEEFFECT || A_BRANCH || A_JUMP || A_TRAPPING)            isOn(attribs, A_SIDEEFFECT || A_BRANCH || A_JUMP || A_TRAPPING ||
343                            A_PINNED ||
344                            A_LOOKER (* can be avoided with pure loads! XXX *))
345    
346       fun pinned(T.RTL{attribs, ...}) =
347             isOn(attribs, A_SIDEEFFECT || A_TRAPPING || A_PINNED)
348         | pinned(T.PHI _) = true
349         | pinned(T.SOURCE _) = true
350         | pinned(T.SINK _) = true
351         | pinned _ = false
352    
353     fun hasSideEffect(T.RTL{attribs, ...}) = isOn(attribs, A_SIDEEFFECT)     fun hasSideEffect(T.RTL{attribs, ...}) = isOn(attribs, A_SIDEEFFECT)
354       | hasSideEffect _ = false       | hasSideEffect _ = false
# Line 348  Line 361 
361       | isConditionalBranch _ = false       | isConditionalBranch _ = false
362     fun isJump(T.RTL{attribs, ...}) = isOn(attribs,A_JUMP)     fun isJump(T.RTL{attribs, ...}) = isOn(attribs,A_JUMP)
363       | isJump _ = false       | isJump _ = false
364       fun isLooker(T.RTL{attribs, ...}) = isOn(attribs,A_LOOKER)
365         | isLooker _ = false
366    
367     (*     (*
368      * Create a uniq RTL      * Create a uniq RTL

Legend:
Removed from v.656  
changed lines
  Added in v.657

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