source: scripts/patches/gcc-4.0.0-fix_tree_optimisation_PR21173.patch@ 8fdfc096

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 8fdfc096 was 7f65c0e, checked in by Jim Gifford <clfs@…>, 19 years ago

r625@server (orig r623): jim | 2005-10-31 12:43:24 -0800
Final Move

  • Property mode set to 100644
File size: 1.7 KB
  • gcc/gcc/tree-ssa-pre.c

    Submitted By: Ryan Oliver <ryan.oliver@pha.com.au>
    Source: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21173
    Initial Package Version: 4.0.0
    Upstrean Status: In Gcc4 Mainline
    Description:
    
    2005-04-25  Daniel Berlin  <dberlin@dberlin.org>
    
    	Fix PR tree-optimization/21173
    	
    	* tree-ssa-pre.c (create_expression_by_pieces): Call unshare_expr
    	on things we pass to force_gimple_operand.  Don't try to special
    	case min_invariants.
    
    RCS file: /cvs/gcc/gcc/gcc/tree-ssa-pre.c,v
    retrieving revision 2.65.4.2
    retrieving revision 2.65.4.3
    diff -u -r2.65.4.2 -r2.65.4.3
     
    13301330       
    13311331        folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr),
    13321332                              genop1, genop2));
    1333         newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL);
     1333        newexpr = force_gimple_operand (unshare_expr (folded),
     1334                                        &forced_stmts, false, NULL);
    13341335        if (forced_stmts)
    13351336          {
    13361337            tsi = tsi_start (forced_stmts);
     
    13721373        add_referenced_tmp_var (temp);
    13731374        folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr),
    13741375                              genop1));
    1375         /* If the generated operand  is already GIMPLE min_invariant
    1376            just use it instead of calling force_gimple_operand on it,
    1377            since that may make it not invariant by copying it into an
    1378            assignment.  */
    1379         if (!is_gimple_min_invariant (genop1))
    1380           newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL);
    1381         else
    1382           newexpr = genop1;
     1376        newexpr = force_gimple_operand (unshare_expr (folded),
     1377                                        &forced_stmts, false, NULL);
    13831378        if (forced_stmts)
    13841379          {
    13851380            tsi = tsi_start (forced_stmts);
Note: See TracBrowser for help on using the repository browser.