mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
Change uses of Method to Function
Change uses of methodArgument to FunctionArgument git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1988 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b277d1d0e0
commit
0fc0c1d3e1
@ -1,4 +1,4 @@
|
|||||||
//===- llvm/Analysis/InstForest.h - Partition Method into forest -*- C++ -*--=//
|
//===- llvm/Analysis/InstForest.h - Partition Func into forest ---*- C++ -*--=//
|
||||||
//
|
//
|
||||||
// This interface is used to partition a method into a forest of instruction
|
// This interface is used to partition a method into a forest of instruction
|
||||||
// trees, where the following invariants hold:
|
// trees, where the following invariants hold:
|
||||||
@ -163,8 +163,8 @@ class InstForest : public std::vector<InstTreeNode<Payload> *> {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// ctor - Create an instruction forest for the specified method...
|
// ctor - Create an instruction forest for the specified method...
|
||||||
InstForest(Method *M) {
|
InstForest(Function *F) {
|
||||||
for (Method::iterator MI = M->begin(), ME = M->end(); MI != ME; ++MI) {
|
for (Function::iterator MI = F->begin(), ME = F->end(); MI != ME; ++MI) {
|
||||||
BasicBlock *BB = *MI;
|
BasicBlock *BB = *MI;
|
||||||
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) {
|
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) {
|
||||||
Instruction *Inst = *I;
|
Instruction *Inst = *I;
|
||||||
@ -240,7 +240,7 @@ InstTreeNode<Payload>::InstTreeNode(InstForest<Payload> &IF, Value *V,
|
|||||||
|
|
||||||
if (!isa<Instruction>(V)) {
|
if (!isa<Instruction>(V)) {
|
||||||
assert((isa<Constant>(V) || isa<BasicBlock>(V) ||
|
assert((isa<Constant>(V) || isa<BasicBlock>(V) ||
|
||||||
isa<MethodArgument>(V) || isa<GlobalValue>(V)) &&
|
isa<FunctionArgument>(V) || isa<GlobalValue>(V)) &&
|
||||||
"Unrecognized value type for InstForest Partition!");
|
"Unrecognized value type for InstForest Partition!");
|
||||||
if (isa<Constant>(V))
|
if (isa<Constant>(V))
|
||||||
getTreeData().first.second = ConstNode;
|
getTreeData().first.second = ConstNode;
|
||||||
|
@ -43,10 +43,10 @@ public:
|
|||||||
inline CachedWriter &operator<<(const GlobalVariable *X) {
|
inline CachedWriter &operator<<(const GlobalVariable *X) {
|
||||||
return *this << (const Value*)X;
|
return *this << (const Value*)X;
|
||||||
}
|
}
|
||||||
inline CachedWriter &operator<<(const Method *X) {
|
inline CachedWriter &operator<<(const Function *X) {
|
||||||
return *this << (const Value*)X;
|
return *this << (const Value*)X;
|
||||||
}
|
}
|
||||||
inline CachedWriter &operator<<(const MethodArgument *X) {
|
inline CachedWriter &operator<<(const FunctionArgument *X) {
|
||||||
return *this << (const Value*)X;
|
return *this << (const Value*)X;
|
||||||
}
|
}
|
||||||
inline CachedWriter &operator<<(const BasicBlock *X) {
|
inline CachedWriter &operator<<(const BasicBlock *X) {
|
||||||
|
@ -19,11 +19,6 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "llvm/Type.h"
|
#include "llvm/Type.h"
|
||||||
|
|
||||||
class Module;
|
|
||||||
class GlobalVariable;
|
|
||||||
class Function;
|
|
||||||
class BasicBlock;
|
|
||||||
class Instruction;
|
|
||||||
class SlotCalculator;
|
class SlotCalculator;
|
||||||
|
|
||||||
// The only interface defined by this file... convert the internal
|
// The only interface defined by this file... convert the internal
|
||||||
@ -100,10 +95,11 @@ inline std::ostream &operator<<(std::ostream &o, const Value *I) {
|
|||||||
switch (I->getValueType()) {
|
switch (I->getValueType()) {
|
||||||
case Value::TypeVal: return o << cast<const Type>(I);
|
case Value::TypeVal: return o << cast<const Type>(I);
|
||||||
case Value::ConstantVal: WriteToAssembly(cast<Constant>(I) , o); break;
|
case Value::ConstantVal: WriteToAssembly(cast<Constant>(I) , o); break;
|
||||||
case Value::MethodArgumentVal: return o << I->getType() << " "<< I->getName();
|
case Value::FunctionArgumentVal:
|
||||||
|
return o << I->getType() << " " << I->getName();
|
||||||
case Value::InstructionVal:WriteToAssembly(cast<Instruction>(I) , o); break;
|
case Value::InstructionVal:WriteToAssembly(cast<Instruction>(I) , o); break;
|
||||||
case Value::BasicBlockVal: WriteToAssembly(cast<BasicBlock>(I) , o); break;
|
case Value::BasicBlockVal: WriteToAssembly(cast<BasicBlock>(I) , o); break;
|
||||||
case Value::MethodVal: WriteToAssembly(cast<Function>(I) , o); break;
|
case Value::FunctionVal: WriteToAssembly(cast<Function>(I) , o); break;
|
||||||
case Value::GlobalVariableVal:
|
case Value::GlobalVariableVal:
|
||||||
WriteToAssembly(cast<GlobalVariable>(I), o); break;
|
WriteToAssembly(cast<GlobalVariable>(I), o); break;
|
||||||
case Value::ModuleVal: WriteToAssembly(cast<Module>(I) , o); break;
|
case Value::ModuleVal: WriteToAssembly(cast<Module>(I) , o); break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user