Ignore:
Timestamp:
Oct 31, 2015, 12:20:31 PM (3 years ago)
Author:
nmedfort
Message:

Bug fix for use-def correctness regarding escaping values of If and While nodes.

File:
1 edited

Legend:

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

    r4841 r4856  
    2121class PabloBlock;
    2222class String;
     23class Statement;
    2324
    2425class PabloAST {
     
    162163    friend class Simplifier;
    163164    friend class PabloBlock;
     165    template <class ValueType, class ValueList>
     166    friend void checkForReplacementInEscapedValueList(const Statement *, const PabloAST * const, PabloAST * const, ValueList &);
    164167public:
    165168    static inline bool classof(const PabloAST * e) {
     
    185188    }
    186189
    187     inline void replaceUsesOfWith(const PabloAST * const from, PabloAST * const to) {
    188         for (unsigned i = 0; i != getNumOperands(); ++i) {
    189             if (getOperand(i) == from) {
    190                 setOperand(i, to);
    191             }
    192         }
    193     }
     190    void replaceUsesOfWith(PabloAST * const from, PabloAST * const to);
    194191
    195192    inline PabloAST * getOperand(const unsigned index) const {
     
    243240        }
    244241    } 
    245 #ifndef NDEBUG
    246     bool noRecursiveOperand(const PabloAST * const operand);
    247 #endif
     242private:
     243    template <class ValueType, class ValueList>
     244    void checkForReplacementInEscapedValueList(Statement * branch, PabloAST * const from, PabloAST * const to, ValueList & list);
    248245protected:   
    249246    const String *              mName;
Note: See TracChangeset for help on using the changeset viewer.