Ignore:
Timestamp:
Jan 27, 2017, 2:22:06 PM (2 years ago)
Author:
nmedfort
Message:

Optimized Symbol Generation (and fixed potential bug that could allow duplicate names being constructed); made PabloKernel? extend PabloAST (temporarily removed PabloAST::getName() to avoid diamond problem); added an internal scalar to PabloKernel? struct for each Count to avoid InOut? output scalar variable problem; allowed CodeMotionPass? to move code within the same scope but across a branch statement. Began work on separating Kernels into either Block-Oriented or Segment-Oriented kernels.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/cc/cc_compiler.cpp

    r5267 r5283  
    3434PabloAST * CC_Compiler::compileCC(const std::string & canonicalName, const CC *cc, PabloBlock & block) {
    3535    PabloAST * const var = charset_expr(cc, block);
    36     var->setName(block.makeName(canonicalName));
     36    if (LLVM_LIKELY(isa<Statement>(var))) {
     37        cast<Statement>(var)->setName(block.makeName(canonicalName));
     38    }
    3739    return var;
    3840}
     
    4042PabloAST * CC_Compiler::compileCC(const std::string & canonicalName, const CC *cc, PabloBuilder & builder) {
    4143    PabloAST * const var = charset_expr(cc, builder);
    42     var->setName(builder.makeName(canonicalName));
     44    if (LLVM_LIKELY(isa<Statement>(var))) {
     45        cast<Statement>(var)->setName(builder.makeName(canonicalName));
     46    }
    4347    return var;
    4448}
Note: See TracChangeset for help on using the changeset viewer.