From 57d365a67aaef76497b85e9a18b785c562652b16 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Thu, 26 Apr 2007 09:40:04 +0000 Subject: [PATCH] license note added, cleaned up per-file doxygen comments and include guards, cleaned up Makefile.in [r13470] --- ir/adt/Makefile.in | 54 +++++++++++++++++++++++++++++++++++++++----- ir/adt/align.h | 40 ++++++++++++++++++++------------ ir/adt/array.c | 32 ++++++++++++++++++-------- ir/adt/array.h | 35 +++++++++++++++++----------- ir/adt/bipartite.c | 23 +++++++++++++++++-- ir/adt/bipartite.h | 31 +++++++++++++++++-------- ir/adt/bitfiddle.h | 23 +++++++++++++++++-- ir/adt/bitset.h | 30 +++++++++++++++++++----- ir/adt/bitset_ia32.h | 25 +++++++++++++++++++- ir/adt/bitset_std.h | 28 +++++++++++++++++++++-- ir/adt/cpset.c | 28 +++++++++++++++++++++++ ir/adt/cpset.h | 23 +++++++++++++++++-- ir/adt/eset.c | 33 +++++++++++++++++++-------- ir/adt/eset.h | 41 ++++++++++++++++++++++----------- ir/adt/fourcc.h | 38 +++++++++++++++++++++---------- ir/adt/gaussjordan.c | 1 - ir/adt/gaussjordan.h | 8 +++++-- ir/adt/hashptr.h | 38 +++++++++++++++++++++---------- ir/adt/hashset.c | 19 ++++++++++++++++ ir/adt/hashset.h | 25 +++++++++++++++++--- ir/adt/hungarian.c | 7 ++++-- ir/adt/hungarian.h | 11 +++++---- ir/adt/impl.h | 31 +++++++++++++++++++++---- ir/adt/iterator.c | 18 +++++++++++++++ ir/adt/iterator.h | 33 ++++++++++++++++++++++----- ir/adt/list.h | 21 ++++++++--------- ir/adt/obst.h | 43 ++++++++++++++++++++++++----------- ir/adt/offset.h | 34 ++++++++++++++++++++-------- ir/adt/pdeq.c | 33 +++++++++++++++++++-------- ir/adt/pdeq.h | 38 +++++++++++++++++++------------ ir/adt/plist.c | 19 ++++++++++++++++ ir/adt/plist.h | 43 ++++++++++++++++++++++++++--------- ir/adt/pmap.c | 34 ++++++++++++++++++++-------- ir/adt/pmap.h | 39 +++++++++++++++++++++----------- ir/adt/pqueue.c | 28 +++++++++++++++++++++-- ir/adt/pqueue.h | 40 +++++++++++++++++++++++--------- ir/adt/pset.h | 38 ++++++++++++++++++++++--------- ir/adt/pset_new.c | 25 ++++++++++++++++++++ ir/adt/pset_new.h | 35 ++++++++++++++++++++++------ ir/adt/raw_bitset.h | 32 +++++++++++++++++++++----- ir/adt/set.c | 39 +++++++++++++++++++------------- ir/adt/set.h | 37 ++++++++++++++++++------------ ir/adt/unionfind.h | 43 +++++++++++++++++++++-------------- ir/adt/util.h | 34 ++++++++++++++++++++-------- ir/adt/xmalloc.c | 33 +++++++++++++++++++-------- ir/adt/xmalloc.h | 40 +++++++++++++++++++++----------- 46 files changed, 1056 insertions(+), 347 deletions(-) diff --git a/ir/adt/Makefile.in b/ir/adt/Makefile.in index ddcee1dc8..961645403 100644 --- a/ir/adt/Makefile.in +++ b/ir/adt/Makefile.in @@ -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 diff --git a/ir/adt/align.h b/ir/adt/align.h index 01e877faf..0e897984c 100644 --- a/ir/adt/align.h +++ b/ir/adt/align.h @@ -1,22 +1,32 @@ /* - * 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 /** - * @file align.h + * @file + * @brief macros for alignment. + * @author Markus Armbruster + * @version $Id$ */ +#ifndef FIRM_ADT_ALIGN_H +#define FIRM_ADT_ALIGN_H + +#include /** 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 diff --git a/ir/adt/array.c b/ir/adt/array.c index 6f9618482..bdcd518d8 100644 --- a/ir/adt/array.c +++ b/ir/adt/array.c @@ -1,13 +1,27 @@ /* - * 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 diff --git a/ir/adt/array.h b/ir/adt/array.h index 20b44ad1b..ce71b7497 100644 --- a/ir/adt/array.h +++ b/ir/adt/array.h @@ -1,21 +1,30 @@ /* - * 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 #include diff --git a/ir/adt/bipartite.c b/ir/adt/bipartite.c index 77226b6d5..6c3f8f5ee 100644 --- a/ir/adt/bipartite.c +++ b/ir/adt/bipartite.c @@ -1,9 +1,28 @@ /* - * 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 diff --git a/ir/adt/bipartite.h b/ir/adt/bipartite.h index 71b6ece02..b0f998da1 100644 --- a/ir/adt/bipartite.h +++ b/ir/adt/bipartite.h @@ -1,17 +1,30 @@ -/** - * @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; diff --git a/ir/adt/bitfiddle.h b/ir/adt/bitfiddle.h index 6dd9bd741..29f042a66 100644 --- a/ir/adt/bitfiddle.h +++ b/ir/adt/bitfiddle.h @@ -1,3 +1,22 @@ +/* + * 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 #include diff --git a/ir/adt/bitset.h b/ir/adt/bitset.h index 630ba750d..d3b11c63d 100644 --- a/ir/adt/bitset.h +++ b/ir/adt/bitset.h @@ -1,12 +1,30 @@ +/* + * 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" diff --git a/ir/adt/bitset_ia32.h b/ir/adt/bitset_ia32.h index 515e4d991..77e54fc25 100644 --- a/ir/adt/bitset_ia32.h +++ b/ir/adt/bitset_ia32.h @@ -1,4 +1,27 @@ - +/* + * 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 diff --git a/ir/adt/bitset_std.h b/ir/adt/bitset_std.h index 7075daf3e..3763d8a93 100644 --- a/ir/adt/bitset_std.h +++ b/ir/adt/bitset_std.h @@ -1,5 +1,29 @@ -#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" diff --git a/ir/adt/cpset.c b/ir/adt/cpset.c index 4f429618b..e4c8716fc 100644 --- a/ir/adt/cpset.c +++ b/ir/adt/cpset.c @@ -1,3 +1,31 @@ +/* + * 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" diff --git a/ir/adt/cpset.h b/ir/adt/cpset.h index 662fe69d4..5413cd79b 100644 --- a/ir/adt/cpset.h +++ b/ir/adt/cpset.h @@ -1,3 +1,22 @@ +/* + * 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. diff --git a/ir/adt/eset.c b/ir/adt/eset.c index def5ee8e5..6408f2e6a 100644 --- a/ir/adt/eset.c +++ b/ir/adt/eset.c @@ -1,16 +1,29 @@ /* - * 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 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 hash-set (WARNING: deprecated!) + * @author Hubert Schmid + * @date 09.06.2002 + * @version $Id$ + */ #ifdef HAVE_CONFIG_H # include "config.h" #endif diff --git a/ir/adt/eset.h b/ir/adt/eset.h index 14a6effab..3e71ce46d 100644 --- a/ir/adt/eset.h +++ b/ir/adt/eset.h @@ -1,17 +1,32 @@ /* - * 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 diff --git a/ir/adt/fourcc.h b/ir/adt/fourcc.h index 8b5a7cb17..3534ad497 100644 --- a/ir/adt/fourcc.h +++ b/ir/adt/fourcc.h @@ -1,18 +1,32 @@ /* - * 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 diff --git a/ir/adt/gaussjordan.c b/ir/adt/gaussjordan.c index c4c799880..39aebf047 100644 --- a/ir/adt/gaussjordan.c +++ b/ir/adt/gaussjordan.c @@ -32,7 +32,6 @@ /* returns 0 if successful */ /* returns -1 if ill-conditioned matrix */ /*------------------------------------------------------*/ - #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/ir/adt/gaussjordan.h b/ir/adt/gaussjordan.h index 98b0a01a0..c89977bf6 100644 --- a/ir/adt/gaussjordan.h +++ b/ir/adt/gaussjordan.h @@ -1,5 +1,9 @@ -#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 diff --git a/ir/adt/hashptr.h b/ir/adt/hashptr.h index a4191bdec..a5f2c9161 100644 --- a/ir/adt/hashptr.h +++ b/ir/adt/hashptr.h @@ -1,16 +1,30 @@ /* - * 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. + * + * 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 __HASHPTR_H__ -#define __HASHPTR_H__ + +/** + * @file + * @brief Hash function for pointers + * @author Michael Beck, Sebastian Hack + * @version $Id$ + */ +#ifndef FIRM_ADT_HASHPTR_H +#define FIRM_ADT_HASHPTR_H #include "firm_config.h" @@ -73,4 +87,4 @@ static INLINE unsigned _hash_combine(unsigned x, unsigned y) */ #define HASH_COMBINE(a,b) _hash_combine(a, b) -#endif /* __HASHPTR_H__ */ +#endif diff --git a/ir/adt/hashset.c b/ir/adt/hashset.c index d452ec5db..723843427 100644 --- a/ir/adt/hashset.c +++ b/ir/adt/hashset.c @@ -1,3 +1,22 @@ +/* + * 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 17.03.2007 diff --git a/ir/adt/hashset.h b/ir/adt/hashset.h index 0d44bed86..4812d0345 100644 --- a/ir/adt/hashset.h +++ b/ir/adt/hashset.h @@ -1,13 +1,32 @@ +/* + * 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 * @brief Generic hashset functions * @author Matthias Braun * @version $Id$ + * + * You have to specialize this header by defining HashSet, HashSetIterator and + * ValueType */ - -/* You have to specialize this header by defining HashSet, HashSetIterator and - * ValueType */ #ifdef HashSet #include diff --git a/ir/adt/hungarian.c b/ir/adt/hungarian.c index 943567edc..05910a901 100644 --- a/ir/adt/hungarian.c +++ b/ir/adt/hungarian.c @@ -24,8 +24,11 @@ ******************************************************************** ********************************************************************/ -/* $Id$ */ - +/** + * @file + * @brief Solving the Minimum Assignment Problem using the Hungarian Method. + * @version $Id$ + */ #ifdef HAVE_CONFIG_H # include "config.h" #endif diff --git a/ir/adt/hungarian.h b/ir/adt/hungarian.h index 1c6b122cb..1c5851ad9 100644 --- a/ir/adt/hungarian.h +++ b/ir/adt/hungarian.h @@ -25,10 +25,13 @@ ******************************************************************** ********************************************************************/ -/* $Id$ */ - -#ifndef _HUNGARIAN_H_ -#define _HUNGARIAN_H_ +/** + * @file + * @brief Solving the Minimum Assignment Problem using the Hungarian Method. + * @version $Id$ + */ +#ifndef FIRM_ADT_HUNGARIAN_H +#define FIRM_ADT_HUNGARIAN_H #define HUNGARIAN_MODE_MINIMIZE_COST 0 #define HUNGARIAN_MODE_MAXIMIZE_UTIL 1 diff --git a/ir/adt/impl.h b/ir/adt/impl.h index 0d523d377..911c9bc70 100644 --- a/ir/adt/impl.h +++ b/ir/adt/impl.h @@ -1,11 +1,32 @@ +/* + * 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. + */ + /** - * Some macros for wrapper function implementation. + * @file + * @brief Some macros for wrapper function implementation. (WARNING deprecated) * @author Sebastian Hack - * @date 9.12.2004 + * @date 9.12.2004 + * + * Please don't use these macros, they make the code unnecessarily unreadable! */ - -#ifndef _IMPL_H -#define _IMPL_H +#ifndef FIRM_ADT_IMPL_H +#define FIRM_ADT_IMPL_H #define _MANGLE(prefix,name) prefix ## name diff --git a/ir/adt/iterator.c b/ir/adt/iterator.c index 0038f9660..8d465cb6d 100644 --- a/ir/adt/iterator.c +++ b/ir/adt/iterator.c @@ -1,3 +1,21 @@ +/* + * 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. + */ #ifdef HAVE_CONFIG_H # include "config.h" #endif diff --git a/ir/adt/iterator.h b/ir/adt/iterator.h index bf74c1106..f802e0607 100644 --- a/ir/adt/iterator.h +++ b/ir/adt/iterator.h @@ -1,11 +1,32 @@ +/* + * 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. + */ + /** - * Iterators for the several collection types used in firm. - * Useful for formatted and unified dumping of collections of objects. - * @author Sebastian Hack - * @date 29.11.2004 + * @file + * @brief Iterators for the several collection types used in firm. + * Useful for formatted and unified dumping of collections of objects. + * @author Sebastian Hack + * @date 29.11.2004 + * @version $Id$ */ -#ifndef _ITERATOR_H -#define _ITERATOR_H +#ifndef FIRM_ADT_ITERATOR_H +#define FIRM_ADT_ITERATOR_H #include "fourcc.h" diff --git a/ir/adt/list.h b/ir/adt/list.h index 8713e363e..8b8f205ed 100644 --- a/ir/adt/list.h +++ b/ir/adt/list.h @@ -1,14 +1,9 @@ -/** - * Linked lists. - * Shamelessly adapted from the linux kernel. - */ - -#ifndef _FIRM_LIST_H -#define _FIRM_LIST_H -#include "firm_config.h" - -/* +/** + * @file + * @brief Doubly linked lists. + * @version $Id$ + * * Simple doubly linked list implementation. * * Some of the internal functions ("__xxx") are useful when @@ -16,7 +11,11 @@ * sometimes we already know the next/prev entries and we can * generate better code by using them directly rather than * using the generic single-entry routines. - */ + */ +#ifndef FIRM_ADT_LIST_H +#define FIRM_ADT_LIST_H + +#include "firm_config.h" struct list_head { struct list_head *next, *prev; diff --git a/ir/adt/obst.h b/ir/adt/obst.h index 1cad1bd62..c4285efbc 100644 --- a/ir/adt/obst.h +++ b/ir/adt/obst.h @@ -1,18 +1,35 @@ /* - * Project: libFIRM - * File name: ir/adt/obst.h - * Purpose: - * Author: Martin Trapp, Christian Schaefer - * Modified by: - * Created: - * CVS-ID: $Id$ - * Copyright: (c) 1998-2003 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 Provied obstack_chunk_alloc and obstack_chunk_free for obstack.h + * @author Martin Trapp, Christian Schaefer + * @version $Id$ + */ +#ifndef FIRM_ADT_OBST_H +#define FIRM_ADT_OBST_H + +#include +#include "xmalloc.h" -# include -# include "xmalloc.h" +#define obstack_chunk_alloc xmalloc +#define obstack_chunk_free free -# define obstack_chunk_alloc xmalloc -# define obstack_chunk_free free +#endif diff --git a/ir/adt/offset.h b/ir/adt/offset.h index fa4b5a5a9..8ccec28e9 100644 --- a/ir/adt/offset.h +++ b/ir/adt/offset.h @@ -1,16 +1,30 @@ -/** - * @file offset.h - * @date 31.05.2005 - * @author Sebastian Hack +/* + * 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. * - * Firm's own offset_of and container_of + * Licensees holding valid libFirm Professional Edition licenses may use + * this file in accordance with the libFirm Commercial License. + * Agreement provided with the Software. * - * Copyright (C) 2005 Universitaet Karlsruhe - * Released under the GPL + * 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 _OFFSET_H -#define _OFFSET_H +/** + * @file + * @brief Implementation of offset_of and container_of + * @date 31.05.2005 + * @author Sebastian Hack + */ +#ifndef FIRM_ADT_OFFSET_H +#define FIRM_ADT_OFFSET_H /** * Get the offset of a member of a struct. @@ -29,4 +43,4 @@ */ #define firm_container_of(ptr, type, member) ((type *) ((char *) (ptr) - firm_offset_of(type, member))) -#endif /* _OFFSET_H */ +#endif diff --git a/ir/adt/pdeq.c b/ir/adt/pdeq.c index 850626b00..7ef6eef7b 100644 --- a/ir/adt/pdeq.c +++ b/ir/adt/pdeq.c @@ -1,13 +1,28 @@ /* - * Project: libFIRM - * File name: ir/adt/pdeq.c - * Purpose: Pdeq --- double ended queue of generic pointers. - * Author: Christian von Roques - * Modified by: - * Created: 1999 by getting from fiasco - * CVS-ID: $Id$ - * Copyright: (c) 1995, 1996 Christian von Roques - * 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 double ended queue of generic pointers. + * @author Christian von Roques + * @date 1999 by getting from fiasco + * @version $Id$ */ #ifdef HAVE_CONFIG_H # include "config.h" diff --git a/ir/adt/pdeq.h b/ir/adt/pdeq.h index 3f422fe0e..1462a728b 100644 --- a/ir/adt/pdeq.h +++ b/ir/adt/pdeq.h @@ -1,22 +1,30 @@ /* - * Project: libFIRM - * File name: ir/adt/pdeq.h - * Purpose: Declarations for pdeq. - * Author: Christian von Roques - * Modified by: Michael Beck - * Created: 1999 by getting from fiasco - * CVS-ID: $Id$ - * Copyright: (c) 1995, 1996 Christian von Roques - * 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 _PDEQ_H_ -#define _PDEQ_H_ /** - * @file pdeq.h - * - * Declarations for double ended queue/list of generic pointers. + * @file + * @brief double ended queue of generic pointers. + * @author Christian von Roques + * @version $Id$ */ +#ifndef FIRM_ADT_PDEQ_H +#define FIRM_ADT_PDEQ_H /** * The type of the pointer compare function. @@ -262,4 +270,4 @@ typedef pdeq stack; */ #define stack_empty(st) pdeq_empty(wq) -#endif /* _PDEQ_H_ */ +#endif diff --git a/ir/adt/plist.c b/ir/adt/plist.c index 4fbe0f6ee..af3bbabeb 100644 --- a/ir/adt/plist.c +++ b/ir/adt/plist.c @@ -1,3 +1,22 @@ +/* + * 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. + */ + /** * Simple, non circular, double linked pointer list. * Created because the properties of the standard circular list were not diff --git a/ir/adt/plist.h b/ir/adt/plist.h index d5ec0823f..a4e86d317 100644 --- a/ir/adt/plist.h +++ b/ir/adt/plist.h @@ -1,17 +1,38 @@ -/** - * Simple, non circular, double linked pointer list. - * Created because the properties of the standard circular list were not - * very well suited for the interference graph implementation. - * This list uses an obstack and a free-list to efficiently manage its - * elements. +/* + * 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 * @author Kimon Hoffmann * @date 14.07.2005 * @cvs-id $Id$ - * @note Until now the code is entirely untested so it probably contains - * plenty of errors. - */ -#ifndef _PLIST_H_ -#define _PLIST_H_ + * @summary Simple, non circular, double linked pointer list. + * Created because the properties of the standard circular list were + * not very well suited for the interference graph implementation. + * This list uses an obstack and a free-list to efficiently manage its + * elements. + * @note Until now the code is entirely untested so it probably contains + * plenty of errors. (Matze: Is this still true, the code seems to be + * used at some places....) + */ +#ifndef FIRM_ADT_PLIST_H +#define FIRM_ADT_PLIST_H #include #include "obst.h" diff --git a/ir/adt/pmap.c b/ir/adt/pmap.c index 4dffe1fdd..75bf28067 100644 --- a/ir/adt/pmap.c +++ b/ir/adt/pmap.c @@ -1,14 +1,28 @@ /* - * Project: libFIRM - * File name: ir/adt/pmap.c - * Purpose: Datentyp: Vereinfachte Map (hash-map) zum Speichern von - * Zeigern/Adressen -> 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 simplified hashmap for pointer -> pointer mappings + * @author Hubert Schmid + * @date 09.06.2002 + * @version $Id$ */ #ifdef HAVE_CONFIG_H # include "config.h" diff --git a/ir/adt/pmap.h b/ir/adt/pmap.h index 5394d4c14..d550dd512 100644 --- a/ir/adt/pmap.h +++ b/ir/adt/pmap.h @@ -1,18 +1,31 @@ /* - * Project: libFIRM - * File name: ir/adt/eset.c - * Purpose: Datentyp: Vereinfachte Map (hash-map) zum Speichern von - * Zeigern/Adressen -> 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. */ -#ifndef _PMAP_H_ -#define _PMAP_H_ +/** + * @file + * @brief Simplified hashnap for pointer->pointer relations + * @author Hubert Schmid + * @date 09.06.2002 + * @version $Id$ + */ +#ifndef FIRM_ADT_PMAP_H +#define FIRM_ADT_PMAP_H /** A map which maps addresses to addresses. */ typedef struct pmap pmap; @@ -70,4 +83,4 @@ pmap_entry *pmap_next(pmap *); */ void pmap_break(pmap *map); -#endif /* _PMAP_H_ */ +#endif diff --git a/ir/adt/pqueue.c b/ir/adt/pqueue.c index 77ed3738a..74fcef67c 100644 --- a/ir/adt/pqueue.c +++ b/ir/adt/pqueue.c @@ -1,7 +1,32 @@ +/* + * 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 + * @author Christian Wuerdig, Matthias Braun + * @brief Priority Queue implementation based on the heap datastructure + * @version $Id$ + */ #include "array.h" #include "pqueue.h" -/** +/* * Implements a heap. * * Implementation note: It might seem strange that we start indexing at 0 @@ -15,7 +40,6 @@ * implementations or the ugly (i+1)*2 - 1 and (i+1)*2 for calculating the * left and right child. (At the expense that stuff easily breaks when you make * changes and don't think that the left child of 0 is 0 :-/) - * @author matze * */ diff --git a/ir/adt/pqueue.h b/ir/adt/pqueue.h index ea25d6e74..a0c6fff9d 100644 --- a/ir/adt/pqueue.h +++ b/ir/adt/pqueue.h @@ -1,14 +1,32 @@ -/** -* @file pqueue.h -* @date 18.04.2007 -* @author Christian Wuerdig -* @brief Implementation of a priority queue. This is the ported version of the -* original Java implementation by Matthias Braun. -* @version $Id$ -*/ +/* + * 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 _PQUEUE_H_ -#define _PQUEUE_H_ +/** + * @file + * @date 18.04.2007 + * @author Christian Wuerdig + * @brief Implementation of a priority queue. This is the ported version of the + * original Java implementation by Matthias Braun. + * @version $Id$ + */ +#ifndef FIRM_ADT_PQUEUE_H +#define FIRM_ADT_PQUEUE_H typedef struct _pqueue_t pqueue; @@ -53,4 +71,4 @@ int pqueue_length(pqueue *q); */ int pqueue_empty(pqueue *q); -#endif /* _PQUEUE_H_ */ +#endif diff --git a/ir/adt/pset.h b/ir/adt/pset.h index 4ffc69be3..3b2398e6c 100644 --- a/ir/adt/pset.h +++ b/ir/adt/pset.h @@ -1,17 +1,33 @@ /* - * Project: libFIRM - * File name: ir/adt/pset.h - * Purpose: Declarations for pset. - * 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 _PSET_H -#define _PSET_H +/** + * @file + * @brief optimized version of set for sets containing only pointers + * (deprecated) + * @author Markus Armbruster + * @version $Id$ + * @note This code has been deprecated. Use pset_new or cpset for new + * code. + */ +#ifndef FIRM_ADT_PSET_H +#define FIRM_ADT_PSET_H #include diff --git a/ir/adt/pset_new.c b/ir/adt/pset_new.c index 33bc19d0e..dd9dc7dfb 100644 --- a/ir/adt/pset_new.c +++ b/ir/adt/pset_new.c @@ -1,3 +1,28 @@ +/* + * 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 implementation of pset_new + * @author Matthias Braun + * @version $Id$ + */ #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/ir/adt/pset_new.h b/ir/adt/pset_new.h index 530f9adca..c667310bc 100644 --- a/ir/adt/pset_new.h +++ b/ir/adt/pset_new.h @@ -1,15 +1,36 @@ +/* + * 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 17.03.2007 - * @brief A hashset that contains pointers + * @brief hashset containing pointers * @author Matthias Braun - * @version $Id: pset_new.h 169 2007-04-03 01:01:09Z uxsm $ + * @version $Id$ * - * NOTE: This has been named pset_new_new for now until all code has been changed - * to use this instead of the old deprecated pset_new functions! + * @note This has been named pset_new_new for now until all code has been + * changed to use this instead of the old deprecated pset_new functions! + * This version performs better than pset in terms of speed and memory + * usage and allows multiple iterators over the set */ -#ifndef _FIRM_PSET_NEW_H_ -#define _FIRM_PSET_NEW_H_ +#ifndef FIRM_ADT_PSET_NEW_H +#define FIRM_ADT_PSET_NEW_H #define HashSet pset_new_t #define HashSetIterator pset_new_iterator_t @@ -115,4 +136,4 @@ void pset_new_remove_iterator(pset_new_t *pset_new, const pset_new_iterator_t *i ptr = pset_new_iterator_next(&iter); \ ptr != NULL; ptr = pset_new_iterator_next(&iter)) -#endif /* _FIRM_PSET_NEW_H_ */ +#endif diff --git a/ir/adt/raw_bitset.h b/ir/adt/raw_bitset.h index d58c2f158..707bec15a 100644 --- a/ir/adt/raw_bitset.h +++ b/ir/adt/raw_bitset.h @@ -1,8 +1,28 @@ +/* + * 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 - * @author Matthias Braun - * @brief helper functions for working with raw bitsets + * @file + * @brief helper functions for working with raw bitsets + * @date 15.10.2004 + * @author Matthias Braun + * @version $Id$ * @summary * Raw bitsets are constructed from int arrays. Additional information * like the size of the bitset or the used memory aren't saved for @@ -17,8 +37,8 @@ * exactly 32 bits may be put into each element of the array. If there are * remaining bits, then they should be 0 */ -#ifndef __FIRM_RAW_BITSET_H -#define __FIRM_RAW_BITSET_H +#ifndef FIRM_ADT_RAW_BITSET_H +#define FIRM_ADT_RAW_BITSET_H #include #include "bitset.h" diff --git a/ir/adt/set.c b/ir/adt/set.c index f2e4dd756..d0c2b18be 100644 --- a/ir/adt/set.c +++ b/ir/adt/set.c @@ -1,13 +1,27 @@ /* - * Project: libFIRM - * File name: ir/adt/set.c - * Purpose: Set --- collection of entries that are unique wrt to a key. - * 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 implementation of set + * @author Markus Armbruster + * @version $Id$ */ /* This code is derived from: @@ -29,17 +43,10 @@ TODO: Fix Esmond's ugly MixedCapsIdentifiers ;-> */ - -/* $Id$ */ - #ifdef HAVE_CONFIG_H # include "config.h" #endif -/* bcopy is not ISO C * -#define bcopy(X, Y, Z) memcpy((Y), (X), (Z)) -*/ - #ifdef PSET # define SET pset # define PMANGLE(pre) pre##_pset diff --git a/ir/adt/set.h b/ir/adt/set.h index 214019dc9..c3214caa1 100644 --- a/ir/adt/set.h +++ b/ir/adt/set.h @@ -1,23 +1,30 @@ /* - * Project: libFIRM - * File name: ir/adt/set.h - * Purpose: Declarations for set. - * 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 set.h - * - * Declarations for set. + * @file + * @brief hashset: datastructure containing objects accessible by their key + * @author Markus Armbruster + * @verison $Id$ */ - -#ifndef _SET_H -#define _SET_H +#ifndef FIRM_ADT_SET_H +#define FIRM_ADT_SET_H #include diff --git a/ir/adt/unionfind.h b/ir/adt/unionfind.h index 4dde3eca0..613e64cab 100644 --- a/ir/adt/unionfind.h +++ b/ir/adt/unionfind.h @@ -1,26 +1,35 @@ /* - * Project: libFIRM - * File name: ir/adt/unionfind.h - * Purpose: Union-Find datastructure - * Author: Matthias Braun - * Modified by: - * CVS-ID: $Id$ - * Copyright: (c) 2006, Matthias Braun - * 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 unionfind.h - * - * Union-Find datastructure + * @file + * @brief Union-Find datastructure + * @author Matthias Braun + * @version $Id$ + * @summary + * Union-Find datastructure * - * This implementation uses weighted sets and path compression which results - * in O(n) complexity for n find and union operations (actually it's - * n * alpha(n) with alpha being the inverse of the ackermann function and - * therefore smaller than 5 for all 64bit values of n) + * This implementation uses weighted sets and path compression which results + * in (nearly) O(n) complexity for n find and union operations */ -#ifndef _UNIONFIND_H -#define _UNIONFIND_H +#ifndef FIRM_ADT_UNIONFIND_H +#define FIRM_ADT_UNIONFIND_H #include diff --git a/ir/adt/util.h b/ir/adt/util.h index c8acb5652..3757ed83d 100644 --- a/ir/adt/util.h +++ b/ir/adt/util.h @@ -1,16 +1,30 @@ -/** - * @file util.h - * @date 31.05.2005 - * @author Sebastian Hack +/* + * 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. * - * Some utility macros. + * Licensees holding valid libFirm Professional Edition licenses may use + * this file in accordance with the libFirm Commercial License. + * Agreement provided with the Software. * - * Copyright (C) 2005 Universitaet Karlsruhe - * Released under the GPL + * 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 _UTIL_H -#define _UTIL_H +/** + * @file + * @date 31.05.2005 + * @author Sebastian Hack + * @brief Some utility macros. + */ +#ifndef FIRM_ADT_UTIL_H +#define FIRM_ADT_UTIL_H /** * Get the offset of a member of a struct. @@ -67,4 +81,4 @@ #define UNLIKELY(x) x #endif -#endif /* _UTIL_H */ +#endif diff --git a/ir/adt/xmalloc.c b/ir/adt/xmalloc.c index 1f8ea744c..eaccc2f5e 100644 --- a/ir/adt/xmalloc.c +++ b/ir/adt/xmalloc.c @@ -1,18 +1,31 @@ /* - * Project: libFIRM - * File name: ir/adt/xmalloc.c - * Purpose: Xmalloc --- never failing wrappers for malloc() & friends. - * 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 implementation of xmalloc & friends + * @author Markus Armbruster + * @version $Id$ */ /* @@@ ToDo: replace this file with the one from liberty. [reimplement xstrdup, ... ] */ - #ifdef HAVE_CONFIG_H # include "config.h" #endif diff --git a/ir/adt/xmalloc.h b/ir/adt/xmalloc.h index d7a6122e9..5131fb937 100644 --- a/ir/adt/xmalloc.h +++ b/ir/adt/xmalloc.h @@ -1,18 +1,32 @@ /* - * Project: libFIRM - * File name: ir/adt/xmalloc.h - * Purpose: More comfortable allocations. - * 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 _XMALLOC_H_ -#define _XMALLOC_H_ +/** + * @file + * @brief never failing wrappers for malloc() & friends. + * @author Markus Armbruster + * @version $Id$ + * @note The functions here never fail because they simply abort your + * program in case of an error. + */ +#ifndef FIRM_ADT_XMALLOC_H +#define FIRM_ADT_XMALLOC_H #include @@ -36,4 +50,4 @@ void free(void *ptr); #include #endif -#endif /* _XMALLOC_H_ */ +#endif -- 2.20.1