Add DebugLoc-aware constructors for SDNode derived
[oota-llvm.git] / include / llvm / CodeGen / MachineMemOperand.h
index 5ab27e91a2f118e3f32b9835045e23abf06062fd..4388c0aab2243aad6c028dcffd3ecf4b34605a3b 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_CODEGEN_MEMOPERAND_H
-#define LLVM_CODEGEN_MEMOPERAND_H
-
-#include "llvm/Support/MathExtras.h"
+#ifndef LLVM_CODEGEN_MACHINEMEMOPERAND_H
+#define LLVM_CODEGEN_MACHINEMEMOPERAND_H
 
 namespace llvm {
 
 class Value;
+class FoldingSetNodeID;
 
 //===----------------------------------------------------------------------===//
 /// MachineMemOperand - A description of a memory reference used in the backend.
@@ -50,8 +49,7 @@ public:
   /// MachineMemOperand - Construct an MachineMemOperand object with the
   /// specified address Value, flags, offset, size, and alignment.
   MachineMemOperand(const Value *v, unsigned int f, int64_t o, uint64_t s,
-                    unsigned int a)
-    : Offset(o), Size(s), V(v), Flags((f & 7) | ((Log2_32(a) + 1) << 3)) {}
+                    unsigned int a);
 
   /// getValue - Return the base address of the memory access.
   /// Special values are PseudoSourceValue::FPRel, PseudoSourceValue::SPRel,
@@ -77,6 +75,10 @@ public:
   bool isLoad() const { return Flags & MOLoad; }
   bool isStore() const { return Flags & MOStore; }
   bool isVolatile() const { return Flags & MOVolatile; }
+
+  /// Profile - Gather unique data for the object.
+  ///
+  void Profile(FoldingSetNodeID &ID) const;
 };
 
 } // End llvm namespace