Ignore:
Timestamp:
Jan 27, 2017, 2:22:06 PM (3 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/pablo/branch.cpp

    r5267 r5283  
    33#include <pablo/pe_var.h>
    44#include <pablo/ps_assign.h>
     5#include <pablo/pablo_kernel.h>
     6
     7#include <llvm/Support/raw_ostream.h>
    58
    69using namespace llvm;
     
    2023    bool inside = false;
    2124    bool outside = false;
     25
    2226    for (const PabloAST * user : var->users()) {
    23         if (isa<Assign>(user)) {           
     27
     28        if (isa<Assign>(user)) {
    2429
    2530            const PabloBlock * const scope = cast<Assign>(user)->getParent();
    26 
    2731            // Is this Var assigned a value within the body of this branch?
    2832            for (const PabloBlock * test = scope; test; test = test->getPredecessor()) {
     
    6771                test = check->getParent();
    6872            }
     73        } else if (isa<PabloKernel>(user)) {
     74            if (inside) {
     75                return true;
     76            }
     77            outside = true;
    6978        }
    7079outer_loop: continue;
Note: See TracChangeset for help on using the changeset viewer.