knownCase pass

Matthew Fluet fluet@CS.Cornell.EDU
Tue, 15 Jan 2002 15:38:22 -0500 (EST)


> jumps back to the header.  Unfortunately, knownCase doesn't lead to
> the result that I'd hoped, at least for a simple fold loop like
> 
> ----------------------------------------
> val _ = List.foldl (op +) 0 [1, 2, 3, 4]
> ----------------------------------------
> 
> It looks to me like knownCase did the right thing.  I don't think any
> code duplication is required to get this right.  It looks to me like a
> layout problem in the codegen.

The codegen does a simple depth first traversal of blocks for layout.  So,
we hit L_9 first and just add it in.

Let me think a little about it.  The loop forest stuff might help, but it
chooses headers different than what we would like.