aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/llvm/CodeGen/MachineMemOperand.h6
-rw-r--r--lib/CodeGen/MachineInstr.cpp6
2 files changed, 7 insertions, 5 deletions
diff --git a/include/llvm/CodeGen/MachineMemOperand.h b/include/llvm/CodeGen/MachineMemOperand.h
index dd70b81..b7e267d 100644
--- a/include/llvm/CodeGen/MachineMemOperand.h
+++ b/include/llvm/CodeGen/MachineMemOperand.h
@@ -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.
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index 2d06aa4..ae6f3f5 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -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.");