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
3b9fe0c6
Commit
3b9fe0c6
authored
Jul 31, 2014
by
Simon Marlow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor to fix 80column overflow
parent
52188ada
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
16 deletions
+20
-16
compiler/nativeGen/RegAlloc/Linear/Main.hs
compiler/nativeGen/RegAlloc/Linear/Main.hs
+20
-16
No files found.
compiler/nativeGen/RegAlloc/Linear/Main.hs
View file @
3b9fe0c6
...
...
@@ -196,26 +196,30 @@ regAlloc _ (CmmProc _ _ _ _)
linearRegAlloc
::
(
Outputable
instr
,
Instruction
instr
)
=>
DynFlags
->
[
BlockId
]
-- ^ entry points
->
BlockMap
RegSet
-- ^ live regs on entry to each basic block
->
[
SCC
(
LiveBasicBlock
instr
)]
-- ^ instructions annotated with "deaths"
->
[
BlockId
]
-- ^ entry points
->
BlockMap
RegSet
-- ^ live regs on entry to each basic block
->
[
SCC
(
LiveBasicBlock
instr
)]
-- ^ instructions annotated with "deaths"
->
UniqSM
([
NatBasicBlock
instr
],
RegAllocStats
,
Int
)
linearRegAlloc
dflags
entry_ids
block_live
sccs
=
let
platform
=
targetPlatform
dflags
in
case
platformArch
platform
of
ArchX86
->
linearRegAlloc'
dflags
(
frInitFreeRegs
platform
::
X86
.
FreeRegs
)
entry_ids
block_live
sccs
ArchX86_64
->
linearRegAlloc'
dflags
(
frInitFreeRegs
platform
::
X86_64
.
FreeRegs
)
entry_ids
block_live
sccs
ArchSPARC
->
linearRegAlloc'
dflags
(
frInitFreeRegs
platform
::
SPARC
.
FreeRegs
)
entry_ids
block_live
sccs
ArchPPC
->
linearRegAlloc'
dflags
(
frInitFreeRegs
platform
::
PPC
.
FreeRegs
)
entry_ids
block_live
sccs
ArchARM
_
_
_
->
panic
"linearRegAlloc ArchARM"
ArchARM64
->
panic
"linearRegAlloc ArchARM64"
ArchPPC_64
->
panic
"linearRegAlloc ArchPPC_64"
ArchAlpha
->
panic
"linearRegAlloc ArchAlpha"
ArchMipseb
->
panic
"linearRegAlloc ArchMipseb"
ArchMipsel
->
panic
"linearRegAlloc ArchMipsel"
=
case
platformArch
platform
of
ArchX86
->
go
$
(
frInitFreeRegs
platform
::
X86
.
FreeRegs
)
ArchX86_64
->
go
$
(
frInitFreeRegs
platform
::
X86_64
.
FreeRegs
)
ArchSPARC
->
go
$
(
frInitFreeRegs
platform
::
SPARC
.
FreeRegs
)
ArchPPC
->
go
$
(
frInitFreeRegs
platform
::
PPC
.
FreeRegs
)
ArchARM
_
_
_
->
panic
"linearRegAlloc ArchARM"
ArchARM64
->
panic
"linearRegAlloc ArchARM64"
ArchPPC_64
->
panic
"linearRegAlloc ArchPPC_64"
ArchAlpha
->
panic
"linearRegAlloc ArchAlpha"
ArchMipseb
->
panic
"linearRegAlloc ArchMipseb"
ArchMipsel
->
panic
"linearRegAlloc ArchMipsel"
ArchJavaScript
->
panic
"linearRegAlloc ArchJavaScript"
ArchUnknown
->
panic
"linearRegAlloc ArchUnknown"
ArchUnknown
->
panic
"linearRegAlloc ArchUnknown"
where
go
f
=
linearRegAlloc'
dflags
f
entry_ids
block_live
sccs
platform
=
targetPlatform
dflags
linearRegAlloc'
::
(
FR
freeRegs
,
Outputable
instr
,
Instruction
instr
)
...
...
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