aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-08-20 15:58:01 +0000
committerDan Gohman <gohman@apple.com>2008-08-20 15:58:01 +0000
commit98beebe566fa5b99ec93de1296613776cec31143 (patch)
treed81844ff03c7e1c712621cd6d9b46d7fbb013767 /lib/CodeGen/MachineInstr.cpp
parent41a458d9599fcfaa123e2d3a7cf2f6e9d09d1efb (diff)
downloadexternal_llvm-98beebe566fa5b99ec93de1296613776cec31143.zip
external_llvm-98beebe566fa5b99ec93de1296613776cec31143.tar.gz
external_llvm-98beebe566fa5b99ec93de1296613776cec31143.tar.bz2
Change the FoldingSetNodeID usage for objects which carry
alignment and volatility information, such as loads and stores, to reduce the number of integer values added to the FoldingSetNodeID. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55058 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r--lib/CodeGen/MachineInstr.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index ccd53fa..00987d7 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -24,6 +24,7 @@
#include "llvm/Support/LeakDetector.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/Streams.h"
+#include "llvm/ADT/FoldingSet.h"
#include <ostream>
using namespace llvm;
@@ -250,6 +251,15 @@ MachineMemOperand::MachineMemOperand(const Value *v, unsigned int f,
assert((isLoad() || isStore()) && "Not a load/store!");
}
+/// Profile - Gather unique data for the object.
+///
+void MachineMemOperand::Profile(FoldingSetNodeID &ID) const {
+ ID.AddInteger(Offset);
+ ID.AddInteger(Size);
+ ID.AddPointer(V);
+ ID.AddInteger(Flags);
+}
+
//===----------------------------------------------------------------------===//
// MachineInstr Implementation
//===----------------------------------------------------------------------===//