summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit2da2bedc72614dde92d9a3deeebe83fe2e8f9893 (patch)
tree929f6176a1dec0f59fba0dbabbca0a5948a12b71 /llvm/lib/CodeGen/MachineInstr.cpp
parent3ad7e96f8acf3ad55f1b8ca51052e5f84bfb623d (diff)
downloadbcm5719-llvm-2da2bedc72614dde92d9a3deeebe83fe2e8f9893.tar.gz
bcm5719-llvm-2da2bedc72614dde92d9a3deeebe83fe2e8f9893.zip
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. llvm-svn: 55058
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index ccd53fa4c4e..00987d76fcd 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/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
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud