Commit 57d365a6 authored by Matthias Braun's avatar Matthias Braun
Browse files

license note added, cleaned up per-file doxygen comments and include guards, cleaned up Makefile.in

[r13470]
parent fe4fdb42
......@@ -16,13 +16,55 @@ topdir = ../..
subdir := ir/adt
disable_libiberty := @disable_libiberty@
INSTALL_HEADERS_ADT = pset.h set.h pmap.h eset.h hashptr.h array.h pdeq.h iterator.h align.h fourcc.h util.h plist.h \
bipartite.h xmalloc.h gaussjordan.h hungarian.h raw_bitset.h pqueue.h pset_new.h
INSTALL_HEADERS_ADT = \
align.h \
array.h \
bipartite.h \
bitfiddle.h \
bitset.h \
bitset_ia32.h \
bitset_std.h \
cpset.h \
eset.h \
fourcc.h \
gaussjordan.h \
hashptr.h \
hashset.h \
hungarian.h \
impl.h \
iterator.h \
list.h \
obst.h \
offset.h \
pdeq.h \
plist.h \
pmap.h \
pqueue.h \
pset.h \
pset_new.h \
raw_bitset.h \
set.h \
unionfind.h \
util.h \
xmalloc.h
SOURCES = Makefile.in \
array.c obst.h pdeq.c \
set.c pset.c pmap.c eset.c iterator.c xmalloc.h \
plist.c bipartite.c gaussjordan.c hungarian.c pqueue.c pset_new.c
SOURCES = \
Makefile.in \
array.c \
bipartite.c \
cpset.c \
eset.c \
gaussjordan.c \
hashset.c \
hungarian.c \
iterator.c \
pdeq.c \
plist.c \
pmap.c \
pqueue.c \
pset.c \
pset_new.c \
set.c
ifeq ($(disable_libiberty),no)
SOURCES += xmalloc.c
......
/*
* Project: libFIRM
* File name: ir/adt/align.h
* Purpose: macros for alignment.
* Author: Markus Armbruster
* Modified by:
* Created: 1999 by getting from fiasco
* CVS-ID: $Id$
* Copyright: (c) 1995, 1996 Markus Armbruster
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
* Copyrigth (C) 1995-2007 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
* This file may be distributed and/or modified under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in the
* packaging of this file.
*
* Licensees holding valid libFirm Professional Edition licenses may use
* this file in accordance with the libFirm Commercial License.
* Agreement provided with the Software.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
#ifndef _ALIGN_H
#define _ALIGN_H
#include <stddef.h>
/**
* @file align.h
* @file
* @brief macros for alignment.
* @author Markus Armbruster
* @version $Id$
*/
#ifndef FIRM_ADT_ALIGN_H
#define FIRM_ADT_ALIGN_H
#include <stddef.h>
/** A size handled efficiently by malloc(), at least 1K. */
#define PREF_MALLOC_SIZE 2048
......@@ -53,4 +63,4 @@ typedef union {
/** Maximal alignment required for any type. */
#define MAX_ALIGN ALIGNOF (aligned_type)
#endif /* _ALIGN_H */
#endif
/*
* Project: libFIRM
* File name: ir/adt/array.c
* Purpose: Array --- dynamic & flexible arrays.
* Author: Markus Armbruster
* Modified by:
* Created: 1999 by getting from fiasco
* CVS-ID: $Id$
* Copyright: (c) 1995, 1996 Markus Armbruster
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
* Copyrigth (C) 1995-2007 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
* This file may be distributed and/or modified under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in the
* packaging of this file.
*
* Licensees holding valid libFirm Professional Edition licenses may use
* this file in accordance with the libFirm Commercial License.
* Agreement provided with the Software.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
/**
* @file
* @brief Array --- dynamic & flexible arrays.
* @author Markus Armbruster
* @version $Id$
*/
#ifdef HAVE_CONFIG_H
......
/*
* Project: libFIRM
* File name: ir/adt/array.h
* Purpose: Declarations for Array.
* Author: Markus Armbruster
* Modified by:
* Created: 1999 by getting from fiasco
* CVS-ID: $Id$
* Copyright: (c) 1995, 1996 Markus Armbruster
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
* Copyrigth (C) 1995-2007 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
* This file may be distributed and/or modified under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in the
* packaging of this file.
*
* Licensees holding valid libFirm Professional Edition licenses may use
* this file in accordance with the libFirm Commercial License.
* Agreement provided with the Software.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
/**
* @file array.h Dynamic and flexible arrays for C.
* @file
* @brief Dynamic and flexible arrays for C.
* @author Markus Armbruster
* @version $Id$
*/
#ifndef _ARRAY_H
#define _ARRAY_H
#ifndef FIRM_ADT_ARRAY_H
#define FIRM_ADT_ARRAY_H
#include <assert.h>
#include <stddef.h>
......
/*
* Specialized implementation for perfect bipartite matching.
* Copyrigth (C) 1995-2007 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
* This file may be distributed and/or modified under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in the
* packaging of this file.
*
* Licensees holding valid libFirm Professional Edition licenses may use
* this file in accordance with the libFirm Commercial License.
* Agreement provided with the Software.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
/**
* @file
* @brief Specialized implementation for perfect bipartite matching.
* @author Sebastian Hack
* @cvs-id $Id$
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
......
/**
* @file bipartite.h
* @date 26.01.2006
* @author Sebastian Hack
/*
* Copyrigth (C) 1995-2007 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
* Copyright (C) 2006 Universitaet Karlsruhe
* Released under the GPL
* This file may be distributed and/or modified under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in the
* packaging of this file.
*
* Implements bipartite matchings.
* Licensees holding valid libFirm Professional Edition licenses may use
* this file in accordance with the libFirm Commercial License.
* Agreement provided with the Software.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
#ifndef _BIPARTITE_H
#define _BIPARTITE_H
/**
* @file
* @date 26.01.2006
* @author Sebastian Hack
* @brief Implements bipartite matchings.
*/
#ifndef FIRM_ADT_BIPARTITE_H
#define FIRM_ADT_BIPARTITE_H
typedef struct _bipartite_t bipartite_t;
......
/*
* Copyrigth (C) 1995-2007 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
* This file may be distributed and/or modified under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in the
* packaging of this file.
*
* Licensees holding valid libFirm Professional Edition licenses may use
* this file in accordance with the libFirm Commercial License.
* Agreement provided with the Software.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
/**
* @file
* @date 28.9.2004
......@@ -5,8 +24,8 @@
* @author Sebastian Hack, Matthias Braun
* @version $Id$
*/
#ifndef _FIRM_BITFIDDLE_H_
#define _FIRM_BITFIDDLE_H_
#ifndef FIRM_ADT_BITFIDDLE_H
#define FIRM_ADT_BITFIDDLE_H
#include <limits.h>
#include <assert.h>
......
/*
* Copyrigth (C) 1995-2007 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
* This file may be distributed and/or modified under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in the
* packaging of this file.
*
* Licensees holding valid libFirm Professional Edition licenses may use
* this file in accordance with the libFirm Commercial License.
* Agreement provided with the Software.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
/**
* @file bitset.h
* @date 15.10.2004
* @file
* @date 15.10.2004
* @author Sebastian Hack
* @brief A bitset implementation.
* @brief A bitset implementation.
*/
#ifndef __FIRM_BITSET_H
#define __FIRM_BITSET_H
#ifndef FIRM_ADT_BITSET_H
#define FIRM_ADT_BITSET_H
#include "firm_config.h"
......
/*
* Copyrigth (C) 1995-2007 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
* This file may be distributed and/or modified under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in the
* packaging of this file.
*
* Licensees holding valid libFirm Professional Edition licenses may use
* this file in accordance with the libFirm Commercial License.
* Agreement provided with the Software.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
/**
* @file
* @brief intel 80x86 implementation of bitsets
* @version $Id$
*/
#ifndef _BITSET_IA32_H
#define _BITSET_IA32_H
......
#ifndef _BITSET_STD_H
#define _BITSET_STD_H
/*
* Copyrigth (C) 1995-2007 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
* This file may be distributed and/or modified under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in the
* packaging of this file.
*
* Licensees holding valid libFirm Professional Edition licenses may use
* this file in accordance with the libFirm Commercial License.
* Agreement provided with the Software.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
/**
* @file
* @brief ANSI-C compliant implementation of bitsets
* @version $Id$
*/
#ifndef FIRM_ADT_BITSET_STD_H
#define FIRM_ADT_BITSET_STD_H
#include "bitfiddle.h"
......
/*
* Copyrigth (C) 1995-2007 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
* This file may be distributed and/or modified under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in the
* packaging of this file.
*
* Licensees holding valid libFirm Professional Edition licenses may use
* this file in accordance with the libFirm Commercial License.
* Agreement provided with the Software.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
/**
* @file
* @brief Custom pointer set
* @author Matthias Braun
* @version $Id$
*
* This implements a set of pointers which allows to specify custom callbacks
* for comparing and hashing it's elements.
*/
#include "config.h"
#include "cpset.h"
......
/*
* Copyrigth (C) 1995-2007 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
* This file may be distributed and/or modified under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in the
* packaging of this file.
*
* Licensees holding valid libFirm Professional Edition licenses may use
* this file in accordance with the libFirm Commercial License.
* Agreement provided with the Software.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
/**
* @file
* @date 16.03.2007
......@@ -5,8 +24,8 @@
* @author Matthias Braun
* @version $Id$
*/
#ifndef _FIRM_CPSET_H_
#define _FIRM_CPSET_H_
#ifndef FIRM_ADT_CPSET_H
#define FIRM_ADT_CPSET_H
/**
* The type of a cpset compare function.
......
/*
* Project: libFIRM
* File name: ir/adt/eset.c
* Purpose: Datentyp: Vereinfachte Menge (hash-set) zum Speichern von
* Zeigern/Adressen.
* Author: Hubert Schmid
* Modified by:
* Created: 09.06.2002
* CVS-ID: $Id$
* Copyright: (c) 2002 Universitt Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
* Copyrigth (C) 1995-2007 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
* This file may be distributed and/or modified under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in the
* packaging of this file.
*
* Licensees holding valid libFirm Professional Edition licenses may use
* this file in accordance with the libFirm Commercial License.
* Agreement provided with the Software.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
/**
* @file
* @brief A pointer hash-set (WARNING: deprecated!)
* @author Hubert Schmid
* @date 09.06.2002
* @version $Id$
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
......
/*
* Project: libFIRM
* File name: ir/adt/eset.h
* Purpose: Datentyp: Vereinfachte Menge (hash-set) zum Speichern von
* Zeigern/Adressen.
* Author: Hubert Schmid
* Modified by:
* Created: 09.06.2002
* CVS-ID: $Id$
* Copyright: (c) 2002 Universität Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
* Copyrigth (C) 1995-2007 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
* This file may be distributed and/or modified under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in the
* packaging of this file.
*
* Licensees holding valid libFirm Professional Edition licenses may use
* this file in accordance with the libFirm Commercial License.
* Agreement provided with the Software.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
/**
* @file
* @brief a pointer hashset (WARNING: deprecated, use hashset_new.*
* instead)
* @author Hubert Schmid
* @date 09.06.2002
* @version $Id$
*/
#ifndef _ESET_H_
#define _ESET_H_
#ifndef FIRM_ADT_ESET_H
#define FIRM_ADT_ESET_H
/**
* "eset" is a set of addresses. The addresses are used for element
......@@ -58,4 +73,4 @@ void *eset_next(eset *s);
/** Inserts all elements of source into target (union). Does NOT work if NULL is contained in source. */
void eset_insert_all(eset *target, eset *source);
#endif /* _ESET_H_ */
#endif
/*
* Project: libFIRM
* File name: ir/adt/fourcc.h
* Purpose: define the famous infame FOURCC macro.
* Author:
* Modified by:
* Created: 02.01.2004
* CVS-ID: $Id$
* Copyright: (C) 2004 University of Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
* Copyrigth (C) 1995-2007 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
* This file may be distributed and/or modified under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in the
* packaging of this file.
*
* Licensees holding valid libFirm Professional Edition licenses may use
* this file in accordance with the libFirm Commercial License.
* Agreement provided with the Software.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
#ifndef _FOURCC_H
#define _FOURCC_H
/**
* @file
* @brief Define the famous infame FOURCC macro.
* @date 02.01.2004
* @version $Id$
*/
#ifndef FIRM_ADT_FOURCC_H
#define FIRM_ADT_FOURCC_H
/** define a readable fourcc code */
#define FOURCC(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
#endif /* _FOURCC_H */
#endif
......@@ -32,7 +32,6 @@
/* returns 0 if successful */
/* returns -1 if ill-conditioned matrix */
/*------------------------------------------------------*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
......
#ifndef FIRM_GAUSSJORDAN_H_
#define FIRM_GAUSSJORDAN_H_
/**
* @file
* @brief solves a system of linear equations
*/
#ifndef FIRM_ADT_GAUSSJORDAN_H
#define FIRM_ADT_GAUSSJORDAN_H
/**
* solves a system of linear equations and returns 0 if successful
......
/*
* Project: libFIRM
* File name: ir/adt/hashptr.h
* Purpose: Hash function for pointers
* Author: Michael Beck, Sebastian Hack
* Modified by:
* Created: 2004
* CVS-ID: $Id$
* Copyright: (C) 2004 University of Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
* Copyrigth (C) 1995-2007 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
* This file may be distributed and/or modified under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in the
* packaging of this file.
*
* Licensees holding valid libFirm Professional Edition licenses may use
* this file in accordance with the libFirm Commercial License.
* Agreement provided with the Software.