Преглед изворни кода

HPCC-8562 Remove some redundant #options
Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>

Gavin Halliday пре 12 година
родитељ
комит
7a238d9017

+ 1 - 6
ecl/hqlcpp/hqlcpp.cpp

@@ -1508,7 +1508,6 @@ void HqlCppTranslator::cacheOptions()
         DebugOption(options.peephole,"peephole", true),
         DebugOption(options.foldConstantCast,"foldConstantCast", true),
         DebugOption(options.optimizeBoolReturn,"optimizeBoolReturn", true),
-        DebugOption(options.checkRowOverflow,"checkRowOverflow", true),
         DebugOption(options.freezePersists,"freezePersists", false),
         DebugOption(options.maxRecordSize, "defaultMaxLengthRecord", MAX_RECORD_SIZE),
 
@@ -1532,7 +1531,6 @@ void HqlCppTranslator::cacheOptions()
         DebugOption(options.commonUpChildGraphs,"commonUpChildGraphs", true),
         DebugOption(options.detectAmbiguousSelector,"detectAmbiguousSelector", false),
         DebugOption(options.allowAmbiguousSelector,"allowAmbiguousSelector", false),
-        DebugOption(options.preserveUniqueSelector,"preserveUniqueSelector", true),
 #ifdef _DEBUG
         DebugOption(options.regressionTest,"regressionTest", true),
 #else
@@ -1557,7 +1555,7 @@ void HqlCppTranslator::cacheOptions()
         DebugOption(options.warnOnImplicitReadLimit,"warnOnImplicitReadLimit", targetRoxie()),
 
         DebugOption(options.convertJoinToLookup,"convertJoinToLookup", true),
-        DebugOption(options.convertJoinToLookupIfSorted,"convertJoinToLookupIfSorted", false),      // should change to false once tested
+        DebugOption(options.convertJoinToLookupIfSorted,"convertJoinToLookupIfSorted", false),
         DebugOption(options.spotCSE,"spotCSE", true),
         DebugOption(options.optimizeNonEmpty,"optimizeNonEmpty", !targetThor()),                // not sure that it will be conditional resourced correctly for thor
         DebugOption(options.allowVariableRoxieFilenames,"allowVariableRoxieFilenames", false),
@@ -1576,7 +1574,6 @@ void HqlCppTranslator::cacheOptions()
         DebugOption(options.canGenerateSimpleAction,"canGenerateSimpleAction", true),
         DebugOption(options.minimizeActivityClasses,"minimizeActivityClasses", true),
         DebugOption(options.maxRootMaybeThorActions, "maxRootMaybeThorActions", 0),
-        DebugOption(options.includeHelperInGraph,"includeHelperInGraph", false),
         DebugOption(options.minimizeSkewBeforeSpill,"minimizeSkewBeforeSpill", false),
         DebugOption(options.createSerializeForUnknownSize,"createSerializeForUnknownSize", false),
         DebugOption(options.implicitLinkedChildRows,"implicitLinkedChildRows", false),
@@ -1669,7 +1666,6 @@ void HqlCppTranslator::cacheOptions()
         DebugOption(options.addLibraryInputsToGraph,"addLibraryInputsToGraph", false),
         DebugOption(options.showRecordCountInGraph,"showRecordCountInGraph", true),
         DebugOption(options.serializeRowsetInExtract,"serializeRowsetInExtract", false),
-        DebugOption(options.optimizeInSegmentMonitor,"optimizeInSegmentMonitor", true),
         DebugOption(options.testIgnoreMaxLength,"testIgnoreMaxLength", false),
         DebugOption(options.trackDuplicateActivities,"trackDuplicateActivities", false),
         DebugOption(options.showActivitySizeInGraph,"showActivitySizeInGraph", false),
@@ -1700,7 +1696,6 @@ void HqlCppTranslator::cacheOptions()
         DebugOption(options.projectNestedTables,"projectNestedTables",true),
         DebugOption(options.showSeqInGraph,"showSeqInGraph",false),  // For tracking down why projects are not commoned up
         DebugOption(options.normalizeSelectorSequence,"normalizeSelectorSequence",false),  // For tracking down why projects are not commoned up
