README 3.37 KB
Newer Older
Matthias Braun's avatar
Matthias Braun committed
1
2
                                   libFirm
                   A graph based SSA intermediate representation
Götz Lindenmaier's avatar
Götz Lindenmaier committed
3

Matthias Braun's avatar
Matthias Braun committed
4
5
6
7
8
Contents:
1. Introduction
2. Building and Installation
3. Usage
4. Contact
Götz Lindenmaier's avatar
Götz Lindenmaier committed
9

Matthias Braun's avatar
Matthias Braun committed
10
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Götz Lindenmaier's avatar
Götz Lindenmaier committed
11

Matthias Braun's avatar
Matthias Braun committed
12
1. Introduction
Götz Lindenmaier's avatar
Götz Lindenmaier committed
13

Matthias Braun's avatar
Matthias Braun committed
14
15
The Firm library implements the Firm intermediate representation (ir). An old
description of Firm can be found in [TLB:99].
Götz Lindenmaier's avatar
Götz Lindenmaier committed
16

Matthias Braun's avatar
Matthias Braun committed
17
libFirm contains algorithms for construction of the SSA form directly from the
Matthias Braun's avatar
Matthias Braun committed
18
attributed syntax tree. A set of analyses and optimisation phases is provided.
Matthias Braun's avatar
Matthias Braun committed
19
20
This version includes a complete backend for the IA32 architecture, as well as
some unfinished backends for MIPS, ARM, PPC32.
Matthias Braun's avatar
Matthias Braun committed
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

1.1. Features

- works exculsively on a graph based SSA represenation up to the code emission.
  Based on the work of C. Click and M. Trapp
- written in portable C. Known to run on msvc 6-8 Win32, gcc on Linux, FreeBSD,
  Cygwin
- includes doxygen documentation
- support for object oriented type hierarchies
- Analyses: dominance, loop tree, execution frequency, control dependencies,
            inter procedural call graph, rapid type, def-use, alias analysis,
            class hierarchy analysis, ...
- Optimisations: constant folding, local common subexpression elimination,
                 global common subexpression elimination, code placement,
                 operator strength reduction, scalar replacement, load/store,
                 control flow optimisations, if-conversion, partial condition
                 evaluation, reassociation, tail recursion elimination,
Matthias Braun's avatar
Matthias Braun committed
38
                 inlining, procedure cloning, dead code elimination, ...
Matthias Braun's avatar
Matthias Braun committed
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
- local common subexpression eliminiation, constant folding,
  constant propagatation, arithmetic identities happen implicitely
- extensive checkers
- enhanced debugging support: breakpoints on node creation, entity creation,
            graph dumping, visual studio debug extension
- lowering of intrinsics, double word arithmetics, bitfields
- backend with SSA based register allocation including several algorithms for
  spilling and copy coalescing. Instruction and block scheduling, support for
  ABI handling.
- working ia32 backend with support for x87 and SSE2 floating point
- unfinished backends for MIPS, ARM, PPC32

- connections to the Edison Design Group C and java frontends available.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2. Building and Installation
56

57
These are instruction for the gcc compiler on unix variants or cygwin.
58

Matthias Braun's avatar
Matthias Braun committed
59
 1. Change into the directory containing libfirms source
60

Matthias Braun's avatar
Matthias Braun committed
61
62
 2. Create a directory named build 'mkdir build'. Change into this directory
    and execute the configure script. 'cd build ; ../configure'
63

Matthias Braun's avatar
Matthias Braun committed
64
65
66
67
68
69
70
71
72
73
74
75
 3. Type 'make' to compile the package

 4. You may install libfirm as super user by typing 'make install'

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

3. Usage

To generate FIRM code from a compiler frontend read the documentation
"libFIRM: A Library for Compiler Optimization Reaserch Implementing
Firm", UKA tech-report 2002-5. About Firm you can learn in UKA
tech-report 1999-14.
76
77


Matthias Braun's avatar
Matthias Braun committed
78
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
79

Matthias Braun's avatar
Matthias Braun committed
80
4. Contact
81

Matthias Braun's avatar
Matthias Braun committed
82
83
84
85
86
87
88
89
You can contact us at
	firm@ipd.info.uni-karlsruhe.de

There's a mailing list here:
	https://lists.sourceforge.net/lists/listinfo/libfirm-user

We have a bugtracker at:
	http://pp.info.uni-karlsruhe.de/~firm/bugs