Ignore:
Timestamp:
Sep 23, 2016, 4:12:41 PM (3 years ago)
Author:
nmedfort
Message:

Initial work for incorporating Types into Pablo AST.

File:
1 edited

Legend:

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

    r5156 r5160  
    485485 ** ------------------------------------------------------------------------------------------------------------- */
    486486void UCDCompiler::generateWithDefaultIfHierarchy(NameMap & names, PabloBuilder & entry) {
    487     addTargets(names);
     487    addTargets(entry, names);
    488488    generateRange(defaultIfHierachy, entry);
    489489    updateNames(names, entry);
     
    495495PabloAST * UCDCompiler::generateWithDefaultIfHierarchy(const UnicodeSet * set, PabloBuilder & entry) {
    496496    // mTargetMap.insert(std::make_pair<const UnicodeSet *, PabloAST *>(set, PabloBlock::createZeroes()));
    497     mTargetMap.emplace(set, PabloBlock::createZeroes());
     497    mTargetMap.emplace(set, entry.createZeroes());
    498498    generateRange(defaultIfHierachy, entry);
    499499    return mTargetMap.begin()->second;
     
    504504 ** ------------------------------------------------------------------------------------------------------------- */
    505505void UCDCompiler::generateWithoutIfHierarchy(NameMap & names, PabloBuilder & entry) {
    506     addTargets(names);
     506    addTargets(entry, names);
    507507    generateRange(noIfHierachy, entry);
    508508    updateNames(names, entry);
     
    513513 ** ------------------------------------------------------------------------------------------------------------- */
    514514PabloAST * UCDCompiler::generateWithoutIfHierarchy(const UnicodeSet * set, PabloBuilder & entry) {
    515     mTargetMap.emplace(set, PabloBlock::createZeroes());
     515    mTargetMap.emplace(set, entry.createZeroes());
    516516    generateRange(noIfHierachy, entry);
    517517    return mTargetMap.begin()->second;
     
    521521 * @brief addTargets
    522522 ** ------------------------------------------------------------------------------------------------------------- */
    523 inline void UCDCompiler::addTargets(const NameMap & names) {
     523inline void UCDCompiler::addTargets(PabloBuilder & entry, const NameMap & names) {
    524524    for (const auto t : names) {
    525525        if (LLVM_LIKELY(isa<CC>(t.first->getDefinition()))) {
    526             mTargetMap.emplace(cast<CC>(t.first->getDefinition()), t.second ? t.second : PabloBlock::createZeroes());
     526            mTargetMap.emplace(cast<CC>(t.first->getDefinition()), t.second ? t.second : entry.createZeroes());
    527527        } else {
    528528            throw std::runtime_error(t.first->getName() + " is not defined by a CC!");
Note: See TracChangeset for help on using the changeset viewer.