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
29db17fe
Commit
29db17fe
authored
Oct 24, 2013
by
Jan Stolarek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary check in CmmContFlowOpt
Fixes #8456
parent
47b6e15c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
compiler/cmm/CmmContFlowOpt.hs
compiler/cmm/CmmContFlowOpt.hs
+6
-8
No files found.
compiler/cmm/CmmContFlowOpt.hs
View file @
29db17fe
...
...
@@ -198,9 +198,8 @@ blockConcat splitting_procs g@CmmGraph { g_entry = entry_id }
maybe_concat
block
(
blocks
,
shortcut_map
,
backEdges
)
-- If:
-- (1) current block ends with unconditional branch to b' and
-- (2) it has exactly one predecessor (namely, current block) and
-- (3) we have not mapped any other label to b'
-- (see Note [Shortcut call returns]).
-- (2) it has exactly one predecessor (namely, current block)
--
-- Then:
-- (1) append b' block at the end of current block
-- (2) remove b' from the map of blocks
...
...
@@ -211,10 +210,12 @@ blockConcat splitting_procs g@CmmGraph { g_entry = entry_id }
-- shorcutable and has only one predecessor and attempted to shortcut it
-- first we would make that block unreachable but would not remove it
-- from the graph.
--
-- Note that we always maintain an up-to-date list of predecessors, so
-- we can ignore the contents of shortcut_map
|
CmmBranch
b'
<-
last
,
Just
blk'
<-
mapLookup
b'
blocks
,
hasOnePredecessor
b'
,
hasNotBeenMappedTo
b'
shortcut_map
,
Just
blk'
<-
mapLookup
b'
blocks
=
let
bid'
=
entryLabel
blk'
in
(
mapDelete
bid'
$
mapInsert
bid
(
splice
head
blk'
)
blocks
,
shortcut_map
...
...
@@ -315,9 +316,6 @@ blockConcat splitting_procs g@CmmGraph { g_entry = entry_id }
hasOnePredecessor
b
=
numPreds
b
==
1
hasNotBeenMappedTo
::
BlockId
->
BlockEnv
BlockId
->
Bool
hasNotBeenMappedTo
b
successor_map
=
mapMember
b
successor_map
-- Functions for incrementing and decrementing number of predecessors. If
-- decrementing would set the predecessor count to 0, we remove entry from the
-- map.
...
...
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