summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-10-28 23:53:56 +0000
committerChris Lattner <sabre@nondot.org>2002-10-28 23:53:56 +0000
commit2cc214c06cbb94f95928636981c9805d6300cff1 (patch)
tree65eebe577e7269221085b36b3a54847624bcf198 /include
parent534124d0e35165b7cb38d5fffb5ea2ac4638252b (diff)
downloadllvm-2cc214c06cbb94f95928636981c9805d6300cff1.tar.gz
llvm-2cc214c06cbb94f95928636981c9805d6300cff1.tar.bz2
llvm-2cc214c06cbb94f95928636981c9805d6300cff1.tar.xz
Strip a bunch of #includes from the file, move some virtual functions to
.cpp file git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4364 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Target/MachineInstrInfo.h24
-rw-r--r--include/llvm/Target/TargetInstrInfo.h24
2 files changed, 22 insertions, 26 deletions
diff --git a/include/llvm/Target/MachineInstrInfo.h b/include/llvm/Target/MachineInstrInfo.h
index 82c14be99e..cd0a3edb2b 100644
--- a/include/llvm/Target/MachineInstrInfo.h
+++ b/include/llvm/Target/MachineInstrInfo.h
@@ -7,16 +7,15 @@
#ifndef LLVM_TARGET_MACHINEINSTRINFO_H
#define LLVM_TARGET_MACHINEINSTRINFO_H
-#include "Support/NonCopyable.h"
#include "Support/DataTypes.h"
-#include "llvm/Constant.h"
-#include "llvm/DerivedTypes.h"
+#include <vector>
class MachineInstrDescriptor;
class MachineInstr;
class TargetMachine;
class Value;
class Instruction;
+class Constant;
class Function;
class MachineCodeForInstruction;
@@ -50,7 +49,6 @@ extern const MachineInstrDescriptor *TargetInstrDescriptors;
//
//---------------------------------------------------------------------------
-
const unsigned M_NOP_FLAG = 1 << 0;
const unsigned M_BRANCH_FLAG = 1 << 1;
const unsigned M_CALL_FLAG = 1 << 2;
@@ -82,7 +80,7 @@ struct MachineInstrDescriptor {
};
-class MachineInstrInfo : public NonCopyableV {
+class MachineInstrInfo {
public:
const TargetMachine& target;
@@ -91,6 +89,8 @@ protected:
unsigned descSize; // number of entries in the desc array
unsigned numRealOpCodes; // number of non-dummy op codes
+ MachineInstrInfo(const MachineInstrInfo &); // DO NOT IMPLEMENT
+ void operator=(const MachineInstrInfo &); // DO NOT IMPLEMENT
public:
MachineInstrInfo(const TargetMachine& tgt,
const MachineInstrDescriptor *desc, unsigned descSize,
@@ -241,14 +241,12 @@ public:
// Queries about representation of LLVM quantities (e.g., constants)
//-------------------------------------------------------------------------
- // Test if this type of constant must be loaded from memory into
- // a register, i.e., cannot be set bitwise in register and cannot
- // use immediate fields of instructions. Note that this only makes
- // sense for primitive types.
- virtual bool ConstantTypeMustBeLoaded(const Constant* CV) const {
- assert(CV->getType()->isPrimitiveType() || isa<PointerType>(CV->getType()));
- return !(CV->getType()->isIntegral() || isa<PointerType>(CV->getType()));
- }
+ /// ConstantTypeMustBeLoaded - Test if this type of constant must be loaded
+ /// from memory into a register, i.e., cannot be set bitwise in register and
+ /// cannot use immediate fields of instructions. Note that this only makes
+ /// sense for primitive types.
+ ///
+ virtual bool ConstantTypeMustBeLoaded(const Constant* CV) const;
// Test if this constant may not fit in the immediate field of the
// machine instructions (probably) generated for this instruction.
diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h
index 82c14be99e..cd0a3edb2b 100644
--- a/include/llvm/Target/TargetInstrInfo.h
+++ b/include/llvm/Target/TargetInstrInfo.h
@@ -7,16 +7,15 @@
#ifndef LLVM_TARGET_MACHINEINSTRINFO_H
#define LLVM_TARGET_MACHINEINSTRINFO_H
-#include "Support/NonCopyable.h"
#include "Support/DataTypes.h"
-#include "llvm/Constant.h"
-#include "llvm/DerivedTypes.h"
+#include <vector>
class MachineInstrDescriptor;
class MachineInstr;
class TargetMachine;
class Value;
class Instruction;
+class Constant;
class Function;
class MachineCodeForInstruction;
@@ -50,7 +49,6 @@ extern const MachineInstrDescriptor *TargetInstrDescriptors;
//
//---------------------------------------------------------------------------
-
const unsigned M_NOP_FLAG = 1 << 0;
const unsigned M_BRANCH_FLAG = 1 << 1;
const unsigned M_CALL_FLAG = 1 << 2;
@@ -82,7 +80,7 @@ struct MachineInstrDescriptor {
};
-class MachineInstrInfo : public NonCopyableV {
+class MachineInstrInfo {
public:
const TargetMachine& target;
@@ -91,6 +89,8 @@ protected:
unsigned descSize; // number of entries in the desc array
unsigned numRealOpCodes; // number of non-dummy op codes
+ MachineInstrInfo(const MachineInstrInfo &); // DO NOT IMPLEMENT
+ void operator=(const MachineInstrInfo &); // DO NOT IMPLEMENT
public:
MachineInstrInfo(const TargetMachine& tgt,
const MachineInstrDescriptor *desc, unsigned descSize,
@@ -241,14 +241,12 @@ public:
// Queries about representation of LLVM quantities (e.g., constants)
//-------------------------------------------------------------------------
- // Test if this type of constant must be loaded from memory into
- // a register, i.e., cannot be set bitwise in register and cannot
- // use immediate fields of instructions. Note that this only makes
- // sense for primitive types.
- virtual bool ConstantTypeMustBeLoaded(const Constant* CV) const {
- assert(CV->getType()->isPrimitiveType() || isa<PointerType>(CV->getType()));
- return !(CV->getType()->isIntegral() || isa<PointerType>(CV->getType()));
- }
+ /// ConstantTypeMustBeLoaded - Test if this type of constant must be loaded
+ /// from memory into a register, i.e., cannot be set bitwise in register and
+ /// cannot use immediate fields of instructions. Note that this only makes
+ /// sense for primitive types.
+ ///
+ virtual bool ConstantTypeMustBeLoaded(const Constant* CV) const;
// Test if this constant may not fit in the immediate field of the
// machine instructions (probably) generated for this instruction.