[PATCH] D17864: [PGO] Promote indirect calls to conditional direct calls with value-profile

Rong Xu via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 6 13:12:00 PDT 2016


On Wed, Apr 6, 2016 at 12:46 PM, Mehdi AMINI <mehdi.amini at apple.com> wrote:

> joker.eph added inline comments.
>
> ================
> Comment at: lib/Transforms/IPO/PassManagerBuilder.cpp:383
> @@ -380,1 +382,3 @@
> +    MPM.add(createPGOIndirectCallPromotionPass());
> +  }
>
> ----------------
> Why is it running twice in LTO mode?
>
The first one is for intra module promotions. The second one is for cross
module promotion.
The idea is to run as many promotions in pre lto compilation (until we see
a cross module target -- the targets are sorted based on the counts). I
think this will save compile time for parallel build.

>
> ================
> Comment at: lib/Transforms/IPO/PassManagerBuilder.cpp:588
> @@ -583,1 +587,3 @@
>
> +  // Indirect call promotion. (xur)
> +  PM.add(createPGOIndirectCallPromotionPass(true));
> ----------------
> What is the meaning of the "xur" here?
>

Should be removed.

>
> ================
> Comment at: lib/Transforms/Instrumentation/IndirectCallPromotion.cpp:534
> @@ +533,3 @@
> +
> +bool PGOIndirectCallPromotion::runOnModule(Module &M) {
> +  if (DisableICP)
> ----------------
> Can you implement this in a utility function? I expect the "pass wrapper"
> to have a dummy runOnModule that would only call the public API.
>
Sorry, can you explain a little more?
Do you mean I move the current in current runOnModule to a static function
and call it from runOnModule?


>
>
> http://reviews.llvm.org/D17864
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160406/9ff341e2/attachment.html>


More information about the llvm-commits mailing list