mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
Change errs() to dbgs().
llvm-svn: 92639
This commit is contained in:
parent
b961c4aa37
commit
6b20914d8a
@ -147,7 +147,7 @@ CallGraphNode *ArgPromotion::PromoteArguments(CallGraphNode *CGN) {
|
|||||||
const Type *AgTy = cast<PointerType>(PtrArg->getType())->getElementType();
|
const Type *AgTy = cast<PointerType>(PtrArg->getType())->getElementType();
|
||||||
if (const StructType *STy = dyn_cast<StructType>(AgTy)) {
|
if (const StructType *STy = dyn_cast<StructType>(AgTy)) {
|
||||||
if (maxElements > 0 && STy->getNumElements() > maxElements) {
|
if (maxElements > 0 && STy->getNumElements() > maxElements) {
|
||||||
DEBUG(errs() << "argpromotion disable promoting argument '"
|
DEBUG(dbgs() << "argpromotion disable promoting argument '"
|
||||||
<< PtrArg->getName() << "' because it would require adding more"
|
<< PtrArg->getName() << "' because it would require adding more"
|
||||||
<< " than " << maxElements << " arguments to the function.\n");
|
<< " than " << maxElements << " arguments to the function.\n");
|
||||||
} else {
|
} else {
|
||||||
@ -409,7 +409,7 @@ bool ArgPromotion::isSafeToPromoteArgument(Argument *Arg, bool isByVal) const {
|
|||||||
// to do.
|
// to do.
|
||||||
if (ToPromote.find(Operands) == ToPromote.end()) {
|
if (ToPromote.find(Operands) == ToPromote.end()) {
|
||||||
if (maxElements > 0 && ToPromote.size() == maxElements) {
|
if (maxElements > 0 && ToPromote.size() == maxElements) {
|
||||||
DEBUG(errs() << "argpromotion not promoting argument '"
|
DEBUG(dbgs() << "argpromotion not promoting argument '"
|
||||||
<< Arg->getName() << "' because it would require adding more "
|
<< Arg->getName() << "' because it would require adding more "
|
||||||
<< "than " << maxElements << " arguments to the function.\n");
|
<< "than " << maxElements << " arguments to the function.\n");
|
||||||
// We limit aggregate promotion to only promoting up to a fixed number
|
// We limit aggregate promotion to only promoting up to a fixed number
|
||||||
@ -593,7 +593,7 @@ CallGraphNode *ArgPromotion::DoPromotion(Function *F,
|
|||||||
NF->copyAttributesFrom(F);
|
NF->copyAttributesFrom(F);
|
||||||
|
|
||||||
|
|
||||||
DEBUG(errs() << "ARG PROMOTION: Promoting to:" << *NF << "\n"
|
DEBUG(dbgs() << "ARG PROMOTION: Promoting to:" << *NF << "\n"
|
||||||
<< "From: " << *F);
|
<< "From: " << *F);
|
||||||
|
|
||||||
// Recompute the parameter attributes list based on the new arguments for
|
// Recompute the parameter attributes list based on the new arguments for
|
||||||
@ -808,7 +808,7 @@ CallGraphNode *ArgPromotion::DoPromotion(Function *F,
|
|||||||
LI->replaceAllUsesWith(I2);
|
LI->replaceAllUsesWith(I2);
|
||||||
AA.replaceWithNewValue(LI, I2);
|
AA.replaceWithNewValue(LI, I2);
|
||||||
LI->eraseFromParent();
|
LI->eraseFromParent();
|
||||||
DEBUG(errs() << "*** Promoted load of argument '" << I->getName()
|
DEBUG(dbgs() << "*** Promoted load of argument '" << I->getName()
|
||||||
<< "' in function '" << F->getName() << "'\n");
|
<< "' in function '" << F->getName() << "'\n");
|
||||||
} else {
|
} else {
|
||||||
GetElementPtrInst *GEP = cast<GetElementPtrInst>(I->use_back());
|
GetElementPtrInst *GEP = cast<GetElementPtrInst>(I->use_back());
|
||||||
@ -835,7 +835,7 @@ CallGraphNode *ArgPromotion::DoPromotion(Function *F,
|
|||||||
NewName += ".val";
|
NewName += ".val";
|
||||||
TheArg->setName(NewName);
|
TheArg->setName(NewName);
|
||||||
|
|
||||||
DEBUG(errs() << "*** Promoted agg argument '" << TheArg->getName()
|
DEBUG(dbgs() << "*** Promoted agg argument '" << TheArg->getName()
|
||||||
<< "' of function '" << NF->getName() << "'\n");
|
<< "' of function '" << NF->getName() << "'\n");
|
||||||
|
|
||||||
// All of the uses must be load instructions. Replace them all with
|
// All of the uses must be load instructions. Replace them all with
|
||||||
|
Loading…
Reference in New Issue
Block a user