-        DebugOption(options.transformCaseToChoose,"transformCaseToChoose",true),
         DebugOption(options.removeXpathFromOutput,"removeXpathFromOutput",false),
         DebugOption(options.canLinkConstantRows,"canLinkConstantRows",true),
     };

+ 0 - 6
ecl/hqlcpp/hqlcpp.ipp

@@ -558,7 +558,6 @@ struct HqlCppOptions
     bool                peephole;
     bool                foldConstantCast;
     bool                optimizeBoolReturn;
-    bool                checkRowOverflow;
     bool                freezePersists;
     bool                checkRoxieRestrictions;
     bool                checkThorRestrictions;
@@ -610,7 +609,6 @@ struct HqlCppOptions
     bool                preventSteppedSplit;
     bool                canGenerateSimpleAction;
     bool                minimizeActivityClasses;
-    bool                includeHelperInGraph;
     bool                minimizeSkewBeforeSpill;
     bool                createSerializeForUnknownSize;
     bool                implicitLinkedChildRows;
@@ -652,7 +650,6 @@ struct HqlCppOptions
     bool                combineTrivialStored;
     bool                combineAllStored;
     bool                allowStoredDuplicate;
-    bool                preserveUniqueSelector;
     bool                allowScopeMigrate;
     bool                supportFilterProject;
     bool                normalizeExplicitCasts;
@@ -685,7 +682,6 @@ struct HqlCppOptions
     bool                addLibraryInputsToGraph;
     bool                showRecordCountInGraph;
     bool                serializeRowsetInExtract;
-    bool                optimizeInSegmentMonitor;
     bool                testIgnoreMaxLength;
     bool                trackDuplicateActivities;               // for diagnosing problems with code becoming duplicated
     bool                showActivitySizeInGraph;
@@ -714,7 +710,6 @@ struct HqlCppOptions
     bool                projectNestedTables;
     bool                showSeqInGraph;
     bool                normalizeSelectorSequence;
-    bool                transformCaseToChoose;
     bool                removeXpathFromOutput;
     bool                canLinkConstantRows;
 };
@@ -909,7 +904,6 @@ public:
     void generateStatistics(const char * targetDir, const char * varient);
 
             unsigned getHints()                             { return hints; }
-    inline  bool checkForRowOverflow() const                { return options.checkRowOverflow; }
     inline bool queryEvaluateCoLocalRowInvariantInExtract() const { return options.evaluateCoLocalRowInvariantInExtract; }
     inline byte notifyOptimizedProjectsLevel()              { return options.notifyOptimizedProjects; }
     inline bool generateAsserts() const                     { return options.checkAsserts; }

+ 0 - 3
ecl/hqlcpp/hqlhtcpp.cpp

