Re: [GOOGLE] Rewrite FUNCTION_DECL references after LIPO linking

2014-07-15 Thread Xinliang David Li
ok. This is now consistent with how cgraph targets are handled. (Changes like this may shake up more bugs due to bad assumptions. More extensive testing after this is expected). David On Tue, Jul 15, 2014 at 3:24 AM, Teresa Johnson wrote: > This patch will rewrite references to function decls in

FDO and source changes

2014-07-16 Thread Xinliang David Li
oid SLP vectorization of large basic blocks. */ DEFPARAM (PARAM_SLP_MAX_INSNS_IN_BB, "slp-max-insns-in-bb", Index: ChangeLog === --- ChangeLog (revision 212682) +++ ChangeLog (working copy) @@ -1,3

Re: FDO and source changes

2014-07-17 Thread Xinliang David Li
On Wed, Jul 16, 2014 at 4:42 PM, Jan Hubicka wrote: >> Instrumentation based FDO is designed to work when the source files >> that are used to generate the instr binary match exactly with the >> sources in profile-use compile. It is known historically that using >> stale profile (due to source cha

Re: FDO and source changes

2014-07-17 Thread Xinliang David Li
>> >> I see why you do not like first_global_object_name because changing it would >> cause >> all functions from that unit to drop the profiles. Perhaps we can combine >> function name >> and compilation unit (gcov file) name? > > that is a good idea -- it will also solve the LTO problem you men

Re: FDO and source changes

2014-07-18 Thread Xinliang David Li
Any other concern of the patch? I don't really like the name of the parameter myself. Do you have better suggestions? thanks, David On Thu, Jul 17, 2014 at 10:17 AM, Xinliang David Li wrote: >>> >>> I see why you do not like first_global_object_name because changing it

a new libgcov interface: __gcov_dump_all

2014-07-18 Thread Xinliang David Li
geLog === --- libgcc/ChangeLog(revision 212682) +++ libgcc/ChangeLog(working copy) @@ -1,3 +1,9 @@ +2014-07-18 Xinliang David Li + + * libgcov-driver.c: Force __gcov_dump to be exported + * libgcov-interface.c (register_dumper)

Re: a new libgcov interface: __gcov_dump_all

2014-07-20 Thread Xinliang David Li
shared libs. David On Sun, Jul 20, 2014 at 12:42 PM, Nathan Sidwell wrote: > On 07/18/14 22:41, Xinliang David Li wrote: >> >> Hi, the following patch implements a new dumper interface to allow >> dumping of profile data for all instrumented shared libraries. >> &g

Re: a new libgcov interface: __gcov_dump_all

2014-07-22 Thread Xinliang David Li
Please take a look the updated patch. It addresses the issue of using dlclose before dump, and potential races (between a thread closing a library and the dumper call). David On Sun, Jul 20, 2014 at 11:12 PM, Nathan Sidwell wrote: > On 07/20/14 21:38, Xinliang David Li wrote: >&g

Re: FDO and source changes

2014-07-23 Thread Xinliang David Li
On Tue, Jul 22, 2014 at 8:14 PM, Jeff Law wrote: > On 07/16/14 14:32, Xinliang David Li wrote: >> >> Instrumentation based FDO is designed to work when the source files >> that are used to generate the instr binary match exactly with the >> sources in profile-use compil

Re: FDO and source changes

2014-07-23 Thread Xinliang David Li
; something that's 64 bit long is enough to make sure collisions does > not happen. Maybe it's worth the trouble? > > On Wed, Jul 23, 2014 at 10:42 AM, Xinliang David Li > wrote: >> >> On Tue, Jul 22, 2014 at 8:14 PM, Jeff Law wrote: >> > On 07/16/14 14:32

Re: [GOOGLE] Use resolved node during AFDO vpt

2014-07-23 Thread Xinliang David Li
ok. David On Wed, Jul 23, 2014 at 1:46 PM, Teresa Johnson wrote: > AFDO invokes cgraph_node_for_asm during VPT to get the cgraph node for > a callee. Use the resolved node so we don't add a reference to the > un-resolved node after LIPO fixup. > > Passes regression tests and internal test. Ok fo

Re: FDO and source changes

2014-07-23 Thread Xinliang David Li
ternal id based on assembler name and source location. */ +DEFPARAM (PARAM_PROFILE_FUNC_INTERNAL_ID, + "profile-func-internal-id", + "use internal function id in profile lookup", + 0, 0, 1) + /* Avoid SLP vectorization of large basic bl

Re: gcov name cleanup

2014-07-24 Thread Xinliang David Li
On Wed, Jul 23, 2014 at 11:45 PM, Nathan Sidwell wrote: > This second patch cleans up some more global names. the three functions > should not be visible to the user. I'm not sure if they're attempting to > export an interface to the user but they're (a) undocumented and (b) don't > follow exist

Re: FDO and source changes

2014-07-25 Thread Xinliang David Li
Ok. The internal benchmark testing also shows no change in behavior. David On Fri, Jul 25, 2014 at 2:55 PM, Jeff Law wrote: > On 07/23/14 15:52, Xinliang David Li wrote: >> >> Index: ChangeLog >> === >>

Re: another gcov cleanup

2014-07-26 Thread Xinliang David Li
looks good. thanks. David On Sat, Jul 26, 2014 at 12:08 AM, Nathan Sidwell wrote: > This patch removes 2 global variables -- gi_filename and gcov_max_filename. > The relevant data is moved into the renamed gcov_filename structure and > length is calculated later in the process. > > One more chan

Re: [Google] Add libgcov dummy references for weak symbols

2014-03-10 Thread Xinliang David Li
Ok. David On Mon, Mar 10, 2014 at 1:28 PM, Teresa Johnson wrote: > This patch adds dummy references to libgcov for the symbols accessed > via weak references from application code to ensure they are resolved > at link time. Passes regression tests. Ok for google-4_8? > > Thanks, > Teresa > > 201

Re: [GOOGLE] Writes annotation info in elf section.

2014-03-12 Thread Xinliang David Li
Why is it not enough to emit warnings during build time when source code changes signifcantly? David On Tue, Mar 11, 2014 at 4:27 PM, Dehao Chen wrote: > During AutoFDO annotation, we want to record the annotation stats into > an elf section, so that we can calculate how much percentage of the >

Re: [GOOGLE] Writes annotation info in elf section.

2014-03-12 Thread Xinliang David Li
Dehao explained that the data needs to merged during link time to give meaningful diagnostics. Ok for google branch. David On Wed, Mar 12, 2014 at 3:55 PM, Xinliang David Li wrote: > Why is it not enough to emit warnings during build time when source > code changes signifcantly? >

Re: [GOOGLE] update ssa before compute_inline_parameters

2014-03-20 Thread Xinliang David Li
I think the right way to fix this is to wrap the call to early_inliner and check the TODO flags. See execute_function_todo: if (flags & TODO_cleanup_cfg) { cleanup_tree_cfg (); if (!(flags & TODO_update_ssa_any) && need_ssa_update_p (cfun)) flags |= TODO_update_ssa;

Re: [GOOGLE] update ssa before compute_inline_parameters

2014-03-20 Thread Xinliang David Li
- compute_inline_parameters (cgraph_get_node > (current_function_decl), true); > - early_inliner (); > + early_inline (); >autofdo::afdo_annotate_cfg (promoted_stmts); >compute_function_frequency (); >update_ssa (TODO_update_ssa); Is this update still needed

Re: [GOOGLE] update ssa before compute_inline_parameters

2014-03-20 Thread Xinliang David Li
The patch is ok. David On Thu, Mar 20, 2014 at 1:10 PM, Dehao Chen wrote: > On Thu, Mar 20, 2014 at 1:02 PM, Xinliang David Li wrote: >> On Thu, Mar 20, 2014 at 12:40 PM, Dehao Chen wrote: >>> Patch updated to add a wrapper early_inline function >>> &g

Re: [GOOGLE] Refactor the LIPO fixup

2014-03-25 Thread Xinliang David Li
Add comment to the new function. init_node_map is better invoked after the link step to avoid creating entries with for dead nodes. Ok if large perf testing is fine. David On Tue, Mar 25, 2014 at 3:38 PM, Dehao Chen wrote: > This patch refactors LIPO fixup related code to move it into a > stand

Re: [GOOGLE] Refactor the LIPO fixup

2014-03-26 Thread Xinliang David Li
is cgraph_init_gid_map called after linking? David On Wed, Mar 26, 2014 at 3:54 PM, Dehao Chen wrote: > Patch updated, passed performance tests. > > Dehao > > On Tue, Mar 25, 2014 at 4:03 PM, Xinliang David Li wrote: >> Add comment to the new function. init_node_map is

Re: [GOOGLE] Refactor the LIPO fixup

2014-03-27 Thread Xinliang David Li
ok. On Thu, Mar 27, 2014 at 9:02 AM, Dehao Chen wrote: > On Wed, Mar 26, 2014 at 4:05 PM, Xinliang David Li wrote: >> is cgraph_init_gid_map called after linking? > > Oh, forgot that part. It's interesting that the test can pass without > another cgraph_init_gid_map

Re: [GOOGLE] Updates SSA after VPT transofrmations in AFDO pass

2014-04-03 Thread Xinliang David Li
looks fine. David On Thu, Apr 3, 2014 at 10:56 AM, Dehao Chen wrote: > This patch updates SSA after VPT transformation. This is needed > because compute_inline_parameters will ICE without updated SSA. > > Testing on-going. > > OK for google-4_8? > > Thanks, > Dehao > > Index: gcc/auto-profile.c

Re: [GOOGLE] AutoFDO+LIPO should invoke add_fake_edge too

2014-04-07 Thread Xinliang David Li
ok (after fixing the format -- a function name starts a new line in function def). David On Mon, Apr 7, 2014 at 12:49 PM, Dehao Chen wrote: > This patch calls add_fake_edge for the AutoFDO+LIPO path. > > Bootstrapped and passed regression test and performance test. > > OK for google-4_8? > > Th

Re: [GOOGLE] Fix incorrect detection of recursive calls during LIPO IPA inlining

2014-04-10 Thread Xinliang David Li
Looks good to me. David On Thu, Apr 10, 2014 at 2:04 PM, Teresa Johnson wrote: > This patch fixes an issue where self-recursive calls were missed > during ipa inlining in LIPO compiles, since the resolved nodes were > not checked. When a self-recursive call was inlined incorrectly, > ipa_inline

Re: Inliner heuristics TLC 1/n - let small function inlinng to ignore cold portion of program

2014-04-17 Thread Xinliang David Li
This looks fine. LIPO has similar change too. Other directions worth looking into: 1) To model icache effect better, weighted callee size need to be used with profile. The weight for BB may look like: min(1, FREQ(BB)/FREQ(ENTRY)). 2) When function splitting is turned on, are any inline heuristi

Re: LTO inliner -- sensitivity to increasing register pressure

2014-04-18 Thread Xinliang David Li
Do you witness similar problems with LTO +FDO? My concern is it can be tricky to get the register pressure estimate right. The register pressure problem is created by downstream components (code motions etc) but only exposed by the inliner. If you want to get it 'right' (i.e., not exposing the pr

Re: LTO inliner -- sensitivity to increasing register pressure

2014-04-18 Thread Xinliang David Li
On Fri, Apr 18, 2014 at 10:26 AM, Jan Hubicka wrote: > Hello, >> Honza, >> Seeing your recent patches relating to inliner heuristics for LTO, >> I thought I should mention some related work I'm doing. >> >> By way of introduction, I've recently joined the IBM LTC's PPC >> Toolchain team, working

Re: LTO inliner -- sensitivity to increasing register pressure

2014-04-18 Thread Xinliang David Li
with different quality thus different weights. Another challenge is how to quantify cycle savings/overhead more precisely. With that, we can abandon the threshold based scheme -- any callsite with a net saving will be considered. David > Honza >> >> Aaron >> >> On Fr

Re: LTO inliner -- sensitivity to increasing register pressure

2014-04-18 Thread Xinliang David Li
On Fri, Apr 18, 2014 at 12:51 PM, Jan Hubicka wrote: >> What I've observed on power is that LTO alone reduces performance and >> LTO+FDO is not significantly different than FDO alone. >> >> I agree that an exact estimate of the register pressure would be a >> difficult problem. I'm hoping that som

Re: LTO inliner -- sensitivity to increasing register pressure

2014-04-18 Thread Xinliang David Li
On Fri, Apr 18, 2014 at 2:16 PM, Jan Hubicka wrote: >> On Fri, Apr 18, 2014 at 12:27 PM, Jan Hubicka wrote: >> >> What I've observed on power is that LTO alone reduces performance and >> >> LTO+FDO is not significantly different than FDO alone. >> > On SPEC2k6? >> > >> > This is quite surprising,

Re: [PATCH, x86] merge movsd/movhpd pair in peephole

2014-04-21 Thread Xinliang David Li
Bin, when will the patch for the generic pass be available for review? David On Wed, Apr 9, 2014 at 7:27 PM, Bin.Cheng wrote: > On Thu, Apr 10, 2014 at 8:18 AM, Wei Mi wrote: >> Hi, >> >> For the testcase 1.c >> >> #include >> >> double a[1000]; >> >> __m128d foo1() { >> __m128d res; >> re

Re: Inliner heuristics TLC 1/n - let small function inlinng to ignore cold portion of program

2014-04-23 Thread Xinliang David Li
On Tue, Apr 22, 2014 at 1:17 PM, Jan Hubicka wrote: >> This looks fine. LIPO has similar change too. Other directions worth >> looking into: >> >> 1) To model icache effect better, weighted callee size need to be >> used with profile. The weight for BB may look like: min(1, >> FREQ(BB)/FREQ(ENT

Re: [PATCH i386]: Enable push/pop in pro/epilogue for modern CPUs

2012-12-11 Thread Xinliang David Li
On Tue, Dec 11, 2012 at 1:49 AM, Richard Biener wrote: > On Mon, Dec 10, 2012 at 10:07 PM, Mike Stump wrote: >> On Dec 10, 2012, at 12:42 PM, Xinliang David Li wrote: >>> I have not measured the CFI size impact -- but conceivably it should >>> be larger -- which is un

Re: [PATCH i386]: Enable push/pop in pro/epilogue for modern CPUs

2012-12-11 Thread Xinliang David Li
52340 618545 delta -1.5% 15.5% -0.006% parser-move 81244 15788 334003 parser-push 80684 16332 333987 delta -0.7% 3.4% -0.005% On Tue, Dec 11, 2012 at 9:14 AM, Xinliang David Li wrote: > On Tue, Dec 11, 2012 at 1:49 AM, Richard Biener > wrote: >> On Mon, Dec 10, 2012

Re: [PATCH i386]: Enable push/pop in pro/epilogue for modern CPUs

2012-12-11 Thread Xinliang David Li
Some SPEC2k performance number (with 3 runs on core2): Push wins over move on 3 benchmarks. Others are noises. perlbmk : ~+1.9% gap: ~+1.4% vortex:~ +0.7% David On Tue, Dec 11, 2012 at 2:53 PM, Xinliang David Li wrote: > The following the O2 size data from SPEC2k. Note that w

Re: [PATCH i386]: Enable push/pop in pro/epilogue for modern CPUs

2012-12-12 Thread Xinliang David Li
On Wed, Dec 12, 2012 at 8:37 AM, Jan Hubicka wrote: >> I noticed in prologue/epilogue, GCC prefers to use MOVs followed by a >> SP adjustment instead of a sequence of pushes/pops. The preference to >> the MOVs are good for old CPU micro-architectures (before pentium-4, >> K10), because it breaks t

Re: [PATCH i386]: Enable push/pop in pro/epilogue for modern CPUs

2012-12-12 Thread Xinliang David Li
Honza, can you explain each change and point to the reference? thanks, David On Wed, Dec 12, 2012 at 8:37 AM, Jan Hubicka wrote: >> I noticed in prologue/epilogue, GCC prefers to use MOVs followed by a >> SP adjustment instead of a sequence of pushes/pops. The preference to >> the MOVs are good

Re: [PATCH i386]: Enable push/pop in pro/epilogue for modern CPUs

2012-12-12 Thread Xinliang David Li
On Wed, Dec 12, 2012 at 10:30 AM, Jan Hubicka wrote: > Concerning 1push per cycle, I think it is same as K7 hardware did, so move > prologue should be a win. >> > Index: config/i386/i386.c >> > === >> > --- config/i386/i386.c (revisi

Re: [PATCH i386]: Enable push/pop in pro/epilogue for modern CPUs

2012-12-12 Thread Xinliang David Li
On Wed, Dec 12, 2012 at 4:16 PM, Xinliang David Li wrote: > On Wed, Dec 12, 2012 at 10:30 AM, Jan Hubicka wrote: >> Concerning 1push per cycle, I think it is same as K7 hardware did, so move >> prologue should be a win. >>> >

Re: [PATCH i386]: Enable push/pop in pro/epilogue for modern CPUs

2012-12-12 Thread Xinliang David Li
On Wed, Dec 12, 2012 at 5:19 PM, Jan Hubicka wrote: >> > libcall is not faster up to 8KB to rep sequence that is better for >> > regalloc/code >> > cache than fully blowin function call. >> >> Be careful with this. My recollection is that REP sequence is good for >> any size -- for smaller size,

Re: [PATCH i386]: Enable push/pop in pro/epilogue for modern CPUs

2012-12-12 Thread Xinliang David Li
9:14PM -0800, Xinliang David Li wrote: >> On Wed, Dec 12, 2012 at 5:19 PM, Jan Hubicka wrote: >> >> > libcall is not faster up to 8KB to rep sequence that is better for >> >> > regalloc/code >> >> > cache than fully blowin function call. >

Re: [PATCH] Use new dump scheme for loop unroll passes

2012-12-13 Thread Xinliang David Li
A couple of comments: 1) please dump with source location if possible. What is the use of the information if there is no line number 2) Please do not use the existing dump report -- Loop 1,2,3 etc means nothing to user 3) The optimization report should be standardized with some template (similar t

Re: [google 4.7] atomic update of profile counters (issue6965050)

2012-12-19 Thread Xinliang David Li
This looks good to me for google branches. Useful for trunk too. David On Wed, Dec 19, 2012 at 12:08 PM, Rong Xu wrote: > Hi, > > This patch adds the supprot of atomic update the profile counters. > Tested with google internal benchmarks and fdo kernel build. > > Thanks, > > -Rong > > 2012-12-19

Re: [google 4.7] fdo build for linux kernel (issue 6968046)

2012-12-20 Thread Xinliang David Li
It depends on the value distribution . David On Thu, Dec 20, 2012 at 11:30 AM, Rong Xu wrote: > On Wed, Dec 19, 2012 at 5:22 PM, Rong Xu wrote: >> On Wed, Dec 19, 2012 at 5:04 PM, wrote: >>> The change in gcov-io.h is from a different patch. >> >> sorry. here is the patch for gcov-io.h: >> >

Re: [PATCH i386]: Enable push/pop in pro/epilogue for modern CPUs

2012-12-20 Thread Xinliang David Li
Ahmad has helped doing some atom performance testing (ChromeOS benchmarks) with this patch. In summary, there is no statistically significant regression seen. There is one improvement of about +1.9% (v8 benchmark) which looks real. David On Wed, Dec 12, 2012 at 9:24 AM, Xinliang David Li wrote

Re: [google 4.7] fdo build for linux kernel (issue6968046)

2012-12-21 Thread Xinliang David Li
Kernel build does not link in libgcc, which defines the function. David On Fri, Dec 21, 2012 at 8:31 AM, Teresa Johnson wrote: > On Wed, Dec 19, 2012 at 12:11 PM, Rong Xu wrote: >> Hi, >> >> This patch updates the support for FDO build in linux kernel for gcc 4.7. >> Tested with 2.6.34 kernel a

Re: FDO patch -- make ic related vars TLS if target allows

2012-12-28 Thread Xinliang David Li
Is there a way to tell if the program is going to be multi-threaded? If not, it might be useful to introduce a compiler option such as -fmt which also enables -lpthread. Using tricks like weakrefs can introduce unnecessary runtime overhead. David On Fri, Dec 28, 2012 at 8:26 AM, David Edelsohn

Re: atomic update of profile counters (issue7000044)

2012-12-28 Thread Xinliang David Li
It would be great if this can make into gcc4.8. The patch has close to 0 impact on code stability. David On Fri, Dec 28, 2012 at 11:32 AM, Rong Xu wrote: > Hi Honza, > > In the other thread of discussion (similar patch in google-4_7 > branch), you said you were thinking if to let this patch into

Re: [google 4_7] fix unsat for target w/o atomic builtins (issue7031051)

2013-01-02 Thread Xinliang David Li
Ok for google branch, but it might be better to warn this at compile time (more discussion needed for the trunk version). David On Wed, Jan 2, 2013 at 4:58 PM, Rong Xu wrote: > Hi, > > This patch fixes an issue in r194725. The call to atmoic builtin > is emmitted regardless of -fprofile-gen-atom

Re: [google][4.7] Allow function reordering linker plugin to separate hot and cold code into different ELF segments

2013-01-03 Thread Xinliang David Li
Is it better to change the option to something like: split_segment|nosplit-segment or split_segment=yes|no David On Thu, Jan 3, 2013 at 5:41 PM, Sriraman Tallam wrote: > Hi Rong, > > The following patch modifies the behaviour of the linker plugin to > not create a separate segment for cold s

Re: [google 4_7] Backport r194909 (<:: is incorrectly treated as digraph ...) to google/gcc-4_7 branch (issue7028052)

2013-01-04 Thread Xinliang David Li
ok. thanks, David On Fri, Jan 4, 2013 at 9:32 AM, Paul Pluzhnikov wrote: > Back-port revision 194909 to google/gcc-4_7 branch: > http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194909 > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54526 > > Google ref: b/7427993 > > Index: gcc/testsuite/g++.old

Re: [google][4.7] Allow function reordering linker plugin to separate hot and cold code into different ELF segments

2013-01-04 Thread Xinliang David Li
AM, Rong Xu wrote: >> The code looks fine to me. Please consider David's comments about the >> option name. >> >> -Rong >> >> On Thu, Jan 3, 2013 at 9:14 PM, Xinliang David Li wrote: >>> Is it better to change the option to something lik

Re: [google 4_7] Backport r194909 (<:: is incorrectly treated as digraph ...) to google/gcc-4_7 branch (issue7028052)

2013-01-04 Thread Xinliang David Li
I saw only one test case fix patch from Paolo in trunk. Does this patch include more local fixes? David On Fri, Jan 4, 2013 at 3:03 PM, Paul Pluzhnikov wrote: > On Fri, Jan 4, 2013 at 9:41 AM, Xinliang David Li wrote: >> ok. > > The patch as sent caused some breakage, I had

Re: [google 4_7] Backport r194909 (<:: is incorrectly treated as digraph ...) to google/gcc-4_7 branch (issue7028052)

2013-01-04 Thread Xinliang David Li
ok. thanks, David On Fri, Jan 4, 2013 at 3:38 PM, Paul Pluzhnikov wrote: > On Fri, Jan 4, 2013 at 3:27 PM, Xinliang David Li wrote: >> I saw only one test case fix patch from Paolo in trunk. Does this >> patch include more local fixes? > > There was an earlier patch which

Re: [google 4-7] adjust single target i-call heursitic (issue7059044)

2013-01-04 Thread Xinliang David Li
Need to document the parameter in doc/invoke.texi. Ok with that change. David On Fri, Jan 4, 2013 at 5:28 PM, Rong Xu wrote: > Hi, > > This patch adjusts the single target indirect call promotion heuristics. > (1) it uses bb counts (bb_all), instead of count "all" which only counts > the target

Re: [cxx-conversion] Change uses of htab_t in gcc/config to hash_table.

2013-01-05 Thread Xinliang David Li
I noticed that the traverse and traverse_noresize method takes Argument as the first template parameter. It should be moved to be the second after the callback. In most of the cases, the type of the Argument can be deduced from the callsite, so that the user only need to specify the callback: ht->

Re: [google gcc-4_7] Inlining and devirtualization tests

2013-01-15 Thread Xinliang David Li
Looks fine. Why adding tests that are expected to fail? Are these tests passing with trunk? David On Tue, Jan 15, 2013 at 9:33 PM, Maxim Kuvyrkov wrote: > David, > > This patch adds tests for inlining and devirtualization optimizations, some > of which are already in google's gcc-4_7 branch.

Re: [google] Port revisions for -mpatch-functions-for-instrumentation option back to google-main. (issue7301068)

2013-02-08 Thread Xinliang David Li
ok. thanks, David On Fri, Feb 8, 2013 at 6:57 PM, Harshit Chopra wrote: > 2013-02-08 Harshit Chopra > > Porting revisions r183548, r183888, r186118, r192231, r193381. > > diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c > index ab416ff..04b973f 100644 > --- a/gcc/c-famil

Re: [google 4_7] Fix bad merge into coverage_init (issue7322063)

2013-02-12 Thread Xinliang David Li
ok. The same problem exists in google/main too. David On Tue, Feb 12, 2013 at 1:38 PM, Teresa Johnson wrote: > This patch fixes a bad merge from google/integration to google/4_7. > > Passes regression tests. Ok for google/4_7? > > Thanks, > Teresa > > 2013-02-12 Teresa Johnson > > * c

Re: [google][4.7] Minor Function reordering plugin enhancements.

2013-02-13 Thread Xinliang David Li
when split_segment is specified but the API does not exist, why not making it fatal ? Will it crash at some point when the null pointer is referenced later? David On Wed, Feb 13, 2013 at 4:19 PM, Sriraman Tallam wrote: > Hi, > >I have attached a patch for the reordering plugin to display > a

Re: [google][4.7] Minor Function reordering plugin enhancements.

2013-02-13 Thread Xinliang David Li
ok. thanks, David On Wed, Feb 13, 2013 at 4:41 PM, Sriraman Tallam wrote: > Updated patch attached. > > Thanks > Sri > > On Wed, Feb 13, 2013 at 4:39 PM, Sriraman Tallam wrote: >> On Wed, Feb 13, 2013 at 4:32 PM, Xinliang David Li >> wrote: >>> when

Re:

2013-02-14 Thread Xinliang David Li
On Thu, Feb 14, 2013 at 10:18 AM, Matt wrote: > The attached patches do two things: > 1. Backports a fix from trunk that eliminates bogus warning traces. On my > current codebase which links ~40MB of C++ with LTO, the bogus warning traces > are literally hundreds of lines. > What is the trunk rev

Re:

2013-02-14 Thread Xinliang David Li
Ok for the google branch -- please provide the patch details in svn commit message (note that ChangeLog is not needed any more for the branch). David On Thu, Feb 14, 2013 at 11:53 AM, Matt Hargett wrote: > On Feb 14, 2013, at 10:40 AM, Xinliang David Li wrote: > >> On Thu, Feb 14

Re: [google] AddressSanitizer for gcc, first attempt. (issue 5272048)

2011-10-18 Thread Xinliang David Li
On Tue, Oct 18, 2011 at 3:56 PM, wrote: > On 2011/10/18 22:52:33, davidxl wrote: >> >> http://codereview.appspot.com/5272048/diff/18001/tree-asan.c >> File tree-asan.c (right): > > > http://codereview.appspot.com/5272048/diff/18001/tree-asan.c#newcode325 >> >> tree-asan.c:325: base = build_addr (

Re: [google] AddressSanitizer for gcc, first attempt. (issue 5272048)

2011-10-18 Thread Xinliang David Li
It will be weird to put the instrumentation pass inside loop opt, besides memory loads which are loop invariants and redundant stores in loop should be handled by pre/pde. +cc Richard Guenther You may want to ask the middle-end maintainer to review your code at this point if you want it to be in

Re: [google] Suppress FDO-use related notes/warnings (issue5294043)

2011-10-18 Thread Xinliang David Li
On Tue, Oct 18, 2011 at 3:48 PM, Rong Xu wrote: > Suppress verbose notes/warnings printed in FDO-use compilation. > (1) Add option -fprofile-use-verbose. Gcc currently does not emit informational messages on high level transformations such as inlining, value profiling transformations (ic promotio

Re: [google] AddressSanitizer for gcc, first attempt. (issue 5272048)

2011-10-19 Thread Xinliang David Li
On Wed, Oct 19, 2011 at 12:02 PM, wrote: > Minimized the crash to this: > > struct Foo { >  unsigned bf1:1; >  unsigned bf2:1; >  unsigned bf3:1; > }; > > void foo (struct Foo *ob) { >  ob->bf2 = 1; > } > > > > D.2731_4 = &ob_1(D)->bf2; > __asan_base_addr.2 = (long unsigned int) D.2731_4; > D.273

Re: [google] AddressSanitizer for gcc, first attempt. (issue 5272048)

2011-10-19 Thread Xinliang David Li
what kind of failures? David On Wed, Oct 19, 2011 at 2:04 PM, wrote: > On 2011/10/19 20:38:35, kcc wrote: >> >> Added code to avoid bitfields. > > Is there anything I should know about splitting basic blocks in the > presence of EH? > Currently, asan fails on 483.xalancbmk, 453.povray and 450.s

Re: new patches using -fopt-info (issue5294043)

2011-10-20 Thread Xinliang David Li
On Thu, Oct 20, 2011 at 1:21 AM, Richard Guenther wrote: > On Thu, Oct 20, 2011 at 1:33 AM, Andi Kleen wrote: >> x...@google.com (Rong Xu) writes: >> >>> After some off-line discussion, we decided to use a more general approach >>> to control the printing of optimization messages/warnings. We wil

Re: new patches using -fopt-info (issue5294043)

2011-10-20 Thread Xinliang David Li
While discussion for trunk version is still going, it is ok for google branches. thanks, David On Wed, Oct 19, 2011 at 4:28 PM, Rong Xu wrote: > After some off-line discussion, we decided to use a more general approach > to control the printing of optimization messages/warnings. We will > intro

Re: new patches using -fopt-info (issue5294043)

2011-10-20 Thread Xinliang David Li
On Thu, Oct 20, 2011 at 12:53 PM, Andi Kleen wrote: >> This warnings/notes are caused >> by inconsistent profile due to data race (which is currently common in >> multi-thread programs), > > I never quite understood why the gcov counters are not simply marked > __thread. This would make the profil

Re: new patches using -fopt-info (issue5294043)

2011-10-21 Thread Xinliang David Li
There are two proposals here. One is -fopt-info which prints out informational notes to stderr, and the other is -fopt-report which is more elaborate form of dump files. Are you object to both or just the opt-report one? The former is no different from any other informational notes we already have

Re: new patches using -fopt-info (issue5294043)

2011-10-23 Thread Xinliang David Li
On Sun, Oct 23, 2011 at 3:18 AM, Richard Guenther wrote: > On Fri, Oct 21, 2011 at 6:48 PM, Xinliang David Li wrote: >> There are two proposals here. One is -fopt-info which prints out >> informational notes to stderr, and the other is -fopt-report which is >> more elabora

Re: new patches using -fopt-info (issue5294043)

2011-10-24 Thread Xinliang David Li
> Well, you seem to keep not reading what I write.  I am not opposed > to adding -fopt-info/report nor to funnel messages to stdout/err.  What > I am opposed is the way you want to introduce them.  I want you to > fix what we dump into dump files, so that both -fopt-report and -fopt-info > can be i

Re: new patches using -fopt-info (issue5294043)

2011-10-26 Thread Xinliang David Li
I am hoping that too:) Yes, I will try to do it when I find some time. David On Wed, Oct 26, 2011 at 1:37 AM, Richard Guenther wrote: > On Tue, Oct 25, 2011 at 9:30 PM, Xinliang David Li wrote: >> >> >> On Tue, Oct 25, 2011 at 1:02 AM, Richard Guenther >> wrote: &

Re: [google] ThreadSanitizer instrumentation pass (issue 5303083)

2011-11-01 Thread Xinliang David Li
that means some existing bugs get exposed. Your previous version simply skipped the target mem refs. You will need to debug the problem a little more. David On Tue, Nov 1, 2011 at 5:26 AM, wrote: > On 2011/10/31 06:08:34, davidxl wrote: >> >> http://codereview.appspot.com/5303083/diff/1/gcc/pa

Re: [google] AddressSanitizer for gcc, first attempt. (issue 5272048)

2011-11-01 Thread Xinliang David Li
On Tue, Nov 1, 2011 at 12:16 PM, Diego Novillo wrote: > On 11-11-01 15:11 , konstantin.s.serebry...@gmail.com wrote: >> >> Diego mentioned that we can move the asan pass somewhere to the very >> end, just before lowering to RTL. >> Where would be this blessed place? >> Does it still have TARGET_ME

Re: [google] ThreadSanitizer instrumentation pass (issue 5303083)

2011-11-01 Thread Xinliang David Li
On Tue, Nov 1, 2011 at 12:26 PM, Martin Jambor wrote: > Hi, > > sorry that I'm not using the fancy web tool but I do not want to use > my google account and gmail address in particular for work-related > stuff. > > On Tue, Nov 01, 2011 at 06:05:46PM +, davi...@google.com wrote: >> > > ... > >>

Re: [google] AddressSanitizer for gcc, first attempt. (issue 5272048)

2011-11-01 Thread Xinliang David Li
On Tue, Nov 1, 2011 at 12:41 PM, Diego Novillo wrote: > On 11-11-01 15:34 , Xinliang David Li wrote: > >>> Right before pass_expand?  In init_optimization_passes(), look for >>> NEXT_PASS >>> (pass_expand).  That's RTL generation.  Somewhere before th

Re: [google] AddressSanitizer for gcc, first attempt. (issue 5272048)

2011-11-01 Thread Xinliang David Li
Ok for google/main when the option is documented in doc/invoke.texi and a Changlog file is provided. David On Tue, Nov 1, 2011 at 5:24 PM, wrote: > So, do you have any other suggestions before the first commit? > > http://codereview.appspot.com/5272048/ >

Re: [google] Enable loop unroll/peel notes under -fopt-info

2011-11-02 Thread Xinliang David Li
On Tue, Nov 1, 2011 at 2:53 AM, Richard Guenther wrote: > On Tue, Nov 1, 2011 at 1:46 AM, Teresa Johnson wrote: >> This patch is for google-main only. >> >> Tested with bootstrap and regression tests. >> >> Print unroll and peel factors along with loop source position under >> -fopt-info. >> >>

Re: [google] Enable loop unroll/peel notes under -fopt-info

2011-11-02 Thread Xinliang David Li
Ok for google/main. 1) may be better to omit the const iteration count for complete unroll message 2) Instead of dumping loop header count, is it better to dump pre-header count -- it gives an idea of how often the loop is entered. The loop header count can be derived from loop average iteration a

Re: [google] ThreadSanitizer instrumentation pass (issue 5303083)

2011-11-03 Thread Xinliang David Li
> http://codereview.appspot.com/5303083/diff/1/gcc/tree-tsan.c#newcode911 >> >> gcc/tree-tsan.c:911: bbd->has_sb = 0; >> Where is the code that instrument function calls? > > I do not instrument calls. Instead I instrument func entry/exit. > How are calls to locking and synchronization functions t

Re: [google] ThreadSanitizer instrumentation pass (issue 5303083)

2011-11-03 Thread Xinliang David Li
On Thu, Nov 3, 2011 at 6:31 AM, wrote: > On 2011/11/01 16:59:04, davidxl wrote: >> >> that means some existing bugs get exposed. > > It is quite likely. > >> Your previous version >> simply skipped the target mem refs. > > Hummm... how can non-handling of some expressions lead to crashes? I > wou

Re: [google] fix for undefined location list symbol in LIPO (issue5355042)

2011-11-04 Thread Xinliang David Li
Ok for google branches. David On Fri, Nov 4, 2011 at 10:13 AM, Rong Xu wrote: > Don't emit the type info if a function's context type is not > output. > > For google branch only. > > Tested with internal benchmark suite with -g. > > 2011-11-04   Rong Xu   > >        * gcc/dwarf2out.c (dwarf2out_

Re: [google] suppress LIPO notes (issue5356041)

2011-11-04 Thread Xinliang David Li
ok. David On Fri, Nov 4, 2011 at 10:39 AM, Rong Xu wrote: > Suppress another LIPO notes. Move it under fopt-info. > > For google branch only. > > Tested with internal branchmark suite. > > 2011-11-04   Rong Xu   > >        * gcc/c-family/c-opts.c: move the notes under fopt-info. > > Index: gcc/c

put __stl_prime_list in comdat section

2011-11-05 Thread Xinliang David Li
Hi, the following patch is a follow up to the one posted here http://gcc.gnu.org/ml/gcc-patches/2009-05/msg01293.html. The new patch is a header only change and can greatly reduce rodata section size for some programs. Ok for trunk after testing? thanks, David cl Description: Binary data st

[v3] Re: put __stl_prime_list in comdat section

2011-11-05 Thread Xinliang David Li
thanks. The attached is the revised patch. David On Sat, Nov 5, 2011 at 11:52 AM, Paolo Carlini wrote: > On 11/05/2011 07:32 PM, Xinliang David Li wrote: >> >> Hi, the following patch is a follow up to the one posted here >> http://gcc.gnu.org/ml/gcc-patches/2009-05/msg0129

Re: [v3] Re: put __stl_prime_list in comdat section

2011-11-06 Thread Xinliang David Li
Ping .. (the Nov 7 cutoff date is close ..). thanks, David On Sat, Nov 5, 2011 at 12:22 PM, Xinliang David Li wrote: > thanks. The attached is the revised patch. > > David > > On Sat, Nov 5, 2011 at 11:52 AM, Paolo Carlini > wrote: >> On 11/05/2011 07:32 PM,

vector garbaged collected while still in use

2011-11-06 Thread Xinliang David Li
tested on linux/x86-64. Ok for trunk (or better fix suggested)? thanks, David 2011-11-05 Xinliang David Li * cp/decl.c (cp_finish_decl): Prevent cleanups from being garbage collected before being released. Index: cp/decl.c

Re: vector garbaged collected while still in use

2011-11-07 Thread Xinliang David Li
1, argv=0x7fffd3c8) at /usr/local/google/davidxl/dev/gcc/tot/gcc/toplev.c:2006 #25 0x00cd97e0 in main (argc=71, argv=0x7fffd3c8) at /usr/local/google/davidxl/dev/gcc/tot/gcc/main.c:36 On Mon, Nov 7, 2011 at 1:56 AM, Richard Guenther wrote: > On Mon, Nov 7, 2011 at 8:53 AM, Xinli

Re: Disable early inlining while compiling for coverage (issue5173042)

2011-11-07 Thread Xinliang David Li
On Mon, Nov 7, 2011 at 1:30 PM, Sharad Singhai wrote: > Honza, > Sorry, I forgot about this. Could you please put this on your TODO list? > > David, > While a proper fix is pending for the trunk, we need this interim fix > internally. Okay for google/main? ok. thanks, David > > Thanks, > Sharad

Re: [google] fix build warning (issue5341048)

2011-11-07 Thread Xinliang David Li
ok for google/main. David On Mon, Nov 7, 2011 at 2:40 PM, Rong Xu wrote: > Fix the build warning introduced in r180971. > > This is for google branch only. > > Tested with build. > > 2011-11-07   Rong Xu   > >        * gcc/dwarf2out.c (dwarf2out_decl): fix mixed declarations and code. > > Index:

Re: vector garbaged collected while still in use

2011-11-08 Thread Xinliang David Li
Here is the revised patch. Bootstrap and regression tested on linux/x86-64. Honza, can you comment on the implication of this change? thanks, David On Mon, Nov 7, 2011 at 2:09 PM, Richard Guenther wrote: > On Mon, Nov 7, 2011 at 5:41 PM, Xinliang David Li wrote: >> Here is the st

Re: vector garbaged collected while still in use

2011-11-10 Thread Xinliang David Li
Looks like it is fixed already, so there is no need for this patch. David On Wed, Nov 9, 2011 at 12:36 AM, Richard Guenther wrote: > On Tue, Nov 8, 2011 at 6:10 PM, Xinliang David Li wrote: >> Here is the revised patch. Bootstrap and regression tested on linux/x86-64. >> &g

Re: [google] ThreadSanitizer instrumentation pass (issue 5303083)

2011-11-10 Thread Xinliang David Li
On Thu, Nov 10, 2011 at 4:24 PM, Kostya Serebryany wrote: > > > On Thu, Nov 10, 2011 at 4:00 PM, wrote: >> >> Have you run through SPEC, and SPEC06 with this change? What is the >> instrumentation overhead using gcc? > > I don't think anyone of us ever run spec with tsan. > Mostly because this wi

Re: [PATCH] Add working-set size and hotness information to fdo summary (issue6465057)

2012-08-19 Thread Xinliang David Li
On Sun, Aug 19, 2012 at 9:59 PM, Teresa Johnson wrote: > On Sat, Aug 18, 2012 at 1:19 AM, Jan Hubicka wrote: >> >> > +{ >> > + cs_prg->num = cs_tprg->num; >> > + /* Allocate the working set array for the merged >> > summary. */ >> > +

<    2   3   4   5   6   7   8   9   10   11   >