\batchmode
\documentclass[10pt,a4paper]{article}
\makeatletter
\usepackage{epsfig,html,fancybox,xspace,alltt,tgrind_tab4_gen_tex2e,multicol}
\usepackage{verbatim,wrapfig}
\usepackage{page_de_garde_CRI}




























 
 






















































































































\externallabels{http://www.cri.ensmp.fr/pips/Papers/pipsSC96/pipsSC96.html}
{/projects/Pips/Production/Html/Papers/pipsSC96/labels.pl}



 




\global\mag=900 \global\setlength{\textwidth}{13 true cm}
  \global\setlength{\textheight}{20 true cm}
  \global\hsize=\textwidth
  \global\vsize=\textheight
  \pagestyle{empty}
  
                                


 \LesAdresses{
  \small\htmladdnormallink{Centre de Recherche en Informatique}
      {http://www.cri.ensmp.fr}, 
  \small\htmladdnormallink{École Nationale Supérieure des Mines de Paris}
      {http://www.ensmp.fr},
  \small 35, rue Saint-Honoré, 
  \small F-77305 \textsc{Fontainebleau cedex France}.
  {\tt\small\{\htmladdnormallink
    {ancourt}{mailto:ancourt@cri.ensmp.fr},\htmladdnormallink
    {coelho}{mailto:coelho@cri.ensmp.fr},\htmladdnormallink
    {creusillet}{mailto:creusillet@cri.ensmp.fr},\htmladdnormallink
    {keryell}{mailto:keryell@cri.ensmp.fr}\}@cri.ensmp.fr}
    \small\htmladdnormallink{\texttt{http://www.cri.ensmp.fr/pips}}
      {http://www.cri.ensmp.fr/pips}
  }


 \LeTitre{How to Add a New Phase in PIPS:
  the Case of Dead Code Elimination}

\title{\LeTitre}

\author{
  \htmladdnormallink{Corinne \textsc{Ancourt}}
{http://www.cri.ensmp.fr/people/ancourt} \and \htmladdnormallink{Fabien \textsc{Coelho}}
{http://www.cri.ensmp.fr/people/coelho} \and \htmladdnormallink{Béatrice \textsc{Creusillet}}
{http://www.cri.ensmp.fr/people/creusillet} \and \htmladdnormallink{Ronan \textsc{Keryell}}
{http://www.cri.ensmp.fr/people/keryell}
  \latex{\end{tabular}}
~
\latex{\begin{tabular}[t]{c}}\latex{\LesAdresses}
}
\date{}

\newcommand {\janname}{January}

\newcommand {\febname}{February}

\newcommand {\marname}{March}

\newcommand {\aprname}{April}

\newcommand {\mayname}{May}

\newcommand {\junname}{June}

\newcommand {\julname}{July}

\newcommand {\augname}{August}

\newcommand {\sepname}{September}

\newcommand {\octname}{October}

\newcommand {\novname}{November}

\newcommand {\decname}{December}

\newcommand {\CA}{\htmladdnormallink{Corinne \textsc{Ancourt}}
  {http://www.cri.ensmp.fr/people/ancourt}}

\newcommand {\FC}{\htmladdnormallink{Fabien \textsc{Coelho}}
  {http://www.cri.ensmp.fr/people/coelho}}

\newcommand {\BC}{\htmladdnormallink{Béatrice \textsc{Creusillet}}
  {http://www.cri.ensmp.fr/people/creusillet}}

\newcommand {\FI}{\htmladdnormallink{François \textsc{Irigoin}}
  {http://www.cri.ensmp.fr/people/irigoin}}

\newcommand {\PJ}{\htmladdnormallink{Pierre \textsc{Jouvelot}}
  {http://www.cri.ensmp.fr/people/jouvelot}}

\newcommand {\RK}{\htmladdnormallink{Ronan \textsc{Keryell}}
  {http://www.cri.ensmp.fr/people/keryell}}

\newcommand {\HPF}{\htmladdnormallink{{\sc hpf}}
  {http://www.crpc.rice.edu/HPFF/home.html}\xspace}

\newcommand {\CMF}{{\sc cmf}\xspace}

\newcommand {\CRAFT}{{\sc craft}\xspace}

\newcommand {\PVM}{\htmladdnormallink
  {{\sc pvm}\xspace}{http://www.epm.ornl.gov/pvm/pvm_home.html}}

\newcommand {\TRUE}{\texttt{TRUE}\xspace}

\newcommand {\FALSE}{\texttt{FALSE}\xspace}

\newcommand {\PIPS}{\htmladdnormallink{{\sc pips}}
  {http://www.cri.ensmp.fr/pips}\xspace}

\newcommand {\Pips}{\htmladdnormallink{{\sc Pips}}
  {http://www.cri.ensmp.fr/pips}\xspace}

\newcommand {\HPFC}{\htmladdnormallink{\textsc{hpfc}}
  {http://www.cri.ensmp/pips/hpfc.html}\xspace}

\newcommand {\WPsoixantecinq}{\htmladdnormallink{{\sc wp65}}
  {http://www.cri.ensmp.fr/pips/wp65.html}\xspace}

\newcommand {\NewGen}{\htmladdnormallink{{\sc NewGen}}
  {http://www.cri.ensmp.fr/pips/newgen-manual/newgen-manual.html}\xspace}

\newcommand {\Pcallees}{\textbf{CALLEES}\xspace}

\newcommand {\Pcallers}{\textbf{CALLERS}\xspace}

\newcommand {\Pcomplexity}{\htmlref{complexity}{sec:complexities}\xspace}

\newcommand {\Pcomplexities}{\htmlref{complexities}{sec:complexities}\xspace}

\newcommand {\Pdomain}{\htmladdnormallink{domain}{http://www.cri.ensmp.fr/pips/newgen-manual/newgen-manual.html}\xspace}

\newcommand {\Pdomains}{\htmladdnormallink{domains}{http://www.cri.ensmp.fr/pips/newgen-manual/newgen-manual.html}\xspace}

\newcommand {\PDomains}{\htmladdnormallink{Domains}{http://www.cri.ensmp.fr/pips/newgen-manual/newgen-manual.html}\xspace}

\newcommand {\Peffect}{\htmlref{effect}{sec:effects}\xspace}

\newcommand {\Plinear}{\htmlref{linear $C^3$}{sec:effects}\xspace}

\newcommand {\Peffects}{\htmlref{effects}{sec:effects}\xspace}

\newcommand {\Pphase}{\htmlref{phase}{sec:phases}\xspace}

\newcommand {\Pphases}{\htmlref{phases}{sec:phases}\xspace}

\newcommand {\pips}{\htmladdnormallink{\texttt{pips}}
  {http://www.cri.ensmp.fr/pips/batch-interface.html}\xspace}

\newcommand {\tpips}{\htmladdnormallink{\texttt{tpips}}
  {http://www.cri.ensmp.fr/pips/line-interface.html}\xspace}

\newcommand {\wpips}{\htmladdnormallink{\texttt{wpips}}
  {http://www.cri.ensmp.fr/pips/wpips-epips-user-manual/wpips-epips-user-manual.html}\xspace}

\newcommand {\EPIPS}{\htmladdnormallink{{\sc Epips}}
  {http://www.cri.ensmp.fr/pips/wpips-epips-user-manual.html}\xspace}

\newcommand {\TPIPS}{\htmladdnormallink{\textsc{Tpips}}
  {http://www.cri.ensmp.fr/pips/line-interface.html}\xspace}

\newcommand {\WPIPS}{\htmladdnormallink{\textsc{Wpips}}
  {http://www.cri.ensmp.fr/pips/wpips-epips-user-manual.html}\xspace}

\newcommand {\PIPSDBM}{\htmlref{{\sc pipsdbm}}{sec:pipsdbm}\xspace}

\newcommand {\PIPSMAKE}{\htmladdnormallink{{\sc pipsMake}}
  {http://www.cri.ensmp.fr/pips/pipsmake.html}\xspace}

\newcommand {\pipsmakemake}{\htmladdnormallink{\texttt{pips-makemake}}
  {http://www.cri.ensmp.fr/pips/developer_guide/developer_guide.html}\xspace}

\newcommand {\PIPSMAKERC}{\htmladdnormallink{\texttt{pipsmake-rc}}
  {http://www.cri.ensmp.fr:/pips/pipsmake-rc/pipsmake-rc.html}\xspace}

\newcommand {\PIPSMAKERCTEX}{\htmladdnormallink{\texttt{pipsmake-rc.tex}}
  {http://www.cri.ensmp.fr:/pips/pipsmake-rc/pipsmake-rc.html}\xspace}

\newcommand {\Pprecondition}{\htmlref{precondition}{sec:preconditions}\xspace}

\newcommand {\Ppreconditions}{\htmlref{preconditions}{sec:preconditions}\xspace}

\newcommand {\Ppredicate}{\htmlref{predicate}{sec:predicates}\xspace}

\newcommand {\Ppredicates}{\htmlref{predicates}{sec:predicates}\xspace}

\newcommand {\Pproperty}{\htmlref{property}{sec:properties}\xspace}

\newcommand {\Pproperties}{\htmlref{properties}{sec:properties}\xspace}

\newcommand {\Ppropertyfile}{\htmladdnormallink{property file}
  {http://www.cri.ensmp.fr/pips/properties-rc/properties-rc.html}\xspace}

\newcommand {\Poption}{\htmlref{option}{sec:options}\xspace}

\newcommand {\Poptions}{\htmlref{options}{sec:options}\xspace}

\newcommand {\Pprettyprinter}{\htmlref{prettyprinter}
  {sec:prettyprinters}\xspace}

\newcommand {\Pprettyprinters}{\htmlref{prettyprinters}
  {sec:prettyprinters}\xspace}

\newcommand {\Pregion}{\htmlref{region}{sec:regions}\xspace}

\newcommand {\Pregions}{\htmlref{regions}{sec:regions}\xspace}

\newcommand {\Presource}{\htmlref{resource}{sec:resources}\xspace}

\newcommand {\Presources}{\htmlref{resources}{sec:resources}\xspace}

\newcommand {\Pri}{\htmladdnormallink{internal representation}
  {http://www.cri.ensmp.fr/pips/ri/ri.html}\xspace\xspace}

\newcommand {\Ptransformer}{\htmlref{transformer}{sec:transformers}\xspace}

\newcommand {\Ptransformers}{\htmlref{transformers}{sec:transformers}\xspace}

\newcommand {\Pworkspace}{\htmlref{workspace}{sec:workspace}\xspace}

\newcommand {\Ccube}{Linear C$^3$ library\xspace}

\newcommand {\CRI}{\htmladdnormallink{\textsc{cri}\xspace}
  {http://www.cri.ensmp.fr}}

\newcommand {\CNRS}{\htmladdnormallink
  {\textsc{cnrs}\xspace}{http://www.cnrs.fr}}

\newcommand {\IRISA}{\htmladdnormallink
  {\textsc{irisa}\xspace}{http://www.irisa.fr}}

\newcommand {\PRISM}{\htmladdnormallink
  {\textsc{prism}\xspace}{http://www.prism.uvsq.fr}}

\newcommand {\SPMD}{\textsc{spmd}}

\newcommand {\voiraussi}[1]{\emph{See also} #1}

\newcommand {\PIP}{\htmladdnormallink
  {\textsc{pip}\xspace}
  {http://www.prism.uvsq.fr/english/parallel/paf/autom_us.html}}

\newcommand {\PAF}{\htmladdnormallink
  {PAF\xspace}{http://www.prism.uvsq.fr/english/parallel/paf/autom_us.html}}

\newcommand {\OMEGA}{\htmladdnormallink
  {Omega\xspace}{http://www.cs.umd.edu/projects/omega}}

\newcommand {\PETIT}{\htmladdnormallink
  {Petit\xspace}{http://www.cs.umd.edu/projects/omega}}

\newcommand {\NASCENT}{\htmladdnormallink
  {Nascent\xspace}{http://cse.ogi.edu/Sparse/nascent.html}}

\newcommand {\Bouclette}{\htmladdnormallink
  {Bouclette\xspace}
  {http://www.ens-lyon.fr/LIP/groupes/apte/bclt/bouclettes.html}}

\newcommand {\LooPo}{\htmladdnormallink
  {LooPo\xspace}{http://brahms.fmi.uni-passau.de/cl/loopo}}

\newcommand {\SUIF}{\htmladdnormallink
  {SUIF\xspace}{http://suif.stanford.edu}}

\newcommand {\POLARIS}{\htmladdnormallink
  {Polaris\xspace}{http://www.csrd.uiuc.edu/polaris}}

\newcommand {\PFdeux}{\htmladdnormallink
  {Parafrase 2\xspace}{http://www.csrd.uiuc.edu/parafrase2}}

\newcommand {\VFCS}{\htmladdnormallink
  {VFCS\xspace}{http://www.par.univie.ac.at/project/vfcs.html}}

\newcommand {\PARADIGME}{\htmladdnormallink
  {Paradigme\xspace}{http://www.crhc.uiuc.edu/Paradigme}}

\newcommand {\ADAPTOR}{\htmladdnormallink
  {Adaptor\xspace}{http://www.gmd.de/SCAI/lab/adaptor/adaptor_home.html}}

\newcommand {\DSystem}{\htmladdnormallink
  {D system\xspace}{http://www.cs.rice.edu/fortran-tools/DSystem/DSystem.html}}

\newcommand {\FX}{\htmladdnormallink
  {Fx\xspace}{http://www.cs.cmu.edu/\string~fx}}

\newcommand {\Annai}{\htmladdnormallink
  {Annai\xspace}{http://www.cscs.ch/Official/Project_CSCS-NEC.html}}

\newcommand {\SHPF}{\htmladdnormallink
  {SHPF\xspace}{http://www.hpcc.ecs.soton.ac.uk/shpf/shpf.html}}

\newcommand {\PREPARE}{\htmladdnormallink
  {Prepare\xspace}{http://www.irisa.fr/pampa/PREPARE/prepare.html}}

\newcommand {\Pandore}{\htmladdnormallink
  {Pandore\xspace}{http://www.irisa.fr/pampa/PANDORE/pandore.html}}

\newcommand {\EPPP}{\htmladdnormallink
  {EPPP\xspace}{http://www.crim.ca/apar/Group/English/Projects/EPPP.html}}

\newcommand {\Cray}{\htmladdnormallink
  {\textsc{Cray}\xspace}{http://www.cray.com}}

\newcommand {\DEC}{\htmladdnormallink
  {\textsc{dec}\xspace}{http://www.digital.com}}

\newcommand {\GNU}{\textsc{gnu}\xspace}

\newcommand {\IBM}{\htmladdnormallink
  {\textsc{ibm}\xspace}{http://www.ibm.com}}

\newcommand {\SUN}{\htmladdnormallink
  {\textsc{sun}\xspace}{http://www.sun.com}}

\newcommand {\TMC}{\htmladdnormallink
  {\textsc{tmc}\xspace}{http://www.thinking.com}}

\newcommand {\HTML}{\textsc{html}\xspace}

\newcommand {\LaTeXToHTML}{\htmladdnormallink
  {\LaTeX2\textsc{html}\xspace}{http://cbl.leeds.ac.uk/nikos/tex2html/doc/latex2html/latex2html.html}}

\newcommand {\UNIX}{\textsc{unix}\xspace}

\newcommand {\indexbib}[1]{}

\newcommand {\larger}{}

\newcommand {\recuperableftp}[1]
  {Available by {\tt ftp anonymous} on {\tt #1}}

\newcommand {\recuperableftpfichier}[2]
  {Available by {\tt ftp anonymous} on {\tt #1} in the file {\tt #2}}

\newcommand {\nouvellethese}{PhD Thesis}

\newcommand {\recuperablewww}[1]
  {Available by {\sc www} at \htmladdnormallink{{\tt #1}}{#1}}

\renewcommand {\xspace}{{}}

\renewcommand {\floatpagefraction}{1}

\renewcommand {\textfraction}{0}

\renewcommand {\topfraction}{1}

\renewcommand {\bottomfraction}{1}

\def\thepage{}

\newcommand {\entetebiblio}{\small\begin{multicols}{2}}

\makeatother
\newenvironment{tex2html_wrap}{}{}
\newwrite\lthtmlwrite
\def\lthtmltypeout#1{{\let\protect\string\immediate\write\lthtmlwrite{#1}}}%
\newbox\sizebox
\begin{document}
\pagestyle{empty}
\stepcounter{section}
\stepcounter{section}
\stepcounter{section}
\stepcounter{section}
\stepcounter{subsection}
\stepcounter{subsection}
\stepcounter{subsection}
{\newpage
\clearpage
\samepage \begin{figure}
  \htmlimage{scale=1.5}
  {\small
    \begin{alltt}\end{alltt}
      
\begin{verbatim}suppress_dead_code   > MODULE.code
        < PROGRAM.entities
        < MODULE.code
        < MODULE.proper_effects
        < MODULE.preconditions\end{verbatim}

    \end{alltt}
    }
  
  \label{fig:examples_pipsmake-rc}
\end{figure}
}

\stepcounter{subsection}
\stepcounter{subsubsection}
\stepcounter{subsubsection}
\stepcounter{subsection}
\stepcounter{subsubsection}
\stepcounter{subsubsection}
\stepcounter{subsection}
{\newpage
\clearpage
\samepage \begin{figure}\htmlimage{scale=1.5}
  {\footnotesize
    \begin{multicols}{2}
      \begin{tgrind}
        
\File{codes/suppress\_dead\_code.c},{13:20},{Sep 17 1996}
\L{\LB{bool}}
\L{\LB{\Proc{statement\_weakly\_feasible\_p}statement\_weakly\_feasible\_p(statement s)}}
\L{\LB{\{}}
\L{\LB{    transformer pre = load\_statement\_precondition(s);}}
\L{\LB{    \C{}/* Get the precondition linear constraint}}
\L{\LB{       system associated with s */\CE{}}}
\L{\LB{    Psysteme sc = predicate\_system(transformer\_relation(pre));}}
\L{\LB{    \C{}/* Test if there is at least a solution */\CE{}}}
\L{\LB{    bool feasible\_p = !sc\_empty\_p(sc);}}
\L{\LB{    \K{return} feasible\_p;}}
\L{\LB{\}}}
\L{\LB{}}
\L{\LB{\K{static} bool}}
\L{\LB{\Proc{dead\_statement\_filter}dead\_statement\_filter(statement s)}}
\L{\LB{\{}}
\L{\LB{   instruction i = statement\_instruction(s);}}
\L{\LB{   bool ret = TRUE;}}
\L{\LB{}}
\L{\LB{   ifdebug(9) \{}}
\L{\LB{       debug(9, \S{}\"dead\_statement\_filter\"\SE{},}}
\L{\LB{}\Tab{8}{     \S{}\"The current statement:!n\"\SE{});}}
\L{\LB{       print\_text(stderr,}}
\L{\LB{}\Tab{16}{  text\_statement(get\_current\_module\_entity(), 0, s));}}
\L{\LB{   \}}}
\L{\LB{}}
\L{\LB{   \K{if} (!statement\_weakly\_feasible\_p(s))}}
\L{\LB{       \C{}/* empty precondition */\CE{}}}
\L{\LB{      ret = remove\_dead\_statement(s, i);}}
\L{\LB{   \K{else} }}
\L{\LB{   \{}}
\L{\LB{      \K{switch} (instruction\_tag(i)) \{}}
\L{\LB{      \K{case} is\_instruction\_loop:}}
\L{\LB{      \{ }}
\L{\LB{         loop l = instruction\_loop(i);}}
\L{\LB{         \K{if} (dead\_loop\_p(l))}}
\L{\LB{}\Tab{8}{     \C{}/* DO I=1,0 for example */\CE{}}}
\L{\LB{            ret = remove\_dead\_loop(s, i, l);}}
\L{\LB{         \K{else} \K{if} (loop\_executed\_once\_p(s, l)) \{}}
\L{\LB{}\Tab{8}{     \C{}/* DO I=N,N for example */\CE{}}}
\L{\LB{            remove\_loop\_statement(s, i, l);}}
\L{\LB{            suppress\_dead\_code\_statement(body);}}
\L{\LB{            ret = FALSE;}}
\L{\LB{         \}}}
\L{\LB{         \K{break};}}
\L{\LB{      \}    }}
\L{\LB{      \K{case} is\_instruction\_test:}}
\L{\LB{         ret = dead\_deal\_with\_test(s, instruction\_test(i));}}
\L{\LB{         \K{break};}}
\L{\LB{      \K{case} is\_instruction\_unstructured:}}
\L{\LB{         dead\_recurse\_unstructured(instruction\_unstructured(i));}}
\L{\LB{         ret = FALSE;}}
\L{\LB{         \K{break};}}
\L{\LB{      \}}}
\L{\LB{   \}}}
\L{\LB{   }}
\L{\LB{   \K{if} (!ret)}}
\L{\LB{       \C{}/* Try to rewrite the code underneath */\CE{}}}
\L{\LB{       dead\_statement\_rewrite(s);}}
\L{\LB{}}
\L{\LB{   \K{return} ret;}}
\L{\LB{\}}}
\L{\LB{}}
\L{\LB{\K{void}}}
\L{\LB{\Proc{suppress\_dead\_code\_statement}suppress\_dead\_code\_statement(statement module\_stmt)}}
\L{\LB{\{}}
\L{\LB{    gen\_recurse(module\_stmt, \C{}/* recursion from here */\CE{}}}
\L{\LB{                statement\_domain, \C{}/* on statements */\CE{}}}
\L{\LB{}\Tab{16}{\C{}/* entry function (top-down): */\CE{}}}
\L{\LB{                dead\_statement\_filter,}}
\L{\LB{}\Tab{16}{\C{}/* exit function (bottom-up): */\CE{}}}
\L{\LB{                dead\_statement\_rewrite);}}
\L{\LB{\}}}

      \end{tgrind}
    \end{multicols}}
  
  \label{fig:new_phase:suppress_dead_code}
\end{figure}
}

\stepcounter{subsection}
\stepcounter{subsection}
\stepcounter{subsection}
\stepcounter{subsection}
\stepcounter{subsection}
\stepcounter{section}
\stepcounter{subsection}
\stepcounter{section}

\end{document}
