[PATCH PR85720/partial]Support runtime loop versioning if loop can be distributed into builtin functions

2018-05-22 Thread Bin Cheng
test on x86_64. Is it OK? Thanks, bin 2018-05-22 Bin Cheng * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge SCC if all partitions are builtins. (version_loop_by_alias_check): New parameter. Generate cancelable runtime alias ch

[PATCH PR85804]Fix wrong code by correcting bump step computation in vector(1) load of single-element group access

2018-05-21 Thread Bin Cheng
Bin Cheng PR tree-optimization/85804 * tree-vect-stmts.c (vectorizable_load): Compute correct bump step for vector(1) load in single-element group access. gcc/testsuite 2018-05-17 Bin Cheng PR tree-optimization/85804 * gcc.c-torture/execute/pr85804.c

[PATCH PR85793]Fix ICE by loading vector(1) scalara_type for 1 element-wise case

2018-05-16 Thread Bin Cheng
Hi, This patch fixes ICE by loading vector(1) scalar_type if it's 1 element-wise for VMAT_ELEMENTWISE. Bootstrap and test on x86_64 and AArch64 ongoing. Is it OK? Thanks, bin 2018-05-16 Bin Cheng Richard Biener PR tree-optimization/85793 * tree-vect-st

[PATCH GCC][6/6]Restrict predcom using register pressure information

2018-05-04 Thread Bin Cheng
2018-04-27 Bin Cheng * tree-predcom.c (stor-layout.h, tree-ssa-live.h): Include. (REG_RELAX_RATIO, prune_chains): New. (tree_predictive_commoning_loop): Compute reg pressure using class region. Prune chains based on reg pressure. Force to not unroll if

[PATCH GCC][5/6]implement live range, reg pressure computation class

2018-05-04 Thread Bin Cheng
e and coalesce data structures and algorithms in the future. Bootstrap and test on x86_64 and AArch64 ongoing. Any comments? Thanks, bin 2018-04-27 Bin Cheng * tree-ssa-live.c (memmodel.h, ira.h, tree-ssa-coalesce.h): Include. (struct stmt_lr_info, free_stmt_lr_info)

[PATCH GCC][4/6]Support regional coalesce and live range computation

2018-05-04 Thread Bin Cheng
hanks, bin 2018-04-27 Bin Cheng * tree-outof-ssa.c (remove_ssa_form): Update use. * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support regional coalesce. (coalesce_with_default): Update comment. (create_outofssa_var_map): Support regional coalesce.

[PATCH GCC][3/6]Delete unnecessary function live_merge_and_clear

2018-05-04 Thread Bin Cheng
HI, This is an obvious patch removing the unnecessary function. Bootstrap and test on x86_64 and AArch64 ongoing. Is it OK? Thanks, bin 2018-04-27 Bin Cheng * tree-ssa-live.h (live_merge_and_clear): Delete.From ba6e47da7faba9a31c776a6d06ef052b1ed392a8 Mon Sep 17 00:00:00 2001 From

[PATCH GCC][2/6]Compute available register for each register classes

2018-05-04 Thread Bin Cheng
Hi, This is the second patch computing available/clobber registers for register classes. It's the same as the original patch posted @https://gcc.gnu.org/ml/gcc-patches/2017-05/msg01022.html Bootstrap and test on x86_64 and AArch64 ongoing. Any comments? Thanks, bin 2017-04-27 Bin

[PATCH GCC][1/6]Compute type mode and register class mapping

2018-05-04 Thread Bin Cheng
the original version patch at https://gcc.gnu.org/ml/gcc-patches/2017-05/msg01021.html Bootstrap and test on x86_64 and AArch64 ongoing. Any comments? Thanks, bin 2018-04-27 Bin Cheng * ira.c (setup_mode_classes): New function. (find_reg_classes): Call above function.

[PATCH PR85190]Adjust pointer for aligned access

2018-04-10 Thread Bin Cheng
04-10 Bin Cheng PR testsuite/85190 * gcc.dg/vect/pr81196.c: Adjust pointer for aligned access.diff --git a/gcc/testsuite/gcc.dg/vect/pr81196.c b/gcc/testsuite/gcc.dg/vect/pr81196.c index 46d7a9e..15320ae 100644 --- a/gcc/testsuite/gcc.dg/vect/pr81196.c +++ b/gcc/testsuite/gcc.dg

[wwwdocs]Mention -ftree-loop-distribution

2018-04-03 Thread Bin Cheng
Hi, Option -ftree-loop-distribution is improved and enabled by default at -O3 for GCC8. This patch describes the change, is it OK? Thanks, binIndex: htdocs/gcc-8/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-8/changes.html,

[PATCH testsuite]Fix pr83126.c failure for bare-metal toolchains

2018-03-22 Thread Bin Cheng
Hi, The new test pr83126.c requires pthread for compiling, this simple patch skips it for bare-metal toolchains. Test checked. Is it OK? Thanks, bin gcc/testsuite 2018-03-22 Bin Cheng * gcc.dg/graphite/pr83126.c: Require pthread for the test.diff --git a/gcc/testsuite/gcc.dg

