aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineInstr.h
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2001-10-28 21:24:50 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2001-10-28 21:24:50 +0000
commitdd52255e9a26fbc9b7e0cd22a2dd99b0b6bae991 (patch)
treefbf90fe39b64b9cfb15a6794ba1e053d10861208 /include/llvm/CodeGen/MachineInstr.h
parent4321ded265a20cb62fa5a99918dfc7d227094b8e (diff)
Added a constant pool to record values that need to be emitted
in the assembly code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@999 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r--include/llvm/CodeGen/MachineInstr.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index eea3f03312..83798aed22 100644
--- a/include/llvm/CodeGen/MachineInstr.h
+++ b/include/llvm/CodeGen/MachineInstr.h
@@ -20,6 +20,8 @@
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/NonCopyable.h"
#include "llvm/Target/MachineInstrInfo.h"
+#include "hash_map"
+#include "hash_set"
template<class _MI, class _V> class ValOpIterator;
@@ -110,7 +112,7 @@ public:
return (unsigned) regNum;
}
inline int64_t getImmedValue () const {
- assert(opType >= MO_SignExtendedImmed || opType <= MO_PCRelativeDisp);
+ assert(opType == MO_SignExtendedImmed || opType == MO_UnextendedImmed);
return immedVal;
}
inline bool opIsDef () const {
@@ -512,6 +514,7 @@ private:
unsigned automaticVarsSize;
unsigned regSpillsSize;
unsigned optionalOutgoingArgsSize;
+ hash_set<const ConstPoolVal*> constantsForConstPool;
hash_map<const Value*, int> offsetsFromFP;
hash_map<const Value*, int> offsetsFromSP;
@@ -529,7 +532,12 @@ public:
inline unsigned getAutomaticVarsSize() const { return automaticVarsSize; }
inline unsigned getRegSpillsSize() const { return regSpillsSize; }
inline unsigned getOptionalOutgoingArgsSize() const
- { return optionalOutgoingArgsSize;}
+ { return optionalOutgoingArgsSize; }
+ inline const hash_set<const ConstPoolVal*>&
+ getConstantPoolValues() const {return constantsForConstPool;}
+
+ void addToConstantPool (const ConstPoolVal* constVal)
+ { constantsForConstPool.insert(constVal); }
inline void markAsLeafMethod() { compiledAsLeaf = true; }