Changeset: 055b1e627b4d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=055b1e627b4d
Modified Files:
monetdb5/optimizer/opt_constants.c
Branch: default
Log Message:
Avoid some work if possible in constant optimizer
diffs (31 lines):
diff --git a/monetdb5/optimizer/opt_constants.c
b/monetdb5/optimizer/opt_constants.c
--- a/monetdb5/optimizer/opt_constants.c
+++ b/monetdb5/optimizer/opt_constants.c
@@ -9,8 +9,7 @@
/*
* Constant Duplicate Removal
* The compilers may generate an abundance of constants on
- * the stack. This simple optimizer re-organizes performs a complete
- * job to use constants only once.
+ * the stack. This simple optimizer merges them into a single reference.
* This makes it easier to search for statement duplicates
* and alias their variables.
*/
@@ -79,11 +78,12 @@ OPTconstantsImplementation(Client cntxt,
}
}
- for (i = 0; i < mb->stop; i++){
- p= getInstrPtr(mb,i);
- for (k=0; k < p->argc; k++)
- getArg(p,k) = alias[getArg(p,k)];
- }
+ if( actions)
+ for (i = 0; i < mb->stop; i++){
+ p= getInstrPtr(mb,i);
+ for (k=0; k < p->argc; k++)
+ getArg(p,k) = alias[getArg(p,k)];
+ }
GDKfree(alias);
GDKfree(cst);
GDKfree(index);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list