mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
Use proper debugging facilities so other people don't have to look at my commented-out
debugging lines. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37347 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9b6bd12ef0
commit
cdf8efde6a
@ -28,10 +28,10 @@
|
|||||||
#include "llvm/ADT/DepthFirstIterator.h"
|
#include "llvm/ADT/DepthFirstIterator.h"
|
||||||
#include "llvm/ADT/Statistic.h"
|
#include "llvm/ADT/Statistic.h"
|
||||||
#include "llvm/Support/Compiler.h"
|
#include "llvm/Support/Compiler.h"
|
||||||
|
#include "llvm/Support/Debug.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <cstdio>
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
@ -288,11 +288,13 @@ void GVNPRE::clean(GVNPRE::ValueTable VN, std::set<GVNPRE::Expression>& set) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GVNPRE::dump(GVNPRE::ValueTable& VN, std::set<GVNPRE::Expression>& s) {
|
void GVNPRE::dump(GVNPRE::ValueTable& VN, std::set<GVNPRE::Expression>& s) {
|
||||||
printf("{ ");
|
DOUT << "{ ";
|
||||||
for (std::set<Expression>::iterator I = s.begin(), E = s.end(); I != E; ++I) {
|
for (std::set<Expression>::iterator I = s.begin(), E = s.end(); I != E; ++I) {
|
||||||
printf("(%d, %s, value.%d, value.%d) ", I->opcode, I->value == 0 ? "0" : I->value->getName().c_str(), I->lhs, I->rhs);
|
DOUT << "( " << I->opcode << ", "
|
||||||
|
<< (I->value == 0 ? "0" : I->value->getName().c_str())
|
||||||
|
<< ", value." << I->lhs << ", value." << I->rhs << " ) ";
|
||||||
}
|
}
|
||||||
printf("}\n\n");
|
DOUT << "}\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
void GVNPRE::CalculateAvailOut(GVNPRE::ValueTable& VN, std::set<Expression>& MS,
|
void GVNPRE::CalculateAvailOut(GVNPRE::ValueTable& VN, std::set<Expression>& MS,
|
||||||
@ -439,21 +441,23 @@ bool GVNPRE::runOnFunction(Function &F) {
|
|||||||
iterations++;
|
iterations++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*printf("Iterations: %d\n", iterations);
|
DOUT << "Iterations: " << iterations << "\n";
|
||||||
|
|
||||||
for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I) {
|
for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I) {
|
||||||
printf("Name: ");
|
DOUT << "Name: " << I->getName().c_str() << "\n";
|
||||||
printf(I->getName().c_str());
|
|
||||||
printf("\nTMP_GEN: ");
|
DOUT << "TMP_GEN: ";
|
||||||
dump(VN, generatedTemporaries[I]);
|
dump(VN, generatedTemporaries[I]);
|
||||||
printf("\nEXP_GEN: ");
|
DOUT << "\n";
|
||||||
|
|
||||||
|
DOUT << "EXP_GEN: ";
|
||||||
dump(VN, generatedExpressions[I]);
|
dump(VN, generatedExpressions[I]);
|
||||||
//printf("\nANTIC_OUT: ");
|
DOUT << "\n";
|
||||||
//dump(VN, anticipatedOut[I]);
|
|
||||||
printf("\nANTIC_IN: \n");
|
DOUT << "ANTIC_IN: ";
|
||||||
dump(VN, anticipatedIn[I]);
|
dump(VN, anticipatedIn[I]);
|
||||||
printf("\n");
|
DOUT << "\n";
|
||||||
}*/
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user