Ignore:
Timestamp:
Oct 18, 2014, 4:05:41 PM (5 years ago)
Author:
cameron
Message:

All -> Zeroes, Ones

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/pabloAST.cpp

    r4244 r4247  
    77#include "pabloAST.h"
    88#include "pe_advance.h"
    9 #include "pe_all.h"
    109#include "pe_and.h"
    1110#include "pe_call.h"
     
    1918#include "pe_var.h"
    2019#include "pe_xor.h"
     20#include "pe_zeroes.h"
     21#include "pe_ones.h"
    2122
    2223namespace pablo {
     
    3233bool equals(const PabloAST * expr1, const PabloAST * expr2) {
    3334    if (expr1->getClassTypeId() == expr2->getClassTypeId()) {
    34         if (const All * all1 = dyn_cast<const All>(expr1)) {
    35             if (const All * all2 = cast<const All>(expr2)) {
    36                 return all1->getValue() == all2->getValue();
    37             }
     35        if ((isa<const Zeroes>(expr1)) || (isa<const Ones>(expr1))) {
     36            return true;
    3837        }
    3938        else if (const Var * var1 = dyn_cast<const Var>(expr1)) {
Note: See TracChangeset for help on using the changeset viewer.