[PATCH] Add function entry count metadata.

Diego Novillo dnovillo at google.com
Wed May 13 07:12:28 PDT 2015


On Tue, May 12, 2015 at 8:14 PM, Philip Reames
<listmail at philipreames.com> wrote:

> Comment at: docs/BranchWeightMetadata.rst:124
> @@ +123,3 @@
> +analysis and optimization, ``MD_prof`` nodes can also be assigned to a
> +function header. The first operator is a string indicating the name of
> +the associated counter.
> ----------------
> "function header"?  What's that?  I assume you mean the definition or declaration itself?
>
> operand -> operator

Done.

>
> ================
> Comment at: lib/IR/Verifier.cpp:1480
> @@ +1479,3 @@
> +             "expected string with name of the !prof annotation", MD);
> +      MDString *MDS = dyn_cast<MDString>(MD->getOperand(0));
> +      StringRef ProfName = MDS->getString();
> ----------------
> cast rather than dyn_cast

Done.

>
> ================
> Comment at: test/Verifier/function-metadata.ll:3
> @@ +2,3 @@
> +
> +define i32 @bad1() !prof !0 {
> +  ret i32 0
> ----------------
> I still want to see a positive test example.  Your example from the documentation would be a good one.  Something to show that the profiling is valid when used properly.

Done.

Thanks for the review and suggestions.


Diego.



More information about the llvm-commits mailing list