The hLLVM package

[ Tags: bsd3, compilers-interpreters, library, program ] [ Propose Tags ]

A pure Haskell library for analyzing and transforming LLVM assembly codes. It includes: 1) a parser to parse LLVM code in its text form; 2) an internal IR that is designed for Hoopl and direct composition; 3) a set of utility functions to convert LLVM AST to and from the internal IR; 4) a set of utility functions to query the IR.


[Skip to Readme]

Properties

Versions 0.5.0.0, 0.5.0.1
Change log CHANGES
Dependencies array, base (>=3 && <5), bytestring, cmdargs (==0.10.*), containers, data-dword (==0.3), directory, filepath, hooplext (==3.10.0.2), mtl, parsec (>=3.1.2 && <3.2), pretty (>=1.1.1.1), template-haskell (>=2.9.0.0), transformers (>=0.3.0.0) [details]
License BSD3
Author Ning Wang <email@ningwang.org>
Maintainer Ning Wang <email@ningwang.org>
Category Compilers/Interpreters
Source repository head: git clone https://github.com/mlite/hLLVM.git
Uploaded Wed Apr 15 08:38:36 UTC 2015 by NingWang
Distributions
Executables llvm-test
Downloads 333 total (12 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-12-10 [all 8 reports]
Hackage Matrix CI

Modules

  • Llvm
    • Data
      • Llvm.Data.Ast
      • Llvm.Data.Conversion
        • Llvm.Data.Conversion.AstIrConversion
        • Llvm.Data.Conversion.AstScanner
        • Llvm.Data.Conversion.AstSimplification
        • Llvm.Data.Conversion.IrAstConversion
        • Llvm.Data.Conversion.LabelMapM
        • Llvm.Data.Conversion.TypeConversion
      • Llvm.Data.CoreIr
      • Llvm.Data.Ir
      • Llvm.Data.IrType
      • Llvm.Data.Shared
        • Llvm.Data.Shared.AtomicEntity
        • Llvm.Data.Shared.DataLayout
        • Llvm.Data.Shared.SimpleConst
        • Llvm.Data.Shared.Util
      • Llvm.Data.Type
    • Pass
      • Llvm.Pass.Dominator
      • Llvm.Pass.Liveness
      • Llvm.Pass.Mem2Reg
      • Llvm.Pass.NormalGraph
      • Llvm.Pass.Optimizer
      • Llvm.Pass.PassManager
      • Llvm.Pass.PassTester
      • Llvm.Pass.PhiFixUp
      • Llvm.Pass.Rewriter
      • Llvm.Pass.Uda
    • Query
      • Llvm.Query.Conversion
      • Llvm.Query.IrCxt
      • Llvm.Query.Qerror
      • Llvm.Query.TypeConstValue
      • Llvm.Query.TypeDef
    • Syntax
      • Parser
        • Llvm.Syntax.Parser.Basic
        • Llvm.Syntax.Parser.Block
        • Llvm.Syntax.Parser.Const
        • Llvm.Syntax.Parser.DataLayout
        • Llvm.Syntax.Parser.Instruction
        • Llvm.Syntax.Parser.Module
        • Llvm.Syntax.Parser.Rhs
        • Llvm.Syntax.Parser.Type
      • Printer
        • Llvm.Syntax.Printer.Common
        • Llvm.Syntax.Printer.IrPrint
        • Llvm.Syntax.Printer.LlvmPrint
        • Llvm.Syntax.Printer.SharedEntityPrint
    • Util
      • Llvm.Util.Mapping
      • Llvm.Util.Monadic
  • ParserTester

Flags

NameDescriptionDefaultType
debug

Enable debug support

DisabledAutomatic
testcoverage

Enable test coverage report

DisabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for hLLVM-0.5.0.1

[back to package description]

hLLVM -- A Haskell Library for analyzing and transforming LLVM assembly codes

Goal:

  • Provide functionalities for performaning analysis and transformation of LLVM codes in pure Haskell

Build:

From hLLVM toplevel directory

cabal configure

cabal build

The test driver 'llvm-test' is generated at dist/build/llvm-test

Test:

test LLVM assembly parser

dist/build/llvm-test/llvm-test parse -i test/test1.ll -o out.ll

test mem2reg pass

dist/build/llvm-test/llvm-test pass -s=mem2reg -f=10000 -i test/test1.ll -o out.ll

test dce pass

dist/build/llvm-test/llvm-test pass -s=dce -f=10000 -i test/test1.ll -o out.ll

test mem2reg and dce passes

dist/build/llvm-test/llvm-test pass -s=mem2reg -s=dce -f=1000 -i test/test1.ll -o out.ll

run tests in batch (llvm-test needs to be available in the executable search paths)

test/runLlvmTest.sh [parse|ast2ir|ir2ast] <directory of llvm-3.5 test cases>