From 713f73ed9241d5967f85bf856ff2ef74d9fc6592 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=B6tz=20Lindenmaier?= Date: Mon, 15 Nov 2004 12:38:19 +0000 Subject: [PATCH] we need more and more libs at linking ... changed node numbers (unknown_entity) [r4401] --- firmjni/Makefile.in | 8 +++---- firmjni/auxilliary/Heapanal.c | 6 +++++- firmjni/testprograms/Makefile.in | 7 ++++-- firmjni/testprograms/run-results.txt | 32 ++++++++++++++-------------- 4 files changed, 30 insertions(+), 23 deletions(-) diff --git a/firmjni/Makefile.in b/firmjni/Makefile.in index 911733200..67b6a8370 100644 --- a/firmjni/Makefile.in +++ b/firmjni/Makefile.in @@ -49,7 +49,7 @@ CPPFLAGS += -I$(top_srcdir)/ir/ir -I$(top_srcdir)/ir/common \ -I$(top_srcdir)/ir/ana -I$(top_srcdir)/ir/opt \ -I$(top_srcdir)/ir/st -I$(top_srcdir)/ir/stat -LDFLAGS += -I$(topdir) +LDFLAGS += -I$(topdir) -L$(libdir) -lfirmlower -labor FIRM_HEADERS=$(notdir $(FIRM_PATH_HEADERS)) MEMBERS=$(subst .h,.m,$(shell echo $(FIRM_HEADERS)|$(SHELL_TOUPPER))) @@ -134,10 +134,10 @@ else HEAPANALLIB = endif - +# We need firmlower and abor for heap analysis stuff, wich is called from aux/Heapanal.java +# BY the way, what is sw/lib/ can this be removed??? jni: $(HFILES) $(OFILES) # ../libfirm.a - gcc -shared -fPIC -o $(LIBNAME) *.o -lfirm -L.. $(HEAPANALLIB) $(LDFLAGS) -liberty -L../../sw/lib - + gcc -shared -fPIC -o $(LIBNAME) *.o -lfirm -lxml2 -L.. $(HEAPANALLIB) $(LDFLAGS) -liberty -L../../sw/lib install: cp libfirmjni.so $(libdir) # mkdir $(javadir) diff --git a/firmjni/auxilliary/Heapanal.c b/firmjni/auxilliary/Heapanal.c index 1bb328c07..5dba31cae 100644 --- a/firmjni/auxilliary/Heapanal.c +++ b/firmjni/auxilliary/Heapanal.c @@ -108,7 +108,7 @@ void Java_firmjni_Heapanal_analHeap__ (JNIEnv *env, jclass clazz) /* Analysis that builds the call graph and finds the free methods, i.e. methods that are dereferenced. Optimizes polymorphic calls.*/ - cgana(&arr_len, &free_methods, 0); + cgana(&arr_len, &free_methods); /* Remove methods that are never called. */ /* gc_irgs(arr_len, free_methods); */ /* Build the interprocedural dataflow representation */ @@ -154,6 +154,10 @@ void Java_firmjni_Heapanal_analHeap__ (JNIEnv *env, jclass clazz) /* * $Log$ + * Revision 1.5 2004/11/15 12:38:16 goetz + * we need more and more libs at linking ... + * changed node numbers (unknown_entity) + * * Revision 1.4 2004/08/14 10:09:52 goetz * adapted to new semantics * diff --git a/firmjni/testprograms/Makefile.in b/firmjni/testprograms/Makefile.in index 47f880c42..8aaaa6dff 100644 --- a/firmjni/testprograms/Makefile.in +++ b/firmjni/testprograms/Makefile.in @@ -24,10 +24,13 @@ SOURCES := Makefile.in \ MYCLASSPATH = $(CLASSPATH):../.. +XML2_LIBRARY_PATH = /usr/public/libxml2-2.6.14/lib + LD_LIBRARY_PATH += $srcdir/firmjni +LD_LIBRARY_PATH += $XML2_LIBRARY_PATH -run_bin_EXAMPLES = java -cp $(MYCLASSPATH) -Djava.library.path=$(topdir) Empty; \ - java -cp $(MYCLASSPATH) -Djava.library.path=$(topdir) IfElseExample +run_bin_EXAMPLES = java -cp $(MYCLASSPATH) -Djava.library.path=$(topdir):$(XML2_LIBRARY_PATH) Empty; \ + java -cp $(MYCLASSPATH) -Djava.library.path=$(topdir):$(XML2_LIBRARY_PATH) IfElseExample %.class: $(top_srcdir)/firmjni/testprograms/%.java javac -d . $< diff --git a/firmjni/testprograms/run-results.txt b/firmjni/testprograms/run-results.txt index a5adcb71b..c3a5dd69d 100644 --- a/firmjni/testprograms/run-results.txt +++ b/firmjni/testprograms/run-results.txt @@ -7,29 +7,29 @@ use xvcg to view this graph: Creating an IR graph: IfElseExample... Optimization: 3 -new Node 33 -old Node 32 +new Node 37 +old Node 36 Optimization: 2 -new Nodes: 35, -old Nodes: 36, 34, 35, +new Nodes: 39, +old Nodes: 40, 38, 39, Optimization: 4 -new Nodes: 35, -old Nodes: 35, 35, +new Nodes: 39, +old Nodes: 39, 39, Optimization: 2 -new Nodes: 20, -old Nodes: 37, 34, 20, +new Nodes: 23, +old Nodes: 41, 38, 23, Optimization: 4 -new Nodes: 30, -old Nodes: 43, 30, +new Nodes: 34, +old Nodes: 47, 34, Optimization: 5 -new Nodes: 27, -old Nodes: 42, 35, +new Nodes: 31, +old Nodes: 46, 39, Done building the graph. Optimizing it. Optimization: 5 -new Nodes: 27, -old Nodes: 42, 35, +new Nodes: 31, +old Nodes: 46, 39, Optimization: 4 -new Nodes: 35, -old Nodes: 44, 35, +new Nodes: 39, +old Nodes: 48, 39, use xvcg to view this graph: /ben/goetz/bin/xvcg GRAPHNAME -- 2.20.1