cgraph node profile update in cgraph_rebuild_references causes a performance issue

2014-10-30 Thread Wei Mi
We have a program like this: A() {// hot func ... } B() { A();// very hot if (i) { A(); // very cold } } Both callsites of A will be inlined into B. In gcc func save_inline_function_body in inline_transform stage, A's first clone will be choosen and turned into a real func.

gcc-4_9 inlines less funcs than gcc-4_8 because of used_as_abstract_origin flag.

2014-11-18 Thread Wei Mi
We see an inline problem as below caused by r201408 (https://gcc.gnu.org/ml/gcc-patches/2013-08/msg00027.html). hoo() { foo(); ... } foo { goo(); ... } foo is func splitted, so its body changes to foo { goo(); ... foo.part(); } and the used_as_abstract_origin of cgraph node of fo

Re: gcc-4_9 inlines less funcs than gcc-4_8 because of used_as_abstract_origin flag.

2014-11-19 Thread Wei Mi
Submit a bug here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63970 Wei. On Wed, Nov 19, 2014 at 2:18 AM, Richard Biener wrote: > On Wed, Nov 19, 2014 at 8:21 AM, Richard Biener > wrote: >> On November 19, 2014 8:13:09 AM CET, Wei Mi wrote: >>>We see an inline probl

Re: gcc-4_9 inlines less funcs than gcc-4_8 because of used_as_abstract_origin flag.

2014-11-22 Thread Wei Mi
Thanks for the fix. Is it ok to backport it to gcc-4_9? Thanks, Wei. On Sat, Nov 22, 2014 at 1:08 PM, Jan Hubicka wrote: > Hi, > this is patch I commited to mainline > > 2014-11-22 Jan Hubicka > > * ipa.c (symbol_table::remove_unreachable_nodes): Mark all inline > clones > as

Why out-of-ssa does var coalescing based on name?

2013-08-22 Thread Wei Mi
escing all the vars without conflicts in the same phi stmt, instead of only coalescing the vars with the same base name? Thanks, Wei Mi.

Re: Why out-of-ssa does var coalescing based on name?

2013-08-23 Thread Wei Mi
significant memory increase for expand phase (I used your -fmem-report patch to dump the memory usage of each pass. It is useful. I am wondering why it didn't go into the trunk). Thanks, Wei Mi. On Fri, Aug 23, 2013 at 5:10 AM, Richard Biener wrote: > Wei Mi wrote: >>For the

Question about a IRA/LRA bug

2013-09-20 Thread Wei Mi
xical subreg as above, but it is hard to control IRA to allocate r107 above just to hardreg R15 (Only in that case the error will happen). Any suggestion to achieve it? Thanks, Wei Mi.

Re: Question about a IRA/LRA bug

2013-09-23 Thread Wei Mi
::create_insn_allocnos, then it is not a local fix in ira-color.c::assign_hard_reg and may have wide impact on IRA. I am not sure what other side-effect it will cause. I can try that and see what will happen, and submit a candidate fix for you to review. Regards, Wei Mi. On Mon, Sep 23, 2013 at 2:04 PM

Re: Why out-of-ssa does var coalescing based on name?

2013-09-26 Thread Wei Mi
ation on one application (I will look into it). Generally, it is good for the performance of our applications! Regards, Wei Mi.

missing optimization "a << (b & 63) to a << b"

2013-01-16 Thread Wei Mi
Hi, For x86, shift insn will automatically mask the count to 5 bits in 32 bit mode and to 6 bits in 64 bit mode, so for the testcase below, the buf_ << (-end & 63) could be optimized to buf_ << -end. But for trunk compiler, some place in the testcase is not optimized. typedef unsigned long long u

Re: State of AutoFDO in GCC

2021-04-25 Thread Wei Mi via Gcc
On Sun, Apr 25, 2021 at 4:18 PM Xinliang David Li wrote: > > > On Sun, Apr 25, 2021 at 12:07 PM Jan Hubicka wrote: > >> David, >> > >> > The text format is documented here: >> > https://clang.llvm.org/docs/UsersManual.html >> > The binary format is not documented. The binary format is not >> gua

Re: State of AutoFDO in GCC

2021-05-10 Thread Wei Mi via Gcc
https://github.com/google/autofdo has been updated. Now create_gcov/dump_gcov are added back and can be built separately. Please look at "2.2 Build autofdo tool for gcc" in https://github.com/google/autofdo#readme On Wed, Apr 28, 2021 at 10:40 PM Andi Kleen wrote: > > On Mon, Apr 26, 2021 at 06:

Re: [EXTERNAL] Re: State of AutoFDO in GCC

2021-05-22 Thread Wei Mi via Gcc
.h:18, > > from ../profile.h:15, > > from ../profile.cc:5: > > ../third_party/perf_data_converter/src/quipper/compat/proto.h:16:10: fatal > error: perf_stat.pb.h: No such file or directory > > #include "perf_stat.pb.h" > > ^~~~ > >

Re: [EXTERNAL] Re: State of AutoFDO in GCC

2021-05-24 Thread Wei Mi via Gcc
fatal > error: perf_data.pb.h: No such file or directory > #include "perf_data.pb.h" > ^~~~ > compilation terminated. > [6/241] Building CXX object CMakeFiles/dump_gcov_lib.dir/symbol_map.cc.o > ninja: build stopped: subcommand failed. > > Thanks, > >

Re: [EXTERNAL] Re: State of AutoFDO in GCC

2021-05-24 Thread Wei Mi via Gcc
rc/quipper/huge_page_deducer.cc:144:26: > error: ‘unordered_map’ in namespace ‘std’ does not name a template type > >using container = std::unordered_map; > > ^ > > > > > > > > From: Wei Mi > Sent: Monday, May

Re: [EXTERNAL] Re: State of AutoFDO in GCC

2021-05-25 Thread Wei Mi via Gcc
rf_data_converter/src/quipper/perf_reader.cc:1518:46: error: > no match for 'operator[]' (operand types are 'const > google::protobuf::RepeatedField' and 'int') > nrcpus = proto_uint32_metadata.data()[0]; > > -Original Message- > From: Wei

Re: [EXTERNAL] Re: State of AutoFDO in GCC

2021-05-25 Thread Wei Mi via Gcc
alled] > > -----Original Message- > From: Wei Mi > Sent: Tuesday, May 25, 2021 9:17 AM > To: Eugene Rozenfeld > Cc: Andi Kleen ; Hongtao Yu ; Xinliang > David Li ; Jan Hubicka ; gcc@gcc.gnu.org; > Wenlei He > Subject: Re: [EXTERNAL] Re: State of AutoFDO in GCC > &g

Re: [EXTERNAL] Re: State of AutoFDO in GCC

2021-05-26 Thread Wei Mi via Gcc
sion 3.6.1.3. > > Eugene > > -Original Message- > From: Wei Mi > Sent: Tuesday, May 25, 2021 8:07 PM > To: Eugene Rozenfeld > Cc: Andi Kleen ; Hongtao Yu ; Xinliang > David Li ; Jan Hubicka ; gcc@gcc.gnu.org; > Wenlei He > Subject: Re: [EXTERNAL] Re: State

Re: [EXTERNAL] Re: State of AutoFDO in GCC

2021-06-14 Thread Wei Mi via Gcc
ut the same example with dwarf v5 produced > "File './sort' has mangled .debug_info section." > and a gcov file with 0 functions. > > Does create_llvm_prof has the same limitation? > > Eugene > > -Original Message- > From: Wei Mi > Sent: We