Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Glasgow Haskell Compiler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
5c718b15
Commit
5c718b15
authored
Jul 15, 2011
by
Ian Lynagh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove some more defaultTargetPlatform uses
parent
3b322660
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
20 deletions
+22
-20
compiler/nativeGen/AsmCodeGen.lhs
compiler/nativeGen/AsmCodeGen.lhs
+6
-5
compiler/nativeGen/RegAlloc/Graph/Main.hs
compiler/nativeGen/RegAlloc/Graph/Main.hs
+6
-5
compiler/nativeGen/RegAlloc/Graph/Stats.hs
compiler/nativeGen/RegAlloc/Graph/Stats.hs
+4
-4
compiler/nativeGen/TargetReg.hs
compiler/nativeGen/TargetReg.hs
+6
-6
No files found.
compiler/nativeGen/AsmCodeGen.lhs
View file @
5c718b15
...
...
@@ -212,7 +212,8 @@ nativeCodeGen' :: (Outputable statics, PlatformOutputable instr, Instruction ins
-> Handle -> UniqSupply -> [RawCmm] -> IO ()
nativeCodeGen' dflags ncgImpl h us cmms
= do
let split_cmms = concat $ map add_split cmms
let platform = targetPlatform dflags
split_cmms = concat $ map add_split cmms
-- BufHandle is a performance hack. We could hide it inside
-- Pretty if it weren't for the fact that we do lots of little
-- printDocs here (in order to do codegen in constant space).
...
...
@@ -226,7 +227,7 @@ nativeCodeGen' dflags ncgImpl h us cmms
-- dump native code
dumpIfSet_dyn dflags
Opt_D_dump_asm "Asm code"
(vcat $ map (docToSDoc . pprNatCmmTop ncgImpl
(targetPlatform dflags)
) $ concat native)
(vcat $ map (docToSDoc . pprNatCmmTop ncgImpl
platform
) $ concat native)
-- dump global NCG stats for graph coloring allocator
(case concat $ catMaybes colorStats of
...
...
@@ -245,9 +246,9 @@ nativeCodeGen' dflags ncgImpl h us cmms
Opt_D_dump_asm_conflicts "Register conflict graph"
$ Color.dotGraph
targetRegDotColor
(Color.trivColorable
(targetPlatform dflags)
targetVirtualRegSqueeze
targetRealRegSqueeze
)
(Color.trivColorable
platform
(targetVirtualRegSqueeze platform)
(targetRealRegSqueeze platform)
)
$ graphGlobal)
...
...
compiler/nativeGen/RegAlloc/Graph/Main.hs
View file @
5c718b15
...
...
@@ -59,9 +59,10 @@ regAlloc dflags regsFree slotsFree code
-- TODO: the regClass function is currently hard coded to the default target
-- architecture. Would prefer to determine this from dflags.
-- There are other uses of targetRegClass later in this module.
let
triv
=
trivColorable
(
targetPlatform
dflags
)
targetVirtualRegSqueeze
targetRealRegSqueeze
let
platform
=
targetPlatform
dflags
triv
=
trivColorable
platform
(
targetVirtualRegSqueeze
platform
)
(
targetRealRegSqueeze
platform
)
(
code_final
,
debug_codeGraphs
,
_
)
<-
regAlloc_spin
dflags
0
...
...
@@ -349,8 +350,8 @@ patchRegsFromGraph platform graph code
$$
Color
.
dotGraph
(
\
_
->
text
"white"
)
(
trivColorable
platform
targetVirtualRegSqueeze
targetRealRegSqueeze
)
(
targetVirtualRegSqueeze
platform
)
(
targetRealRegSqueeze
platform
)
)
graph
)
in
patchEraseLive
patchF
code
...
...
compiler/nativeGen/RegAlloc/Graph/Stats.hs
View file @
5c718b15
...
...
@@ -76,8 +76,8 @@ instance (Outputable statics, PlatformOutputable instr) => PlatformOutputable (R
$$
Color
.
dotGraph
targetRegDotColor
(
trivColorable
platform
targetVirtualRegSqueeze
targetRealRegSqueeze
)
(
targetVirtualRegSqueeze
platform
)
(
targetRealRegSqueeze
platform
)
)
(
raGraph
s
)
...
...
@@ -113,8 +113,8 @@ instance (Outputable statics, PlatformOutputable instr) => PlatformOutputable (R
$$
Color
.
dotGraph
targetRegDotColor
(
trivColorable
platform
targetVirtualRegSqueeze
targetRealRegSqueeze
)
(
targetVirtualRegSqueeze
platform
)
(
targetRealRegSqueeze
platform
)
)
(
raGraphColored
s
)
$$
text
""
...
...
compiler/nativeGen/TargetReg.hs
View file @
5c718b15
...
...
@@ -44,9 +44,9 @@ import qualified SPARC.Regs as SPARC
-- We should be passing DynFlags in instead, and looking at
-- its targetPlatform.
targetVirtualRegSqueeze
::
RegClass
->
VirtualReg
->
FastInt
targetVirtualRegSqueeze
=
case
platformArch
defaultTargetP
latform
of
targetVirtualRegSqueeze
::
Platform
->
RegClass
->
VirtualReg
->
FastInt
targetVirtualRegSqueeze
platform
=
case
platformArch
p
latform
of
ArchX86
->
X86
.
virtualRegSqueeze
ArchX86_64
->
X86
.
virtualRegSqueeze
ArchPPC
->
PPC
.
virtualRegSqueeze
...
...
@@ -55,9 +55,9 @@ targetVirtualRegSqueeze
ArchARM
->
panic
"targetVirtualRegSqueeze ArchARM"
ArchUnknown
->
panic
"targetVirtualRegSqueeze ArchUnknown"
targetRealRegSqueeze
::
RegClass
->
RealReg
->
FastInt
targetRealRegSqueeze
=
case
platformArch
defaultTargetP
latform
of
targetRealRegSqueeze
::
Platform
->
RegClass
->
RealReg
->
FastInt
targetRealRegSqueeze
platform
=
case
platformArch
p
latform
of
ArchX86
->
X86
.
realRegSqueeze
ArchX86_64
->
X86
.
realRegSqueeze
ArchPPC
->
PPC
.
realRegSqueeze
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment