mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-12 18:33:22 +00:00
Add support for module local constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@737 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
72665af24d
commit
7502f635c6
@ -3,6 +3,10 @@
|
|||||||
// This file contains the declarations for the Module class that is used to
|
// This file contains the declarations for the Module class that is used to
|
||||||
// maintain all the information related to a VM module.
|
// maintain all the information related to a VM module.
|
||||||
//
|
//
|
||||||
|
// A module also maintains a GlobalValRefMap object that is used to hold all
|
||||||
|
// constant references to global variables in the module. When a global
|
||||||
|
// variable is destroyed, it should have no entries in the GlobalValueRefMap.
|
||||||
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#ifndef LLVM_MODULE_H
|
#ifndef LLVM_MODULE_H
|
||||||
@ -13,6 +17,8 @@
|
|||||||
#include "llvm/ValueHolder.h"
|
#include "llvm/ValueHolder.h"
|
||||||
class Method;
|
class Method;
|
||||||
class GlobalVariable;
|
class GlobalVariable;
|
||||||
|
class GlobalValueRefMap; // Used by ConstPoolVals.cpp
|
||||||
|
class ConstPoolPointerReference;
|
||||||
|
|
||||||
class Module : public Value, public SymTabValue {
|
class Module : public Value, public SymTabValue {
|
||||||
public:
|
public:
|
||||||
@ -35,6 +41,14 @@ private:
|
|||||||
GlobalListType GlobalList; // The Global Variables
|
GlobalListType GlobalList; // The Global Variables
|
||||||
MethodListType MethodList; // The Methods
|
MethodListType MethodList; // The Methods
|
||||||
|
|
||||||
|
GlobalValueRefMap *GVRefMap;
|
||||||
|
|
||||||
|
// Accessor for the underlying GlobalValRefMap... only through the
|
||||||
|
// ConstPoolPointerReference class...
|
||||||
|
friend class ConstPoolPointerReference;
|
||||||
|
void mutateConstPoolPointerReference(GlobalValue *OldGV, GlobalValue *NewGV);
|
||||||
|
ConstPoolPointerReference *getConstPoolPointerReference(GlobalValue *GV);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Module();
|
Module();
|
||||||
~Module();
|
~Module();
|
||||||
@ -47,7 +61,6 @@ public:
|
|||||||
bool reduceApply(bool (*Func)(Method*));
|
bool reduceApply(bool (*Func)(Method*));
|
||||||
bool reduceApply(bool (*Func)(const Method*)) const;
|
bool reduceApply(bool (*Func)(const Method*)) const;
|
||||||
|
|
||||||
|
|
||||||
// Get the underlying elements of the Module...
|
// Get the underlying elements of the Module...
|
||||||
inline const GlobalListType &getGlobalList() const { return GlobalList; }
|
inline const GlobalListType &getGlobalList() const { return GlobalList; }
|
||||||
inline GlobalListType &getGlobalList() { return GlobalList; }
|
inline GlobalListType &getGlobalList() { return GlobalList; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user