[PATCH] D12781: PGO IR-level instrumentation infrastructure

Rong Xu via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 1 14:47:55 PST 2015


@silvas:
It's not clear how can I use CHECK-DAG to group together the branch weight
meta data and the related instruction. if there is a single instruction and
single meta data, I can move up the branch weight meta data next the the
instruction.  But if there are multiple, I don't know how to do it. From
the document, CHECK-DAG can be used b/w two matches (or before the first
match, or after the last match).  Move the branch-weight meta data and use
USE-DAG is not working.

I also tried to change all use USE to USE (except the first and last). That
won't work either.

As for the loop2, it just a more complex data flow. I'll change it to two
level nexted loop according to David's suggestion.

@david:
I used to use a buttom test loop, but I removed based on silvas's
suggestion. I'll add more tests later if necessary.



On Mon, Nov 30, 2015 at 8:38 PM, David Li <davidxl at google.com> wrote:

> davidxl added inline comments.
>
> ================
> Comment at: test/Transforms/PGOProfile/loop2.ll:9
> @@ +8,3 @@
> +
> +define i32 @test_nested_for(i32 %r, i32 %s, i32 %t) {
> +entry:
> ----------------
> silvas wrote:
> > What is the importance of testing a nested for loop? What part of the
> code are you trying to exercise that isn't covered by loop1.ll?
> Having loop nest in the test for better coverage is fine -- but looks like
> we don't actually need 3-deep nest -- a 2-deep loop nest is good enough and
> will be easier to read.
>
> loop1.ll has a loop with top test. How about a loop test with bottom
> testing. Also a loop with more control flow inside the body, and a loop
> with early exit might be nice to have -- but those can be added later as
> follow ups if needed.
>
>
> http://reviews.llvm.org/D12781
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151201/ae9ae455/attachment.html>


More information about the llvm-commits mailing list