Changeset: 075e2cd531b9 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/075e2cd531b9
Removed Files:
        monetdb5/optimizer/opt_strimps.c
        monetdb5/optimizer/opt_strimps.h
Modified Files:
        clients/Tests/exports.stable.out
        monetdb5/optimizer/CMakeLists.txt
        monetdb5/optimizer/opt_pipes.c
        monetdb5/optimizer/opt_prelude.c
        monetdb5/optimizer/opt_prelude.h
        monetdb5/optimizer/opt_wrapper.c
Branch: default
Log Message:

Removed unused (and unusable) strimps optimizer.


diffs (279 lines):

diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -1235,7 +1235,6 @@ void strAfterCall(ValPtr v, ValPtr bak);
 void strBeforeCall(ValPtr v, ValPtr bak);
 const char *strRef;
 const char *streamsRef;
-const char *strimpFilterSelectRef;
 const char *strimpsRef;
 const char *subavgRef;
 const char *subcountRef;
diff --git a/monetdb5/optimizer/CMakeLists.txt 
b/monetdb5/optimizer/CMakeLists.txt
--- a/monetdb5/optimizer/CMakeLists.txt
+++ b/monetdb5/optimizer/CMakeLists.txt
@@ -47,7 +47,6 @@ target_sources(optimizer
   opt_postfix.c opt_postfix.h
   opt_volcano.c opt_volcano.h
   opt_fastpath.c opt_fastpath.h
-  opt_strimps.c opt_strimps.h
   opt_wrapper.c
   PUBLIC
   ${CMAKE_CURRENT_SOURCE_DIR}/opt_pipes.h)
diff --git a/monetdb5/optimizer/opt_pipes.c b/monetdb5/optimizer/opt_pipes.c
--- a/monetdb5/optimizer/opt_pipes.c
+++ b/monetdb5/optimizer/opt_pipes.c
@@ -58,21 +58,6 @@ static struct PIPELINES {
         "optimizer.garbageCollector();"
         "optimizer.profiler();",
         "stable", NULL, 1},
-#ifdef USE_STRIMPS_OPTIMIZERS
-       {"minimal_strimps_pipe",
-        "optimizer.inline();"
-        "optimizer.remap();"
-        "optimizer.aliases();"
-        "optimizer.constants();"
-        "optimizer.deadcode();"
-        "optimizer.multiplex();"
-        "optimizer.strimps();"
-        "optimizer.generator();"
-        //"optimizer.candidates();" only for decoration in explain
-        "optimizer.garbageCollector();"
-        "optimizer.profiler();",
-        "stable", NULL, 1},
-#endif  // USE_STRIMPS_OPTIMIZERS
        {"minimal_fast",
         "optimizer.minimalfast()",
         "stable", NULL, 1},
@@ -117,39 +102,6 @@ static struct PIPELINES {
         "optimizer.garbageCollector();"
         "optimizer.profiler();",
         "stable", NULL, 1},
-#ifdef USE_STRIMPS_OPTIMIZERS
-       {"strimps_pipe",
-        "optimizer.inline();"
-        "optimizer.remap();"
-        "optimizer.costModel();"
-        "optimizer.coercions();"
-        "optimizer.aliases();"
-        "optimizer.evaluate();"
-        "optimizer.emptybind();"
-        "optimizer.deadcode();" /* Feb2021 update, I pushed deadcode optimizer 
earlier in the pipeline so it runs before mitosis, thus removing less 
instructions */
-        "optimizer.pushselect();"
-        "optimizer.aliases();"
-        "optimizer.mitosis();"
-        "optimizer.mergetable();"
-        "optimizer.aliases();"
-        "optimizer.constants();"
-        "optimizer.commonTerms();"
-        "optimizer.projectionpath();"
-        "optimizer.deadcode();"
-        "optimizer.matpack();"
-        "optimizer.reorder();"
-        "optimizer.dataflow();"
-        "optimizer.querylog();"
-        "optimizer.multiplex();"
-        "optimizer.strimps();"
-        "optimizer.generator();"
-        "optimizer.candidates();"
-        "optimizer.deadcode();"
-        "optimizer.postfix();"
-        "optimizer.garbageCollector();"
-        "optimizer.profiler();",
-        "stable", NULL, 1},
-#endif  // USE_STRIMPS_OPTIMIZERS
        {"default_fast",
         "optimizer.defaultfast()",
         "stable", NULL, 1},
diff --git a/monetdb5/optimizer/opt_prelude.c b/monetdb5/optimizer/opt_prelude.c
--- a/monetdb5/optimizer/opt_prelude.c
+++ b/monetdb5/optimizer/opt_prelude.c
@@ -232,7 +232,6 @@ const char *sqlcatalogRef;
 const char *sqlRef;
 const char *stoptraceRef;
 const char *streamsRef;
-const char *strimpFilterSelectRef;
 const char *strimpsRef;
 const char *strRef;
 const char *subavgRef;
@@ -485,7 +484,6 @@ void optimizerInit(void)
        sqlRef = putName("sql");
        stoptraceRef = putName("stoptrace");
        streamsRef = putName("streams");
-       strimpFilterSelectRef = putName("strimpfilterselect");
        strimpsRef = putName("strimps");
        strRef = putName("str");
        subavgRef = putName("subavg");
diff --git a/monetdb5/optimizer/opt_prelude.h b/monetdb5/optimizer/opt_prelude.h
--- a/monetdb5/optimizer/opt_prelude.h
+++ b/monetdb5/optimizer/opt_prelude.h
@@ -231,7 +231,6 @@ mal_export  const char *sqlcatalogRef;
 mal_export  const char *sqlRef;
 mal_export  const char *stoptraceRef;
 mal_export  const char *streamsRef;
