[PATCH] D57957: [NFC] Pass blocks vector to the OutlineRegionInfo constructor by reference.
Sergey Dmitriev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 8 11:45:23 PST 2019
sdmitriev updated this revision to Diff 186016.
sdmitriev added a comment.
[NFC] Avoid passing blocks vector to the OutlineRegionInfo constructor by value.
Addressed review comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57957/new/
https://reviews.llvm.org/D57957
Files:
llvm/lib/Transforms/IPO/PartialInlining.cpp
Index: llvm/lib/Transforms/IPO/PartialInlining.cpp
===================================================================
--- llvm/lib/Transforms/IPO/PartialInlining.cpp
+++ llvm/lib/Transforms/IPO/PartialInlining.cpp
@@ -181,11 +181,11 @@
// Container for outline regions
struct OutlineRegionInfo {
- OutlineRegionInfo(SmallVector<BasicBlock *, 8> Region,
+ OutlineRegionInfo(ArrayRef<BasicBlock *> Region,
BasicBlock *EntryBlock, BasicBlock *ExitBlock,
BasicBlock *ReturnBlock)
- : Region(Region), EntryBlock(EntryBlock), ExitBlock(ExitBlock),
- ReturnBlock(ReturnBlock) {}
+ : Region(Region.begin(), Region.end()), EntryBlock(EntryBlock),
+ ExitBlock(ExitBlock), ReturnBlock(ReturnBlock) {}
SmallVector<BasicBlock *, 8> Region;
BasicBlock *EntryBlock;
BasicBlock *ExitBlock;
@@ -535,7 +535,6 @@
// assert(ReturnBlock && "ReturnBlock is NULL somehow!");
FunctionOutliningMultiRegionInfo::OutlineRegionInfo RegInfo(
DominateVector, DominateVector.front(), ExitBlock, ReturnBlock);
- RegInfo.Region = DominateVector;
OutliningInfo->ORI.push_back(RegInfo);
#ifndef NDEBUG
if (TracePartialInlining) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57957.186016.patch
Type: text/x-patch
Size: 1248 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190208/50bf6f7a/attachment.bin>
More information about the llvm-commits
mailing list