[commit: ghc] master: nativeGen: detabify/dewhitespace SPARC/CodeGen/Sanity (5ef0050)

git at git.haskell.org git at git.haskell.org
Sun Jul 20 21:57:26 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/5ef0050c200e09f2a673ba5bda6eb2ad4d59e0cc/ghc

>---------------------------------------------------------------

commit 5ef0050c200e09f2a673ba5bda6eb2ad4d59e0cc
Author: Austin Seipp <austin at well-typed.com>
Date:   Fri Jul 18 22:29:47 2014 -0500

    nativeGen: detabify/dewhitespace SPARC/CodeGen/Sanity
    
    Signed-off-by: Austin Seipp <austin at well-typed.com>


>---------------------------------------------------------------

5ef0050c200e09f2a673ba5bda6eb2ad4d59e0cc
 compiler/nativeGen/SPARC/CodeGen/Sanity.hs | 91 +++++++++++++-----------------
 1 file changed, 40 insertions(+), 51 deletions(-)

diff --git a/compiler/nativeGen/SPARC/CodeGen/Sanity.hs b/compiler/nativeGen/SPARC/CodeGen/Sanity.hs
index 5dff9ce..8164132 100644
--- a/compiler/nativeGen/SPARC/CodeGen/Sanity.hs
+++ b/compiler/nativeGen/SPARC/CodeGen/Sanity.hs
@@ -1,22 +1,13 @@
-
-{-# OPTIONS_GHC -fno-warn-tabs #-}
--- The above warning supression flag is a temporary kludge.
--- While working on this module you are encouraged to remove it and
--- detab the module (please do the detabbing in a separate patch). See
---     http://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
-
 -- | One ounce of sanity checking is worth 10000000000000000 ounces
---	of staring blindly at assembly code trying to find the problem..
---
+-- of staring blindly at assembly code trying to find the problem..
 module SPARC.CodeGen.Sanity (
-	checkBlock
+        checkBlock
 )
 
 where
 
 import SPARC.Instr
-import SPARC.Ppr	()
+import SPARC.Ppr        ()
 import Instruction
 
 import Cmm
@@ -31,48 +22,46 @@ checkBlock :: CmmBlock
            -> NatBasicBlock Instr
 
 checkBlock cmm block@(BasicBlock _ instrs)
-	| checkBlockInstrs instrs
-	= block
+        | checkBlockInstrs instrs
+        = block
 
-	| otherwise
-	= pprPanic 
-		("SPARC.CodeGen: bad block\n")
-		( vcat	[ text " -- cmm -----------------\n"
-			, ppr cmm
-			, text " -- native code ---------\n"
-			, ppr block ])
+        | otherwise
+        = pprPanic
+                ("SPARC.CodeGen: bad block\n")
+                ( vcat  [ text " -- cmm -----------------\n"
+                        , ppr cmm
+                        , text " -- native code ---------\n"
+                        , ppr block ])
 
 
 checkBlockInstrs :: [Instr] -> Bool
 checkBlockInstrs ii
 
-	-- An unconditional jumps end the block.
-	--	There must be an unconditional jump in the block, otherwise
-	--	the register liveness determinator will get the liveness
-	--	information wrong. 
-	--
-	--	If the block ends with a cmm call that never returns
-	--	then there can be unreachable instructions after the jump,
-	--	but we don't mind here.
-	--
-	| instr : NOP : _	<- ii 
-	, isUnconditionalJump instr
-	= True
-	
-	-- All jumps must have a NOP in their branch delay slot.
-	--	The liveness determinator and register allocators aren't smart
-	--	enough to handle branch delay slots.
-	--
-	| instr : NOP : is	<- ii
-	, isJumpishInstr instr
-	= checkBlockInstrs is
-
-	-- keep checking
-	| _:i2:is		<- ii
-	= checkBlockInstrs (i2:is)
-
-	-- this block is no good	
-	| otherwise
-	= False
-
-
+        -- An unconditional jumps end the block.
+        --      There must be an unconditional jump in the block, otherwise
+        --      the register liveness determinator will get the liveness
+        --      information wrong.
+        --
+        --      If the block ends with a cmm call that never returns
+        --      then there can be unreachable instructions after the jump,
+        --      but we don't mind here.
+        --
+        | instr : NOP : _       <- ii
+        , isUnconditionalJump instr
+        = True
+
+        -- All jumps must have a NOP in their branch delay slot.
+        --      The liveness determinator and register allocators aren't smart
+        --      enough to handle branch delay slots.
+        --
+        | instr : NOP : is      <- ii
+        , isJumpishInstr instr
+        = checkBlockInstrs is
+
+        -- keep checking
+        | _:i2:is               <- ii
+        = checkBlockInstrs (i2:is)
+
+        -- this block is no good
+        | otherwise
+        = False



More information about the ghc-commits mailing list