aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Transforms/Utils/AddrModeMatcher.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Transforms/Utils/AddrModeMatcher.h')
-rw-r--r--include/llvm/Transforms/Utils/AddrModeMatcher.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Utils/AddrModeMatcher.h b/include/llvm/Transforms/Utils/AddrModeMatcher.h
index be601e2..61d2c01 100644
--- a/include/llvm/Transforms/Utils/AddrModeMatcher.h
+++ b/include/llvm/Transforms/Utils/AddrModeMatcher.h
@@ -39,6 +39,12 @@ struct ExtAddrMode : public TargetLowering::AddrMode {
ExtAddrMode() : BaseReg(0), ScaledReg(0) {}
void print(raw_ostream &OS) const;
void dump() const;
+
+ bool operator==(const ExtAddrMode& O) const {
+ return (BaseReg == O.BaseReg) && (ScaledReg == O.ScaledReg) &&
+ (BaseGV == O.BaseGV) && (BaseOffs == O.BaseOffs) &&
+ (HasBaseReg == O.HasBaseReg) && (Scale == O.Scale);
+ }
};
static inline raw_ostream &operator<<(raw_ostream &OS, const ExtAddrMode &AM) {