diff options
Diffstat (limited to 'compiler/cmm/CmmExpr.hs')
-rw-r--r-- | compiler/cmm/CmmExpr.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/cmm/CmmExpr.hs b/compiler/cmm/CmmExpr.hs index 3b6fec6925..939d4b7ca9 100644 --- a/compiler/cmm/CmmExpr.hs +++ b/compiler/cmm/CmmExpr.hs @@ -225,6 +225,10 @@ filterRegsUsed p e = foldRegsUsed (\regs r -> if p r then extendRegSet regs r else regs) emptyRegSet e +instance UserOfLocalRegs a => UserOfLocalRegs (Maybe a) where + foldRegsUsed f z (Just x) = foldRegsUsed f z x + foldRegsUsed _ z Nothing = z + instance UserOfLocalRegs CmmReg where foldRegsUsed f z (CmmLocal reg) = f z reg foldRegsUsed _ z (CmmGlobal _) = z |