Changeset: aeecf7ae27ad for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=aeecf7ae27ad Modified Files: monetdb5/optimizer/opt_weld.c Branch: mal-weld Log Message:
opt_weld findWeldCycle fast exit diffs (24 lines): diff --git a/monetdb5/optimizer/opt_weld.c b/monetdb5/optimizer/opt_weld.c --- a/monetdb5/optimizer/opt_weld.c +++ b/monetdb5/optimizer/opt_weld.c @@ -186,16 +186,17 @@ static void changeSubGraphID(InstrDep ** static int findWeldCycle(InstrDep *instrDep, int sourceID) { if (instrDep == NULL) return 0; - int i, result = 0; + int i; for (i = 0; i < instrDep->numInputs; i++) { InstrDep *input = instrDep->inputs[i]; if (input->subGraphID == sourceID) { return 1; } else { - result |= findWeldCycle(input, sourceID); + if (findWeldCycle(input, sourceID)) + return 1; } } - return result; + return 0; } static void topoSort(InstrDep *instrDep, int subGraphID, InstrDep **result, int *resultIdx) { _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list