mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 07:34:33 +00:00
*** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4317 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
92eba0c49b
commit
32be9f6cd4
@ -8,7 +8,7 @@
|
||||
#include "llvm/CodeGen/RegAllocCommon.h"
|
||||
#include "llvm/CodeGen/RegClass.h"
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
||||
#include "llvm/CodeGen/MachineBasicBlock.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Function.h"
|
||||
#include "llvm/BasicBlock.h"
|
||||
@ -148,10 +148,10 @@ void LiveRangeInfo::constructLiveRanges() {
|
||||
//
|
||||
for (Function::const_iterator BBI=Meth->begin(); BBI != Meth->end(); ++BBI){
|
||||
// get the vector of machine instructions for this basic block.
|
||||
MachineCodeForBasicBlock& MIVec = MachineCodeForBasicBlock::get(BBI);
|
||||
MachineBasicBlock& MIVec = MachineBasicBlock::get(BBI);
|
||||
|
||||
// iterate over all the machine instructions in BB
|
||||
for(MachineCodeForBasicBlock::iterator MInstIterator = MIVec.begin();
|
||||
for(MachineBasicBlock::iterator MInstIterator = MIVec.begin();
|
||||
MInstIterator != MIVec.end(); ++MInstIterator) {
|
||||
MachineInstr *MInst = *MInstIterator;
|
||||
|
||||
@ -252,12 +252,11 @@ void LiveRangeInfo::coalesceLRs()
|
||||
BBI != BBE; ++BBI) {
|
||||
|
||||
// get the iterator for machine instructions
|
||||
const MachineCodeForBasicBlock& MIVec = MachineCodeForBasicBlock::get(BBI);
|
||||
MachineCodeForBasicBlock::const_iterator MInstIterator = MIVec.begin();
|
||||
const MachineBasicBlock& MIVec = MachineBasicBlock::get(BBI);
|
||||
MachineBasicBlock::const_iterator MInstIterator = MIVec.begin();
|
||||
|
||||
// iterate over all the machine instructions in BB
|
||||
for( ; MInstIterator != MIVec.end(); ++MInstIterator) {
|
||||
|
||||
const MachineInstr * MInst = *MInstIterator;
|
||||
|
||||
if( DEBUG_RA >= RA_DEBUG_LiveRanges) {
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "llvm/CodeGen/PhyRegAlloc.h"
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
#include "llvm/CodeGen/MachineInstrAnnot.h"
|
||||
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
||||
#include "llvm/CodeGen/MachineBasicBlock.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/Analysis/LiveVar/FunctionLiveVarInfo.h"
|
||||
#include "llvm/Analysis/LoopInfo.h"
|
||||
@ -275,8 +275,8 @@ void PhyRegAlloc::buildInterferenceGraphs()
|
||||
|
||||
// get the iterator for machine instructions
|
||||
//
|
||||
const MachineCodeForBasicBlock& MIVec = MachineCodeForBasicBlock::get(BBI);
|
||||
MachineCodeForBasicBlock::const_iterator MII = MIVec.begin();
|
||||
const MachineBasicBlock& MIVec = MachineBasicBlock::get(BBI);
|
||||
MachineBasicBlock::const_iterator MII = MIVec.begin();
|
||||
|
||||
// iterate over all the machine instructions in BB
|
||||
//
|
||||
@ -420,8 +420,8 @@ void PhyRegAlloc::addInterferencesForArgs() {
|
||||
//-----------------------------
|
||||
inline void
|
||||
InsertBefore(MachineInstr* newMI,
|
||||
MachineCodeForBasicBlock& MIVec,
|
||||
MachineCodeForBasicBlock::iterator& MII)
|
||||
MachineBasicBlock& MIVec,
|
||||
MachineBasicBlock::iterator& MII)
|
||||
{
|
||||
MII = MIVec.insert(MII, newMI);
|
||||
++MII;
|
||||
@ -429,8 +429,8 @@ InsertBefore(MachineInstr* newMI,
|
||||
|
||||
inline void
|
||||
InsertAfter(MachineInstr* newMI,
|
||||
MachineCodeForBasicBlock& MIVec,
|
||||
MachineCodeForBasicBlock::iterator& MII)
|
||||
MachineBasicBlock& MIVec,
|
||||
MachineBasicBlock::iterator& MII)
|
||||
{
|
||||
++MII; // insert before the next instruction
|
||||
MII = MIVec.insert(MII, newMI);
|
||||
@ -438,16 +438,16 @@ InsertAfter(MachineInstr* newMI,
|
||||
|
||||
inline void
|
||||
SubstituteInPlace(MachineInstr* newMI,
|
||||
MachineCodeForBasicBlock& MIVec,
|
||||
MachineCodeForBasicBlock::iterator MII)
|
||||
MachineBasicBlock& MIVec,
|
||||
MachineBasicBlock::iterator MII)
|
||||
{
|
||||
*MII = newMI;
|
||||
}
|
||||
|
||||
inline void
|
||||
PrependInstructions(vector<MachineInstr *> &IBef,
|
||||
MachineCodeForBasicBlock& MIVec,
|
||||
MachineCodeForBasicBlock::iterator& MII,
|
||||
MachineBasicBlock& MIVec,
|
||||
MachineBasicBlock::iterator& MII,
|
||||
const std::string& msg)
|
||||
{
|
||||
if (!IBef.empty())
|
||||
@ -467,8 +467,8 @@ PrependInstructions(vector<MachineInstr *> &IBef,
|
||||
|
||||
inline void
|
||||
AppendInstructions(std::vector<MachineInstr *> &IAft,
|
||||
MachineCodeForBasicBlock& MIVec,
|
||||
MachineCodeForBasicBlock::iterator& MII,
|
||||
MachineBasicBlock& MIVec,
|
||||
MachineBasicBlock::iterator& MII,
|
||||
const std::string& msg)
|
||||
{
|
||||
if (!IAft.empty())
|
||||
@ -489,10 +489,10 @@ AppendInstructions(std::vector<MachineInstr *> &IAft,
|
||||
|
||||
void PhyRegAlloc::updateMachineCode()
|
||||
{
|
||||
MachineCodeForBasicBlock& MIVec = MachineCodeForBasicBlock::get(&Meth->getEntryNode());
|
||||
MachineBasicBlock& MIVec = MachineBasicBlock::get(&Meth->getEntryNode());
|
||||
|
||||
// Insert any instructions needed at method entry
|
||||
MachineCodeForBasicBlock::iterator MII = MIVec.begin();
|
||||
MachineBasicBlock::iterator MII = MIVec.begin();
|
||||
PrependInstructions(AddedInstrAtEntry.InstrnsBefore, MIVec, MII,
|
||||
"At function entry: \n");
|
||||
assert(AddedInstrAtEntry.InstrnsAfter.empty() &&
|
||||
@ -503,8 +503,8 @@ void PhyRegAlloc::updateMachineCode()
|
||||
BBI != BBE; ++BBI) {
|
||||
|
||||
// iterate over all the machine instructions in BB
|
||||
MachineCodeForBasicBlock &MIVec = MachineCodeForBasicBlock::get(BBI);
|
||||
for (MachineCodeForBasicBlock::iterator MII = MIVec.begin();
|
||||
MachineBasicBlock &MIVec = MachineBasicBlock::get(BBI);
|
||||
for (MachineBasicBlock::iterator MII = MIVec.begin();
|
||||
MII != MIVec.end(); ++MII) {
|
||||
|
||||
MachineInstr *MInst = *MII;
|
||||
@ -958,8 +958,8 @@ void PhyRegAlloc::printMachineCode()
|
||||
cerr << "\n"; printLabel(BBI); cerr << ": ";
|
||||
|
||||
// get the iterator for machine instructions
|
||||
MachineCodeForBasicBlock& MIVec = MachineCodeForBasicBlock::get(BBI);
|
||||
MachineCodeForBasicBlock::iterator MII = MIVec.begin();
|
||||
MachineBasicBlock& MIVec = MachineBasicBlock::get(BBI);
|
||||
MachineBasicBlock::iterator MII = MIVec.begin();
|
||||
|
||||
// iterate over all the machine instructions in BB
|
||||
for ( ; MII != MIVec.end(); ++MII) {
|
||||
@ -1039,7 +1039,7 @@ void PhyRegAlloc::printMachineCode()
|
||||
void PhyRegAlloc::colorIncomingArgs()
|
||||
{
|
||||
const BasicBlock &FirstBB = Meth->front();
|
||||
const MachineInstr *FirstMI = MachineCodeForBasicBlock::get(&FirstBB).front();
|
||||
const MachineInstr *FirstMI = MachineBasicBlock::get(&FirstBB).front();
|
||||
assert(FirstMI && "No machine instruction in entry BB");
|
||||
|
||||
MRI.colorMethodArgs(Meth, LRI, &AddedInstrAtEntry);
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "llvm/CodeGen/RegAllocCommon.h"
|
||||
#include "llvm/CodeGen/RegClass.h"
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
||||
#include "llvm/CodeGen/MachineBasicBlock.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Function.h"
|
||||
#include "llvm/BasicBlock.h"
|
||||
@ -148,10 +148,10 @@ void LiveRangeInfo::constructLiveRanges() {
|
||||
//
|
||||
for (Function::const_iterator BBI=Meth->begin(); BBI != Meth->end(); ++BBI){
|
||||
// get the vector of machine instructions for this basic block.
|
||||
MachineCodeForBasicBlock& MIVec = MachineCodeForBasicBlock::get(BBI);
|
||||
MachineBasicBlock& MIVec = MachineBasicBlock::get(BBI);
|
||||
|
||||
// iterate over all the machine instructions in BB
|
||||
for(MachineCodeForBasicBlock::iterator MInstIterator = MIVec.begin();
|
||||
for(MachineBasicBlock::iterator MInstIterator = MIVec.begin();
|
||||
MInstIterator != MIVec.end(); ++MInstIterator) {
|
||||
MachineInstr *MInst = *MInstIterator;
|
||||
|
||||
@ -252,12 +252,11 @@ void LiveRangeInfo::coalesceLRs()
|
||||
BBI != BBE; ++BBI) {
|
||||
|
||||
// get the iterator for machine instructions
|
||||
const MachineCodeForBasicBlock& MIVec = MachineCodeForBasicBlock::get(BBI);
|
||||
MachineCodeForBasicBlock::const_iterator MInstIterator = MIVec.begin();
|
||||
const MachineBasicBlock& MIVec = MachineBasicBlock::get(BBI);
|
||||
MachineBasicBlock::const_iterator MInstIterator = MIVec.begin();
|
||||
|
||||
// iterate over all the machine instructions in BB
|
||||
for( ; MInstIterator != MIVec.end(); ++MInstIterator) {
|
||||
|
||||
const MachineInstr * MInst = *MInstIterator;
|
||||
|
||||
if( DEBUG_RA >= RA_DEBUG_LiveRanges) {
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "llvm/CodeGen/PhyRegAlloc.h"
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
#include "llvm/CodeGen/MachineInstrAnnot.h"
|
||||
#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
|
||||
#include "llvm/CodeGen/MachineBasicBlock.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/Analysis/LiveVar/FunctionLiveVarInfo.h"
|
||||
#include "llvm/Analysis/LoopInfo.h"
|
||||
@ -275,8 +275,8 @@ void PhyRegAlloc::buildInterferenceGraphs()
|
||||
|
||||
// get the iterator for machine instructions
|
||||
//
|
||||
const MachineCodeForBasicBlock& MIVec = MachineCodeForBasicBlock::get(BBI);
|
||||
MachineCodeForBasicBlock::const_iterator MII = MIVec.begin();
|
||||
const MachineBasicBlock& MIVec = MachineBasicBlock::get(BBI);
|
||||
MachineBasicBlock::const_iterator MII = MIVec.begin();
|
||||
|
||||
// iterate over all the machine instructions in BB
|
||||
//
|
||||
@ -420,8 +420,8 @@ void PhyRegAlloc::addInterferencesForArgs() {
|
||||
//-----------------------------
|
||||
inline void
|
||||
InsertBefore(MachineInstr* newMI,
|
||||
MachineCodeForBasicBlock& MIVec,
|
||||
MachineCodeForBasicBlock::iterator& MII)
|
||||
MachineBasicBlock& MIVec,
|
||||
MachineBasicBlock::iterator& MII)
|
||||
{
|
||||
MII = MIVec.insert(MII, newMI);
|
||||
++MII;
|
||||
@ -429,8 +429,8 @@ InsertBefore(MachineInstr* newMI,
|
||||
|
||||
inline void
|
||||
InsertAfter(MachineInstr* newMI,
|
||||
MachineCodeForBasicBlock& MIVec,
|
||||
MachineCodeForBasicBlock::iterator& MII)
|
||||
MachineBasicBlock& MIVec,
|
||||
MachineBasicBlock::iterator& MII)
|
||||
{
|
||||
++MII; // insert before the next instruction
|
||||
MII = MIVec.insert(MII, newMI);
|
||||
@ -438,16 +438,16 @@ InsertAfter(MachineInstr* newMI,
|
||||
|
||||
inline void
|
||||
SubstituteInPlace(MachineInstr* newMI,
|
||||
MachineCodeForBasicBlock& MIVec,
|
||||
MachineCodeForBasicBlock::iterator MII)
|
||||
MachineBasicBlock& MIVec,
|
||||
MachineBasicBlock::iterator MII)
|
||||
{
|
||||
*MII = newMI;
|
||||
}
|
||||
|
||||
inline void
|
||||
PrependInstructions(vector<MachineInstr *> &IBef,
|
||||
MachineCodeForBasicBlock& MIVec,
|
||||
MachineCodeForBasicBlock::iterator& MII,
|
||||
MachineBasicBlock& MIVec,
|
||||
MachineBasicBlock::iterator& MII,
|
||||
const std::string& msg)
|
||||
{
|
||||
if (!IBef.empty())
|
||||
@ -467,8 +467,8 @@ PrependInstructions(vector<MachineInstr *> &IBef,
|
||||
|
||||
inline void
|
||||
AppendInstructions(std::vector<MachineInstr *> &IAft,
|
||||
MachineCodeForBasicBlock& MIVec,
|
||||
MachineCodeForBasicBlock::iterator& MII,
|
||||
MachineBasicBlock& MIVec,
|
||||
MachineBasicBlock::iterator& MII,
|
||||
const std::string& msg)
|
||||
{
|
||||
if (!IAft.empty())
|
||||
@ -489,10 +489,10 @@ AppendInstructions(std::vector<MachineInstr *> &IAft,
|
||||
|
||||
void PhyRegAlloc::updateMachineCode()
|
||||
{
|
||||
MachineCodeForBasicBlock& MIVec = MachineCodeForBasicBlock::get(&Meth->getEntryNode());
|
||||
MachineBasicBlock& MIVec = MachineBasicBlock::get(&Meth->getEntryNode());
|
||||
|
||||
// Insert any instructions needed at method entry
|
||||
MachineCodeForBasicBlock::iterator MII = MIVec.begin();
|
||||
MachineBasicBlock::iterator MII = MIVec.begin();
|
||||
PrependInstructions(AddedInstrAtEntry.InstrnsBefore, MIVec, MII,
|
||||
"At function entry: \n");
|
||||
assert(AddedInstrAtEntry.InstrnsAfter.empty() &&
|
||||
@ -503,8 +503,8 @@ void PhyRegAlloc::updateMachineCode()
|
||||
BBI != BBE; ++BBI) {
|
||||
|
||||
// iterate over all the machine instructions in BB
|
||||
MachineCodeForBasicBlock &MIVec = MachineCodeForBasicBlock::get(BBI);
|
||||
for (MachineCodeForBasicBlock::iterator MII = MIVec.begin();
|
||||
MachineBasicBlock &MIVec = MachineBasicBlock::get(BBI);
|
||||
for (MachineBasicBlock::iterator MII = MIVec.begin();
|
||||
MII != MIVec.end(); ++MII) {
|
||||
|
||||
MachineInstr *MInst = *MII;
|
||||
@ -958,8 +958,8 @@ void PhyRegAlloc::printMachineCode()
|
||||
cerr << "\n"; printLabel(BBI); cerr << ": ";
|
||||
|
||||
// get the iterator for machine instructions
|
||||
MachineCodeForBasicBlock& MIVec = MachineCodeForBasicBlock::get(BBI);
|
||||
MachineCodeForBasicBlock::iterator MII = MIVec.begin();
|
||||
MachineBasicBlock& MIVec = MachineBasicBlock::get(BBI);
|
||||
MachineBasicBlock::iterator MII = MIVec.begin();
|
||||
|
||||
// iterate over all the machine instructions in BB
|
||||
for ( ; MII != MIVec.end(); ++MII) {
|
||||
@ -1039,7 +1039,7 @@ void PhyRegAlloc::printMachineCode()
|
||||
void PhyRegAlloc::colorIncomingArgs()
|
||||
{
|
||||
const BasicBlock &FirstBB = Meth->front();
|
||||
const MachineInstr *FirstMI = MachineCodeForBasicBlock::get(&FirstBB).front();
|
||||
const MachineInstr *FirstMI = MachineBasicBlock::get(&FirstBB).front();
|
||||
assert(FirstMI && "No machine instruction in entry BB");
|
||||
|
||||
MRI.colorMethodArgs(Meth, LRI, &AddedInstrAtEntry);
|
||||
|
Loading…
x
Reference in New Issue
Block a user