Skip to content

Commit bbb2707

Browse files
fda0igcbot
authored andcommitted
rule-of-three, use std::move
Address rule-of-three violation in MergeAllocas.h Use std::move in leaf code in CodeSinking.cpp
1 parent f6e728c commit bbb2707

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

IGC/AdaptorCommon/RayTracing/MergeAllocas.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ namespace IGC
4747
clearLivenessInfo();
4848
}
4949

50+
AllocationBasedLivenessAnalysis (const AllocationBasedLivenessAnalysis &) = delete;
51+
AllocationBasedLivenessAnalysis & operator=(const AllocationBasedLivenessAnalysis &) = delete;
52+
5053
bool runOnFunction(llvm::Function& F) override;
5154
llvm::StringRef getPassName() const override
5255
{

IGC/Compiler/CISACodeGen/CodeSinking.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ namespace IGC {
11671167
InstrVec BBInstructions;
11681168
for (Instruction &I : *BB)
11691169
BBInstructions.push_back(&I);
1170-
OriginalPositions[BB] = BBInstructions;
1170+
OriginalPositions[BB] = std::move(BBInstructions);
11711171
}
11721172

11731173
auto rerunLiveness = [&]()

0 commit comments

Comments
 (0)