Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > e677bbbdff6d27fe001f15e0ef2bb4cc > files > 160

sdcc-3.0.0-0.fc14.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<!--Converted with LaTeX2HTML 2008 (1.71)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>8.1.6 Algebraic Simplifications</TITLE>
<META NAME="description" CONTENT="8.1.6 Algebraic Simplifications">
<META NAME="keywords" CONTENT="sdccman">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META NAME="Generator" CONTENT="LaTeX2HTML v2008">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="sdccman.css">

<LINK REL="next" HREF="node176.html">
<LINK REL="previous" HREF="node174.html">
<LINK REL="up" HREF="node169.html">
<LINK REL="next" HREF="node176.html">
</HEAD>

<BODY >
<!--Navigation Panel-->
<A NAME="tex2html3441"
  HREF="node176.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html3435"
  HREF="node169.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html3429"
  HREF="node174.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html3437"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html3439"
  HREF="node191.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html3442"
  HREF="node176.html">8.1.7 'switch' Statements</A>
<B> Up:</B> <A NAME="tex2html3436"
  HREF="node169.html">8.1 Optimizations</A>
<B> Previous:</B> <A NAME="tex2html3430"
  HREF="node174.html">8.1.5 Loop Reversing</A>
 &nbsp; <B>  <A NAME="tex2html3438"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html3440"
  HREF="node191.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->

<H2><A NAME="SECTION00916000000000000000">
8.1.6 Algebraic Simplifications</A>
</H2>

<P>
SDCC does numerous algebraic simplifications, the following is a small
sub-set of these optimizations.
<BLOCKQUOTE>
<TT>i = j + 0;&nbsp;&nbsp;&nbsp;&nbsp; /* changed to: */&nbsp;&nbsp;&nbsp;&nbsp; i = j; </TT>&nbsp;
<BR><TT>i /= 2;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* for unsigned i changed to: */&nbsp;&nbsp;&nbsp;&nbsp;
i &gt;&gt;= 1; </TT>&nbsp;
<BR><TT>i = j - j;&nbsp;&nbsp;&nbsp;&nbsp; /* changed to: */&nbsp;&nbsp;&nbsp;&nbsp; i = 0;
</TT>&nbsp;
<BR><TT>i = j / 1;&nbsp;&nbsp;&nbsp;&nbsp; /* changed to: */&nbsp;&nbsp;&nbsp;&nbsp; i = j;</TT>

</BLOCKQUOTE>
Note the subexpressions<A NAME="4094"></A> given above are generally
introduced by macro expansions or as a result of copy/constant propagation.

<P>
<BR><HR>
<ADDRESS>

2011-03-20
</ADDRESS>
</BODY>
</HTML>