@@ -2155,9 +2155,6 @@ void ActivityInstance::createGraphNode(IPropertyTree * defaultSubGraph, bool alw
     if (strcmp(graphEclText.str(), "<>") != 0)
         addAttribute("ecl", graphEclText.str());
 
-    if (translator.queryOptions().includeHelperInGraph)
-        addAttribute("helper", factoryName);
-
     if (translator.queryOptions().showSeqInGraph)
     {
         IHqlExpression * selSeq = querySelSeq(dataset);

+ 7 - 10
ecl/hqlcpp/hqlsource.cpp

@@ -3903,17 +3903,14 @@ void MonitorExtractor::expandSelects(IHqlExpression * expr, IHqlSimpleScope * ex
 
 void MonitorExtractor::buildKeySegmentInExpr(BuildMonitorState & buildState, KeySelectorInfo & selectorInfo, BuildCtx & ctx, const char * target, IHqlExpression & thisKey, MonitorFilterKind filterKind)
 {
-    if (translator.queryOptions().optimizeInSegmentMonitor)
+    //Generally this slightly increases the code size, but reduces the number of
+    //temporary sets which is generally more efficient.
+    OwnedHqlExpr simplified = querySimplifyInExpr(&thisKey);
+    if (simplified)
     {
-        //Generally this slightly increases the code size, but reduces the number of
-        //temporary sets which is generally more efficient.
-        OwnedHqlExpr simplified = querySimplifyInExpr(&thisKey);
-        if (simplified)
-        {
-            OwnedHqlExpr folded = foldHqlExpression(simplified);
-            buildKeySegmentExpr(buildState, selectorInfo, ctx, target, *folded, filterKind);
-            return;
-        }
+        OwnedHqlExpr folded = foldHqlExpression(simplified);
+        buildKeySegmentExpr(buildState, selectorInfo, ctx, target, *folded, filterKind);
+        return;
     }
 
     IHqlExpression * expandedSelector = selectorInfo.expandedSelector;

+ 0 - 3
ecl/hqlcpp/hqltcppc.cpp

@@ -577,9 +577,6 @@ void CMemberInfo::gatherMaxRowSize(SizeStruct & totalSize, IHqlExpression * newS
 
 void CMemberInfo::checkAssignOk(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * newSize, unsigned fixedExtra)
 {
-    if (!translator.checkForRowOverflow())
-        return;
-
     //If no size beyond the constant value then this can't be increasing the size of the row => no need to check
     if (matchesConstantValue(newSize, 0))
         return;

+ 1 - 7
ecl/hqlcpp/hqlttcpp.cpp

@@ -10126,7 +10126,6 @@ HqlTreeNormalizer::HqlTreeNormalizer(HqlCppTranslator & _translator) : NewHqlTra
     const HqlCppOptions & translatorOptions = translator.queryOptions();
     options.removeAsserts = !translatorOptions.checkAsserts;
     options.commonUniqueNameAttributes = translatorOptions.commonUniqueNameAttributes;
-    options.simplifySelectorSequence = !translatorOptions.preserveUniqueSelector && !translatorOptions.detectAmbiguousSelector && !translatorOptions.allowAmbiguousSelector;
     options.sortIndexPayload = translatorOptions.sortIndexPayload;
     options.allowSections = translatorOptions.allowSections;
     options.normalizeExplicitCasts = translatorOptions.normalizeExplicitCasts;
@@ -10135,7 +10134,6 @@ HqlTreeNormalizer::HqlTreeNormalizer(HqlCppTranslator & _translator) : NewHqlTra
     options.constantFoldNormalize = translatorOptions.constantFoldNormalize;
     options.allowActivityForKeyedJoin = translatorOptions.allowActivityForKeyedJoin;
     options.implicitShuffle = translatorOptions.implicitBuildIndexShuffle;
-    options.transformCaseToChoose = translatorOptions.transformCaseToChoose;
     errors = translator.queryErrors();
     nextSequenceValue = 1;
 }
@@ -10485,7 +10483,7 @@ IHqlExpression * HqlTreeNormalizer::transformCaseToChoose(IHqlExpression * expr)
     //For the moment only convert datasets to choose format.  (Partly to test implementation.)
     //Datarows are unlikely to benefit, and will cause additional work.
     //Converting actions has implications for needing new activity kinds, and support in thor.
-    if (!expr->isDataset() || !options.transformCaseToChoose)
+    if (!expr->isDataset())
         return transformCaseToIfs(expr);
 
     unsigned max = numRealChildren(expr);
@@ -11904,10 +11902,6 @@ IHqlExpression * HqlTreeNormalizer::createTransformedBody(IHqlExpression * expr)
 #ifdef USE_SELSEQ_UID
             if (name == _selectorSequence_Atom)
             {
-                //Purely for testing what effect adding the unique sequences has on the parse time
-                if (options.simplifySelectorSequence)
-                    return createDummySelectorSequence();
-
                 //Ensure parameterised sequences generate a unique sequence number...
                 //Not sure the following is really necessary, but will reduce in memory tree size....
                 //also saves complications from having weird attributes in the tree

+ 0 - 2
ecl/hqlcpp/hqlttcpp.ipp

@@ -1187,7 +1187,6 @@ protected:
     {
         bool removeAsserts;
         bool commonUniqueNameAttributes;
-        bool simplifySelectorSequence;
         bool sortIndexPayload;
         bool allowSections;
         bool normalizeExplicitCasts;
@@ -1196,7 +1195,6 @@ protected:
         bool constantFoldNormalize;
         bool allowActivityForKeyedJoin;
         bool implicitShuffle;
-        bool transformCaseToChoose;
     } options;
     unsigned nextSequenceValue;
     bool seenForceLocal;