Move MachineMemOperand::getAlignment out of line, to avoid needing
authorDan Gohman <gohman@apple.com>
Fri, 25 Sep 2009 23:33:20 +0000 (23:33 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 25 Sep 2009 23:33:20 +0000 (23:33 +0000)
MathExtras.h in MachineMemOperand.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82822 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineMemOperand.h
lib/CodeGen/MachineInstr.cpp

index dd70b81dd5451cd5b4ac643007ea7a55b1dfe873..b7e267dd13337d3428edb4236942b1e1beea51bc 100644 (file)
@@ -16,8 +16,6 @@
 #ifndef LLVM_CODEGEN_MACHINEMEMOPERAND_H
 #define LLVM_CODEGEN_MACHINEMEMOPERAND_H
 
-#include "llvm/Support/MathExtras.h"
-
 namespace llvm {
 
 class Value;
@@ -76,9 +74,7 @@ public:
 
   /// getAlignment - Return the minimum known alignment in bytes of the
   /// actual memory reference.
-  uint64_t getAlignment() const {
-    return MinAlign(getBaseAlignment(), getOffset());
-  }
+  uint64_t getAlignment() const;
 
   /// getBaseAlignment - Return the minimum known alignment in bytes of the
   /// base address, without the offset.
index 2d06aa4799950a8c4145578e59d1c9351d597fb7..ae6f3f5d5f6b9513de2ee284c9b33c72e38c5ab6 100644 (file)
@@ -315,6 +315,12 @@ void MachineMemOperand::refineAlignment(const MachineMemOperand *MMO) {
   }
 }
 
+/// getAlignment - Return the minimum known alignment in bytes of the
+/// actual memory reference.
+uint64_t MachineMemOperand::getAlignment() const {
+  return MinAlign(getBaseAlignment(), getOffset());
+}
+
 raw_ostream &llvm::operator<<(raw_ostream &OS, const MachineMemOperand &MMO) {
   assert((MMO.isLoad() || MMO.isStore()) &&
          "SV has to be a load, store or both.");