source: scripts/patches/gcc-4.0.0-fix_tree_optimisation_PR21173.patch@ 5bd60e2

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 5bd60e2 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
RevLine 
[617118d]1Submitted By: Ryan Oliver <ryan.oliver@pha.com.au>
2Source: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21173
3Initial Package Version: 4.0.0
4Upstrean Status: In Gcc4 Mainline
5Description:
6
72005-04-25 Daniel Berlin <dberlin@dberlin.org>
8
9 Fix PR tree-optimization/21173
10
11 * tree-ssa-pre.c (create_expression_by_pieces): Call unshare_expr
12 on things we pass to force_gimple_operand. Don't try to special
13 case min_invariants.
14
15===================================================================
16RCS file: /cvs/gcc/gcc/gcc/tree-ssa-pre.c,v
17retrieving revision 2.65.4.2
18retrieving revision 2.65.4.3
19diff -u -r2.65.4.2 -r2.65.4.3
20--- gcc/gcc/tree-ssa-pre.c 2005/04/17 23:40:31 2.65.4.2
21+++ gcc/gcc/tree-ssa-pre.c 2005/04/25 14:02:31 2.65.4.3
22@@ -1330,7 +1330,8 @@
23
24 folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr),
25 genop1, genop2));
26- newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL);
27+ newexpr = force_gimple_operand (unshare_expr (folded),
28+ &forced_stmts, false, NULL);
29 if (forced_stmts)
30 {
31 tsi = tsi_start (forced_stmts);
32@@ -1372,14 +1373,8 @@
33 add_referenced_tmp_var (temp);
34 folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr),
35 genop1));
36- /* If the generated operand is already GIMPLE min_invariant
37- just use it instead of calling force_gimple_operand on it,
38- since that may make it not invariant by copying it into an
39- assignment. */
40- if (!is_gimple_min_invariant (genop1))
41- newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL);
42- else
43- newexpr = genop1;
44+ newexpr = force_gimple_operand (unshare_expr (folded),
45+ &forced_stmts, false, NULL);
46 if (forced_stmts)
47 {
48 tsi = tsi_start (forced_stmts);
Note: See TracBrowser for help on using the repository browser.