mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 18:29:46 +00:00
Convert debug messages to use dbgs(). Generally this means
s/errs/dbgs/g except for certain special cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92066 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b511efa7be
commit
3b519f62fc
@ -102,7 +102,7 @@ namespace llvm {
|
|||||||
typename ProfileInfoT<FType, BType>::Edge E = PI->getEdge(*bbi,BB);
|
typename ProfileInfoT<FType, BType>::Edge E = PI->getEdge(*bbi,BB);
|
||||||
double EdgeWeight = PI->getEdgeWeight(E);
|
double EdgeWeight = PI->getEdgeWeight(E);
|
||||||
if (EdgeWeight == ProfileInfoT<FType, BType>::MissingValue) { EdgeWeight = 0; }
|
if (EdgeWeight == ProfileInfoT<FType, BType>::MissingValue) { EdgeWeight = 0; }
|
||||||
errs() << "calculated in-edge " << E << ": "
|
dbgs() << "calculated in-edge " << E << ": "
|
||||||
<< format("%20.20g",EdgeWeight) << "\n";
|
<< format("%20.20g",EdgeWeight) << "\n";
|
||||||
inWeight += EdgeWeight;
|
inWeight += EdgeWeight;
|
||||||
inCount++;
|
inCount++;
|
||||||
@ -117,13 +117,13 @@ namespace llvm {
|
|||||||
typename ProfileInfoT<FType, BType>::Edge E = PI->getEdge(BB,*bbi);
|
typename ProfileInfoT<FType, BType>::Edge E = PI->getEdge(BB,*bbi);
|
||||||
double EdgeWeight = PI->getEdgeWeight(E);
|
double EdgeWeight = PI->getEdgeWeight(E);
|
||||||
if (EdgeWeight == ProfileInfoT<FType, BType>::MissingValue) { EdgeWeight = 0; }
|
if (EdgeWeight == ProfileInfoT<FType, BType>::MissingValue) { EdgeWeight = 0; }
|
||||||
errs() << "calculated out-edge " << E << ": "
|
dbgs() << "calculated out-edge " << E << ": "
|
||||||
<< format("%20.20g",EdgeWeight) << "\n";
|
<< format("%20.20g",EdgeWeight) << "\n";
|
||||||
outWeight += EdgeWeight;
|
outWeight += EdgeWeight;
|
||||||
outCount++;
|
outCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
errs() << "Block " << BB->getNameStr() << " in "
|
dbgs() << "Block " << BB->getNameStr() << " in "
|
||||||
<< BB->getParent()->getNameStr() << ":"
|
<< BB->getParent()->getNameStr() << ":"
|
||||||
<< "BBWeight=" << format("%20.20g",BBWeight) << ","
|
<< "BBWeight=" << format("%20.20g",BBWeight) << ","
|
||||||
<< "inWeight=" << format("%20.20g",inWeight) << ","
|
<< "inWeight=" << format("%20.20g",inWeight) << ","
|
||||||
@ -141,7 +141,7 @@ namespace llvm {
|
|||||||
|
|
||||||
template<class FType, class BType>
|
template<class FType, class BType>
|
||||||
void ProfileVerifierPassT<FType, BType>::debugEntry (DetailedBlockInfo *DI) {
|
void ProfileVerifierPassT<FType, BType>::debugEntry (DetailedBlockInfo *DI) {
|
||||||
errs() << "TROUBLE: Block " << DI->BB->getNameStr() << " in "
|
dbgs() << "TROUBLE: Block " << DI->BB->getNameStr() << " in "
|
||||||
<< DI->BB->getParent()->getNameStr() << ":"
|
<< DI->BB->getParent()->getNameStr() << ":"
|
||||||
<< "BBWeight=" << format("%20.20g",DI->BBWeight) << ","
|
<< "BBWeight=" << format("%20.20g",DI->BBWeight) << ","
|
||||||
<< "inWeight=" << format("%20.20g",DI->inWeight) << ","
|
<< "inWeight=" << format("%20.20g",DI->inWeight) << ","
|
||||||
@ -191,20 +191,20 @@ namespace llvm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define ASSERTMESSAGE(M) \
|
#define ASSERTMESSAGE(M) \
|
||||||
{ errs() << "ASSERT:" << (M) << "\n"; \
|
{ dbgs() << "ASSERT:" << (M) << "\n"; \
|
||||||
if (!DisableAssertions) assert(0 && (M)); }
|
if (!DisableAssertions) assert(0 && (M)); }
|
||||||
|
|
||||||
template<class FType, class BType>
|
template<class FType, class BType>
|
||||||
double ProfileVerifierPassT<FType, BType>::ReadOrAssert(typename ProfileInfoT<FType, BType>::Edge E) {
|
double ProfileVerifierPassT<FType, BType>::ReadOrAssert(typename ProfileInfoT<FType, BType>::Edge E) {
|
||||||
double EdgeWeight = PI->getEdgeWeight(E);
|
double EdgeWeight = PI->getEdgeWeight(E);
|
||||||
if (EdgeWeight == ProfileInfoT<FType, BType>::MissingValue) {
|
if (EdgeWeight == ProfileInfoT<FType, BType>::MissingValue) {
|
||||||
errs() << "Edge " << E << " in Function "
|
dbgs() << "Edge " << E << " in Function "
|
||||||
<< ProfileInfoT<FType, BType>::getFunction(E)->getNameStr() << ": ";
|
<< ProfileInfoT<FType, BType>::getFunction(E)->getNameStr() << ": ";
|
||||||
ASSERTMESSAGE("Edge has missing value");
|
ASSERTMESSAGE("Edge has missing value");
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
if (EdgeWeight < 0) {
|
if (EdgeWeight < 0) {
|
||||||
errs() << "Edge " << E << " in Function "
|
dbgs() << "Edge " << E << " in Function "
|
||||||
<< ProfileInfoT<FType, BType>::getFunction(E)->getNameStr() << ": ";
|
<< ProfileInfoT<FType, BType>::getFunction(E)->getNameStr() << ": ";
|
||||||
ASSERTMESSAGE("Edge has negative value");
|
ASSERTMESSAGE("Edge has negative value");
|
||||||
}
|
}
|
||||||
@ -218,7 +218,7 @@ namespace llvm {
|
|||||||
DetailedBlockInfo *DI) {
|
DetailedBlockInfo *DI) {
|
||||||
if (Error) {
|
if (Error) {
|
||||||
DEBUG(debugEntry(DI));
|
DEBUG(debugEntry(DI));
|
||||||
errs() << "Block " << DI->BB->getNameStr() << " in Function "
|
dbgs() << "Block " << DI->BB->getNameStr() << " in Function "
|
||||||
<< DI->BB->getParent()->getNameStr() << ": ";
|
<< DI->BB->getParent()->getNameStr() << ": ";
|
||||||
ASSERTMESSAGE(Message);
|
ASSERTMESSAGE(Message);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user