[llvm-commits] [llvm] r82822 - in /llvm/trunk: include/llvm/CodeGen/MachineMemOperand.h lib/CodeGen/MachineInstr.cpp

Dan Gohman gohman at apple.com
Fri Sep 25 16:33:21 PDT 2009


Author: djg
Date: Fri Sep 25 18:33:20 2009
New Revision: 82822

URL: http://llvm.org/viewvc/llvm-project?rev=82822&view=rev
Log:
Move MachineMemOperand::getAlignment out of line, to avoid needing
MathExtras.h in MachineMemOperand.h.

Modified:
    llvm/trunk/include/llvm/CodeGen/MachineMemOperand.h
    llvm/trunk/lib/CodeGen/MachineInstr.cpp

Modified: llvm/trunk/include/llvm/CodeGen/MachineMemOperand.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineMemOperand.h?rev=82822&r1=82821&r2=82822&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineMemOperand.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineMemOperand.h Fri Sep 25 18:33:20 2009
@@ -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 @@
 
   /// 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.

Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=82822&r1=82821&r2=82822&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Fri Sep 25 18:33:20 2009
@@ -315,6 +315,12 @@
   }
 }
 
+/// 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.");





More information about the llvm-commits mailing list