[commit: ghc] master: Rewrite usingInconsistentPicReg as a table for clarity (35a341d)
Gabor Greif
ggreif at gmail.com
Sat Apr 6 20:03:27 CEST 2013
Repository : http://darcs.haskell.org/ghc.git/
On branch : master
https://github.com/ghc/ghc/commit/35a341d4e78078d62ae230f18e5d664f0135e4d1
>---------------------------------------------------------------
commit 35a341d4e78078d62ae230f18e5d664f0135e4d1
Author: Gabor Greif <ggreif at gmail.com>
Date: Sat Apr 6 19:55:47 2013 +0200
Rewrite usingInconsistentPicReg as a table for clarity
No change in functionality intended
>---------------------------------------------------------------
compiler/cmm/CmmPipeline.hs | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/compiler/cmm/CmmPipeline.hs b/compiler/cmm/CmmPipeline.hs
index 78fed22..5e9bca3 100644
--- a/compiler/cmm/CmmPipeline.hs
+++ b/compiler/cmm/CmmPipeline.hs
@@ -184,11 +184,11 @@ cpsTop hsc_env proc =
|| not (tablesNextToCode dflags)
|| -- Note [inconsistent-pic-reg]
usingInconsistentPicReg
- usingInconsistentPicReg = ( platformArch platform == ArchX86 ||
- platformArch platform == ArchPPC
- )
- && platformOS platform == OSDarwin
- && gopt Opt_PIC dflags
+ usingInconsistentPicReg
+ = case (platformArch platform, platformOS platform, gopt Opt_PIC dflags)
+ of (ArchX86, OSDarwin, pic) -> pic
+ (ArchPPC, OSDarwin, pic) -> pic
+ _ -> False
{- Note [inconsistent-pic-reg]
More information about the ghc-commits
mailing list