Commit 4127a4ab authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Merge branch 'master' of

parents 51d89a55 3e63df87
......@@ -7,6 +7,7 @@ module Llvm.Types where
#include "HsVersions.h"
import Data.Char
import Data.Int
import Data.List (intercalate)
import Numeric
......@@ -223,7 +224,9 @@ getPlainName (LMLitVar x ) = getLit x
-- | Print a literal value. No type.
getLit :: LlvmLit -> String
getLit (LMIntLit i _ ) = show ((fromInteger i)::Int)
getLit (LMIntLit i (LMInt 32)) = show (fromInteger i :: Int32)
getLit (LMIntLit i (LMInt 64)) = show (fromInteger i :: Int64)
getLit (LMIntLit i _ ) = show (fromInteger i :: Int)
getLit (LMFloatLit r LMFloat ) = fToStr $ realToFrac r
getLit (LMFloatLit r LMDouble) = dToStr r
getLit f@(LMFloatLit _ _) = error $ "Can't print this float literal!" ++ show f
......@@ -729,6 +729,10 @@ $ ./prog -f +RTS -H32m -S -RTS -h foo bar
<indexterm><primary><option>-T</option></primary><secondary>RTS option</secondary></indexterm>
<indexterm><primary><option>-t</option></primary><secondary>RTS option</secondary></indexterm>
......@@ -751,6 +755,7 @@ $ ./prog -f +RTS -H32m -S -RTS -h foo bar
garbage collector, the amount of memory allocated, the
maximum size of the heap, and so on. The three
variants give different levels of detail:
<option>-T</option> collects the data but produces no output
<option>-t</option> produces a single line of output in the
same format as GHC's <option>-Rghc-timing</option> option,
<option>-s</option> produces a more detailed summary at the
......@@ -763,6 +768,12 @@ $ ./prog -f +RTS -H32m -S -RTS -h foo bar
<replaceable>file</replaceable> is omitted, then the output
is sent to <constant>stderr</constant>.</para>
If you use the <literal>-T</literal> flag then, you should
access the statistics using
<ulink url="&libraryBaseLocation;/GHC-Stats.html">GHC.Stats</ulink>.
If you use the <literal>-t</literal> flag then, when your
program finishes, you will see something like this:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment