[AArch64] Implement the isLegalAddressingMode and getScalingFactorCost APIs.
[oota-llvm.git] / lib / Target / AArch64 / AArch64ISelLowering.h
index 5932e1d1fe53853e92674e6c8ef746764f10d5da..f83c1ab0052e63b69187acb12e423535d60a55a6 100644 (file)
@@ -278,6 +278,17 @@ public:
 
   bool isLegalICmpImmediate(int64_t Val) const;
 
+  /// \brief Return true if the addressing mode represented by AM is legal for
+  /// this target, for a load/store of the specified type.
+  bool isLegalAddressingMode(const AddrMode &AM, Type *Ty) const override;
+
+  /// \brief Return the cost of the scaling factor used in the addressing
+  /// mode represented by AM for this target, for a load/store
+  /// of the specified type.
+  /// If the AM is supported, the return value must be >= 0.
+  /// If the AM is not supported, it returns a negative value.
+  int getScalingFactorCost(const AddrMode &AM, Type *Ty) const override;
+
   bool isTruncateFree(Type *Ty1, Type *Ty2) const override;
   bool isTruncateFree(EVT VT1, EVT VT2) const override;