Changeset 4235 for icGREP


Ignore:
Timestamp:
Oct 14, 2014, 1:33:47 PM (5 years ago)
Author:
nmedfort
Message:

Bug fix for While loop generation.

Location:
icGREP/icgrep-devel/icgrep
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/llvm_gen.cpp

    r4234 r4235  
    77#include "llvm_gen.h"
    88#include <pablo/codegenstate.h>
     9#include <pablo/printer_pablos.h>
    910#include <stdexcept>
    1011
     
    525526    {
    526527        IRBuilder<> b(mBasicBlock);
    527 
    528528        Value * marker = GetMarker(assign->getName());
    529 
    530         b.CreateStore(compileExpression(assign->getExpr()), marker);
    531 
     529        Value * expr = compileExpression(assign->getExpr());
     530        b.CreateStore(expr, marker);
    532531        retVal = marker;
    533532    }
  • icGREP/icgrep-devel/icgrep/re/re_compiler.cpp

    r4234 r4235  
    200200    else {
    201201
    202         Assign * while_test = cg.createAssign(cg.ssa("while_test"), target);
    203         Assign * while_accum = cg.createAssign(cg.ssa("while_accum"), target);
     202        Var * targetVar = cg.createVar(target);
     203
     204        Assign * while_test = cg.createAssign(cg.ssa("while_test"), targetVar);
     205        Assign * while_accum = cg.createAssign(cg.ssa("while_accum"), targetVar);
    204206
    205207        PabloBlock wt(cg);
Note: See TracChangeset for help on using the changeset viewer.