Import devel/libfirm, a graph based intermediate representation and backend

ok bentley@

The Firm library implements the Firm intermediate representation (ir).

libFirm contains algorithms for construction of the SSA form directly
from the attributed syntax tree. A set of analyses and optimization
phases is provided.

libFirm includes backends of varying maturities for IA32, AMD64, ARM,
and other architectures.

Features:
* Completely graph-based, source- and target-independent intermediate
  representation in SSA form
* Extensive set of optimizations
* High-quality register allocation
This commit is contained in:
bcallah 2017-11-06 01:19:16 +00:00
parent a2d9369688
commit 24c9106815
5 changed files with 147 additions and 0 deletions

40
devel/libfirm/Makefile Normal file
View File

@ -0,0 +1,40 @@
# $OpenBSD: Makefile,v 1.1.1.1 2017/11/06 01:19:16 bcallah Exp $
# Has backends for amd64, arm (32-bit), i386, mips (32-bit), sparc (32-bit)
ONLY_FOR_ARCHS = amd64 arm i386
# Must keep version number in sync with lang/cparser
COMMENT = graph based intermediate representation and backend
DISTNAME = libfirm-1.22.1
CATEGORIES = devel
SHARED_LIBS += firm 0.0 # 0.0
# amd64 PIC *just* missed 1.22.0; this will go away next update
GH_ACCOUNT = libfirm
GH_PROJECT = libfirm
GH_COMMIT = 130099bc8afbca472500e378d927e1251d68bc18
HOMEPAGE = https://pp.ipd.kit.edu/firm/
MAINTAINER = Brian Callahan <bcallah@openbsd.org>
# LGPLv2.1+
PERMIT_PACKAGE_CDROM = Yes
WANTLIB += m
# Uncomment next update
# MASTER_SITES = https://github.com/libfirm/libfirm/archive/
MODULES = devel/cmake \
lang/python
MODPY_RUNDEP = No
CONFIGURE_ARGS = -DBUILD_SHARED_LIBS:Bool=On
NO_TEST = Yes
# GitHub has silly naming practices. Uncomment next update.
# WRKDIST = ${WRKDIR}/libfirm-${DISTNAME}
.include <bsd.port.mk>

2
devel/libfirm/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (libfirm-1.22.1-130099bc.tar.gz) = XNrCsy8Q+6qfmHIgN0P4hnBOWewC7dsV6xtEYe7HHC4=
SIZE (libfirm-1.22.1-130099bc.tar.gz) = 1581581

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-CMakeLists_txt,v 1.1.1.1 2017/11/06 01:19:16 bcallah Exp $
Let CMake do the SHARED_LIBS magic.
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -10,8 +10,6 @@ project(libfirm C)
set(libfirm_VERSION "1.22.1")
set(PROJECT_DESCRIPTION "library implementing the intermediate representation Firm")
-set(CMAKE_C_VISIBILITY_PRESET hidden)
-
set(SOURCES
ir/adt/array.c
ir/adt/bipartite.c

14
devel/libfirm/pkg/DESCR Normal file
View File

@ -0,0 +1,14 @@
The Firm library implements the Firm intermediate representation (ir).
libFirm contains algorithms for construction of the SSA form directly
from the attributed syntax tree. A set of analyses and optimization
phases is provided.
libFirm includes backends of varying maturities for IA32, AMD64, ARM,
and other architectures.
Features:
* Completely graph-based, source- and target-independent intermediate
representation in SSA form
* Extensive set of optimizations
* High-quality register allocation

75
devel/libfirm/pkg/PLIST Normal file
View File

@ -0,0 +1,75 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2017/11/06 01:19:16 bcallah Exp $
include/libfirm/
include/libfirm/adt/
include/libfirm/adt/array.h
include/libfirm/adt/bipartite.h
include/libfirm/adt/funcattr.h
include/libfirm/adt/gaussjordan.h
include/libfirm/adt/gaussseidel.h
include/libfirm/adt/hashptr.h
include/libfirm/adt/hungarian.h
include/libfirm/adt/list.h
include/libfirm/adt/obst.h
include/libfirm/adt/obstack.h
include/libfirm/adt/pdeq.h
include/libfirm/adt/plist.h
include/libfirm/adt/pmap.h
include/libfirm/adt/pqueue.h
include/libfirm/adt/pset.h
include/libfirm/adt/set.h
include/libfirm/adt/unionfind.h
include/libfirm/adt/xmalloc.h
include/libfirm/analyze_irg_args.h
include/libfirm/be.h
include/libfirm/begin.h
include/libfirm/callgraph.h
include/libfirm/cdep.h
include/libfirm/cgana.h
include/libfirm/dbginfo.h
include/libfirm/end.h
include/libfirm/execfreq.h
include/libfirm/firm.h
include/libfirm/firm_common.h
include/libfirm/firm_types.h
include/libfirm/heights.h
include/libfirm/ident.h
include/libfirm/irarch.h
include/libfirm/ircgopt.h
include/libfirm/ircons.h
include/libfirm/irconsconfirm.h
include/libfirm/irdom.h
include/libfirm/irdump.h
include/libfirm/iredgekinds.h
include/libfirm/iredges.h
include/libfirm/irflag.h
include/libfirm/irgmod.h
include/libfirm/irgopt.h
include/libfirm/irgraph.h
include/libfirm/irgwalk.h
include/libfirm/irio.h
include/libfirm/irloop.h
include/libfirm/irmemory.h
include/libfirm/irmode.h
include/libfirm/irnode.h
include/libfirm/irop.h
include/libfirm/iropt.h
include/libfirm/iroptimize.h
include/libfirm/irouts.h
include/libfirm/irprintf.h
include/libfirm/irprog.h
include/libfirm/irverify.h
include/libfirm/lowering.h
include/libfirm/nodes.h
include/libfirm/statev.h
include/libfirm/timing.h
include/libfirm/tv.h
include/libfirm/typerep.h
include/libfirm/vrp.h
lib/cmake/
lib/cmake/libfirm/
lib/cmake/libfirm/libfirmConfig.cmake
lib/cmake/libfirm/libfirmConfigVersion.cmake
lib/cmake/libfirm/libfirmTargets-release.cmake
lib/cmake/libfirm/libfirmTargets.cmake
@lib lib/libfirm.so.${LIBfirm_VERSION}
lib/pkgconfig/libfirm.pc