diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2015-01-01 12:56:47 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2015-01-01 12:56:47 +0000 |
commit | 6044c0bc78f4588e9bcacaea4707f473445c161c (patch) | |
tree | 1ede5a0ba14752f4c52da5b50fa1e8ebe5dafa82 /llvm/lib | |
parent | 994cde8869d4c1a6d8309eb73a41268e7538e35b (diff) | |
download | bcm5719-llvm-6044c0bc78f4588e9bcacaea4707f473445c161c.tar.gz bcm5719-llvm-6044c0bc78f4588e9bcacaea4707f473445c161c.zip |
[SROA] Switch to using a more direct debug logging technique in one part
of my new load and store splitting, and fix a bug where it logged
a totally irrelevant slice rather than the actual slice in question.
The logging here previously worked because we used to place new slices
onto the back of the core sequence, but that caused other problems.
I updated the actual code to store new slices in their own vector but
didn't update the logging. There isn't a good way to reuse the logging
any more, and frankly it wasn't needed. We can directly log this bit
more easily.
llvm-svn: 225063
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Scalar/SROA.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp index ce7d4aa714b..0869114e7f7 100644 --- a/llvm/lib/Transforms/Scalar/SROA.cpp +++ b/llvm/lib/Transforms/Scalar/SROA.cpp @@ -3702,8 +3702,9 @@ bool SROA::presplitLoadsAndStores(AllocaInst &AI, AllocaSlices &AS) { Slice(BaseOffset + PartOffset, BaseOffset + PartOffset + PartSize, &PLoad->getOperandUse(PLoad->getPointerOperandIndex()), /*IsSplittable*/ true)); - DEBUG(AS.printSlice(dbgs(), std::prev(AS.end()), " ")); - DEBUG(dbgs() << ": " << *PLoad << "\n"); + DEBUG(dbgs() << " new slice [" << NewSlices.back().beginOffset() + << ", " << NewSlices.back().endOffset() << "): " << *PLoad + << "\n"); // Setup the next partition. PartOffset = Offsets.Splits[Idx]; @@ -3837,8 +3838,9 @@ bool SROA::presplitLoadsAndStores(AllocaInst &AI, AllocaSlices &AS) { Slice(BaseOffset + PartOffset, BaseOffset + PartOffset + PartSize, &PStore->getOperandUse(PStore->getPointerOperandIndex()), /*IsSplittable*/ true)); - DEBUG(AS.printSlice(dbgs(), std::prev(AS.end()), " ")); - DEBUG(dbgs() << ": " << *PStore << "\n"); + DEBUG(dbgs() << " new slice [" << NewSlices.back().beginOffset() + << ", " << NewSlices.back().endOffset() << "): " << *PStore + << "\n"); if (!SplitLoads) { DEBUG(dbgs() << " of split load: " << *PLoad << "\n"); } |