Small improvements to debug info printing in opt.cpp
This commit is contained in:
50
opt.cpp
50
opt.cpp
@@ -1139,6 +1139,11 @@ lExtractFromInserts(llvm::Value *v, unsigned int index) {
|
|||||||
static llvm::Value *
|
static llvm::Value *
|
||||||
lGetBasePtrAndOffsets(llvm::Value *ptrs, llvm::Value **offsets,
|
lGetBasePtrAndOffsets(llvm::Value *ptrs, llvm::Value **offsets,
|
||||||
llvm::Instruction *insertBefore) {
|
llvm::Instruction *insertBefore) {
|
||||||
|
if (g->debugPrint) {
|
||||||
|
fprintf(stderr, "lGetBasePtrAndOffsets\n");
|
||||||
|
LLVMDumpValue(ptrs);
|
||||||
|
}
|
||||||
|
|
||||||
llvm::Value *base = lGetBasePointer(ptrs);
|
llvm::Value *base = lGetBasePointer(ptrs);
|
||||||
if (base != NULL) {
|
if (base != NULL) {
|
||||||
// We have a straight up varying pointer with no indexing that's
|
// We have a straight up varying pointer with no indexing that's
|
||||||
@@ -3854,28 +3859,28 @@ GatherCoalescePass::runOnBasicBlock(llvm::BasicBlock &bb) {
|
|||||||
bool ok = lGetSourcePosFromMetadata(fwdCall, &fwdPos);
|
bool ok = lGetSourcePosFromMetadata(fwdCall, &fwdPos);
|
||||||
Assert(ok);
|
Assert(ok);
|
||||||
|
|
||||||
#if 0
|
if (g->debugPrint) {
|
||||||
if (base != fwdCall->getArgOperand(0)) {
|
if (base != fwdCall->getArgOperand(0)) {
|
||||||
Debug(fwdPos, "base pointers mismatch");
|
Debug(fwdPos, "base pointers mismatch");
|
||||||
base->dump();
|
LLVMDumpValue(base);
|
||||||
fwdCall->getArgOperand(0)->dump();
|
LLVMDumpValue(fwdCall->getArgOperand(0));
|
||||||
|
}
|
||||||
|
if (variableOffsets != fwdCall->getArgOperand(1)) {
|
||||||
|
Debug(fwdPos, "varying offsets mismatch");
|
||||||
|
LLVMDumpValue(variableOffsets);
|
||||||
|
LLVMDumpValue(fwdCall->getArgOperand(1));
|
||||||
|
}
|
||||||
|
if (offsetScale != fwdCall->getArgOperand(2)) {
|
||||||
|
Debug(fwdPos, "offset scales mismatch");
|
||||||
|
LLVMDumpValue(offsetScale);
|
||||||
|
LLVMDumpValue(fwdCall->getArgOperand(2));
|
||||||
|
}
|
||||||
|
if (mask != fwdCall->getArgOperand(4)) {
|
||||||
|
Debug(fwdPos, "masks mismatch");
|
||||||
|
LLVMDumpValue(mask);
|
||||||
|
LLVMDumpValue(fwdCall->getArgOperand(4));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (variableOffsets != fwdCall->getArgOperand(1)) {
|
|
||||||
Debug(fwdPos, "varying offsets mismatch");
|
|
||||||
variableOffsets->dump();
|
|
||||||
fwdCall->getArgOperand(1)->dump();
|
|
||||||
}
|
|
||||||
if (offsetScale != fwdCall->getArgOperand(2)) {
|
|
||||||
Debug(fwdPos, "offset scales mismatch");
|
|
||||||
offsetScale->dump();
|
|
||||||
fwdCall->getArgOperand(2)->dump();
|
|
||||||
}
|
|
||||||
if (mask != fwdCall->getArgOperand(4)) {
|
|
||||||
Debug(fwdPos, "masks mismatch");
|
|
||||||
mask->dump();
|
|
||||||
fwdCall->getArgOperand(4)->dump();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (base == fwdCall->getArgOperand(0) &&
|
if (base == fwdCall->getArgOperand(0) &&
|
||||||
variableOffsets == fwdCall->getArgOperand(1) &&
|
variableOffsets == fwdCall->getArgOperand(1) &&
|
||||||
@@ -3905,9 +3910,6 @@ GatherCoalescePass::runOnBasicBlock(llvm::BasicBlock &bb) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//CO if (modifiedAny)
|
|
||||||
//CO bb.dump();
|
|
||||||
|
|
||||||
return modifiedAny;
|
return modifiedAny;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user