This is not functional change to adopt new emit() API added in https://reviews.llvm.org/D37921.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Analysis/ValueTracking.cpp | ||
---|---|---|
781 ↗ | (On Diff #117558) | Move this inside the lambda and then also no need for {} |
lib/CodeGen/StackProtector.cpp | ||
269–291 ↗ | (On Diff #117558) | auto RemarkBuilder = [&]() { return OptimizationRemark(DEBUG_TYPE, "StackProtectorAllocaOrArray", &I) << "Stack protection applied to function " << ore::NV("Function", F) << " due to a call to alloca or use of a variable length array"; } and then later just: ORE.emit(RemarkBuilder); |
lib/Transforms/IPO/Inliner.cpp | ||
936–950 ↗ | (On Diff #117558) | Move the if inside the lambda? |
lib/Transforms/IPO/SampleProfile.cpp | ||
529–543 ↗ | (On Diff #117558) | Move 'if' inside the lambda |
lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp | ||
386–393 ↗ | (On Diff #117558) | Move the 'using namespace' inside the lambda. You have more of this later. |
lib/Transforms/Scalar/GVN.cpp | ||
857 ↗ | (On Diff #117558) | The caller of this function already uses allowExtraAnalysis so no need to use the closure syntax here. |
lib/Transforms/Vectorize/LoopVectorize.cpp | ||
1251–1270 ↗ | (On Diff #117558) | Do this whole thing in the lambda. |
5752–5754 ↗ | (On Diff #117558) | Again the point of the lambda to only conditionally construct the remark so please either build the remark inside or don't use the lambda syntax. |
One more idea for improvement and then this is ready to go.
lib/Transforms/IPO/Inliner.cpp | ||
---|---|---|
935–945 ↗ | (On Diff #118165) | Can you actually factor this a bit further so that the common parts are done unconditionally. The reason why we use an insertion operator so that we can do such things. |
lib/Transforms/IPO/SampleProfile.cpp | ||
532–543 ↗ | (On Diff #118165) | Same thing here. Just build the common object and conditionally insert the discriminator. |