X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FInstruction.h;h=c85eda28f42ed70b705553bae05cab6997e1b309;hb=3a129c85920404e7ccdb7e655c89fa60a0309cfd;hp=a386d1de42f5a0b1e478585e32a2d7f171ad57a1;hpb=c038a7833565ecf92a699371d448135a097c9e2f;p=oota-llvm.git diff --git a/include/llvm/Instruction.h b/include/llvm/Instruction.h index a386d1de42f..c85eda28f42 100644 --- a/include/llvm/Instruction.h +++ b/include/llvm/Instruction.h @@ -28,8 +28,8 @@ template class SymbolTableListTraits; class Instruction : public User, public ilist_node { - void operator=(const Instruction &); // Do not implement - Instruction(const Instruction &); // Do not implement + void operator=(const Instruction &) LLVM_DELETED_FUNCTION; + Instruction(const Instruction &) LLVM_DELETED_FUNCTION; BasicBlock *Parent; DebugLoc DbgLoc; // 'dbg' Metadata cache. @@ -281,6 +281,16 @@ public: /// ignores the SubclassOptionalData flags, which specify conditions /// under which the instruction's result is undefined. bool isIdenticalToWhenDefined(const Instruction *I) const; + + /// When checking for operation equivalence (using isSameOperationAs) it is + /// sometimes useful to ignore certain attributes. + enum OperationEquivalenceFlags { + /// Check for equivalence ignoring load/store alignment. + CompareIgnoringAlignment = 1<<0, + /// Check for equivalence treating a type and a vector of that type + /// as equivalent. + CompareUsingScalarTypes = 1<<1 + }; /// This function determines if the specified instruction executes the same /// operation as the current one. This means that the opcodes, type, operand @@ -290,7 +300,7 @@ public: /// @returns true if the specified instruction is the same operation as /// the current one. /// @brief Determine if one instruction is the same operation as another. - bool isSameOperationAs(const Instruction *I) const; + bool isSameOperationAs(const Instruction *I, unsigned flags = 0) const; /// isUsedOutsideOfBlock - Return true if there are any uses of this /// instruction in blocks other than the specified block. Note that PHI nodes