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
e21c922f
Commit
e21c922f
authored
Nov 16, 2010
by
simonpj@microsoft.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unncessary fromIntegral calls
parent
2d367f85
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
11 additions
and
11 deletions
+11
-11
compiler/cmm/CmmInfo.hs
compiler/cmm/CmmInfo.hs
+1
-1
compiler/codeGen/CgCallConv.hs
compiler/codeGen/CgCallConv.hs
+1
-1
compiler/codeGen/CgHpc.hs
compiler/codeGen/CgHpc.hs
+1
-1
compiler/codeGen/StgCmmHpc.hs
compiler/codeGen/StgCmmHpc.hs
+1
-1
compiler/codeGen/StgCmmLayout.hs
compiler/codeGen/StgCmmLayout.hs
+1
-1
compiler/ghci/ByteCodeGen.lhs
compiler/ghci/ByteCodeGen.lhs
+1
-1
compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs
compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs
+4
-4
compiler/nativeGen/RegAlloc/Linear/X86/FreeRegs.hs
compiler/nativeGen/RegAlloc/Linear/X86/FreeRegs.hs
+1
-1
No files found.
compiler/cmm/CmmInfo.hs
View file @
e21c922f
...
@@ -245,7 +245,7 @@ mkLiveness uniq live =
...
@@ -245,7 +245,7 @@ mkLiveness uniq live =
small_bitmap
=
case
bitmap
of
small_bitmap
=
case
bitmap
of
[]
->
0
[]
->
0
[
b
]
->
fromIntegral
b
[
b
]
->
b
_
->
panic
"mkLiveness"
_
->
panic
"mkLiveness"
small_liveness
=
small_liveness
=
fromIntegral
(
length
bits
)
.|.
(
small_bitmap
`
shiftL
`
bITMAP_BITS_SHIFT
)
fromIntegral
(
length
bits
)
.|.
(
small_bitmap
`
shiftL
`
bITMAP_BITS_SHIFT
)
...
...
compiler/codeGen/CgCallConv.hs
View file @
e21c922f
...
@@ -150,7 +150,7 @@ mkLiveness name size bits
...
@@ -150,7 +150,7 @@ mkLiveness name size bits
=
let
=
let
small_bits
=
case
bits
of
small_bits
=
case
bits
of
[]
->
0
[]
->
0
[
b
]
->
fromIntegral
b
[
b
]
->
b
_
->
panic
"livenessToAddrMode"
_
->
panic
"livenessToAddrMode"
in
in
return
(
smallLiveness
size
small_bits
)
return
(
smallLiveness
size
small_bits
)
...
...
compiler/codeGen/CgHpc.hs
View file @
e21c922f
...
@@ -29,7 +29,7 @@ cgTickBox :: Module -> Int -> Code
...
@@ -29,7 +29,7 @@ cgTickBox :: Module -> Int -> Code
cgTickBox
mod
n
=
do
cgTickBox
mod
n
=
do
let
tick_box
=
(
cmmIndex
W64
let
tick_box
=
(
cmmIndex
W64
(
CmmLit
$
CmmLabel
$
mkHpcTicksLabel
$
mod
)
(
CmmLit
$
CmmLabel
$
mkHpcTicksLabel
$
mod
)
(
fromIntegral
n
)
n
)
)
stmtsC
[
CmmStore
tick_box
stmtsC
[
CmmStore
tick_box
(
CmmMachOp
(
MO_Add
W64
)
(
CmmMachOp
(
MO_Add
W64
)
...
...
compiler/codeGen/StgCmmHpc.hs
View file @
e21c922f
...
@@ -32,7 +32,7 @@ mkTickBox mod n
...
@@ -32,7 +32,7 @@ mkTickBox mod n
where
where
tick_box
=
cmmIndex
W64
tick_box
=
cmmIndex
W64
(
CmmLit
$
CmmLabel
$
mkHpcTicksLabel
$
mod
)
(
CmmLit
$
CmmLabel
$
mkHpcTicksLabel
$
mod
)
(
fromIntegral
n
)
n
initHpc
::
Module
->
HpcInfo
->
FCode
CmmAGraph
initHpc
::
Module
->
HpcInfo
->
FCode
CmmAGraph
-- Emit top-level tables for HPC and return code to initialise
-- Emit top-level tables for HPC and return code to initialise
...
...
compiler/codeGen/StgCmmLayout.hs
View file @
e21c922f
...
@@ -400,7 +400,7 @@ mkLiveness name size bits
...
@@ -400,7 +400,7 @@ mkLiveness name size bits
=
let
=
let
small_bits
=
case
bits
of
small_bits
=
case
bits
of
[]
->
0
[]
->
0
[
b
]
->
fromIntegral
b
[
b
]
->
b
_
->
panic
"livenessToAddrMode"
_
->
panic
"livenessToAddrMode"
in
in
return
(
smallLiveness
size
small_bits
)
return
(
smallLiveness
size
small_bits
)
...
...
compiler/ghci/ByteCodeGen.lhs
View file @
e21c922f
...
@@ -298,7 +298,7 @@ schemeER_wrk d p rhs
...
@@ -298,7 +298,7 @@ schemeER_wrk d p rhs
| Just (tickInfo, (_annot, newRhs)) <- isTickedExp' rhs = do
| Just (tickInfo, (_annot, newRhs)) <- isTickedExp' rhs = do
code <- schemeE d 0 p newRhs
code <- schemeE d 0 p newRhs
arr <- getBreakArray
arr <- getBreakArray
let idOffSets = getVarOffSets
(fromIntegral d) p tickInfo
let idOffSets = getVarOffSets
d p tickInfo
let tickNumber = tickInfo_number tickInfo
let tickNumber = tickInfo_number tickInfo
let breakInfo = BreakInfo
let breakInfo = BreakInfo
{ breakInfo_module = tickInfo_module tickInfo
{ breakInfo_module = tickInfo_module tickInfo
...
...
compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs
View file @
e21c922f
...
@@ -32,8 +32,8 @@ noFreeRegs = FreeRegs 0 0
...
@@ -32,8 +32,8 @@ noFreeRegs = FreeRegs 0 0
releaseReg
::
RealReg
->
FreeRegs
->
FreeRegs
releaseReg
::
RealReg
->
FreeRegs
->
FreeRegs
releaseReg
(
RealRegSingle
r
)
(
FreeRegs
g
f
)
releaseReg
(
RealRegSingle
r
)
(
FreeRegs
g
f
)
|
r
>
31
=
FreeRegs
g
(
f
.|.
(
1
`
shiftL
`
(
fromIntegral
r
-
32
)))
|
r
>
31
=
FreeRegs
g
(
f
.|.
(
1
`
shiftL
`
(
r
-
32
)))
|
otherwise
=
FreeRegs
(
g
.|.
(
1
`
shiftL
`
fromIntegral
r
))
f
|
otherwise
=
FreeRegs
(
g
.|.
(
1
`
shiftL
`
r
))
f
releaseReg
_
_
releaseReg
_
_
=
panic
"RegAlloc.Linear.PPC.releaseReg: bad reg"
=
panic
"RegAlloc.Linear.PPC.releaseReg: bad reg"
...
@@ -53,8 +53,8 @@ getFreeRegs cls (FreeRegs g f)
...
@@ -53,8 +53,8 @@ getFreeRegs cls (FreeRegs g f)
allocateReg
::
RealReg
->
FreeRegs
->
FreeRegs
allocateReg
::
RealReg
->
FreeRegs
->
FreeRegs
allocateReg
(
RealRegSingle
r
)
(
FreeRegs
g
f
)
allocateReg
(
RealRegSingle
r
)
(
FreeRegs
g
f
)
|
r
>
31
=
FreeRegs
g
(
f
.&.
complement
(
1
`
shiftL
`
(
fromIntegral
r
-
32
)))
|
r
>
31
=
FreeRegs
g
(
f
.&.
complement
(
1
`
shiftL
`
(
r
-
32
)))
|
otherwise
=
FreeRegs
(
g
.&.
complement
(
1
`
shiftL
`
fromIntegral
r
))
f
|
otherwise
=
FreeRegs
(
g
.&.
complement
(
1
`
shiftL
`
r
))
f
allocateReg
_
_
allocateReg
_
_
=
panic
"RegAlloc.Linear.PPC.allocateReg: bad reg"
=
panic
"RegAlloc.Linear.PPC.allocateReg: bad reg"
compiler/nativeGen/RegAlloc/Linear/X86/FreeRegs.hs
View file @
e21c922f
...
@@ -47,7 +47,7 @@ getFreeRegs cls f = go f 0
...
@@ -47,7 +47,7 @@ getFreeRegs cls f = go f 0
allocateReg
::
RealReg
->
FreeRegs
->
FreeRegs
allocateReg
::
RealReg
->
FreeRegs
->
FreeRegs
allocateReg
(
RealRegSingle
r
)
f
allocateReg
(
RealRegSingle
r
)
f
=
f
.&.
complement
(
1
`
shiftL
`
fromIntegral
r
)
=
f
.&.
complement
(
1
`
shiftL
`
r
)
allocateReg
_
_
allocateReg
_
_
=
panic
"RegAlloc.Linear.X86.FreeRegs.allocateReg: no reg"
=
panic
"RegAlloc.Linear.X86.FreeRegs.allocateReg: no reg"
...
...
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