diff options
author | Peter Wortmann <scpmw@leeds.ac.uk> | 2014-10-14 23:11:43 +0200 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-12-16 15:02:28 -0600 |
commit | 7ceaf96fde63bd45dfc1e08a975cba0ee280eb7b (patch) | |
tree | cf7c4b7c3c062ed751aabc563ae2ccc149a6820b /compiler/nativeGen/X86/CodeGen.hs | |
parent | a0895fcb8c47949aac2c5e4a509d69de57582e76 (diff) | |
download | haskell-7ceaf96fde63bd45dfc1e08a975cba0ee280eb7b.tar.gz |
Source notes (Cmm support)
This patch adds CmmTick nodes to Cmm code. This is relatively
straight-forward, but also not very useful, as many blocks will simply
end up with no annotations whatosever.
Notes:
* We use this design over, say, putting ticks into the entry node of all
blocks, as it seems to work better alongside existing optimisations.
Now granted, the reason for this is that currently GHC's main Cmm
optimisations seem to mainly reorganize and merge code, so this might
change in the future.
* We have the Cmm parser generate a few source notes as well. This is
relatively easy to do - worst part is that it complicates the CmmParse
implementation a bit.
(From Phabricator D169)
Diffstat (limited to 'compiler/nativeGen/X86/CodeGen.hs')
-rw-r--r-- | compiler/nativeGen/X86/CodeGen.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs index a4115a0b6d..9e705c87f9 100644 --- a/compiler/nativeGen/X86/CodeGen.hs +++ b/compiler/nativeGen/X86/CodeGen.hs @@ -144,6 +144,7 @@ stmtToInstrs stmt = do is32Bit <- is32BitPlatform case stmt of CmmComment s -> return (unitOL (COMMENT s)) + CmmTick {} -> return nilOL CmmAssign reg src | isFloatType ty -> assignReg_FltCode size reg src |