Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Piyush P Kurur
Glasgow Haskell Compiler
Commits
96d2eb27
Commit
96d2eb27
authored
Jan 18, 2018
by
Alex Biehl
Committed by
Ben Gamari
Jan 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Invert likeliness when improving conditionals
... in CmmSink
parent
1cb12eae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
compiler/cmm/CmmSink.hs
compiler/cmm/CmmSink.hs
+5
-1
No files found.
compiler/cmm/CmmSink.hs
View file @
96d2eb27
...
@@ -462,9 +462,13 @@ tryToInline dflags live node assigs = go usages node emptyLRegSet assigs
...
@@ -462,9 +462,13 @@ tryToInline dflags live node assigs = go usages node emptyLRegSet assigs
CmmCondBranch
(
CmmMachOp
(
MO_Ne
w
)
args
)
CmmCondBranch
(
CmmMachOp
(
MO_Ne
w
)
args
)
ti
fi
l
ti
fi
l
->
CmmCondBranch
(
cmmMachOpFold
dflags
(
MO_Eq
w
)
args
)
->
CmmCondBranch
(
cmmMachOpFold
dflags
(
MO_Eq
w
)
args
)
fi
ti
l
fi
ti
(
inv_likeliness
l
)
node'
->
node'
node'
->
node'
inv_likeliness
::
Maybe
Bool
->
Maybe
Bool
inv_likeliness
Nothing
=
Nothing
inv_likeliness
(
Just
l
)
=
Just
(
not
l
)
inl_exp
::
CmmExpr
->
CmmExpr
inl_exp
::
CmmExpr
->
CmmExpr
-- inl_exp is where the inlining actually takes place!
-- inl_exp is where the inlining actually takes place!
inl_exp
(
CmmReg
(
CmmLocal
l'
))
|
l
==
l'
=
rhs
inl_exp
(
CmmReg
(
CmmLocal
l'
))
|
l
==
l'
=
rhs
...
...
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