[PATCH PR84969]Don't reorder builtin memsets if they set different rhs values

2018-03-20 Thread Bin Cheng
ould be resolved in a more general way maximizing parallelism as well as merging opportunities when sorting partitions into topological order from dependence graph, which isn't GCC8 task. Bootstrap and test on x86_64 and AArch64 ongoing. Okay if no failures? Thanks, bin 2018-03-20 Bin Che

[PATCH AArch64]Fix test failure for pr84682-2.c

2018-03-16 Thread Bin Cheng
Hi, This simple patch fixes test case failure for pr84682-2.c by returning false on wrong mode rtx in aarch64_classify_address, rather than assert. Bootstrap and test on aarch64. Is it OK? Thanks, bin 2018-03-16 Bin Cheng * config/aarch64/aarch64.c (aarch64_classify_address

[PATCH PR82965/PR83991]Fix invalid profile count in vectorization peeling

2018-01-31 Thread Bin Cheng
rap and test on x86_64 and AArch64. gcc.dg/vect/pr79347.c is fixed for both PR82965 and PR83991. Is this OK? Thanks, bin 2018-01-30 Bin Cheng PR tree-optimization/82965 PR tree-optimization/83991 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile

[PATCH PR82604]Fix regression in ftree-parallelize-loops

2018-01-19 Thread Bin Cheng
han now, so parloop can parallelize as before. Bootstrap and test on x86_64 and AArch64 ongoing. Is it OK if no errors? Thanks, bin 2018-01-19 Bin Cheng PR tree-optimization/82604 * tree-loop-distribution.c (enum partition_kind): New enum item PKIND_PARTIAL_MEMSET.

[PATCH PR83695]Fix ICE by resetting cached scev info after interchange.

2018-01-11 Thread Bin Cheng
en we only interchange in limited cases. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2018-01-11 Bin Cheng PR tree-optimization/83695 * gimple-loop-linterchange.cc (tree_loop_interchange::interchange_loops): Call scev_reset_htab to reset cached

[PATCH BACKPORT]Backport r254778 and test case in r244815 to GCC6

2017-12-19 Thread Bin Cheng
HI, This patch backports r254778 and test case in r244815 to GCC6. Bootstrap and test on x86_64. Is it OK? Thanks, bin 2017-12-18 Bin Cheng Backport from mainline 2017-11-15 Bin Cheng PR tree-optimization/82726 PR tree-optimization/70754 * tree

[GCC BACKPORT]Backport revision 254777 and 254778 to GCC 7 branch

2017-12-19 Thread Bin Cheng
Hi, This patch backports revision 254777 and 254778 to GCC 7 branch. Bootstrap and test on x86_64. Is it OK? Thanks, bin 2017-12-18 Bin Cheng Backport from mainline 2017-11-15 Bin Cheng PR tree-optimization/82726 PR tree-optimization/70754 * tree

[PATCH PR81740]Enforce dependence check for outer loop vectorization

2017-12-15 Thread Bin Cheng
enforcing dependence check. It also adds two tests with one shouldn't be vectorized and the other should. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-12-15 Bin Cheng PR tree-optimization/81740 * tree-vect-data-refs.c (vect_analyze_data_ref_depen

[PATCH PR83320]Fix new/free mismatch issue

2017-12-08 Thread Bin Cheng
Hi, While I am still trying to reproduce and verify the issue (valgrind checking runs very slow for me), It's clear I made stupid mistake using free for newed vector. This simple patch fixes it. Bootstrap and test ongoing. Is it OK? Thanks, bin 2017-12-06 Bin Cheng PR

[PATCH GCC]More conservative interchanging small loops with const initialized simple reduction

2017-12-08 Thread Bin Cheng
this patch. Is it OK if test passes? Thanks, bin 2017-12-08 Bin Cheng * gimple-loop-interchange.cc (struct loop_cand): New field. (loop_cand::loop_cand): Init new field in constructor. (loop_cand::classify_simple_reduction): Record simple reduction initialized

[PATCH GCC]Introduce loop interchange pass and enable it at -O3

2017-12-07 Thread Bin Cheng
aves either. So is it OK? Thanks, bin 2017-12-07 Bin Cheng Richard Biener PR tree-optimization/81303 * Makefile.in (gimple-loop-interchange.o): New object file. * common.opt (floop-interchange): Reuse the option from graphite. * doc/invoke.texi (-fl

[PATCH TEST]Adjust GRAPHITE tests in preparation for loop interchange

2017-12-06 Thread Bin Cheng
Hi, The loop interchange pass reuses option -floop-interchange from GRAPHITE, this patch adjusts all affected GRAPHITE tests by changing the option to -floop-nest-optimize. Test result checked with/without loop interchange. Is it OK? Thanks, bin gcc/testsuite 2017-12-06 Bin Cheng

[PATCH branch/gimple-interchange]obvious cleanup

2017-12-05 Thread Bin Cheng
Hi, This is an obvious cleanup patch doing variable renaming, function inlining. Is it OK? Thanks, bin 2017-12-05 Bin Cheng * gimple-loop-interchange.cc (struct induction): Rename fields. (dump_induction, loop_cand::analyze_induction_var): Update uses. (loop_cand

[PATCH branch/gimple-linterchange]Use dyn_cast instread of is_a<> and as_a<>

2017-12-01 Thread Bin Cheng
Hi, This is a simple patch using dyn_cast instead of is_a<> and as_a<> as suggested by review. This is for branches/gimple-linterchange, bootstrap and test as when the branch is created. Is it OK? Thanks, bin 2017-11-30 Bin Cheng * gimple-loop-interchange.cc (is-a.h)

[PATCH GCC]Rename and make remove_dead_inserted_code a simple dce interface

2017-11-28 Thread Bin Cheng
ge to branch: gcc.gnu.org/svn/gcc/branches/gimple-linterchange. Thanks, bin 2017-11-27 Bin Cheng * tree-ssa-dce.c (simple_dce_from_worklist): Move and rename from tree-ssa-pre.c::remove_dead_inserted_code. * tree-ssa-dce.h: New file. * tree-ssa-pre.c (tree-ssa-

[PATCH GCC]Support load in CT_STORE_STORE chain if dominated by store in the same loop iteration

2017-11-17 Thread Bin Cheng
mixed chain. That would need fundamental rewrite of the pass and not sure how useful it would be. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-11-15 Bin Cheng * tree-predcom.c: Add general comment on Store-Store chains. (split_data_refs_to_components

[PATCH Obvious]Remove redundant check on component distance

2017-11-17 Thread Bin Cheng
Hi, This is an obvious patch removing redundant check on component distance in tree-predcom.c Bootstrap and test along with next patch. Is it OK? Thanks, bin 2017-11-15 Bin Cheng * tree-predcom.c (add_ref_to_chain): Remove check on distance.From

[PATCH PR82726/PR70754][2/2]New fix by finding correct root reference in combined chains

2017-11-03 Thread Bin Cheng
. This should be more efficient because we avoid function call to stmt_dominates_stmt_p. Bootstrap and test on x86_64 and AArch64 in patch set. Is it OK? Thanks, bin 2017-11-02 Bin Cheng PR tree-optimization/82726 PR tree-optimization/70754 * tree-predcom.c

[PATCH PR82726][1/2]Revert previous fixes for PR70754 and PR79663

2017-11-03 Thread Bin Cheng
efficient because we avoid function call to stmt_dominates_stmt_p. This is the first patch reverting r244815 and r245689. Bootstrap and test on x86_64 and AArch64 in patch set. Is it OK? Thanks, bin 2017-11-02 Bin Cheng PR tree-optimization/82726 Revert 2017-01-23

[PATCH OBVIOUS]Fix memory leak in tree-predcom.c

2017-11-03 Thread Bin Cheng
Hi, I ran into this memory leak issue in tree-predcom.c when investigating other PRs. This is the obvious fix by freeing reference of trivial component. Bootstrap and test on x86_64. Is it OK? Thanks, bin 2017-11-02 Bin Cheng * tree-predcom.c (determine_roots_comp): Avoid memory

[PATCH PR82776]Exploit more undefined pointer overflow behavior in loop niter analysis

2017-11-03 Thread Bin Cheng
with condition: (size_t (p2 - p1) >= n) in function B::append. So, any comment? Thanks, bin 2017-11-02 Bin Cheng PR tree-optimization/82776 * tree-ssa-loop-niter.c (infer_loop_bounds_from_pointer_arith): Handle POINTER_PLUS_EX

Re: [PATCH GCC][3/3]Refine CFG and bound information for split loops

2017-10-20 Thread Bin Cheng
From: Richard Biener Sent: 20 October 2017 12:24 To: Bin Cheng Cc: gcc-patches@gcc.gnu.org; nd Subject: Re: [PATCH GCC][3/3]Refine CFG and bound information for split loops   On Thu, Oct 19, 2017 at 3:26 PM, Bin Cheng wrote: > Hi, > This is a rework of patch at > https://gc

[PATCH GCC][3/3]Refine CFG and bound information for split loops

2017-10-19 Thread Bin Cheng
4 and AArch64. Comments? Thanks, bin 2017-10-16 Bin Cheng * tree-ssa-loop-split.c (compute_new_first_bound): New parameter. Compute and return bound information for the second split loop. (adjust_loop_split): New function. (split_loop): Update use and call above fun

[PATCH GCC][2/3]Simplify ((A +- CST1 CMP A +- CST2)) for undefined overflow type

2017-10-19 Thread Bin Cheng
Hi, This patch adds pattern simplifying (A +- CST1 CMP A +- CST2) for undefined overflow types. Bootstrap and test for patch set on x86_64 and AArch64. Comments? Thanks, bin 2017-10-16 Bin Cheng * match.pd (A +- CST1 CMP A +- CST2): New pattern.From

[PATCH GCC][1/3]Simplify (A + CST cmp A -> CST cmp zero) for undefined overflow type

2017-10-19 Thread Bin Cheng
simplifies (A + CST cmp A -> CST cmp zero) for types with undefined overflow behavior. Bootstrap and test for patch set on x86_64 and AArch64. Comments? Thanks, bin 2017-10-16 Bin Cheng * match.pd (A + CST cmp A -> CST cmp zero): New simplification for undefined overflow ty

[PATCH PR82574]Check that datref must be executed exactly once per iteration against outermost loop in nest

2017-10-17 Thread Bin Cheng
only need to check against the outermost loop for perfect nest. Bootstrap and test on x86_64. Is it OK? Thanks, bin 2017-10-17 Bin Cheng PR tree-optimization/82574 * tree-loop-distribution.c (find_single_drs): New parameter. Check that data reference must be executed

[PATCH GCC]Introduce qsort_range interface for GCC vector

2017-10-16 Thread Bin Cheng
x86_64 and AArch64 with other patches. Is it OK? Thanks, bin 2017-10-13 Bin Cheng * vec.h (struct GTY((user)) vec::qsort_range): New member function. (struct vec): New member function.From a6aa2866fb067628f63f508e9314c3a092b6055c Mon Sep 17 00:00:00 2001 From: Bin Cheng

[PATCH GCC]Try harder to find base object by expanding base address

2017-10-13 Thread Bin Cheng
ction happened during the expansion. And it's good to have base object for address type iv_uses. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-10-12 Bin Cheng * tree-scalar-evolution.c (alloc_iv): New parameter controlling base expansion for finding b

[PATCH GCC]Refine comment and set type for partition merged from SCC

2017-10-11 Thread Bin Cheng
ntial. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-10-10 Bin Cheng * tree-loop-distribution.c (break_alias_scc_partitions): Add comment and set PTYPE_SEQUENTIAL for merged partition.diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c

[PATCH PR82472]Update postorder number for merged partition.

2017-10-11 Thread Bin Cheng
? Thanks, bin 2017-10-10 Bin Cheng PR tree-optimization/82472 * tree-loop-distribution.c (sort_partitions_by_post_order): Refine comment. (break_alias_scc_partitions): Update postorder number. gcc/testsuite 2017-10-10 Bin Cheng PR tree-optimization

[PATCH GCC][7/7]Merge adjacent memset builtin partitions

2017-10-05 Thread Bin Cheng
_64 and AArch64, is it OK? Thanks, bin 2017-10-04 Bin Cheng * tree-loop-distribution.c (tree-ssa-loop-ivopts.h): New header file. (struct builtin_info): New fields. (classify_builtin_1): Compute and record base and offset parts for memset builtin parti

[PATCH GCC][6/7]Support loop nest distribution for builtin partition

2017-10-05 Thread Bin Cheng
single memset, rather than a loop of memset. Bootstrap and test in patch set on x86_64 and AArch64, is it OK? Thanks, bin 2017-10-04 Bin Cheng * tree-loop-distribution.c (struct builtin_info): New struct. (struct partition): Refactor fields into struct builti

[PATCH GCC][5/7]Extend loop distribution for two-level innermost loop nest

2017-10-05 Thread Bin Cheng
et on x86_64 and AArch64, is it OK? Thanks, bin 2017-10-04 Bin Cheng * tree-loop-distribution.c: Adjust the general comment. (NUM_PARTITION_THRESHOLD): New macro. (ssa_name_has_uses_outside_loop_p): Support loop nest distribution. (classify_partition): Skip bu

[PATCH GCC][4/7]Choose exit edge/path when removing inner loop's exit statement

2017-10-05 Thread Bin Cheng
/path for inner loop's exit condition, otherwise an infinite empty loop will be generated. Test case added. Bootstrap and test in patch set on x86_64 and AArch64, is it OK? Thanks, bin 2017-10-04 Bin Cheng * tree-loop-distribution.c (generate_loops_for_partition): Remove in

[PATCH GCC][3/7]Don't skip renaming PHIs in loop nest with only one inner loop

2017-10-05 Thread Bin Cheng
ow it is only triggered in building spec2006/416.gamess with loop nest distribution, but I failed to reduce a test from it. Bootstrap and test in patch set on x86_64 and AArch64, is it OK? Thanks, bin 2017-10-04 Bin Cheng * tree-vect-loop-manip.c (rename_variables_in_bb): Rename PHI

[PATCH GCC][2/7]Don't rename variables for deleted new preheader

2017-10-05 Thread Bin Cheng
? Thanks, bin 2017-10-04 Bin Cheng * tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Skip renaming variables in new preheader if it's deleted.From 9c7719402c9528b517d8408419c2e9b930708772 Mon Sep 17 00:00:00 2001 From: Bin Cheng Date: Fri, 22 Sep 2017 16:

[PATCH GCC][1/7]Delete unused field of struct partition in loop distribution

2017-10-05 Thread Bin Cheng
. This is the first simple patch deleting unused field of struct partition in loop distribution. It's an obvious change. Bootstrap and test in patch set on x86_64 and AArch64. Thanks, bin 2017-10-04 Bin Cheng * tree-loop-distribution.c (struct partition): Remove unused

[PATCH PR82163/V2]New interface checking LCSSA for single loop

2017-09-22 Thread Bin Cheng
. Bootstrap and test on x86_64, is it OK? Thanks, bin 2017-09-21 Bin Cheng PR tree-optimization/82163 * tree-ssa-loop-manip.h (verify_loop_closed_ssa): New parameter. (checking_verify_loop_closed_ssa): New parameter. * tree-ssa-loop-manip.c (check_loop_closed_ssa_use

[PATCH PR82163]Rewrite loop into lcssa form instantly

2017-09-14 Thread Bin Cheng
doesn't affect compilation time since rewrite_into_loop_closed_ssa_1 is only called for store-store chain transformation and only the transformed loop is rewritten. Bootstrap and test ongoing on x86_64. is it OK if no failures? Thanks, bin 2017-09-14 Bin Cheng PR tree-optimiz

[PATCH GCC]A simple implementation of loop interchange

2017-08-30 Thread Bin Cheng
s with it enabled by default. Any comments? Thanks, bin 2017-08-29 Bin Cheng * Makefile.in (tree-ssa-loop-interchange.o): New object file. * common.opt (ftree-loop-interchange): New option. * doc/invoke.texi (-ftree-loop-interchange): Document new option. * passes.

[PATCH PR81913]Skip niter analysis if either IV in exit condition can wrap

2017-08-24 Thread Bin Cheng
inter case as reported in PR81196, but unsigned type needs more work. The patch also includes two XFAIL tests showing what shall be improved here. Bootstrap and test on AArch64. Is it OK? Thanks, bin 2017-08-24 Bin Cheng PR tree-optimization/81913 * tree-ssa-loop-niter.c (

[GCC RFC]Expensive internal function calls.

2017-08-18 Thread Bin Cheng
f not appropriate. Thanks, bin 2017-08-16 Bin Cheng * gimple.c (gimple_inexpensive_call_p): Consider IFN_LOOP_DIST_ALIAS and IFN_LOOP_VECTORIZED as expensive calls.diff --git a/gcc/gimple.c b/gcc/gimple.c index c4e6f81..6d4e376 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -3

[PATCH PR81832]Skip copying loop header if inner loop is distributed

2017-08-15 Thread Bin Cheng
ecked, but the patch only checks loop's header for simplicity/efficiency's purpose. Any comment? Bootstrap and test on x86_64. Thanks, bin 2017-08-15 Bin Cheng PR tree-optimization/81832 * tree-ssa-loop-ch.c (inner_loop_distributed_p): New function. (pass_ch_

[PATCH PR81799]Fix ICE by forcing to is_gimple_val

2017-08-14 Thread Bin Cheng
Hi, This patch fixes ICE reported in PR81799. It simply uses is_gimple_val rather than is_gimple_condexpr. Bootstap and test on x86_64. Is it OK? Thanks, bin 2017-08-11 Bin Cheng PR tree-optimization/81799 * tree-loop-distribution.c (version_loop_by_alias_check): Force

[PATCH GCC][02/06]New field in struct dependence_info indicating fixed length access

2017-08-14 Thread Bin Cheng
we need to differentiate dependence_info derived from runtime alias check with others derived from restrict pointer. Bootstrap and test in series. any comment? Thanks, bin 2017-08-10 Bin Cheng * tree-core.h (struct tree_base.dependence_info): New field. * tree.c (copy_node

[PATCH GCC][01/06]New interface returning all adjacent vertices in graph

2017-08-14 Thread Bin Cheng
Hi, This simple patch adds new interface returning adjacent vertices for a vertex in graph. Bootstrap and test in series. Is it OK? Thanks, bin 2017-08-10 Bin Cheng * graphds.c (adjacent_vertices): New function. * graphds.h (adjacent_vertices): New declaration.From

[PATCH GCC][06/06]Record runtime alias info in struct dependence_info and pass it along

2017-08-14 Thread Bin Cheng
bitrary graph by simply discarding edges to sub-graph which can be modeled. For example, we can discard edge in above graph. This approximation results in less optimizations but correct code. */ Bootstrap and test in series on x86_64 and AArch64. Is it OK? Thanks, bin 2017-08-10 Bin

[PATCH GCC][03/06]Dump dependence information

2017-08-14 Thread Bin Cheng
Hi, This simple patch adds code dumping struct dependence_info. Bootstrap and test in series. Is it OK? Thanks, bin 2017-08-10 Bin Cheng * tree-pretty-print.c (dump_generic_node): Dump fixed length tag in MEM_REF. Dump dependence info in TARGET_MEM_REF.From

[PATCH GCC][05/06]An interface clear all dependence_info with fixed access length tag

2017-08-14 Thread Bin Cheng
before expanding, but for now it is done in loopdone given predcom is the only motivation pass that I know. Bootstrap and test in series. Is it OK? Thanks, bin 2017-08-10 Bin Cheng * tree-ssa-address.c (clear_dependence_info): New function. (clear_all_dependence_info): New

[PATCH GCC][04/06]Add copying interface for dependence_info

2017-08-14 Thread Bin Cheng
Is it OK? Thanks, bin 2017-08-10 Bin Cheng * tree-ssa-address.c (copy_dependence_info): New function. * tree-ssa-address.h (copy_dependence_info): New declaration. * tree-ssa-loop-ivopts.c (rewrite_use_address): Call above func.From 3cf0275d0db7d3e240bc7a010c6de68f15f46ce

[PATCH GCC][OBVIOUS]Handle boundary case for last iv candidate

2017-08-08 Thread Bin Cheng
Hi, When investigate issues, I ran into this obvious issue that the last candidate is not related to compare type iv_use. This patch fixes it. Will apply later. Thanks, bin 2017-08-08 Bin Cheng * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): Handle boundary

[PATCH PR81744]Fix ICE by deep copying expression of loop's number of iterations

2017-08-08 Thread Bin Cheng
Hi, This is an obvious patch. It fixes ICE in PR81744 by deep copying expression of loop's number of iterations. Test result checked. Is it OK? Thanks, bin 2017-08-07 Bin Cheng PR tree-optimization/81744 * tree-predcom.c (prepare_finalizers_chain): Deep copy ex

[PATCH PR81267]Rewrite into loop closed ssa form in case of any store-store chain

2017-07-31 Thread Bin Cheng
x86_64 and AArch64 ongoing. Is it OK? Thanks, bin 2017-07-31 Bin Cheng PR tree-optimization/81627 * tree-predcom.c (prepare_finalizers): Always rewrite into loop closed ssa form for store-store chain. gcc/testsuite/ChangeLog 2017-07-31 Bin Cheng PR tree

[PATCH PR81620]Don't set has_max_use_after flag for store-store chain

2017-07-31 Thread Bin Cheng
Hi, This simple patch fixes the ICE by not setting has_max_use_after flag for store-store chain because there is no use at all. Bootstrap and test on x86_64 and AArch64 ongoing. Is it OK if no failure? Thanks, bin 2017-07-31 Bin Cheng PR tree-optimization/81620 * tree

[PATCH PR81228]Fixes ICE by adding LTGT in vec_cmp.

2017-07-28 Thread Bin Cheng
to gcc-7-branch. Thanks, bin 2017-07-27 Bin Cheng PR target/81228 * config/aarch64/aarch64-simd.md (vec_cmp): Add LTGT. gcc/testsuite/ChangeLog 2017-07-27 Bin Cheng PR target/81228 * gcc.dg/pr81228.c: New.diff --git a/gcc/config/aarch64/aarch64

[PATCH TEST]Require vect_perm in gcc.dg/vect/pr80815-3.c

2017-07-24 Thread Bin Cheng
Hi, The test has negative step in memory access, thus can't be vectorized on target like sparc-sun-solaris2.12. This patch adds vect_perm requirement for it. Test result checked. Is it OK? Thanks, bin gcc/testsuite/ChangeLog 2017-07-20 Bin Cheng * gcc.dg/vect/pr80815-3.c: Re

[PATCH GCC]Make pointer overflow always undefined and remove the macro

2017-07-24 Thread Bin Cheng
ion, as in nowrap_type_p. This patch makes it always true thus removes definition/usage of the macro. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-07-20 Bin Cheng * tree.h (POINTER_TYPE_OVERFLOW_UNDEFINED): Delete. * fold-const.c (fold_comparison, fold_

[PATCH PR81388]Revert change in revision 238585

2017-07-20 Thread Bin Cheng
e issue itself, any fix would require may_be_zero to be computed, which basically leads to patch revert. Bootstrap and test on x86_64 and AArch64, is it OK? Thanks, bin 2017-07-20 Bin Cheng PR tree-optimization/81388 Revert r238585: 2016-07-21 Bin Cheng

[GCC ARM]Remove unused variable in arm

2017-07-18 Thread Bin Cheng
Hi, This leftover unused variable breaks arm bootstrap. Simply remove it. Thanks, bin 2017-07-18 Bin Cheng * config/arm/arm.c (arm_emit_store_exclusive): Remove unused var.diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 1b7b382..139ab70 100644 --- a/gcc/config/arm

[PATCH PR81408]Turn TREE level unsafe loop optimizations warning to missed optimization message

2017-07-18 Thread Bin Cheng
on messages. I didn't change when this will be dumped, for now it is when called from ivopts. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-07-13 Bin Cheng PR target/81408 * tree-ssa-loop-niter.c (number_of_iterations_exit): Dump missed o

[PATCH PR81369/02]Conservatively not distribute loop with unknown niters

2017-07-14 Thread Bin Cheng
4, is it OK? Thanks, bin 2017-07-12 Bin Cheng PR target/81369 * tree-loop-distribution.c (classify_partition): Only assert on numer of iterations. (merge_dep_scc_partitions): Delete prameter. Update function call. (distribute_loop): Remove code handling

[PATCH PR81369/01]Sort partitions by post order for all cases

2017-07-14 Thread Bin Cheng
Hi, This patch fixes ICE reported by PR81369. It simply sinks call to sort_partitions_by_post_order so that it's executed for all cases. This is necessary to schedule reduction partition as the last one. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-07-12 Bin

[PATCH AArch64]Fix ICE in cortex-a57 fma steering pass

2017-07-12 Thread Bin Cheng
his patch fixes the issue by skipping such instructions if no du chain is found. Bootstrap and test on AArch64/cortex-a57. Is it OK? If it's fine, I would also need to backport it to 7/6 branches. Thanks, bin 2017-07-12 Bin Cheng PR target/81414 * config/aarch64/cortex-a57

[PATCH PR81374]Record the max index of basic block, rather than # of basic blocks

2017-07-10 Thread Bin Cheng
86_64. Is it OK? Thanks, bin 2017-07-10 Bin Cheng PR tree-optimization/81374 * tree-loop-distribution.c (pass_loop_distribution::execute): Record the max index of basic blocks, rather than number of basic blocks.diff --git a/gcc/tree-loop-distribution.c b/gcc/tree

[PATCH PR81196]Analyze ntiers for loop with exit condition comparing induction variables

2017-06-28 Thread Bin Cheng
Hi, This patch picks up a missed-optimization case in loop niter analysis. With this patch, niters information for loop as in added test can be analyzed. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-06-27 Bin Cheng PR tree-optimization/81196 * tree

[PATCH GCC][4/4]Better handle store-stores chain if eliminated stores only store loop invariant

2017-06-27 Thread Bin Cheng
{ a[i] = 1; } a[n] = 2; a[n+1] = 2; Bootstrap(O2/O3) in patch series on x86_64 and AArch64. Is it OK? Thanks, bin 2017-06-21 Bin Cheng * tree-predcom.c: (struct chain): Handle store-store chain in which stores for elimination only store loop inva

[PATCH GCC][3/4]Generalize dead store elimination (or store motion) across loop iterations in predcom

2017-06-27 Thread Bin Cheng
re. Bootstrap(O2/O3) in patch series on x86_64 and AArch64. Is it OK? Thanks, bin 2017-06-21 Bin Cheng * tree-predcom.c: Revise general description of pass. (enum chain_type): New enum type for store elimination. (struct chain): New field supporting sto

[PATCH GCC][1/4]Extend interface ref_at_iteration to compute ref @ (NITERS + ITERS)-th iteration

2017-06-27 Thread Bin Cheng
/O3) in patch series on x86_64 and AArch64. Is it OK? Thanks, bin 2017-06-21 Bin Cheng * tree-predcom.c (ref_at_iteration): Add parameter NITERS. Compute memory reference to DR at (NITERS + ITERS)-th iteration of loop.From ed1df7daca3d2dc2c3ba1c504d5431fba96d0887 Mon Sep 17 00

[PATCH GCC][2/4]Remove interface initialize_root in predcom

2017-06-27 Thread Bin Cheng
Hi, This simple patch removes interface initialize_root. It's simple enough and called only once. Bootstrap(O2/O3) in patch series on x86_64 and AArch64. Is it OK? Thanks, bin 2017-06-21 Bin Cheng * tree-predcom.c (initialize_root): Delete. (execute_pred_commoning_

[PATCH GCC][2/2]Refine CFG and bound information for split loops

2017-06-14 Thread Bin Cheng
st can be completely unrolled by later passes. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-06-12 Bin Cheng * tree-ssa-loop-split.c (compute_new_first_bound): Compute and return bound information for the second split loop. (adjust_loop_split): New fu

[PATCH GCC][1/2]Feed bound computation to folder in loop split

2017-06-14 Thread Bin Cheng
test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-06-12 Bin Cheng * tree-ssa-loop-split.c (compute_new_first_bound): Feed bound computation to folder, rather than force to gimple operands too early.From 372dc98aa91fd495c98c2326f854eb5f2c76500b Mon Sep 17 00:00:00

[PATCH GCC][13/13]Distribute loop with loop versioning under runtime alias check

2017-06-12 Thread Bin Cheng
in SCC now. A better fusion algorithm is desired to minimize loop overhead, maximize parallelism and maximize Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-06-07 Bin Cheng * tree-loop-distribution.c: Add general explanantion on the pass.

[PATCH GCC][12/13]Workaround reduction statements for distribution

2017-06-12 Thread Bin Cheng
patch simply workarounds reduction issue by checking if the statement belongs to all partitions. If yes, the reduction must be computed in the last partition no matter how the loop is distributed. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-06-07 Bin Cheng

[PATCH GCC][08/13]Refactoring structure partition for distribution

2017-06-12 Thread Bin Cheng
it OK? Thanks, bin 2017-06-07 Bin Cheng * tree-loop-distribution.c (struct partition): New fields recording its data references. (partition_alloc, partition_free): Init and release data refs. (partition_merge_into): Merge data refs. (build_rdg_partition_for_v

[PATCH GCC][10/13]Compute and cache data dependence relation

2017-06-12 Thread Bin Cheng
Hi, This patch computes and caches data dependence relation in a hash table so that it can be queried multiple times later for partition dependence check. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-06-07 Bin Cheng * tree-loop-distribution.c (struct

[PATCH GCC][11/13]Annotate partition by its parallelism execution type

2017-06-12 Thread Bin Cheng
x27;t work very well because it does blind distribution/fusion. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-06-07 Bin Cheng * tree-loop-distribution.c (alias.h): Include header file. (enum partition_type): New. (struct partition): New field

[PATCH GCC][09/13]Simply cost model merges partitions with the same references

2017-06-12 Thread Bin Cheng
only merge partitions with the same references. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-06-07 Bin Cheng * tree-loop-distribution.c (ref_base_address): Delete. (similar_memory_accesses): Rename ... (share_memory_accesses): ... to this. Che

[PATCH GCC][06/13]Preserve loop nest in whole distribution life time

2017-06-12 Thread Bin Cheng
Hi, This simple patch computes and preserves loop nest vector for whole distribution life time. The loop nest will be used multiple times in on-demand data dependence computation. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-06-07 Bin Cheng * tree-loop

[PATCH GCC][04/13]Sort statements in topological order for loop distribution

2017-06-12 Thread Bin Cheng
issue by sorting in topological order. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-06-07 Bin Cheng * tree-loop-distribution.c (bb_top_order_index): New. (bb_top_order_index_size, bb_top_order_cmp): New. (stmts_from_loop): Use topological

[PATCH GCC][07/13]Preserve data references for whole distribution life time

2017-06-12 Thread Bin Cheng
Hi, This patch collects and preserves all data references in loop for whole distribution life time. It will be used afterwards. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-06-07 Bin Cheng * tree-loop-distribution.c (datarefs_vec, datarefs_map): New

[PATCH GCC][05/13]Refactoring partition merge

2017-06-12 Thread Bin Cheng
Hi, This simple patch refactors partition merge code and dump information. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-06-07 Bin Cheng * tree-loop-distribution.c (enum fuse_type, fuse_message): New. (partition_merge_into): New parameter. Dump reason

[PATCH GCC][02/13]Skip distribution if there is no loop

2017-06-12 Thread Bin Cheng
Hi, this is a simple patch skipping distribution if there is no loop at all. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-06-07 Bin Cheng * cfgloop.h (pass_loop_distribution::execute): Skip if no loops.From eb6a795331efde92fd6df1c6e612fb1ffa9f482f Mon Sep 17

[PATCH GCC][03/13]Mark and skip distributed loops

2017-06-12 Thread Bin Cheng
Hi, This simple patch marks distributed loops and skips it in following distribution. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-06-07 Bin Cheng * tree-loop-distribution.c (generate_loops_for_partition): Mark distributed loops

[PATCH GCC][01/13]Introduce internal function IFN_LOOP_DIST_ALIAS

2017-06-12 Thread Bin Cheng
. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin 2017-06-07 Bin Cheng * cfgloop.h (struct loop): New field ldist_alias_id. * cfgloopmanip.c (lv_adjust_loop_entry_edge): Comment change. * internal-fn.c (expand_LOOP_DIST_ALIAS): New function

[PATCH GCC][5/5]Enable tree loop distribution at -O3 and above optimization levels.

2017-06-02 Thread Bin Cheng
Hi, This patch enables -ftree-loop-distribution by default at -O3 and above optimization levels. Bootstrap and test at O2/O3 on x86_64 and AArch64. is it OK? Note I don't have strong opinion here and am fine with either it's accepted or rejected. Thanks, bin 2017-05-31

[PATCH GCC][4/5]Improve loop distribution to handle hmmer

2017-06-02 Thread Bin Cheng
formance improvement. There is still inefficient code generation issue which I will try to fix in loop split. Apart from this, the next opportunity in hmmer is to eliminate number of dead stores under proper alias information. Bootstrap and test at O2/O3 on x86_64 and AArch64

[PATCH GCC][2/5]Extend graph data structure

2017-06-02 Thread Bin Cheng
edges skipped. Bootstrap and test at O2/O3 on x86_64 and AArch64. is it OK? Thanks, bin 2017-05-31 Bin Cheng * graphds.c (add_edge): Intitialize edge's attached data. (foll_in_subgraph, dfs_fst_edge, dfs_next_edge): New function pointer parameter. Call po

[PATCH GCC][3/5]Move pass ivcanon upward in compilation process

2017-06-02 Thread Bin Cheng
Bin Cheng * passes.def (pass_iv_canon): Move before pass_loop_distribution.From 1698cc3e552a17e84719dba1ff2fbe4a8890e6be Mon Sep 17 00:00:00 2001 From: Bin Cheng Date: Tue, 30 May 2017 17:56:05 +0100 Subject: [PATCH 3/5] move-ivcanon-pass-20170529.txt --- gcc/passes.def | 2 +- 1 file

  1   2   3   4   5   >