Update of /cvsroot/monetdb/MonetDB5/src/optimizer
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15163
Modified Files:
opt_inline.mx
Log Message:
Use recursive inlineing.
Index: opt_inline.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_inline.mx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- opt_inline.mx 24 Dec 2007 12:28:25 -0000 1.6
+++ opt_inline.mx 27 Dec 2007 18:36:19 -0000 1.7
@@ -23,6 +23,8 @@
as well.
The code is expanded inline using the macro processor.
+The inline optimizer processes all instructions, thereby
+causing recursive inlined functions to appear as well.
@{
@mal
pattern optimizer.inline():str
@@ -45,23 +47,9 @@
#include "mal_config.h"
#include "opt_inline.h"
-static int OPTinlineMultiplex(MalBlkPtr mb, InstrPtr p){
- Symbol s;
- str mod,fcn;
- mod = VALget(&getVar(mb, getArg(p, 1))->value);
- fcn = VALget(&getVar(mb, getArg(p, 2))->value);
- if( (s= findSymbol(mod,fcn)) ==0 )
- return FALSE;
[EMAIL PROTECTED]
-Before we decide to propagate the inline request
-to the multiplex operation, we check some basic properties
-of the target function.
[EMAIL PROTECTED]
- return varGetProp(s->def , getArg(getInstrPtr(s->def,0), 0),
- inlineProp) != NULL;
-}
+extern int OPTinlineMultiplex(MalBlkPtr mb, InstrPtr p);
-static int
+int
OPTinlineImplementation(MalBlkPtr mb, MalStkPtr stk, InstrPtr p)
{
int i;
@@ -118,6 +106,24 @@
return actions;
}
+
+int OPTinlineMultiplex(MalBlkPtr mb, InstrPtr p){
+ Symbol s;
+ str mod,fcn;
+ mod = VALget(&getVar(mb, getArg(p, 1))->value);
+ fcn = VALget(&getVar(mb, getArg(p, 2))->value);
+ if( (s= findSymbol(mod,fcn)) ==0 )
+ return FALSE;
[EMAIL PROTECTED]
+Before we decide to propagate the inline request
+to the multiplex operation, we check some basic properties
+of the target function. Moreover, we apply the inline optimizer
+to the target function as well.
[EMAIL PROTECTED]
+ (void) OPTinlineImplementation(s->def, NULL, p);
+ return varGetProp(s->def , getArg(getInstrPtr(s->def,0), 0),
+ inlineProp) != NULL;
+}
@include optimizerWrapper.mx
@h
@:exportOptimizer(inline)@
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins