[PATCH] D21932: [ThinLTO] Perform profile-guided indirect call promotion
Mehdi AMINI via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 11 13:38:31 PDT 2016
mehdi_amini added inline comments.
================
Comment at: lib/Bitcode/Writer/BitcodeWriter.cpp:151
@@ +150,3 @@
+ if (Index)
+ for (const auto &I : *Index)
+ for (auto &S : I.second)
----------------
davidxl wrote:
> Add one line comment before each 'for' -- kind of hard to read a loop deep nested without some background.
Alternatively, using explicit name for iterator variable can help.
================
Comment at: lib/Transforms/IPO/PassManagerBuilder.cpp:366
@@ +365,3 @@
+ // Indirect call promotion that promotes intra-module targets only.
+ MPM.add(createPGOIndirectCallPromotionLegacyPass());
+
----------------
Is this totally related to this patch or is it already an existing mistake? (I.e. could be committed separately?)
Also remove braces for the if block.
http://reviews.llvm.org/D21932
More information about the llvm-commits
mailing list