Ignore:
Timestamp:
Jul 28, 2017, 12:02:56 PM (2 years ago)
Author:
nmedfort
Message:

Optimization to UCD Compiler to make use of multiple assignments for Vars.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/UCD/ucd_compiler.hpp

    r5160 r5581  
    1717    class PabloBuilder;
    1818    class PabloAST;
     19    class Var;
    1920}
    2021
     
    3031    using codepoint_t = re::codepoint_t;
    3132    using RangeList = std::vector<re::interval_t>;
    32     using TargetMap = boost::container::flat_map<const UnicodeSet *, PabloAST *>;
    33     using Target = std::pair<const UnicodeSet *, PabloAST *>;
    34     using TargetVector = std::vector<Target>;
     33
     34    using TargetMap = boost::container::flat_map<const UnicodeSet *, pablo::Var *>;
     35    using ValueMap = boost::container::flat_map<const UnicodeSet *, PabloAST *>;
     36    using Values = std::vector<std::pair<ValueMap::key_type, ValueMap::mapped_type>>;
    3537
    3638    static const RangeList defaultIfHierachy;
     
    4648
    4749    void generateWithoutIfHierarchy(NameMap & names, PabloBuilder & entry);
    48 
    49     PabloAST * generateWithDefaultIfHierarchy(const UnicodeSet * set, PabloBuilder & entry);
    50 
    51     PabloAST * generateWithoutIfHierarchy(const UnicodeSet * set, PabloBuilder & entry);
    5250
    5351protected:
     
    8078    static RangeList innerRanges(const RangeList & list);
    8179
    82     void addTargets(PabloBuilder & entry, const NameMap & names);
    83 
    84     void updateNames(NameMap & names, PabloBuilder & entry);
     80    void makeTargets(PabloBuilder & entry, NameMap & names);
    8581
    8682private:
    8783    cc::CC_Compiler &       mCharacterClassCompiler;
    8884    PabloAST *              mSuffixVar;
    89     TargetMap               mTargetMap;
     85    TargetMap               mTarget;
     86    ValueMap                mTargetValue;
    9087};
    9188
Note: See TracChangeset for help on using the changeset viewer.