Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.42
 
1.43
 
MAIN:ragge:20110707075106
 
optim.c
_>239239                 o = p->n_op = PLUS;
 240240 
 241241         case MUL:
<> 242+                /*
  243+                 * Check for u=(x-y)+z; where all vars are pointers to
  244+                 * the same struct. This has two advantages:
  245+                 * 1: avoid a mul+div
  246+                 * 2: even if not allowed, people may get surprised if this
  247+                 *    calculation do not give correct result if using
  248+                 *    unaligned structs.
  249+                 */
  250+                if (p->n_type == INTPTR && RCON(p) &&
  251+                    LO(p) == DIV && RCON(p->n_left) &&
  252+                    RV(p) == RV(p->n_left) &&
  253+                    LO(p->n_left) == MINUS) {
  254+                        q = p->n_left->n_left;
  255+                        if (q->n_left->n_type == PTR+STRTY &&
  256+                            q->n_right->n_type == PTR+STRTY &&
  257+                            strmemb(q->n_left->n_ap) ==
  258+                            strmemb(q->n_right->n_ap)) {
  259+                                p = zapleft(p);
  260+                                p = zapleft(p);
  261+                        }
  262+                }
  263+                /* FALLTHROUGH */
<_242264         case PLUS:
 243265         case AND:
 244266         case OR:
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-08-27 12:50 +0200