Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-22 Thread Rong Xu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL267224: PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name (authored by xur). Changed prior to commit: http://reviews.llvm.org/D18624?vs=54717=54725#toc Repository: rL

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-22 Thread Rong Xu via cfe-commits
xur added a comment. tested with povray with full path names in the command line and it works fine. http://reviews.llvm.org/D18624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-22 Thread David Li via cfe-commits
davidxl accepted this revision. davidxl added a comment. This revision is now accepted and ready to land. lgtm http://reviews.llvm.org/D18624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-22 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 54717. xur added a comment. Handling the path-stripped prefix in PGOFuncName. This new patch depends on http://reviews.llvm.org/D19433 http://reviews.llvm.org/D18624 Files: CodeGenPGO.cpp Index: CodeGenPGO.cpp

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-21 Thread Rong Xu via cfe-commits
I was using spec-run where the command line has the pathless filename. The source in Atam's command-line has the absolute path. In meta-data creation, we used Module's getSourceFileName() which has the source name appeared in the command line (in this case, a full patch name). While in Clang's

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-21 Thread Rong Xu via cfe-commits
xur added a comment. I was using spec-run where the command line has the pathless filename. The source in Atam's command-line has the absolute path. In meta-data creation, we used Module's getSourceFileName() which has the source name appeared in the command line (in this case, a full patch

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-21 Thread Adam Nemet via cfe-commits
anemet added a comment. > How did you build povray? > can you show me your command line in building (for example, csg.cpp) for > both--fprofile-instr-use and -fprofile-instr-generate? Sent it in an email. http://reviews.llvm.org/D18624 ___

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-21 Thread Rong Xu via cfe-commits
xur added a comment. I tried http://reviews.llvm.org/D17864 and http://reviews.llvm.org/D18624 with the latest trunk of r267006 on a clean client. The built compiler works fine with povray. the meta data only has the files name. How did you build povray? can you show me your command line in

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-21 Thread Rong Xu via cfe-commits
I tried D17864 and D18624 with the latest trunk of r267006 on a clean client. The built compiler works fine with povray. the meta data only has the files name. How did you build povray? can you show me your command line in building (for example, csg.cpp) for both--fprofile-instr-use and

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-20 Thread Adam Nemet via cfe-commits
anemet added a comment. Rong, do you have full paths or just the filename? http://reviews.llvm.org/D18624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-20 Thread Rong Xu via cfe-commits
xur added a comment. these two patches work fine in my build. My llvm was on top ov r265491. The opt remarks in the last email were emitted by the compiler. I'll try to reproduce with r266465. http://reviews.llvm.org/D18624 ___ cfe-commits mailing

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-20 Thread Rong Xu via cfe-commits
these two patches work fine in my build. My llvm was on top ov r265491. The opt remarks in the last email were emitted by the compiler. I'll try to reproduce with r266465. On Apr 20, 2016 4:00 PM, "Adam Nemet" wrote: > anemet added a comment. > > Still does not to work. The

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-20 Thread Rong Xu via cfe-commits
xur added a comment. the reason for splitting the check is we don't need this check at all in llvm instrument,-- as it's done per function. but I guess it does not matter much to move it in to create -- it's only called once per function. http://reviews.llvm.org/D18624

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-20 Thread Rong Xu via cfe-commits
the reason for splitting the check is we don't need this check at all in llvm instrument,-- as it's done per function. but I guess it does not matter much to move it in to create -- it's only called once per function. On Wed, Apr 20, 2016 at 3:04 PM, David Li wrote: >

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-20 Thread David Li via cfe-commits
davidxl added inline comments. Comment at: lib/CodeGen/CodeGenPGO.cpp:47 @@ +46,3 @@ + // Create PGOFuncName meta data. + if (!llvm::getPGOFuncNameMetadata(*Fn)) +llvm::createPGOFuncNameMetadata(*Fn); This check be folded into the creator. The creator

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-19 Thread Adam Nemet via cfe-commits
anemet added a comment. Sure, I'll try. Also sounds like you are missing a test in this patch that fails with the old version but passes with the new?! http://reviews.llvm.org/D18624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-19 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 54275. xur added a comment. Previous patch was bad (as David noticed) -- we might not annotate all the functions that we interested. This updated patch should work. BTW, I got the following promotions for 453.provay: LLVM gold plugin: csg.cpp:157:15: Promote

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-19 Thread Adam Nemet via cfe-commits
anemet added a comment. Thanks, the indirect call is via the All_Intersections macro in All_CSG_Intersect_Intersections and the top targets are: All_Sphere_Intersections and All_Plane_Intersections. http://reviews.llvm.org/D18624 ___ cfe-commits

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-19 Thread Xinliang David Li via cfe-commits
Can you also try IR based instrumentation? -fprofile-instr-generate -Xclang=-fprofile-instrument=llvm David On Tue, Apr 19, 2016 at 9:40 AM, Adam Nemet wrote: > anemet added a comment. > > As discussed under http://reviews.llvm.org/D17864, I did a run with this > and I don't

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-19 Thread Rong Xu via cfe-commits
I did not test Clang based instrumentation with SPEC. I will try it with povray today. On Tue, Apr 19, 2016 at 9:40 AM, Adam Nemet wrote: > anemet added a comment. > > As discussed under http://reviews.llvm.org/D17864, I did a run with this > and I don't get the indirect call

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-19 Thread Rong Xu via cfe-commits
xur added a comment. I did not test Clang based instrumentation with SPEC. I will try it with povray today. http://reviews.llvm.org/D18624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-19 Thread Adam Nemet via cfe-commits
anemet added a comment. As discussed under http://reviews.llvm.org/D17864, I did a run with this and I don't get the indirect call promoted that calls static functions in povray. I will dig more but do I need to pass some extra flag? http://reviews.llvm.org/D18624

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-15 Thread David Li via cfe-commits
davidxl added inline comments. Comment at: lib/CodeGen/CodeGenPGO.cpp:791 @@ +790,3 @@ +// Create PGOFuncName meta data. +llvm::Function *F = ValueSite->getFunction(); +if (!llvm::getPGOFuncNameMetadata(*F)) This may not be the best place do set the

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-03-30 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 52134. xur added a comment. sync the change in http://reviews.llvm.org/D18623. http://reviews.llvm.org/D18624 Files: lib/CodeGen/CodeGenPGO.cpp Index: lib/CodeGen/CodeGenPGO.cpp === ---

[PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-03-30 Thread Rong Xu via cfe-commits
xur created this revision. xur added reviewers: davidxl, bogner, joker.eph. xur added subscribers: cfe-commits, vsk, xur. Write out the PGOFuncName meta data if PGOFuncName is different from function's raw name. This should only apply to internal linkage functions. This is to be consumed by