mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-20 14:29:27 +00:00
Changed MachineCodeForMethod' to
MachineFunction'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4301 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6f8fd25697
commit
fce1143bcf
@ -1,27 +1,31 @@
|
|||||||
//===-- llvm/CodeGen/MachineCodeForBasicBlock.h -----------------*- C++ -*--=//
|
//===-- llvm/CodeGen/MachineBasicBlock.h ------------------------*- C++ -*--=//
|
||||||
//
|
//
|
||||||
// Collect the sequence of machine instructions for a basic block.
|
// Collect the sequence of machine instructions for a basic block.
|
||||||
//
|
//
|
||||||
//===---------------------------------------------------------------------===//
|
//===---------------------------------------------------------------------===//
|
||||||
|
|
||||||
#ifndef LLVM_CODEGEN_MACHINECODEFORBASICBLOCK_H
|
#ifndef LLVM_CODEGEN_MACHINEBASICBLOCK_H
|
||||||
#define LLVM_CODEGEN_MACHINECODEFORBASICBLOCK_H
|
#define LLVM_CODEGEN_MACHINEBASICBLOCK_H
|
||||||
|
|
||||||
#include "llvm/BasicBlock.h"
|
#include "llvm/BasicBlock.h"
|
||||||
class MachineInstr;
|
class MachineInstr;
|
||||||
|
|
||||||
extern AnnotationID MCFBB_AID;
|
extern AnnotationID MCFBB_AID;
|
||||||
|
|
||||||
class MachineCodeForBasicBlock : public Annotation {
|
// FIXME: this should go away soon
|
||||||
|
class MachineBasicBlock;
|
||||||
|
typedef MachineBasicBlock MachineCodeForBasicBlock;
|
||||||
|
|
||||||
|
class MachineBasicBlock: public Annotation {
|
||||||
std::vector<MachineInstr*> Insts;
|
std::vector<MachineInstr*> Insts;
|
||||||
public:
|
public:
|
||||||
MachineCodeForBasicBlock();
|
MachineBasicBlock();
|
||||||
~MachineCodeForBasicBlock() {}
|
~MachineBasicBlock() {}
|
||||||
|
|
||||||
// Static methods to retrieve or destroy the MachineCodeForBasicBlock
|
// Static methods to retrieve or destroy the MachineBasicBlock
|
||||||
// object for a given basic block.
|
// object for a given basic block.
|
||||||
static MachineCodeForBasicBlock& get(const BasicBlock *bb) {
|
static MachineBasicBlock& get(const BasicBlock *bb) {
|
||||||
return *(MachineCodeForBasicBlock*)bb->getOrCreateAnnotation(MCFBB_AID);
|
return *(MachineBasicBlock*)bb->getOrCreateAnnotation(MCFBB_AID);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void destroy(const BasicBlock *bb) {
|
static void destroy(const BasicBlock *bb) {
|
||||||
|
@ -1,27 +1,31 @@
|
|||||||
//===-- llvm/CodeGen/MachineCodeForBasicBlock.h -----------------*- C++ -*--=//
|
//===-- llvm/CodeGen/MachineBasicBlock.h ------------------------*- C++ -*--=//
|
||||||
//
|
//
|
||||||
// Collect the sequence of machine instructions for a basic block.
|
// Collect the sequence of machine instructions for a basic block.
|
||||||
//
|
//
|
||||||
//===---------------------------------------------------------------------===//
|
//===---------------------------------------------------------------------===//
|
||||||
|
|
||||||
#ifndef LLVM_CODEGEN_MACHINECODEFORBASICBLOCK_H
|
#ifndef LLVM_CODEGEN_MACHINEBASICBLOCK_H
|
||||||
#define LLVM_CODEGEN_MACHINECODEFORBASICBLOCK_H
|
#define LLVM_CODEGEN_MACHINEBASICBLOCK_H
|
||||||
|
|
||||||
#include "llvm/BasicBlock.h"
|
#include "llvm/BasicBlock.h"
|
||||||
class MachineInstr;
|
class MachineInstr;
|
||||||
|
|
||||||
extern AnnotationID MCFBB_AID;
|
extern AnnotationID MCFBB_AID;
|
||||||
|
|
||||||
class MachineCodeForBasicBlock : public Annotation {
|
// FIXME: this should go away soon
|
||||||
|
class MachineBasicBlock;
|
||||||
|
typedef MachineBasicBlock MachineCodeForBasicBlock;
|
||||||
|
|
||||||
|
class MachineBasicBlock: public Annotation {
|
||||||
std::vector<MachineInstr*> Insts;
|
std::vector<MachineInstr*> Insts;
|
||||||
public:
|
public:
|
||||||
MachineCodeForBasicBlock();
|
MachineBasicBlock();
|
||||||
~MachineCodeForBasicBlock() {}
|
~MachineBasicBlock() {}
|
||||||
|
|
||||||
// Static methods to retrieve or destroy the MachineCodeForBasicBlock
|
// Static methods to retrieve or destroy the MachineBasicBlock
|
||||||
// object for a given basic block.
|
// object for a given basic block.
|
||||||
static MachineCodeForBasicBlock& get(const BasicBlock *bb) {
|
static MachineBasicBlock& get(const BasicBlock *bb) {
|
||||||
return *(MachineCodeForBasicBlock*)bb->getOrCreateAnnotation(MCFBB_AID);
|
return *(MachineBasicBlock*)bb->getOrCreateAnnotation(MCFBB_AID);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void destroy(const BasicBlock *bb) {
|
static void destroy(const BasicBlock *bb) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//===-- llvm/CodeGen/MachineCodeForMethod.h ----------------------*- C++ -*--=//
|
//===-- llvm/CodeGen/MachineFunction.h ----------------------*- C++ -*--=//
|
||||||
//
|
//
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Collect native machine code information for a method.
|
// Collect native machine code information for a method.
|
||||||
@ -6,8 +6,8 @@
|
|||||||
// to be stored with each method.
|
// to be stored with each method.
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#ifndef LLVM_CODEGEN_MACHINECODEFORMETHOD_H
|
#ifndef LLVM_CODEGEN_MACHINEFUNCTION_H
|
||||||
#define LLVM_CODEGEN_MACHINECODEFORMETHOD_H
|
#define LLVM_CODEGEN_MACHINEFUNCTION_H
|
||||||
|
|
||||||
#include "llvm/Annotation.h"
|
#include "llvm/Annotation.h"
|
||||||
#include "Support/NonCopyable.h"
|
#include "Support/NonCopyable.h"
|
||||||
@ -19,8 +19,11 @@ class Constant;
|
|||||||
class Type;
|
class Type;
|
||||||
class TargetMachine;
|
class TargetMachine;
|
||||||
|
|
||||||
|
// FIXME: this should go away soon
|
||||||
|
class MachineFunction;
|
||||||
|
typedef MachineFunction MachineCodeForMethod;
|
||||||
|
|
||||||
class MachineCodeForMethod : private Annotation {
|
class MachineFunction : private Annotation {
|
||||||
hash_set<const Constant*> constantsForConstPool;
|
hash_set<const Constant*> constantsForConstPool;
|
||||||
hash_map<const Value*, int> offsets;
|
hash_map<const Value*, int> offsets;
|
||||||
const Function* method;
|
const Function* method;
|
||||||
@ -36,20 +39,20 @@ class MachineCodeForMethod : private Annotation {
|
|||||||
bool automaticVarsAreaFrozen;
|
bool automaticVarsAreaFrozen;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*ctor*/ MachineCodeForMethod(const Function* function,
|
/*ctor*/ MachineFunction(const Function* function,
|
||||||
const TargetMachine& target);
|
const TargetMachine& target);
|
||||||
|
|
||||||
// The next two methods are used to construct and to retrieve
|
// The next two methods are used to construct and to retrieve
|
||||||
// the MachineCodeForMethod object for the given method.
|
// the MachineFunction object for the given method.
|
||||||
// construct() -- Allocates and initializes for a given method and target
|
// construct() -- Allocates and initializes for a given method and target
|
||||||
// get() -- Returns a handle to the object.
|
// get() -- Returns a handle to the object.
|
||||||
// This should not be called before "construct()"
|
// This should not be called before "construct()"
|
||||||
// for a given Method.
|
// for a given Method.
|
||||||
//
|
//
|
||||||
static MachineCodeForMethod& construct(const Function *method,
|
static MachineFunction& construct(const Function *method,
|
||||||
const TargetMachine &target);
|
const TargetMachine &target);
|
||||||
static void destruct(const Function *F);
|
static void destruct(const Function *F);
|
||||||
static MachineCodeForMethod& get(const Function* function);
|
static MachineFunction& get(const Function* function);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Accessors for global information about generated code for a method.
|
// Accessors for global information about generated code for a method.
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
//===-- llvm/CodeGen/MachineCodeForMethod.h ----------------------*- C++ -*--=//
|
//===-- llvm/CodeGen/MachineFunction.h ---------------------------*- C++ -*--=//
|
||||||
//
|
//
|
||||||
// Purpose:
|
// Collect native machine code information for a method. This allows
|
||||||
// Collect native machine code information for a method.
|
// target-specific information about the generated code to be stored with each
|
||||||
// This allows target-specific information about the generated code
|
// method.
|
||||||
// to be stored with each method.
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#ifndef LLVM_CODEGEN_MACHINECODEFORMETHOD_H
|
#ifndef LLVM_CODEGEN_MACHINEFUNCTION_H
|
||||||
#define LLVM_CODEGEN_MACHINECODEFORMETHOD_H
|
#define LLVM_CODEGEN_MACHINEFUNCTION_H
|
||||||
|
|
||||||
#include "llvm/Annotation.h"
|
#include "llvm/Annotation.h"
|
||||||
#include "Support/NonCopyable.h"
|
#include "Support/NonCopyable.h"
|
||||||
@ -20,7 +20,7 @@ class Type;
|
|||||||
class TargetMachine;
|
class TargetMachine;
|
||||||
|
|
||||||
|
|
||||||
class MachineCodeForMethod : private Annotation {
|
class MachineFunction : private Annotation {
|
||||||
hash_set<const Constant*> constantsForConstPool;
|
hash_set<const Constant*> constantsForConstPool;
|
||||||
hash_map<const Value*, int> offsets;
|
hash_map<const Value*, int> offsets;
|
||||||
const Function* method;
|
const Function* method;
|
||||||
@ -36,20 +36,20 @@ class MachineCodeForMethod : private Annotation {
|
|||||||
bool automaticVarsAreaFrozen;
|
bool automaticVarsAreaFrozen;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*ctor*/ MachineCodeForMethod(const Function* function,
|
/*ctor*/ MachineFunction(const Function* function,
|
||||||
const TargetMachine& target);
|
const TargetMachine& target);
|
||||||
|
|
||||||
// The next two methods are used to construct and to retrieve
|
// The next two methods are used to construct and to retrieve
|
||||||
// the MachineCodeForMethod object for the given method.
|
// the MachineFunction object for the given method.
|
||||||
// construct() -- Allocates and initializes for a given method and target
|
// construct() -- Allocates and initializes for a given method and target
|
||||||
// get() -- Returns a handle to the object.
|
// get() -- Returns a handle to the object.
|
||||||
// This should not be called before "construct()"
|
// This should not be called before "construct()"
|
||||||
// for a given Method.
|
// for a given Method.
|
||||||
//
|
//
|
||||||
static MachineCodeForMethod& construct(const Function *method,
|
static MachineFunction& construct(const Function *method,
|
||||||
const TargetMachine &target);
|
const TargetMachine &target);
|
||||||
static void destruct(const Function *F);
|
static void destruct(const Function *F);
|
||||||
static MachineCodeForMethod& get(const Function* function);
|
static MachineFunction& get(const Function* function);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Accessors for global information about generated code for a method.
|
// Accessors for global information about generated code for a method.
|
||||||
|
@ -275,7 +275,7 @@ public:
|
|||||||
// The generated instructions are returned in `mvec'.
|
// The generated instructions are returned in `mvec'.
|
||||||
// Any temp. registers (TmpInstruction) created are recorded in mcfi.
|
// Any temp. registers (TmpInstruction) created are recorded in mcfi.
|
||||||
// Symbolic constants or constants that must be accessed from memory
|
// Symbolic constants or constants that must be accessed from memory
|
||||||
// are added to the constant pool via MachineCodeForMethod::get(F).
|
// are added to the constant pool via MachineFunction::get(F).
|
||||||
//
|
//
|
||||||
virtual void CreateCodeToLoadConst(const TargetMachine& target,
|
virtual void CreateCodeToLoadConst(const TargetMachine& target,
|
||||||
Function* F,
|
Function* F,
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include "Support/NonCopyable.h"
|
#include "Support/NonCopyable.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
class MachineCodeForMethod;
|
class MachineFunction;
|
||||||
class TargetMachine;
|
class TargetMachine;
|
||||||
|
|
||||||
struct MachineFrameInfo : public NonCopyableV {
|
struct MachineFrameInfo : public NonCopyableV {
|
||||||
@ -41,24 +41,24 @@ public:
|
|||||||
// The first few methods have default machine-independent implementations.
|
// The first few methods have default machine-independent implementations.
|
||||||
// The rest must be implemented by the machine-specific subclass.
|
// The rest must be implemented by the machine-specific subclass.
|
||||||
//
|
//
|
||||||
virtual int getIncomingArgOffset (MachineCodeForMethod& mcInfo,
|
virtual int getIncomingArgOffset (MachineFunction& mcInfo,
|
||||||
unsigned argNum) const;
|
unsigned argNum) const;
|
||||||
virtual int getOutgoingArgOffset (MachineCodeForMethod& mcInfo,
|
virtual int getOutgoingArgOffset (MachineFunction& mcInfo,
|
||||||
unsigned argNum) const;
|
unsigned argNum) const;
|
||||||
|
|
||||||
virtual int getFirstIncomingArgOffset (MachineCodeForMethod& mcInfo,
|
virtual int getFirstIncomingArgOffset (MachineFunction& mcInfo,
|
||||||
bool& growUp) const=0;
|
bool& growUp) const=0;
|
||||||
virtual int getFirstOutgoingArgOffset (MachineCodeForMethod& mcInfo,
|
virtual int getFirstOutgoingArgOffset (MachineFunction& mcInfo,
|
||||||
bool& growUp) const=0;
|
bool& growUp) const=0;
|
||||||
virtual int getFirstOptionalOutgoingArgOffset (MachineCodeForMethod&,
|
virtual int getFirstOptionalOutgoingArgOffset (MachineFunction&,
|
||||||
bool& growUp) const=0;
|
bool& growUp) const=0;
|
||||||
virtual int getFirstAutomaticVarOffset (MachineCodeForMethod& mcInfo,
|
virtual int getFirstAutomaticVarOffset (MachineFunction& mcInfo,
|
||||||
bool& growUp) const=0;
|
bool& growUp) const=0;
|
||||||
virtual int getRegSpillAreaOffset (MachineCodeForMethod& mcInfo,
|
virtual int getRegSpillAreaOffset (MachineFunction& mcInfo,
|
||||||
bool& growUp) const=0;
|
bool& growUp) const=0;
|
||||||
virtual int getTmpAreaOffset (MachineCodeForMethod& mcInfo,
|
virtual int getTmpAreaOffset (MachineFunction& mcInfo,
|
||||||
bool& growUp) const=0;
|
bool& growUp) const=0;
|
||||||
virtual int getDynamicAreaOffset (MachineCodeForMethod& mcInfo,
|
virtual int getDynamicAreaOffset (MachineFunction& mcInfo,
|
||||||
bool& growUp) const=0;
|
bool& growUp) const=0;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -275,7 +275,7 @@ public:
|
|||||||
// The generated instructions are returned in `mvec'.
|
// The generated instructions are returned in `mvec'.
|
||||||
// Any temp. registers (TmpInstruction) created are recorded in mcfi.
|
// Any temp. registers (TmpInstruction) created are recorded in mcfi.
|
||||||
// Symbolic constants or constants that must be accessed from memory
|
// Symbolic constants or constants that must be accessed from memory
|
||||||
// are added to the constant pool via MachineCodeForMethod::get(F).
|
// are added to the constant pool via MachineFunction::get(F).
|
||||||
//
|
//
|
||||||
virtual void CreateCodeToLoadConst(const TargetMachine& target,
|
virtual void CreateCodeToLoadConst(const TargetMachine& target,
|
||||||
Function* F,
|
Function* F,
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForMethod.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/Analysis/LiveVar/FunctionLiveVarInfo.h" // FIXME: Remove when modularized better
|
#include "llvm/Analysis/LiveVar/FunctionLiveVarInfo.h" // FIXME: Remove when modularized better
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "llvm/BasicBlock.h"
|
#include "llvm/BasicBlock.h"
|
||||||
@ -1542,7 +1542,7 @@ bool InstructionSchedulingWithSSA::runOnFunction(Function &F)
|
|||||||
if (SchedDebugLevel >= Sched_PrintMachineCode)
|
if (SchedDebugLevel >= Sched_PrintMachineCode)
|
||||||
{
|
{
|
||||||
cerr << "\n*** Machine instructions after INSTRUCTION SCHEDULING\n";
|
cerr << "\n*** Machine instructions after INSTRUCTION SCHEDULING\n";
|
||||||
MachineCodeForMethod::get(&F).dump();
|
MachineFunction::get(&F).dump();
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -31,7 +31,7 @@ class RegToRefVecMap;
|
|||||||
class ValueToDefVecMap;
|
class ValueToDefVecMap;
|
||||||
class RefVec;
|
class RefVec;
|
||||||
class MachineInstr;
|
class MachineInstr;
|
||||||
class MachineCodeForBasicBlock;
|
class MachineBasicBlock;
|
||||||
|
|
||||||
|
|
||||||
/******************** Exported Data Types and Constants ********************/
|
/******************** Exported Data Types and Constants ********************/
|
||||||
@ -312,7 +312,7 @@ private:
|
|||||||
const TargetMachine& target);
|
const TargetMachine& target);
|
||||||
|
|
||||||
void addCallCCEdges (const std::vector<SchedGraphNode*>& memNod,
|
void addCallCCEdges (const std::vector<SchedGraphNode*>& memNod,
|
||||||
MachineCodeForBasicBlock& bbMvec,
|
MachineBasicBlock& bbMvec,
|
||||||
const TargetMachine& target);
|
const TargetMachine& target);
|
||||||
|
|
||||||
void addMachineRegEdges (RegToRefVecMap& regToRefVecMap,
|
void addMachineRegEdges (RegToRefVecMap& regToRefVecMap,
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "llvm/CodeGen/InstrForest.h"
|
#include "llvm/CodeGen/InstrForest.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForMethod.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/Target/MachineRegInfo.h"
|
#include "llvm/Target/MachineRegInfo.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
@ -155,7 +155,7 @@ bool InstructionSelection::runOnFunction(Function &F)
|
|||||||
if (SelectDebugLevel >= Select_PrintMachineCode)
|
if (SelectDebugLevel >= Select_PrintMachineCode)
|
||||||
{
|
{
|
||||||
cerr << "\n*** Machine instructions after INSTRUCTION SELECTION\n";
|
cerr << "\n*** Machine instructions after INSTRUCTION SELECTION\n";
|
||||||
MachineCodeForMethod::get(&F).dump();
|
MachineFunction::get(&F).dump();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
#include "llvm/CodeGen/MachineInstrAnnot.h"
|
#include "llvm/CodeGen/MachineInstrAnnot.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForMethod.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/CodeGen/InstrForest.h"
|
#include "llvm/CodeGen/InstrForest.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "llvm/Target/MachineRegInfo.h"
|
#include "llvm/Target/MachineRegInfo.h"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
// to be stored with each function.
|
// to be stored with each function.
|
||||||
//===---------------------------------------------------------------------===//
|
//===---------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/CodeGen/MachineCodeForMethod.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/CodeGen/MachineInstr.h" // For debug output
|
#include "llvm/CodeGen/MachineInstr.h" // For debug output
|
||||||
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
@ -30,27 +30,27 @@ static AnnotationID MCFM_AID(
|
|||||||
// This should not be called before "construct()"
|
// This should not be called before "construct()"
|
||||||
// for a given Function.
|
// for a given Function.
|
||||||
//
|
//
|
||||||
MachineCodeForMethod&
|
MachineFunction&
|
||||||
MachineCodeForMethod::construct(const Function *M, const TargetMachine &Tar)
|
MachineFunction::construct(const Function *M, const TargetMachine &Tar)
|
||||||
{
|
{
|
||||||
assert(M->getAnnotation(MCFM_AID) == 0 &&
|
assert(M->getAnnotation(MCFM_AID) == 0 &&
|
||||||
"Object already exists for this function!");
|
"Object already exists for this function!");
|
||||||
MachineCodeForMethod* mcInfo = new MachineCodeForMethod(M, Tar);
|
MachineFunction* mcInfo = new MachineFunction(M, Tar);
|
||||||
M->addAnnotation(mcInfo);
|
M->addAnnotation(mcInfo);
|
||||||
return *mcInfo;
|
return *mcInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MachineCodeForMethod::destruct(const Function *M)
|
MachineFunction::destruct(const Function *M)
|
||||||
{
|
{
|
||||||
bool Deleted = M->deleteAnnotation(MCFM_AID);
|
bool Deleted = M->deleteAnnotation(MCFM_AID);
|
||||||
assert(Deleted && "Machine code did not exist for function!");
|
assert(Deleted && "Machine code did not exist for function!");
|
||||||
}
|
}
|
||||||
|
|
||||||
MachineCodeForMethod&
|
MachineFunction&
|
||||||
MachineCodeForMethod::get(const Function *F)
|
MachineFunction::get(const Function *F)
|
||||||
{
|
{
|
||||||
MachineCodeForMethod *mc = (MachineCodeForMethod*)F->getAnnotation(MCFM_AID);
|
MachineFunction *mc = (MachineFunction*)F->getAnnotation(MCFM_AID);
|
||||||
assert(mc && "Call construct() method first to allocate the object");
|
assert(mc && "Call construct() method first to allocate the object");
|
||||||
return *mc;
|
return *mc;
|
||||||
}
|
}
|
||||||
@ -122,7 +122,7 @@ SizeToAlignment(unsigned int size, const TargetMachine& target)
|
|||||||
|
|
||||||
|
|
||||||
/*ctor*/
|
/*ctor*/
|
||||||
MachineCodeForMethod::MachineCodeForMethod(const Function *F,
|
MachineFunction::MachineFunction(const Function *F,
|
||||||
const TargetMachine& target)
|
const TargetMachine& target)
|
||||||
: Annotation(MCFM_AID),
|
: Annotation(MCFM_AID),
|
||||||
method(F), staticStackSize(0),
|
method(F), staticStackSize(0),
|
||||||
@ -138,7 +138,7 @@ MachineCodeForMethod::MachineCodeForMethod(const Function *F,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
MachineCodeForMethod::computeOffsetforLocalVar(const TargetMachine& target,
|
MachineFunction::computeOffsetforLocalVar(const TargetMachine& target,
|
||||||
const Value* val,
|
const Value* val,
|
||||||
unsigned int& getPaddedSize,
|
unsigned int& getPaddedSize,
|
||||||
unsigned int sizeToUse)
|
unsigned int sizeToUse)
|
||||||
@ -160,7 +160,7 @@ MachineCodeForMethod::computeOffsetforLocalVar(const TargetMachine& target,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
MachineCodeForMethod::allocateLocalVar(const TargetMachine& target,
|
MachineFunction::allocateLocalVar(const TargetMachine& target,
|
||||||
const Value* val,
|
const Value* val,
|
||||||
unsigned int sizeToUse)
|
unsigned int sizeToUse)
|
||||||
{
|
{
|
||||||
@ -183,7 +183,7 @@ MachineCodeForMethod::allocateLocalVar(const TargetMachine& target,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
MachineCodeForMethod::allocateSpilledValue(const TargetMachine& target,
|
MachineFunction::allocateSpilledValue(const TargetMachine& target,
|
||||||
const Type* type)
|
const Type* type)
|
||||||
{
|
{
|
||||||
assert(! spillsAreaFrozen &&
|
assert(! spillsAreaFrozen &&
|
||||||
@ -208,7 +208,7 @@ MachineCodeForMethod::allocateSpilledValue(const TargetMachine& target,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
MachineCodeForMethod::pushTempValue(const TargetMachine& target,
|
MachineFunction::pushTempValue(const TargetMachine& target,
|
||||||
unsigned int size)
|
unsigned int size)
|
||||||
{
|
{
|
||||||
unsigned int align = SizeToAlignment(size, target);
|
unsigned int align = SizeToAlignment(size, target);
|
||||||
@ -228,20 +228,20 @@ MachineCodeForMethod::pushTempValue(const TargetMachine& target,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MachineCodeForMethod::popAllTempValues(const TargetMachine& target)
|
MachineFunction::popAllTempValues(const TargetMachine& target)
|
||||||
{
|
{
|
||||||
resetTmpAreaSize(); // clear tmp area to reuse
|
resetTmpAreaSize(); // clear tmp area to reuse
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
MachineCodeForMethod::getOffset(const Value* val) const
|
MachineFunction::getOffset(const Value* val) const
|
||||||
{
|
{
|
||||||
hash_map<const Value*, int>::const_iterator pair = offsets.find(val);
|
hash_map<const Value*, int>::const_iterator pair = offsets.find(val);
|
||||||
return (pair == offsets.end())? INVALID_FRAME_OFFSET : pair->second;
|
return (pair == offsets.end())? INVALID_FRAME_OFFSET : pair->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MachineCodeForMethod::dump() const
|
MachineFunction::dump() const
|
||||||
{
|
{
|
||||||
std::cerr << "\n" << method->getReturnType()
|
std::cerr << "\n" << method->getReturnType()
|
||||||
<< " \"" << method->getName() << "\"\n";
|
<< " \"" << method->getName() << "\"\n";
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
#include "llvm/CodeGen/MachineInstrAnnot.h"
|
#include "llvm/CodeGen/MachineInstrAnnot.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForMethod.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/Analysis/LiveVar/FunctionLiveVarInfo.h"
|
#include "llvm/Analysis/LiveVar/FunctionLiveVarInfo.h"
|
||||||
#include "llvm/Analysis/LoopInfo.h"
|
#include "llvm/Analysis/LoopInfo.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
@ -78,7 +78,7 @@ Pass *getRegisterAllocator(TargetMachine &T) {
|
|||||||
PhyRegAlloc::PhyRegAlloc(Function *F, const TargetMachine& tm,
|
PhyRegAlloc::PhyRegAlloc(Function *F, const TargetMachine& tm,
|
||||||
FunctionLiveVarInfo *Lvi, LoopInfo *LDC)
|
FunctionLiveVarInfo *Lvi, LoopInfo *LDC)
|
||||||
: TM(tm), Meth(F),
|
: TM(tm), Meth(F),
|
||||||
mcInfo(MachineCodeForMethod::get(F)),
|
mcInfo(MachineFunction::get(F)),
|
||||||
LVI(Lvi), LRI(F, tm, RegClassList),
|
LVI(Lvi), LRI(F, tm, RegClassList),
|
||||||
MRI(tm.getRegInfo()),
|
MRI(tm.getRegInfo()),
|
||||||
NumOfRegClasses(MRI.getNumOfRegClasses()),
|
NumOfRegClasses(MRI.getNumOfRegClasses()),
|
||||||
@ -1194,7 +1194,7 @@ void PhyRegAlloc::allocateRegisters()
|
|||||||
|
|
||||||
if (DEBUG_RA) {
|
if (DEBUG_RA) {
|
||||||
cerr << "\n**** Machine Code After Register Allocation:\n\n";
|
cerr << "\n**** Machine Code After Register Allocation:\n\n";
|
||||||
MachineCodeForMethod::get(Meth).dump();
|
MachineFunction::get(Meth).dump();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
class MachineCodeForMethod;
|
class MachineFunction;
|
||||||
class MachineRegInfo;
|
class MachineRegInfo;
|
||||||
class FunctionLiveVarInfo;
|
class FunctionLiveVarInfo;
|
||||||
class MachineInstr;
|
class MachineInstr;
|
||||||
@ -71,7 +71,7 @@ class PhyRegAlloc: public NonCopyable {
|
|||||||
std::vector<RegClass *> RegClassList; // vector of register classes
|
std::vector<RegClass *> RegClassList; // vector of register classes
|
||||||
const TargetMachine &TM; // target machine
|
const TargetMachine &TM; // target machine
|
||||||
const Function *Meth; // name of the function we work on
|
const Function *Meth; // name of the function we work on
|
||||||
MachineCodeForMethod &mcInfo; // descriptor for method's native code
|
MachineFunction &mcInfo; // descriptor for method's native code
|
||||||
FunctionLiveVarInfo *const LVI; // LV information for this method
|
FunctionLiveVarInfo *const LVI; // LV information for this method
|
||||||
// (already computed for BBs)
|
// (already computed for BBs)
|
||||||
LiveRangeInfo LRI; // LR info (will be computed)
|
LiveRangeInfo LRI; // LR info (will be computed)
|
||||||
|
@ -7,10 +7,10 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/Target/MachineFrameInfo.h"
|
#include "llvm/Target/MachineFrameInfo.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForMethod.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
MachineFrameInfo::getIncomingArgOffset(MachineCodeForMethod& mcInfo,
|
MachineFrameInfo::getIncomingArgOffset(MachineFunction& mcInfo,
|
||||||
unsigned argNum) const
|
unsigned argNum) const
|
||||||
{
|
{
|
||||||
assert(argsOnStackHaveFixedSize());
|
assert(argsOnStackHaveFixedSize());
|
||||||
@ -25,7 +25,7 @@ MachineFrameInfo::getIncomingArgOffset(MachineCodeForMethod& mcInfo,
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
MachineFrameInfo::getOutgoingArgOffset(MachineCodeForMethod& mcInfo,
|
MachineFrameInfo::getOutgoingArgOffset(MachineFunction& mcInfo,
|
||||||
unsigned argNum) const
|
unsigned argNum) const
|
||||||
{
|
{
|
||||||
assert(argsOnStackHaveFixedSize());
|
assert(argsOnStackHaveFixedSize());
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForMethod.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/Analysis/LiveVar/FunctionLiveVarInfo.h" // FIXME: Remove when modularized better
|
#include "llvm/Analysis/LiveVar/FunctionLiveVarInfo.h" // FIXME: Remove when modularized better
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "llvm/BasicBlock.h"
|
#include "llvm/BasicBlock.h"
|
||||||
@ -1542,7 +1542,7 @@ bool InstructionSchedulingWithSSA::runOnFunction(Function &F)
|
|||||||
if (SchedDebugLevel >= Sched_PrintMachineCode)
|
if (SchedDebugLevel >= Sched_PrintMachineCode)
|
||||||
{
|
{
|
||||||
cerr << "\n*** Machine instructions after INSTRUCTION SCHEDULING\n";
|
cerr << "\n*** Machine instructions after INSTRUCTION SCHEDULING\n";
|
||||||
MachineCodeForMethod::get(&F).dump();
|
MachineFunction::get(&F).dump();
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -31,7 +31,7 @@ class RegToRefVecMap;
|
|||||||
class ValueToDefVecMap;
|
class ValueToDefVecMap;
|
||||||
class RefVec;
|
class RefVec;
|
||||||
class MachineInstr;
|
class MachineInstr;
|
||||||
class MachineCodeForBasicBlock;
|
class MachineBasicBlock;
|
||||||
|
|
||||||
|
|
||||||
/******************** Exported Data Types and Constants ********************/
|
/******************** Exported Data Types and Constants ********************/
|
||||||
@ -312,7 +312,7 @@ private:
|
|||||||
const TargetMachine& target);
|
const TargetMachine& target);
|
||||||
|
|
||||||
void addCallCCEdges (const std::vector<SchedGraphNode*>& memNod,
|
void addCallCCEdges (const std::vector<SchedGraphNode*>& memNod,
|
||||||
MachineCodeForBasicBlock& bbMvec,
|
MachineBasicBlock& bbMvec,
|
||||||
const TargetMachine& target);
|
const TargetMachine& target);
|
||||||
|
|
||||||
void addMachineRegEdges (RegToRefVecMap& regToRefVecMap,
|
void addMachineRegEdges (RegToRefVecMap& regToRefVecMap,
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "llvm/CodeGen/InstrForest.h"
|
#include "llvm/CodeGen/InstrForest.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForMethod.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/Target/MachineRegInfo.h"
|
#include "llvm/Target/MachineRegInfo.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
@ -155,7 +155,7 @@ bool InstructionSelection::runOnFunction(Function &F)
|
|||||||
if (SelectDebugLevel >= Select_PrintMachineCode)
|
if (SelectDebugLevel >= Select_PrintMachineCode)
|
||||||
{
|
{
|
||||||
cerr << "\n*** Machine instructions after INSTRUCTION SELECTION\n";
|
cerr << "\n*** Machine instructions after INSTRUCTION SELECTION\n";
|
||||||
MachineCodeForMethod::get(&F).dump();
|
MachineFunction::get(&F).dump();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
#include "llvm/CodeGen/MachineInstrAnnot.h"
|
#include "llvm/CodeGen/MachineInstrAnnot.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForMethod.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/CodeGen/InstrForest.h"
|
#include "llvm/CodeGen/InstrForest.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "llvm/Target/MachineRegInfo.h"
|
#include "llvm/Target/MachineRegInfo.h"
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
#include "llvm/CodeGen/MachineInstrAnnot.h"
|
#include "llvm/CodeGen/MachineInstrAnnot.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForMethod.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/Analysis/LiveVar/FunctionLiveVarInfo.h"
|
#include "llvm/Analysis/LiveVar/FunctionLiveVarInfo.h"
|
||||||
#include "llvm/Analysis/LoopInfo.h"
|
#include "llvm/Analysis/LoopInfo.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
@ -78,7 +78,7 @@ Pass *getRegisterAllocator(TargetMachine &T) {
|
|||||||
PhyRegAlloc::PhyRegAlloc(Function *F, const TargetMachine& tm,
|
PhyRegAlloc::PhyRegAlloc(Function *F, const TargetMachine& tm,
|
||||||
FunctionLiveVarInfo *Lvi, LoopInfo *LDC)
|
FunctionLiveVarInfo *Lvi, LoopInfo *LDC)
|
||||||
: TM(tm), Meth(F),
|
: TM(tm), Meth(F),
|
||||||
mcInfo(MachineCodeForMethod::get(F)),
|
mcInfo(MachineFunction::get(F)),
|
||||||
LVI(Lvi), LRI(F, tm, RegClassList),
|
LVI(Lvi), LRI(F, tm, RegClassList),
|
||||||
MRI(tm.getRegInfo()),
|
MRI(tm.getRegInfo()),
|
||||||
NumOfRegClasses(MRI.getNumOfRegClasses()),
|
NumOfRegClasses(MRI.getNumOfRegClasses()),
|
||||||
@ -1194,7 +1194,7 @@ void PhyRegAlloc::allocateRegisters()
|
|||||||
|
|
||||||
if (DEBUG_RA) {
|
if (DEBUG_RA) {
|
||||||
cerr << "\n**** Machine Code After Register Allocation:\n\n";
|
cerr << "\n**** Machine Code After Register Allocation:\n\n";
|
||||||
MachineCodeForMethod::get(Meth).dump();
|
MachineFunction::get(Meth).dump();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
class MachineCodeForMethod;
|
class MachineFunction;
|
||||||
class MachineRegInfo;
|
class MachineRegInfo;
|
||||||
class FunctionLiveVarInfo;
|
class FunctionLiveVarInfo;
|
||||||
class MachineInstr;
|
class MachineInstr;
|
||||||
@ -71,7 +71,7 @@ class PhyRegAlloc: public NonCopyable {
|
|||||||
std::vector<RegClass *> RegClassList; // vector of register classes
|
std::vector<RegClass *> RegClassList; // vector of register classes
|
||||||
const TargetMachine &TM; // target machine
|
const TargetMachine &TM; // target machine
|
||||||
const Function *Meth; // name of the function we work on
|
const Function *Meth; // name of the function we work on
|
||||||
MachineCodeForMethod &mcInfo; // descriptor for method's native code
|
MachineFunction &mcInfo; // descriptor for method's native code
|
||||||
FunctionLiveVarInfo *const LVI; // LV information for this method
|
FunctionLiveVarInfo *const LVI; // LV information for this method
|
||||||
// (already computed for BBs)
|
// (already computed for BBs)
|
||||||
LiveRangeInfo LRI; // LR info (will be computed)
|
LiveRangeInfo LRI; // LR info (will be computed)
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include "SparcInternals.h"
|
#include "SparcInternals.h"
|
||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForMethod.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/Constants.h"
|
#include "llvm/Constants.h"
|
||||||
#include "llvm/DerivedTypes.h"
|
#include "llvm/DerivedTypes.h"
|
||||||
#include "llvm/Module.h"
|
#include "llvm/Module.h"
|
||||||
@ -865,7 +865,7 @@ void SparcModuleAsmPrinter::FoldConstants(const Module &M,
|
|||||||
for (Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I)
|
for (Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I)
|
||||||
if (!I->isExternal()) {
|
if (!I->isExternal()) {
|
||||||
const hash_set<const Constant*> &pool =
|
const hash_set<const Constant*> &pool =
|
||||||
MachineCodeForMethod::get(I).getConstantPoolValues();
|
MachineFunction::get(I).getConstantPoolValues();
|
||||||
MC.insert(pool.begin(), pool.end());
|
MC.insert(pool.begin(), pool.end());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include "SparcInstrSelectionSupport.h"
|
#include "SparcInstrSelectionSupport.h"
|
||||||
#include "llvm/CodeGen/InstrSelection.h"
|
#include "llvm/CodeGen/InstrSelection.h"
|
||||||
#include "llvm/CodeGen/InstrSelectionSupport.h"
|
#include "llvm/CodeGen/InstrSelectionSupport.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForMethod.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
#include "llvm/Constants.h"
|
#include "llvm/Constants.h"
|
||||||
@ -361,7 +361,7 @@ UltraSparcInstrInfo::ConstantMayNotFitInImmedField(const Constant* CV,
|
|||||||
// GlobalValue, viz., the constant address of a global variable or function.
|
// GlobalValue, viz., the constant address of a global variable or function.
|
||||||
// The generated instructions are returned in `mvec'.
|
// The generated instructions are returned in `mvec'.
|
||||||
// Any temp. registers (TmpInstruction) created are recorded in mcfi.
|
// Any temp. registers (TmpInstruction) created are recorded in mcfi.
|
||||||
// Any stack space required is allocated via MachineCodeForMethod.
|
// Any stack space required is allocated via MachineFunction.
|
||||||
//
|
//
|
||||||
void
|
void
|
||||||
UltraSparcInstrInfo::CreateCodeToLoadConst(const TargetMachine& target,
|
UltraSparcInstrInfo::CreateCodeToLoadConst(const TargetMachine& target,
|
||||||
@ -461,7 +461,7 @@ UltraSparcInstrInfo::CreateCodeToLoadConst(const TargetMachine& target,
|
|||||||
mvec.push_back(MI);
|
mvec.push_back(MI);
|
||||||
|
|
||||||
// Make sure constant is emitted to constant pool in assembly code.
|
// Make sure constant is emitted to constant pool in assembly code.
|
||||||
MachineCodeForMethod::get(F).addToConstantPool(cast<Constant>(val));
|
MachineFunction::get(F).addToConstantPool(cast<Constant>(val));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -471,7 +471,7 @@ UltraSparcInstrInfo::CreateCodeToLoadConst(const TargetMachine& target,
|
|||||||
// val must be an integral type. dest must be a Float or Double.
|
// val must be an integral type. dest must be a Float or Double.
|
||||||
// The generated instructions are returned in `mvec'.
|
// The generated instructions are returned in `mvec'.
|
||||||
// Any temp. registers (TmpInstruction) created are recorded in mcfi.
|
// Any temp. registers (TmpInstruction) created are recorded in mcfi.
|
||||||
// Any stack space required is allocated via MachineCodeForMethod.
|
// Any stack space required is allocated via MachineFunction.
|
||||||
//
|
//
|
||||||
void
|
void
|
||||||
UltraSparcInstrInfo::CreateCodeToCopyIntToFloat(const TargetMachine& target,
|
UltraSparcInstrInfo::CreateCodeToCopyIntToFloat(const TargetMachine& target,
|
||||||
@ -487,7 +487,7 @@ UltraSparcInstrInfo::CreateCodeToCopyIntToFloat(const TargetMachine& target,
|
|||||||
&& "Dest type must be float/double");
|
&& "Dest type must be float/double");
|
||||||
|
|
||||||
// Get a stack slot to use for the copy
|
// Get a stack slot to use for the copy
|
||||||
int offset = MachineCodeForMethod::get(F).allocateLocalVar(target, val);
|
int offset = MachineFunction::get(F).allocateLocalVar(target, val);
|
||||||
|
|
||||||
// Get the size of the source value being copied.
|
// Get the size of the source value being copied.
|
||||||
size_t srcSize = target.DataLayout.getTypeSize(val->getType());
|
size_t srcSize = target.DataLayout.getTypeSize(val->getType());
|
||||||
@ -532,7 +532,7 @@ UltraSparcInstrInfo::CreateCodeToCopyIntToFloat(const TargetMachine& target,
|
|||||||
// `val' to an integer register `dest' by copying to memory and back.
|
// `val' to an integer register `dest' by copying to memory and back.
|
||||||
// The generated instructions are returned in `mvec'.
|
// The generated instructions are returned in `mvec'.
|
||||||
// Any temp. registers (TmpInstruction) created are recorded in mcfi.
|
// Any temp. registers (TmpInstruction) created are recorded in mcfi.
|
||||||
// Any stack space required is allocated via MachineCodeForMethod.
|
// Any stack space required is allocated via MachineFunction.
|
||||||
//
|
//
|
||||||
void
|
void
|
||||||
UltraSparcInstrInfo::CreateCodeToCopyFloatToInt(const TargetMachine& target,
|
UltraSparcInstrInfo::CreateCodeToCopyFloatToInt(const TargetMachine& target,
|
||||||
@ -549,7 +549,7 @@ UltraSparcInstrInfo::CreateCodeToCopyFloatToInt(const TargetMachine& target,
|
|||||||
assert((destTy->isIntegral() || isa<PointerType>(destTy))
|
assert((destTy->isIntegral() || isa<PointerType>(destTy))
|
||||||
&& "Dest type must be integer, bool or pointer");
|
&& "Dest type must be integer, bool or pointer");
|
||||||
|
|
||||||
int offset = MachineCodeForMethod::get(F).allocateLocalVar(target, val);
|
int offset = MachineFunction::get(F).allocateLocalVar(target, val);
|
||||||
|
|
||||||
// Store instruction stores `val' to [%fp+offset].
|
// Store instruction stores `val' to [%fp+offset].
|
||||||
// The store opCode is based only the source value being copied.
|
// The store opCode is based only the source value being copied.
|
||||||
@ -579,7 +579,7 @@ UltraSparcInstrInfo::CreateCodeToCopyFloatToInt(const TargetMachine& target,
|
|||||||
// Create instruction(s) to copy src to dest, for arbitrary types
|
// Create instruction(s) to copy src to dest, for arbitrary types
|
||||||
// The generated instructions are returned in `mvec'.
|
// The generated instructions are returned in `mvec'.
|
||||||
// Any temp. registers (TmpInstruction) created are recorded in mcfi.
|
// Any temp. registers (TmpInstruction) created are recorded in mcfi.
|
||||||
// Any stack space required is allocated via MachineCodeForMethod.
|
// Any stack space required is allocated via MachineFunction.
|
||||||
//
|
//
|
||||||
void
|
void
|
||||||
UltraSparcInstrInfo::CreateCopyInstructionsByType(const TargetMachine& target,
|
UltraSparcInstrInfo::CreateCopyInstructionsByType(const TargetMachine& target,
|
||||||
@ -675,7 +675,7 @@ CreateBitExtensionInstructions(bool signExtend,
|
|||||||
// from an arbitrary-sized integer value (sized in bits, not bytes).
|
// from an arbitrary-sized integer value (sized in bits, not bytes).
|
||||||
// The generated instructions are returned in `mvec'.
|
// The generated instructions are returned in `mvec'.
|
||||||
// Any temp. registers (TmpInstruction) created are recorded in mcfi.
|
// Any temp. registers (TmpInstruction) created are recorded in mcfi.
|
||||||
// Any stack space required is allocated via MachineCodeForMethod.
|
// Any stack space required is allocated via MachineFunction.
|
||||||
//
|
//
|
||||||
void
|
void
|
||||||
UltraSparcInstrInfo::CreateSignExtensionInstructions(
|
UltraSparcInstrInfo::CreateSignExtensionInstructions(
|
||||||
@ -697,7 +697,7 @@ UltraSparcInstrInfo::CreateSignExtensionInstructions(
|
|||||||
// For SPARC v9, we sign-extend the given operand using SLL; SRL.
|
// For SPARC v9, we sign-extend the given operand using SLL; SRL.
|
||||||
// The generated instructions are returned in `mvec'.
|
// The generated instructions are returned in `mvec'.
|
||||||
// Any temp. registers (TmpInstruction) created are recorded in mcfi.
|
// Any temp. registers (TmpInstruction) created are recorded in mcfi.
|
||||||
// Any stack space required is allocated via MachineCodeForMethod.
|
// Any stack space required is allocated via MachineFunction.
|
||||||
//
|
//
|
||||||
void
|
void
|
||||||
UltraSparcInstrInfo::CreateZeroExtensionInstructions(
|
UltraSparcInstrInfo::CreateZeroExtensionInstructions(
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "llvm/CodeGen/MachineInstrAnnot.h"
|
#include "llvm/CodeGen/MachineInstrAnnot.h"
|
||||||
#include "llvm/CodeGen/InstrForest.h"
|
#include "llvm/CodeGen/InstrForest.h"
|
||||||
#include "llvm/CodeGen/InstrSelection.h"
|
#include "llvm/CodeGen/InstrSelection.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForMethod.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
||||||
#include "llvm/DerivedTypes.h"
|
#include "llvm/DerivedTypes.h"
|
||||||
#include "llvm/iTerminators.h"
|
#include "llvm/iTerminators.h"
|
||||||
@ -843,7 +843,7 @@ CreateCodeForVariableSizeAlloca(const TargetMachine& target,
|
|||||||
// and create a temporary Value to hold it.
|
// and create a temporary Value to hold it.
|
||||||
assert(result && result->getParent() && "Result value is not part of a fn?");
|
assert(result && result->getParent() && "Result value is not part of a fn?");
|
||||||
Function *F = result->getParent()->getParent();
|
Function *F = result->getParent()->getParent();
|
||||||
MachineCodeForMethod& mcInfo = MachineCodeForMethod::get(F);
|
MachineFunction& mcInfo = MachineFunction::get(F);
|
||||||
bool growUp;
|
bool growUp;
|
||||||
ConstantSInt* dynamicAreaOffset =
|
ConstantSInt* dynamicAreaOffset =
|
||||||
ConstantSInt::get(Type::IntTy,
|
ConstantSInt::get(Type::IntTy,
|
||||||
@ -885,7 +885,7 @@ CreateCodeForFixedSizeAlloca(const TargetMachine& target,
|
|||||||
assert(result && result->getParent() &&
|
assert(result && result->getParent() &&
|
||||||
"Result value is not part of a function?");
|
"Result value is not part of a function?");
|
||||||
Function *F = result->getParent()->getParent();
|
Function *F = result->getParent()->getParent();
|
||||||
MachineCodeForMethod &mcInfo = MachineCodeForMethod::get(F);
|
MachineFunction &mcInfo = MachineFunction::get(F);
|
||||||
|
|
||||||
// Check if the offset would small enough to use as an immediate in
|
// Check if the offset would small enough to use as an immediate in
|
||||||
// load/stores (check LDX because all load/stores have the same-size immediate
|
// load/stores (check LDX because all load/stores have the same-size immediate
|
||||||
|
@ -560,32 +560,32 @@ public:
|
|||||||
// particular function. The frame contents are obtained from the
|
// particular function. The frame contents are obtained from the
|
||||||
// MachineCodeInfoForMethod object for the given function.
|
// MachineCodeInfoForMethod object for the given function.
|
||||||
//
|
//
|
||||||
int getFirstIncomingArgOffset (MachineCodeForMethod& mcInfo,
|
int getFirstIncomingArgOffset (MachineFunction& mcInfo,
|
||||||
bool& growUp) const
|
bool& growUp) const
|
||||||
{
|
{
|
||||||
growUp = true; // arguments area grows upwards
|
growUp = true; // arguments area grows upwards
|
||||||
return FirstIncomingArgOffsetFromFP;
|
return FirstIncomingArgOffsetFromFP;
|
||||||
}
|
}
|
||||||
int getFirstOutgoingArgOffset (MachineCodeForMethod& mcInfo,
|
int getFirstOutgoingArgOffset (MachineFunction& mcInfo,
|
||||||
bool& growUp) const
|
bool& growUp) const
|
||||||
{
|
{
|
||||||
growUp = true; // arguments area grows upwards
|
growUp = true; // arguments area grows upwards
|
||||||
return FirstOutgoingArgOffsetFromSP;
|
return FirstOutgoingArgOffsetFromSP;
|
||||||
}
|
}
|
||||||
int getFirstOptionalOutgoingArgOffset(MachineCodeForMethod& mcInfo,
|
int getFirstOptionalOutgoingArgOffset(MachineFunction& mcInfo,
|
||||||
bool& growUp)const
|
bool& growUp)const
|
||||||
{
|
{
|
||||||
growUp = true; // arguments area grows upwards
|
growUp = true; // arguments area grows upwards
|
||||||
return FirstOptionalOutgoingArgOffsetFromSP;
|
return FirstOptionalOutgoingArgOffsetFromSP;
|
||||||
}
|
}
|
||||||
|
|
||||||
int getFirstAutomaticVarOffset (MachineCodeForMethod& mcInfo,
|
int getFirstAutomaticVarOffset (MachineFunction& mcInfo,
|
||||||
bool& growUp) const;
|
bool& growUp) const;
|
||||||
int getRegSpillAreaOffset (MachineCodeForMethod& mcInfo,
|
int getRegSpillAreaOffset (MachineFunction& mcInfo,
|
||||||
bool& growUp) const;
|
bool& growUp) const;
|
||||||
int getTmpAreaOffset (MachineCodeForMethod& mcInfo,
|
int getTmpAreaOffset (MachineFunction& mcInfo,
|
||||||
bool& growUp) const;
|
bool& growUp) const;
|
||||||
int getDynamicAreaOffset (MachineCodeForMethod& mcInfo,
|
int getDynamicAreaOffset (MachineFunction& mcInfo,
|
||||||
bool& growUp) const;
|
bool& growUp) const;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "SparcInternals.h"
|
#include "SparcInternals.h"
|
||||||
#include "SparcRegClassInfo.h"
|
#include "SparcRegClassInfo.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForMethod.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
@ -28,7 +28,7 @@ namespace {
|
|||||||
const char *getPassName() const { return "Sparc Prolog/Epilog Inserter"; }
|
const char *getPassName() const { return "Sparc Prolog/Epilog Inserter"; }
|
||||||
|
|
||||||
bool runOnFunction(Function &F) {
|
bool runOnFunction(Function &F) {
|
||||||
MachineCodeForMethod &mcodeInfo = MachineCodeForMethod::get(&F);
|
MachineFunction &mcodeInfo = MachineFunction::get(&F);
|
||||||
if (!mcodeInfo.isCompiledAsLeafMethod()) {
|
if (!mcodeInfo.isCompiledAsLeafMethod()) {
|
||||||
InsertPrologCode(F);
|
InsertPrologCode(F);
|
||||||
InsertEpilogCode(F);
|
InsertEpilogCode(F);
|
||||||
@ -60,7 +60,7 @@ void InsertPrologEpilogCode::InsertPrologCode(Function &F)
|
|||||||
// immediate field, we have to use a free register to hold the size.
|
// immediate field, we have to use a free register to hold the size.
|
||||||
// See the comments below for the choice of this register.
|
// See the comments below for the choice of this register.
|
||||||
//
|
//
|
||||||
MachineCodeForMethod& mcInfo = MachineCodeForMethod::get(&F);
|
MachineFunction& mcInfo = MachineFunction::get(&F);
|
||||||
unsigned int staticStackSize = mcInfo.getStaticStackSize();
|
unsigned int staticStackSize = mcInfo.getStaticStackSize();
|
||||||
|
|
||||||
if (staticStackSize < (unsigned) frameInfo.getMinStackFrameSize())
|
if (staticStackSize < (unsigned) frameInfo.getMinStackFrameSize())
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include "SparcInternals.h"
|
#include "SparcInternals.h"
|
||||||
#include "SparcRegClassInfo.h"
|
#include "SparcRegClassInfo.h"
|
||||||
#include "llvm/Target/Sparc.h"
|
#include "llvm/Target/Sparc.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForMethod.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/CodeGen/PhyRegAlloc.h"
|
#include "llvm/CodeGen/PhyRegAlloc.h"
|
||||||
#include "llvm/CodeGen/InstrSelection.h"
|
#include "llvm/CodeGen/InstrSelection.h"
|
||||||
#include "llvm/CodeGen/InstrSelectionSupport.h"
|
#include "llvm/CodeGen/InstrSelectionSupport.h"
|
||||||
@ -477,7 +477,7 @@ void UltraSparcRegInfo::colorMethodArgs(const Function *Meth,
|
|||||||
regClassIDOfArgReg == IntRegClassID &&
|
regClassIDOfArgReg == IntRegClassID &&
|
||||||
"This should only be an Int register for an FP argument");
|
"This should only be an Int register for an FP argument");
|
||||||
|
|
||||||
int TmpOff = MachineCodeForMethod::get(Meth).pushTempValue(target,
|
int TmpOff = MachineFunction::get(Meth).pushTempValue(target,
|
||||||
getSpilledRegSize(regType));
|
getSpilledRegSize(regType));
|
||||||
cpReg2MemMI(FirstAI->InstrnsBefore,
|
cpReg2MemMI(FirstAI->InstrnsBefore,
|
||||||
UniArgReg, getFramePointer(), TmpOff, IntRegType);
|
UniArgReg, getFramePointer(), TmpOff, IntRegType);
|
||||||
@ -496,7 +496,7 @@ void UltraSparcRegInfo::colorMethodArgs(const Function *Meth,
|
|||||||
//
|
//
|
||||||
const MachineFrameInfo& frameInfo = target.getFrameInfo();
|
const MachineFrameInfo& frameInfo = target.getFrameInfo();
|
||||||
int offsetFromFP =
|
int offsetFromFP =
|
||||||
frameInfo.getIncomingArgOffset(MachineCodeForMethod::get(Meth),
|
frameInfo.getIncomingArgOffset(MachineFunction::get(Meth),
|
||||||
argNo);
|
argNo);
|
||||||
|
|
||||||
cpMem2RegMI(FirstAI->InstrnsBefore,
|
cpMem2RegMI(FirstAI->InstrnsBefore,
|
||||||
@ -544,7 +544,7 @@ void UltraSparcRegInfo::colorMethodArgs(const Function *Meth,
|
|||||||
|
|
||||||
const MachineFrameInfo& frameInfo = target.getFrameInfo();
|
const MachineFrameInfo& frameInfo = target.getFrameInfo();
|
||||||
int offsetFromFP =
|
int offsetFromFP =
|
||||||
frameInfo.getIncomingArgOffset(MachineCodeForMethod::get(Meth),
|
frameInfo.getIncomingArgOffset(MachineFunction::get(Meth),
|
||||||
argNo);
|
argNo);
|
||||||
|
|
||||||
LR->modifySpillOffFromFP( offsetFromFP );
|
LR->modifySpillOffFromFP( offsetFromFP );
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
#include "llvm/DerivedTypes.h"
|
#include "llvm/DerivedTypes.h"
|
||||||
#include "llvm/Pass.h"
|
#include "llvm/Pass.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForMethod.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
|
|
||||||
class StackSlots : public FunctionPass {
|
class StackSlots : public FunctionPass {
|
||||||
const TargetMachine &Target;
|
const TargetMachine &Target;
|
||||||
@ -32,7 +32,7 @@ public:
|
|||||||
const Type *PtrInt = PointerType::get(Type::IntTy);
|
const Type *PtrInt = PointerType::get(Type::IntTy);
|
||||||
unsigned Size = Target.DataLayout.getTypeSize(PtrInt);
|
unsigned Size = Target.DataLayout.getTypeSize(PtrInt);
|
||||||
|
|
||||||
MachineCodeForMethod &mcInfo = MachineCodeForMethod::get(&F);
|
MachineFunction &mcInfo = MachineFunction::get(&F);
|
||||||
Value *V = Constant::getNullValue(Type::IntTy);
|
Value *V = Constant::getNullValue(Type::IntTy);
|
||||||
mcInfo.allocateLocalVar(Target, V, 2*Size);
|
mcInfo.allocateLocalVar(Target, V, 2*Size);
|
||||||
return true;
|
return true;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include "SparcInternals.h"
|
#include "SparcInternals.h"
|
||||||
#include "llvm/Target/Sparc.h"
|
#include "llvm/Target/Sparc.h"
|
||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForMethod.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
using std::cerr;
|
using std::cerr;
|
||||||
|
|
||||||
// Build the MachineInstruction Description Array...
|
// Build the MachineInstruction Description Array...
|
||||||
@ -39,7 +39,7 @@ TargetMachine *allocateSparcTargetMachine() { return new UltraSparc(); }
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
int
|
int
|
||||||
UltraSparcFrameInfo::getFirstAutomaticVarOffset(MachineCodeForMethod& ,
|
UltraSparcFrameInfo::getFirstAutomaticVarOffset(MachineFunction& ,
|
||||||
bool& pos) const
|
bool& pos) const
|
||||||
{
|
{
|
||||||
pos = false; // static stack area grows downwards
|
pos = false; // static stack area grows downwards
|
||||||
@ -47,7 +47,7 @@ UltraSparcFrameInfo::getFirstAutomaticVarOffset(MachineCodeForMethod& ,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
UltraSparcFrameInfo::getRegSpillAreaOffset(MachineCodeForMethod& mcInfo,
|
UltraSparcFrameInfo::getRegSpillAreaOffset(MachineFunction& mcInfo,
|
||||||
bool& pos) const
|
bool& pos) const
|
||||||
{
|
{
|
||||||
mcInfo.freezeAutomaticVarsArea(); // ensure no more auto vars are added
|
mcInfo.freezeAutomaticVarsArea(); // ensure no more auto vars are added
|
||||||
@ -58,7 +58,7 @@ UltraSparcFrameInfo::getRegSpillAreaOffset(MachineCodeForMethod& mcInfo,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
UltraSparcFrameInfo::getTmpAreaOffset(MachineCodeForMethod& mcInfo,
|
UltraSparcFrameInfo::getTmpAreaOffset(MachineFunction& mcInfo,
|
||||||
bool& pos) const
|
bool& pos) const
|
||||||
{
|
{
|
||||||
mcInfo.freezeAutomaticVarsArea(); // ensure no more auto vars are added
|
mcInfo.freezeAutomaticVarsArea(); // ensure no more auto vars are added
|
||||||
@ -72,7 +72,7 @@ UltraSparcFrameInfo::getTmpAreaOffset(MachineCodeForMethod& mcInfo,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
UltraSparcFrameInfo::getDynamicAreaOffset(MachineCodeForMethod& mcInfo,
|
UltraSparcFrameInfo::getDynamicAreaOffset(MachineFunction& mcInfo,
|
||||||
bool& pos) const
|
bool& pos) const
|
||||||
{
|
{
|
||||||
// Dynamic stack area grows downwards starting at top of opt-args area.
|
// Dynamic stack area grows downwards starting at top of opt-args area.
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include "llvm/CodeGen/InstrScheduling.h"
|
#include "llvm/CodeGen/InstrScheduling.h"
|
||||||
#include "llvm/CodeGen/RegisterAllocation.h"
|
#include "llvm/CodeGen/RegisterAllocation.h"
|
||||||
#include "llvm/CodeGen/PeepholeOpts.h"
|
#include "llvm/CodeGen/PeepholeOpts.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForMethod.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
||||||
#include "llvm/Reoptimizer/Mapping/MappingInfo.h"
|
#include "llvm/Reoptimizer/Mapping/MappingInfo.h"
|
||||||
#include "llvm/Reoptimizer/Mapping/FInfo.h"
|
#include "llvm/Reoptimizer/Mapping/FInfo.h"
|
||||||
@ -87,7 +87,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool runOnFunction(Function &F) {
|
bool runOnFunction(Function &F) {
|
||||||
MachineCodeForMethod::construct(&F, Target);
|
MachineFunction::construct(&F, Target);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -117,7 +117,7 @@ struct FreeMachineCodeForFunction : public FunctionPass {
|
|||||||
void
|
void
|
||||||
TargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out)
|
TargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out)
|
||||||
{
|
{
|
||||||
// Construct and initialize the MachineCodeForMethod object for this fn.
|
// Construct and initialize the MachineFunction object for this fn.
|
||||||
PM.add(new ConstructMachineCodeForFunction(*this));
|
PM.add(new ConstructMachineCodeForFunction(*this));
|
||||||
|
|
||||||
//Insert empty stackslots in the stack frame of each function
|
//Insert empty stackslots in the stack frame of each function
|
||||||
|
Loading…
x
Reference in New Issue
Block a user