-mal_export  const char *strimpFilterSelectRef;
 mal_export  const char *strimpsRef;
 mal_export  const char *strRef;
 mal_export  const char *subavgRef;
diff --git a/monetdb5/optimizer/opt_strimps.c b/monetdb5/optimizer/opt_strimps.c
deleted file mode 100644
--- a/monetdb5/optimizer/opt_strimps.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * SPDX-License-Identifier: MPL-2.0
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0.  If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V.
- */
-
-/*
- * Selectively inject serialization operations when we know the
- * raw footprint of the query exceeds 80% of RAM.
- */
-
-#include "monetdb_config.h"
-#include "mal_instruction.h"
-#include "opt_strimps.h"
-
-// delaying the startup should not be continued throughout the plan
-// after the startup phase there should be intermediate work to do
-//A heuristic to check it
-#define MAXdelays 128
-
-str
-OPTstrimpsImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci)
-{
-       int i, limit, slimit, actions=0;
-       bool needed = false;
-       // int mvcvar = -1;
-       InstrPtr p, q, *old = mb->stmt;
-       str msg = MAL_SUCCEED;
-       int res;
-
-       (void) pci;
-       (void) cntxt;
-       (void) stk;             /* to fool compilers */
-
-       limit= mb->stop;
-
-       if ( mb->inlineProp )
-               goto bailout;
-
-       for(i=0; i < limit; i++) {
-               p = old[i];
-               if (getModuleId(p) == algebraRef &&
-                       getFunctionId(p) == likeselectRef) {
-                       needed = true;
-                       break;
-               }
-       }
-
-       if (!needed)
-               goto bailout;
-
-       if (newMalBlkStmt(mb, mb->ssize + 20) < 0)
-               throw(MAL,"optimizer.strimps", SQLSTATE(HY013) MAL_MALLOC_FAIL);
-
-       slimit = mb->stop;
-
-       for (i = 0; i < limit; i++) {
-               p = old[i];
-               if (p->token == ENDsymbol) {
-                       pushInstruction(mb,p);
-                       break;
-               }
-
-               /* Look for bind operations on strings, because for those we 
might need strimps */
-
-               if (getModuleId(p) == algebraRef &&
-                       getFunctionId(p) == likeselectRef) {
-                       q = newInstruction(mb, strimpsRef, 
strimpFilterSelectRef);
-                       if (q == NULL) {
-                               msg = createException(MAL, "optimizer.strimps", 
SQLSTATE(HY013) MAL_MALLOC_FAIL);
-                               break;
-                       }
-                       res = newTmpVariable(mb, newBatType(TYPE_oid));
-                       setDestVar(q, res);
-                       q = pushArgument(mb, q, getArg(p, 1));
-                       q = pushArgument(mb, q, getArg(p, 2));
-                       q = pushArgument(mb, q, getArg(p, 3));
-                       q = pushArgument(mb, q, getArg(p, 6));
-
-                       pushInstruction(mb, q);
-                       typeChecker(cntxt->usermodule, mb, q, mb->stop - 1, 
TRUE);
-
-                       getArg(p, 2) = res;
-                       // setArgument(mb, p, 2, res);
-
-                       actions++;
-                       /* continue; */
-               }
-               pushInstruction(mb, p);
-       }
-       for (; i < slimit; i++)
-               if (old[i])
-                       freeInstruction(old[i]);
-       GDKfree(old);
-
-       /* Defense line against incorrect plans */
-       if (msg == MAL_SUCCEED && actions){
-               msg = chkTypes(cntxt->usermodule, mb, FALSE);
-               if (!msg)
-                       msg = chkFlow(mb);
-               if (!msg)
-                       msg = chkDeclarations(mb);
-       }
-       /* keep all actions taken as a post block comment */
-bailout:
-       /* keep actions taken as a fake argument*/
-       (void) pushInt(mb, pci, actions);
-       return msg;
-}
diff --git a/monetdb5/optimizer/opt_strimps.h b/monetdb5/optimizer/opt_strimps.h
deleted file mode 100644
--- a/monetdb5/optimizer/opt_strimps.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * SPDX-License-Identifier: MPL-2.0
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0.  If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V.
- */
-
-#ifndef _OPT_STRIMPS_
-#define _OPT_STRIMPS_
-#include "opt_prelude.h"
-#include "opt_support.h"
-#include "mal_exception.h"
-
-extern str OPTstrimpsImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr p);
-
-
-#endif
diff --git a/monetdb5/optimizer/opt_wrapper.c b/monetdb5/optimizer/opt_wrapper.c
--- a/monetdb5/optimizer/opt_wrapper.c
+++ b/monetdb5/optimizer/opt_wrapper.c
@@ -52,7 +52,6 @@
 #include "opt_reorder.h"
 #include "opt_volcano.h"
 #include "opt_fastpath.h"
-#include "opt_strimps.h"
 #include "optimizer_private.h"
 
 // keep the optimizer list sorted
@@ -92,7 +91,6 @@ static struct {
        {"remap", &OPTremapImplementation,0,0},
        {"remoteQueries", &OPTremoteQueriesImplementation,0,0},
        {"reorder", &OPTreorderImplementation,0,0},
-       {"strimps", &OPTstrimpsImplementation,0,0},
        {"volcano", &OPTvolcanoImplementation,0,0},
        {0,0,0,0}
 };
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to