From 76572961989e62cef01b295c6c8af7460f6080dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=B6tz=20Lindenmaier?= Date: Wed, 20 Aug 2003 09:06:15 +0000 Subject: [PATCH] added copyright info [r1724] --- testprograms/Makefile.in | 14 +++-- testprograms/array-heap_example.c | 19 ++++--- testprograms/array-stack_example.c | 19 ++++--- testprograms/call_str_example.c | 38 ++++++++------ testprograms/cond_example.c | 19 ++++--- testprograms/const_ent_example.c | 63 +++++++++++----------- testprograms/const_eval_example.c | 18 ++++--- testprograms/dead_block_example.c | 18 ++++--- testprograms/empty.c | 18 ++++--- testprograms/endless_loop.c | 20 ++++--- testprograms/float_example.c | 17 +++--- testprograms/global_cse.c | 20 +++---- testprograms/global_var_example.c | 19 ++++--- testprograms/if_else_example.c | 19 ++++--- testprograms/if_example.c | 18 ++++--- testprograms/if_while_example.c | 19 ++++--- testprograms/inheritance_example.c | 18 ++++--- testprograms/irr_cf_example.c | 21 ++++---- testprograms/irr_loop_example.c | 22 ++++---- testprograms/memory_example.c | 18 ++++--- testprograms/oo_inline_example.c | 21 ++++---- testprograms/oo_program_example.c | 18 ++++--- testprograms/three_cfpred_example.c | 81 +++++++++++++++-------------- testprograms/while_example.c | 19 ++++--- 24 files changed, 334 insertions(+), 242 deletions(-) diff --git a/testprograms/Makefile.in b/testprograms/Makefile.in index 8ba9fa31e..cb607a789 100644 --- a/testprograms/Makefile.in +++ b/testprograms/Makefile.in @@ -1,8 +1,14 @@ -# Hey Emacs, this is a -*- makefile -*- -# -# libFIRM Project + # -# $Id$ +# Project: libFIRM +# File name: testprograms/Makefile.in +# Purpose: +# Author: Boris Boesler, Till Riedel +# Modified by: +# Created: +# CVS-ID: $Id$ +# Copyright: (c) 1999-2003 Universität Karlsruhe +# Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. # top_srcdir := @top_srcdir@ diff --git a/testprograms/array-heap_example.c b/testprograms/array-heap_example.c index d0b776fb0..ef6aa5c7f 100644 --- a/testprograms/array-heap_example.c +++ b/testprograms/array-heap_example.c @@ -1,10 +1,15 @@ - /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Goetz Lindenmaier -* -* testprogram. -*/ +/* + * Project: libFIRM + * File name: testprograms/array-heap_example.c + * Purpose: Show representation of dynamically allocated array. + * Author: Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ + # include # include diff --git a/testprograms/array-stack_example.c b/testprograms/array-stack_example.c index 6e8580265..890d59937 100644 --- a/testprograms/array-stack_example.c +++ b/testprograms/array-stack_example.c @@ -1,10 +1,15 @@ - /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Goetz Lindenmaier -* -* testprogram. -*/ +/* + * Project: libFIRM + * File name: testprograms/array-stack_example.c + * Purpose: Show representation of array on stack. + * Author: Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ + # include # include diff --git a/testprograms/call_str_example.c b/testprograms/call_str_example.c index 0d21cf5a7..604a1d7e6 100644 --- a/testprograms/call_str_example.c +++ b/testprograms/call_str_example.c @@ -1,10 +1,14 @@ -/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Christian Schaefer, Goetz Lindenmaier -* -* testprogram. -*/ +/* + * Project: libFIRM + * File name: testprograms/call_str_example.c + * Purpose: Shows representation of constant string. + * Author: Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ # include # include @@ -14,16 +18,16 @@ # include "firm.h" /** -* This file constructs the ir for the following pseudo-program: -* -* void f(char *); -* -* void CALL_STR_EXAMPLE_main () { - f("Hello World\n"); -* } -* -* This program shall demonstrate how to represent string constants. -**/ + * This file constructs the ir for the following pseudo-program: + * + * void f(char *); + * + * void CALL_STR_EXAMPLE_main () { + * f("Hello World\n"); + * } + * + * This program demonstrates how to represent string constants. + */ int main(int argc, char **argv) { diff --git a/testprograms/cond_example.c b/testprograms/cond_example.c index bbaeaf0db..21e3a839b 100644 --- a/testprograms/cond_example.c +++ b/testprograms/cond_example.c @@ -1,10 +1,15 @@ -/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Christian Schaefer, Goetz Lindenmaier -* -* testprogram. -*/ +/* + * Project: libFIRM + * File name: testprograms/cond_example.c + * Purpose: Shows how to represent boolean expressions. + * Author: Christian Schaefer, Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ + #include # include diff --git a/testprograms/const_ent_example.c b/testprograms/const_ent_example.c index 928dbe928..49be43632 100644 --- a/testprograms/const_ent_example.c +++ b/testprograms/const_ent_example.c @@ -1,12 +1,17 @@ -/* Copyright (C) 2000 by Universitaet Karlsruhe -* All rights reserved. -* -* Author: Goetz Lindenmaier -* -* testprogram. -*/ - -#include +/* + * Project: libFIRM + * File name: testprograms/const_ent_example.c + * Purpose: Shows how to construct type information for constant entities. + * Author: Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ + + +# include # include # include "irvrfy.h" @@ -14,26 +19,26 @@ # include "firm.h" /** -* This file constructs type information for constant entities. -* -* It constructs the information for a class type with a dispatch -* table. The class has a field a, and two methods f and g. The -* class is represented by a class type with two entities for the -* field a and the reference to the dispatch table. This reference -* is a constant entity. Ther dispatch table is also represented -* by a class type that contains the two methods. There is one entity -* of the dispatch table which is constant. -* -* Further the example shows the representation of a constant global -* array. -* -* class C { -* int a; -* void f(); -* void g(int); -* } -* int[4] arre = (7, 2, 13, 92); -**/ + * This file constructs type information for constant entities. + * + * It constructs the information for a class type with a dispatch + * table. The class has a field a, and two methods f and g. The + * class is represented by a class type with two entities for the + * field a and the reference to the dispatch table. This reference + * is a constant entity. Ther dispatch table is also represented + * by a class type that contains the two methods. There is one entity + * of the dispatch table which is constant. + * + * Further the example shows the representation of a constant global + * array. + * + * class C { + * int a; + * void f(); + * void g(int); + * } + * int[4] arre = (7, 2, 13, 92); + **/ int main(int argc, char **argv) { diff --git a/testprograms/const_eval_example.c b/testprograms/const_eval_example.c index d90f1062b..dc0bce07e 100644 --- a/testprograms/const_eval_example.c +++ b/testprograms/const_eval_example.c @@ -1,10 +1,14 @@ -/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Christian Schaefer, Goetz Lindenmaier -* -* testprogram -*/ +/* + * Project: libFIRM + * File name: testprograms/const_eval_example.c + * Purpose: Test constant evaluation. + * Author: Christian Schaefer, Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ #include # include diff --git a/testprograms/dead_block_example.c b/testprograms/dead_block_example.c index 7493d7c00..e958837e2 100644 --- a/testprograms/dead_block_example.c +++ b/testprograms/dead_block_example.c @@ -1,10 +1,14 @@ -/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Christian Schaefer, Goetz Lindenmaier -* -* testprogram. -*/ +/* + * Project: libFIRM + * File name: testprograms/dead_block_example.c + * Purpose: Test unreachable code elimination. + * Author: Christian Schaefer, Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ # include # include diff --git a/testprograms/empty.c b/testprograms/empty.c index 0a1de477a..3cf8def69 100644 --- a/testprograms/empty.c +++ b/testprograms/empty.c @@ -1,9 +1,15 @@ -/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Christian Schaefer, Goetz Lindenmaier -* -*/ +/* + * Project: libFIRM + * File name: testprograms/empty.c + * Purpose: The smallest possible firm graph. + * Author: Christian Schaefer, Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ + # include # include diff --git a/testprograms/endless_loop.c b/testprograms/endless_loop.c index 58ac48ce0..0c9c7f8f4 100644 --- a/testprograms/endless_loop.c +++ b/testprograms/endless_loop.c @@ -1,12 +1,16 @@ -/* (C) 2002 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Goetz Lindenmaier -* -* testprogram. -*/ +/* + * Project: libFIRM + * File name: testprograms/endless_loop.c + * Purpose: Representation of an endless loop. + * Author: Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ + -/* $ID$ */ # include # include diff --git a/testprograms/float_example.c b/testprograms/float_example.c index d2247f9d9..4a6b9dd9c 100644 --- a/testprograms/float_example.c +++ b/testprograms/float_example.c @@ -1,9 +1,14 @@ -/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Christian Schaefer, Goetz Lindenmaier -* -*/ +/* + * Project: libFIRM + * File name: testprograms/float_example.c + * Purpose: + * Author: Christian Schaefer, Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ # include # include diff --git a/testprograms/global_cse.c b/testprograms/global_cse.c index 1d1544066..3e701d9dd 100644 --- a/testprograms/global_cse.c +++ b/testprograms/global_cse.c @@ -1,12 +1,14 @@ -/* Copyright (C) 2002 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Christian Schaefer, Goetz Lindenmaier -* -* testprogram. -*/ - -/* $Id$ */ +/* + * Project: libFIRM + * File name: testprograms/global_cse.c + * Purpose: Test global cse. + * Author: Christian Schaefer, Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ # include # include diff --git a/testprograms/global_var_example.c b/testprograms/global_var_example.c index 29268f69a..707f498be 100644 --- a/testprograms/global_var_example.c +++ b/testprograms/global_var_example.c @@ -1,11 +1,14 @@ -/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Goetz Lindenmaier -* -* testprogram. -* -*/ +/* + * Project: libFIRM + * File name: testprograms/global_var_example.c + * Purpose: Illustrates representation of global variable. + * Author: Christian Schaefer, Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ # include # include diff --git a/testprograms/if_else_example.c b/testprograms/if_else_example.c index eae8dd95e..ea0d2e67f 100644 --- a/testprograms/if_else_example.c +++ b/testprograms/if_else_example.c @@ -1,10 +1,15 @@ -/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Christian Schaefer, Goetz Lindenmaier -* -* testprogram. -*/ +/* + * Project: libFIRM + * File name: testprograms/if_else_example.c + * Purpose: Shows construction of if ... else control flow. + * Tests Phi construction. + * Author: Christian Schaefer, Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ # include # include diff --git a/testprograms/if_example.c b/testprograms/if_example.c index 14fa110b5..b46b6c168 100644 --- a/testprograms/if_example.c +++ b/testprograms/if_example.c @@ -1,10 +1,14 @@ -/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Christian Schaefer, Goetz Lindenmaier -* -* testprogram. -*/ +/* + * Project: libFIRM + * File name: testprograms/if_example.c + * Purpose: Shows construction of if. + * Author: Christian Schaefer, Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ # include # include diff --git a/testprograms/if_while_example.c b/testprograms/if_while_example.c index abb1fc76a..dddb2d2a7 100644 --- a/testprograms/if_while_example.c +++ b/testprograms/if_while_example.c @@ -1,10 +1,15 @@ -/* (C) 1998 - 2000 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Christian Schaefer, Goetz Lindenmaier -* -* testprogram. -*/ +/* + * Project: libFIRM + * File name: testprograms/if_while_example.c + * Purpose: Shows more complex control flow. + * Author: Christian Schaefer, Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ + # include # include diff --git a/testprograms/inheritance_example.c b/testprograms/inheritance_example.c index a2e1a2e59..104edf306 100644 --- a/testprograms/inheritance_example.c +++ b/testprograms/inheritance_example.c @@ -1,10 +1,14 @@ -/* Copyright (C) 2000 by Universitaet Karlsruhe -* All rights reserved. -* -* Author: Goetz Lindenmaier -* -* testprogram. -*/ +/* + * Project: libFIRM + * File name: testprograms/inheritance_example.c + * Purpose: Shows type graph with inheritance. + * Author: Christian Schaefer, Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ # include # include diff --git a/testprograms/irr_cf_example.c b/testprograms/irr_cf_example.c index c1eac0633..c85b2b360 100644 --- a/testprograms/irr_cf_example.c +++ b/testprograms/irr_cf_example.c @@ -1,10 +1,14 @@ -/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Christian Schaefer, Goetz Lindenmaier -* -* testprogram. -*/ +/* + * Project: libFIRM + * File name: testprograms/irr_cf_example.c + * Purpose: Test Phi construction with irregular control flow. + * Author: Christian Schaefer, Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ # include # include @@ -13,9 +17,6 @@ # include "irdump.h" # include "firm.h" -/* - * irregular control flow - */ /** * This file constructs a control flow of following shape: diff --git a/testprograms/irr_loop_example.c b/testprograms/irr_loop_example.c index 7e6edbdd2..132c2e435 100644 --- a/testprograms/irr_loop_example.c +++ b/testprograms/irr_loop_example.c @@ -1,10 +1,14 @@ -/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Christian Schaefer, Goetz Lindenmaier -* -* testprogram. -*/ +/* + * Project: libFIRM + * File name: testprograms/irr_loop_example.c + * Purpose: Test Phi construction with irregular control flow. + * Author: Christian Schaefer, Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ # include # include @@ -13,10 +17,6 @@ # include "irdump.h" # include "firm.h" -/* - * an irreducible loop. - */ - /** * This file constructs a control flow of following shape: * diff --git a/testprograms/memory_example.c b/testprograms/memory_example.c index d91071d04..1ec5af15b 100644 --- a/testprograms/memory_example.c +++ b/testprograms/memory_example.c @@ -1,10 +1,14 @@ -/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Christian Schaefer, Goetz Lindenmaier -* -* testprogram. -*/ +/* + * Project: libFIRM + * File name: testprograms/memory_example.c + * Purpose: Illustrate memory edges. + * Author: Christian Schaefer, Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ # include diff --git a/testprograms/oo_inline_example.c b/testprograms/oo_inline_example.c index b3aded472..b6f142f80 100644 --- a/testprograms/oo_inline_example.c +++ b/testprograms/oo_inline_example.c @@ -1,13 +1,14 @@ -/* Copyright (C)2002 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Goetz Lindenmaier -* -* testprogram. -*/ - -/* $ID$ */ - +/* + * Project: libFIRM + * File name: testprograms/oo_inline_example.c + * Purpose: Test inlineing. + * Author: Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ # include # include diff --git a/testprograms/oo_program_example.c b/testprograms/oo_program_example.c index a29456b31..ab3a4cc96 100644 --- a/testprograms/oo_program_example.c +++ b/testprograms/oo_program_example.c @@ -1,10 +1,14 @@ -/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Goetz Lindenmaier -* -* testprogram. -*/ +/* + * Project: libFIRM + * File name: testprograms/oo_program_example.c + * Purpose: A complex example. + * Author: Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ # include # include diff --git a/testprograms/three_cfpred_example.c b/testprograms/three_cfpred_example.c index 51ec8adc8..c6edb4dfd 100644 --- a/testprograms/three_cfpred_example.c +++ b/testprograms/three_cfpred_example.c @@ -1,10 +1,15 @@ -/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Christian Schaefer, Goetz Lindenmaier -* -* testprogram. -*/ +/* + * Project: libFIRM + * File name: testprograms/three_cfpred_example.c + * Purpose: Construct a block with more than two predecessors. + * Author: Christian Schaefer, Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ + # include # include @@ -13,40 +18,36 @@ # include "irdump.h" # include "firm.h" -/* - * a dead block / unreachable code. - */ - /** -* This file constructs a control flow of following shape: -* -* -* firstCondBlock -* / \ -* / \ -* |/_ _\| -* Block1 scnCondBlock -* | | | -* | | | -* | \ / \ / -* | Block2 Block3 -* \ | / -* \ | / -* _\| \ / |/_ -* nextBlock -* -* -* This is a program as, e.g., -* -* if () then -* { Jmp label1; } // happens anyways -* else -* { Jmp label1; } // happens anyways -* label1: -* return(); -* Jmp label1; -* -**/ + * This file constructs a control flow of following shape: + * + * + * firstCondBlock + * / \ + * / \ + * |/_ _\| + * Block1 scnCondBlock + * | | | + * | | | + * | \ / \ / + * | Block2 Block3 + * \ | / + * \ | / + * _\| \ / |/_ + * nextBlock + * + * + * This is a program as, e.g., + * + * if () then + * { Jmp label1; } // happens anyways + * else + * { Jmp label1; } // happens anyways + * label1: + * return(); + * Jmp label1; + * + **/ int main(int argc, char **argv) { diff --git a/testprograms/while_example.c b/testprograms/while_example.c index b49afbb01..8986af6b8 100644 --- a/testprograms/while_example.c +++ b/testprograms/while_example.c @@ -1,10 +1,15 @@ -/* Copyright (C) 2001 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Goetz Lindenmaier -* -* testprogram. -*/ +/* + * Project: libFIRM + * File name: testprograms/while_example.c + * Purpose: Construct a loop. + * Author: Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ + # include # include -- 2.20.1