mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Remove capability for polymorphic destruction from LexicalScope
and LexicalScopes, we're not using it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195182 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1f12b50b83
commit
b88a94faaa
@ -45,13 +45,14 @@ typedef std::pair<const MachineInstr *, const MachineInstr *> InsnRange;
|
|||||||
class LexicalScopes {
|
class LexicalScopes {
|
||||||
public:
|
public:
|
||||||
LexicalScopes() : MF(NULL), CurrentFnLexicalScope(NULL) {}
|
LexicalScopes() : MF(NULL), CurrentFnLexicalScope(NULL) {}
|
||||||
virtual ~LexicalScopes();
|
~LexicalScopes();
|
||||||
|
|
||||||
/// initialize - Scan machine function and constuct lexical scope nest.
|
/// initialize - Scan machine function and constuct lexical scope nest, resets
|
||||||
virtual void initialize(const MachineFunction &);
|
/// the instance if necessary.
|
||||||
|
void initialize(const MachineFunction &);
|
||||||
|
|
||||||
/// releaseMemory - release memory.
|
/// releaseMemory - release memory.
|
||||||
virtual void releaseMemory();
|
void reset();
|
||||||
|
|
||||||
/// empty - Return true if there is any lexical scope information available.
|
/// empty - Return true if there is any lexical scope information available.
|
||||||
bool empty() { return CurrentFnLexicalScope == NULL; }
|
bool empty() { return CurrentFnLexicalScope == NULL; }
|
||||||
@ -156,7 +157,6 @@ private:
|
|||||||
/// LexicalScope - This class is used to track scope information.
|
/// LexicalScope - This class is used to track scope information.
|
||||||
///
|
///
|
||||||
class LexicalScope {
|
class LexicalScope {
|
||||||
virtual void anchor();
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LexicalScope(LexicalScope *P, const MDNode *D, const MDNode *I, bool A)
|
LexicalScope(LexicalScope *P, const MDNode *D, const MDNode *I, bool A)
|
||||||
@ -166,8 +166,6 @@ public:
|
|||||||
Parent->addChild(this);
|
Parent->addChild(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~LexicalScope() {}
|
|
||||||
|
|
||||||
// Accessors.
|
// Accessors.
|
||||||
LexicalScope *getParent() const { return Parent; }
|
LexicalScope *getParent() const { return Parent; }
|
||||||
const MDNode *getDesc() const { return Desc; }
|
const MDNode *getDesc() const { return Desc; }
|
||||||
|
@ -25,10 +25,11 @@
|
|||||||
#include "llvm/Support/FormattedStream.h"
|
#include "llvm/Support/FormattedStream.h"
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
LexicalScopes::~LexicalScopes() { releaseMemory(); }
|
/// ~LexicalScopes - final cleanup after ourselves.
|
||||||
|
LexicalScopes::~LexicalScopes() { reset(); }
|
||||||
|
|
||||||
/// releaseMemory - release memory.
|
/// reset - Reset the instance so that it's prepared for another function.
|
||||||
void LexicalScopes::releaseMemory() {
|
void LexicalScopes::reset() {
|
||||||
MF = NULL;
|
MF = NULL;
|
||||||
CurrentFnLexicalScope = NULL;
|
CurrentFnLexicalScope = NULL;
|
||||||
DeleteContainerSeconds(LexicalScopeMap);
|
DeleteContainerSeconds(LexicalScopeMap);
|
||||||
@ -39,7 +40,7 @@ void LexicalScopes::releaseMemory() {
|
|||||||
|
|
||||||
/// initialize - Scan machine function and constuct lexical scope nest.
|
/// initialize - Scan machine function and constuct lexical scope nest.
|
||||||
void LexicalScopes::initialize(const MachineFunction &Fn) {
|
void LexicalScopes::initialize(const MachineFunction &Fn) {
|
||||||
releaseMemory();
|
reset();
|
||||||
MF = &Fn;
|
MF = &Fn;
|
||||||
SmallVector<InsnRange, 4> MIRanges;
|
SmallVector<InsnRange, 4> MIRanges;
|
||||||
DenseMap<const MachineInstr *, LexicalScope *> MI2ScopeMap;
|
DenseMap<const MachineInstr *, LexicalScope *> MI2ScopeMap;
|
||||||
@ -311,8 +312,6 @@ bool LexicalScopes::dominates(DebugLoc DL, MachineBasicBlock *MBB) {
|
|||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LexicalScope::anchor() {}
|
|
||||||
|
|
||||||
/// dump - Print data structures.
|
/// dump - Print data structures.
|
||||||
void LexicalScope::dump(unsigned Indent) const {
|
void LexicalScope::dump(unsigned Indent) const {
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
@ -704,7 +704,6 @@ bool LDVImpl::runOnMachineFunction(MachineFunction &mf) {
|
|||||||
bool Changed = collectDebugValues(mf);
|
bool Changed = collectDebugValues(mf);
|
||||||
computeIntervals();
|
computeIntervals();
|
||||||
DEBUG(print(dbgs()));
|
DEBUG(print(dbgs()));
|
||||||
LS.releaseMemory();
|
|
||||||
ModifiedMF = Changed;
|
ModifiedMF = Changed;
|
||||||
return Changed;
|
return Changed;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user