[commit: ghc] master: Remove obsolete comment in cmmOffset (d01844f)
git at git.haskell.org
git at git.haskell.org
Mon Mar 9 19:22:26 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/d01844f145263a038235684900bc7228a799ca6d/ghc
>---------------------------------------------------------------
commit d01844f145263a038235684900bc7228a799ca6d
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Mon Mar 9 16:04:42 2015 +0100
Remove obsolete comment in cmmOffset
Summary:
as obviously, the code does _not_ adhere to the comment, and yet the
compiler does _not_ go into an infinite loop.
Test Plan: Run validate
Reviewers: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D719
>---------------------------------------------------------------
d01844f145263a038235684900bc7228a799ca6d
compiler/cmm/CmmUtils.hs | 7 -------
1 file changed, 7 deletions(-)
diff --git a/compiler/cmm/CmmUtils.hs b/compiler/cmm/CmmUtils.hs
index 65d633e..3ddb9ec 100644
--- a/compiler/cmm/CmmUtils.hs
+++ b/compiler/cmm/CmmUtils.hs
@@ -205,13 +205,6 @@ cmmOffsetExpr :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
cmmOffsetExpr dflags e (CmmLit (CmmInt n _)) = cmmOffset dflags e (fromInteger n)
cmmOffsetExpr dflags e byte_off = CmmMachOp (MO_Add (cmmExprWidth dflags e)) [e, byte_off]
--- NB. Do *not* inspect the value of the offset in these smart constructors!!!
--- because the offset is sometimes involved in a loop in the code generator
--- (we don't know the real Hp offset until we've generated code for the entire
--- basic block, for example). So we cannot eliminate zero offsets at this
--- stage; they're eliminated later instead (either during printing or
--- a later optimisation step on Cmm).
---
cmmOffset :: DynFlags -> CmmExpr -> Int -> CmmExpr
cmmOffset _ e 0 = e
cmmOffset _ (CmmReg reg) byte_off = cmmRegOff reg byte_off
More information about the ghc-commits
mailing list