mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 06:29:05 +00:00
Moved MachineCodeForBB to be an annotation on BasicBlock.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2818 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -25,7 +25,6 @@
|
|||||||
#include "Support/ilist"
|
#include "Support/ilist"
|
||||||
|
|
||||||
class TerminatorInst;
|
class TerminatorInst;
|
||||||
class MachineCodeForBasicBlock;
|
|
||||||
template <class _Term, class _BB> class SuccIterator; // Successor Iterator
|
template <class _Term, class _BB> class SuccIterator; // Successor Iterator
|
||||||
template <class _Ptr, class _USE_iterator> class PredIterator;
|
template <class _Ptr, class _USE_iterator> class PredIterator;
|
||||||
|
|
||||||
@@ -41,7 +40,6 @@ public:
|
|||||||
typedef iplist<Instruction> InstListType;
|
typedef iplist<Instruction> InstListType;
|
||||||
private :
|
private :
|
||||||
InstListType InstList;
|
InstListType InstList;
|
||||||
MachineCodeForBasicBlock* machineInstrVec;
|
|
||||||
BasicBlock *Prev, *Next; // Next and Prev links for our intrusive linked list
|
BasicBlock *Prev, *Next; // Next and Prev links for our intrusive linked list
|
||||||
|
|
||||||
void setParent(Function *parent) { InstList.setParent(parent); }
|
void setParent(Function *parent) { InstList.setParent(parent); }
|
||||||
@@ -83,11 +81,6 @@ public:
|
|||||||
TerminatorInst *getTerminator();
|
TerminatorInst *getTerminator();
|
||||||
const TerminatorInst *const getTerminator() const;
|
const TerminatorInst *const getTerminator() const;
|
||||||
|
|
||||||
// Machine code accessor...
|
|
||||||
inline MachineCodeForBasicBlock& getMachineInstrVec() const {
|
|
||||||
return *machineInstrVec;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Provide a scoped predecessor and successor iterator
|
// Provide a scoped predecessor and successor iterator
|
||||||
typedef PredIterator<BasicBlock, Value::use_iterator> pred_iterator;
|
typedef PredIterator<BasicBlock, Value::use_iterator> pred_iterator;
|
||||||
typedef PredIterator<const BasicBlock,
|
typedef PredIterator<const BasicBlock,
|
||||||
|
@@ -11,7 +11,6 @@
|
|||||||
#include "llvm/Constant.h"
|
#include "llvm/Constant.h"
|
||||||
#include "llvm/iPHINode.h"
|
#include "llvm/iPHINode.h"
|
||||||
#include "llvm/SymbolTable.h"
|
#include "llvm/SymbolTable.h"
|
||||||
#include "llvm/CodeGen/MachineInstr.h"
|
|
||||||
#include "SymbolTableListTraitsImpl.h"
|
#include "SymbolTableListTraitsImpl.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
@@ -47,8 +46,7 @@ template SymbolTableListTraits<Instruction, BasicBlock, Function>;
|
|||||||
|
|
||||||
|
|
||||||
BasicBlock::BasicBlock(const std::string &name, Function *Parent)
|
BasicBlock::BasicBlock(const std::string &name, Function *Parent)
|
||||||
: Value(Type::LabelTy, Value::BasicBlockVal, name),
|
: Value(Type::LabelTy, Value::BasicBlockVal, name) {
|
||||||
machineInstrVec(new MachineCodeForBasicBlock) {
|
|
||||||
// Initialize the instlist...
|
// Initialize the instlist...
|
||||||
InstList.setItemParent(this);
|
InstList.setItemParent(this);
|
||||||
|
|
||||||
@@ -59,7 +57,6 @@ BasicBlock::BasicBlock(const std::string &name, Function *Parent)
|
|||||||
BasicBlock::~BasicBlock() {
|
BasicBlock::~BasicBlock() {
|
||||||
dropAllReferences();
|
dropAllReferences();
|
||||||
InstList.clear();
|
InstList.clear();
|
||||||
delete machineInstrVec;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Specialize setName to take care of symbol table majik
|
// Specialize setName to take care of symbol table majik
|
||||||
|
Reference in New Issue
Block a user