mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-05 12:31:46 +00:00
Correction to allow compilation with Visual C++.
Patch contributed by Morten Ofstad. Thanks Morten! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17123 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
698f96f7c8
commit
17e6e44298
@ -638,7 +638,7 @@ void processGraph(Graph &g,
|
|||||||
#ifdef DEBUG_PATH_PROFILES
|
#ifdef DEBUG_PATH_PROFILES
|
||||||
//debugging info
|
//debugging info
|
||||||
cerr<<"After moving dummy code\n";
|
cerr<<"After moving dummy code\n";
|
||||||
for(map<Edge, getEdgeCode *>::iterator cd_i=codeInsertions.begin(),
|
for(map<Edge, getEdgeCode *,EdgeCompare2>::iterator cd_i=codeInsertions.begin(),
|
||||||
cd_e=codeInsertions.end(); cd_i != cd_e; ++cd_i){
|
cd_e=codeInsertions.end(); cd_i != cd_e; ++cd_i){
|
||||||
printEdge(cd_i->first);
|
printEdge(cd_i->first);
|
||||||
cerr<<cd_i->second->getCond()<<":"
|
cerr<<cd_i->second->getCond()<<":"
|
||||||
@ -650,7 +650,7 @@ void processGraph(Graph &g,
|
|||||||
|
|
||||||
//see what it looks like...
|
//see what it looks like...
|
||||||
//now insert code along edges which have codes on them
|
//now insert code along edges which have codes on them
|
||||||
for(map<Edge, getEdgeCode *>::iterator MI=codeInsertions.begin(),
|
for(map<Edge, getEdgeCode *,EdgeCompare2>::iterator MI=codeInsertions.begin(),
|
||||||
ME=codeInsertions.end(); MI!=ME; ++MI){
|
ME=codeInsertions.end(); MI!=ME; ++MI){
|
||||||
Edge ed=MI->first;
|
Edge ed=MI->first;
|
||||||
insertBB(ed, MI->second, rInst, countInst, numPaths, MethNo, threshold);
|
insertBB(ed, MI->second, rInst, countInst, numPaths, MethNo, threshold);
|
||||||
|
@ -30,6 +30,8 @@
|
|||||||
#include "llvm/ADT/STLExtras.h"
|
#include "llvm/ADT/STLExtras.h"
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -143,8 +143,8 @@ static void Coerce(Instruction *I, unsigned OpNum, Type *Ty) {
|
|||||||
if (Constant *C = dyn_cast<Constant>(I->getOperand(OpNum)))
|
if (Constant *C = dyn_cast<Constant>(I->getOperand(OpNum)))
|
||||||
I->setOperand(OpNum, ConstantExpr::getCast(C, Ty));
|
I->setOperand(OpNum, ConstantExpr::getCast(C, Ty));
|
||||||
else {
|
else {
|
||||||
CastInst *C = new CastInst(I->getOperand(OpNum), Ty, "", I);
|
CastInst *CI = new CastInst(I->getOperand(OpNum), Ty, "", I);
|
||||||
I->setOperand(OpNum, C);
|
I->setOperand(OpNum, CI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -220,8 +220,8 @@ void PromoteMem2Reg::run() {
|
|||||||
// (unspecified) ordering of basic blocks in the dominance frontier,
|
// (unspecified) ordering of basic blocks in the dominance frontier,
|
||||||
// which would give PHI nodes non-determinstic subscripts. Fix this by
|
// which would give PHI nodes non-determinstic subscripts. Fix this by
|
||||||
// processing blocks in order of the occurance in the function.
|
// processing blocks in order of the occurance in the function.
|
||||||
for (DominanceFrontier::DomSetType::iterator P = S.begin(),PE = S.end();
|
for (DominanceFrontier::DomSetType::const_iterator P = S.begin(),
|
||||||
P != PE; ++P)
|
PE = S.end(); P != PE; ++P)
|
||||||
DFBlocks.push_back(BBNumbers.getNumber(*P));
|
DFBlocks.push_back(BBNumbers.getNumber(*P));
|
||||||
|
|
||||||
// Sort by which the block ordering in the function.
|
// Sort by which the block ordering in the function.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user