aboutsummaryrefslogtreecommitdiffstats
path: root/doc/index-verimag.html
blob: daed4d6d0599b53dab54ab17b39958d0b722e4ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>The CompCert verified compiler</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

<style type="text/css">
body {
  color: black; background: white;
  margin-left: 5%; margin-right: 5%;
}
h2 { margin-left: -5%;}
h3 { margin-left: -3%; }
h1,h2,h3 { font-family: sans-serif; }
hr { margin-left: -5%; margin-right:-5%; }
a:visited {color : #416DFF; text-decoration : none; font-weight : bold}
a:link {color : #416DFF; text-decoration : none; font-weight : bold}
a:hover {color : Red; text-decoration : underline; }
a:active {color : Red; text-decoration : underline; }
</style>

</HEAD>
<BODY>
  <font color=gray>
<H1 align="center">The CompCert verified compiler</H1>
<H2 align="center">Commented Coq development</H2>
<H3 align="center">Version 3.10, 2021-11-19</H3>
</font>
<H3 align="center"><a href="https://www-verimag.imag.fr">VERIMAG</a> fork version 2021-12-07</H3>

<H2>The CompCert Verimag's fork</H2>
<p>This web page is a patched version of the table of contents of the official CompCert sources documentation, as given on <A HREF="http://compcert.org/doc/index.html">the CompCert Web site</A>.
  The unmodified parts of this table appear in <font color=gray>gray</font>.
  <br>
  <br>
  A high-level view of this CompCert backend is provided by the following documents:

  <ul>
    <li><a href="https://gricad-gitlab.univ-grenoble-alpes.fr/certicompil/compcert-kvx">The Git repo README.md</a>.</li>
    <li><a href="http://www-verimag.imag.fr/~boulme/videos/poster-oopsla20.mp4">A 5-minutes video</a> by C. Six, presenting the postpass scheduling and the KVX backend
    (also on <a href="https://www.youtube.com/watch?v=RAzMDS9OVSw">YouTube if you need subtitles</a>).</li>
    <li><a href="https://hal.archives-ouvertes.fr/hal-02185883">Certified and Efficient Instruction Scheduling</a>, an OOPSLA'20 paper, by Six, Boulm&eacute; and Monniaux.</li>
    <li><a href="https://hal.archives-ouvertes.fr/hal-03200774">Formally Verified Superblock Scheduling</a>, a CPP'22 paper, by Six, Gourdin, Boulm&eacute;, Monniaux, Fasse and Nardino.</li>
    <li><a href="https://hal.archives-ouvertes.fr/tel-03326923">Optimized and formally-verified compilation for a VLIW processor</a>, Phd Thesis of Cyril Six in 2021.</li>
    <li><a href="https://hal.archives-ouvertes.fr/tel-03356701">Formally Verified Defensive Programming (efficient Coq-verified computations from untrusted ML oracles) &ndash; Chapters 1 to 3</a>, Habilitation Thesis of Sylvain Boulm&eacute; in 2021.</li>
    <li><a href="https://www-verimag.imag.fr/~boulme/CPP_2022/FASSE-Justus-MSc-Thesis_2021.pdf">Code Transformations to Increase Prepass Scheduling Opportunities in CompCert</a>, MSc Thesis of Justus Fasse in 2021.</li>
    <li><a href="https://www-verimag.imag.fr/~boulme/CPP_2022/NARDINO-Nicolas-BSc-Thesis_2021.pdf">Register-Pressure-Aware Prepass-Scheduling for CompCert</a>, BSc Thesis of Nicolas Nardino in 2021.</li>
    <li><a href="https://www.lirmm.fr/afadl2021/papers/afadl2021_paper_9.pdf">Formally verified postpass scheduling with peephole optimization for AArch64</a>, a short AFADL'21 paper, by Gourdin.</li>
  </ul>

  <p>The people responsible for this version are</p>

  <ul>
    <li>Sylvain Boulm&eacute; (Grenoble-INP, Verimag)</li>
    <li>David Monniaux (CNRS, Verimag)</li>
    <li>Cyril Six (Kalray)</li>
    <li>L&eacute;o Gourdin (UGA, Verimag)</li>
  </ul>


  <p>with contributions of:</p>

  <ul>
    <li>Justus Fasse (M2R UGA, now at KU Leuven).</li>
    <li>Pierre Goutagny and Nicolas Nardino (L3 ENS-Lyon).</li>
  </ul>

</p>

<H2>Introduction</H2>

<font color="gray">
<P>CompCert is a compiler that generates PowerPC, ARM, RISC-V and x86 assembly
code from CompCert C, a large subset of the C programming language.
The particularity of this compiler is that it is written mostly within
the specification language of the Coq proof assistant, and its
correctness --- the fact that the generated assembly code is
semantically equivalent to its source program --- was entirely proved
within the Coq proof assistant.</P>

<P>High-level descriptions of the CompCert compiler and its proof of 
correctness can be found in the following papers (in increasing order of technical details):</P>
<UL>
<LI>Xavier Leroy, <A HREF="https://xavierleroy.org/publi/compcert-CACM.pdf">Formal verification of a realistic compiler</A>.  Communications of the ACM 52(7), July 2009.
<LI>Xavier Leroy, <A HREF="https://xavierleroy.org/publi/compcert-backend.pdf">A formally verified compiler back-end</A>. 
Journal of Automated Reasoning 43(4):363-446, 2009.
</UL>

<P>This Web site gives a commented listing of the underlying Coq
specifications and proofs.  Proof scripts are folded by default, but
can be viewed by clicking on "Proof".  Some modules (written in <I>italics</I> below) differ between the five target architectures.  The
PowerPC versions of these modules are shown below; the AArch64, ARM,
x86 and RISC-V versions can be found in the source distribution.
</P>

<P> This development is a work in progress; some parts have
substantially changed since the overview papers above were
written.</P>

<P>The complete sources for CompCert can be downloaded from
<A HREF="https://github.com/AbsInt/CompCert/">the Git repository</A>
or <A HREF="https://compcert.org/">the CompCert Web site</A>.
</P>

<P>This document and the CompCert sources are copyright Institut
National de Recherche en Informatique et en Automatique (INRIA) and
AbsInt Angewandte Informatik GmbH, and are distributed under the terms of the
following <A HREF="https://compcert.org/doc/LICENSE.txt">license</A>.
</P>
</font>

<H2>Table of contents</H2>

<font color="gray">
<H3>General-purpose libraries, data structures and algorithms</H3>

<UL>
<LI> <A HREF="html/compcert.lib.Coqlib.html">Coqlib</A>: addendum to the Coq standard library.
<LI> <A HREF="html/compcert.lib.Maps.html">Maps</A>: finite maps.
<LI> <A HREF="html/compcert.lib.Integers.html">Integers</A>: machine integers.
<LI> <A HREF="html/compcert.lib.Floats.html">Floats</A>: machine floating-point numbers.
<LI> <A HREF="html/compcert.lib.Iteration.html">Iteration</A>: various forms of "while" loops.
<LI> <A HREF="html/compcert.lib.Ordered.html">Ordered</A>: construction of
ordered types.
<LI> <A HREF="html/compcert.lib.Lattice.html">Lattice</A>: construction of
semi-lattices.
<LI> <A HREF="html/compcert.backend.Kildall.html">Kildall</A>: resolution of dataflow
inequations by fixpoint iteration.
<LI> <A HREF="html/compcert.lib.UnionFind.html">UnionFind</A>: a persistent union-find data structure.
<LI> <A HREF="html/compcert.lib.Postorder.html">Postorder</A>: postorder numbering of a directed graph.
</UL></font>

<H4><A HREF=https://github.com/boulme/ImpureDemo>The Impure library</A> (of Boulm&eacute;)</H4>
<UL>
<LI><A HREF="html/compcert.lib.Impure.ImpConfig.html">ImpConfig</A>: declares the <tt>Impure</tt> monad and defines its extraction.</LI>
<LI><A HREF="html/compcert.lib.Impure.ImpCore.html">ImpCore</A>: defines notations for the <tt>Impure</tt> monad and a <tt>wlp_simplify</tt> tactic (to reason about <tt>Impure</tt> functions in a Hoare-logic style).</LI>
<LI><A HREF="html/compcert.lib.Impure.ImpLoops.html">ImpLoops</A>, <A HREF="html/compcert.lib.Impure.ImpIO.html">ImpIO</A>, <A HREF="html/compcert.lib.Impure.ImpHCons.html">ImpHCons</A>: declare <tt>Impure</tt> oracles and define operators from these oracles. <A HREF="html/compcert.lib.Impure.ImpExtern.html">ImpExtern</A> exports all these impure operators.</LI>
<LI><A HREF="html/compcert.lib.Impure.ImpMonads.html">ImpMonads</A>: axioms of "impure computations" and some Coq models of these axioms.</LI>
<LI><A HREF="html/compcert.lib.Impure.ImpPrelude.html">ImpPrelude</A>: declares the data types exchanged with <tt>Impure</tt> oracles.</LI>
</UL>

<H4 id="abstractbb">The <tt>abstractbb</tt> library, introduced for Aarch64 and KVX cores</H4>
This library introduces a block intermediate representation used for postpass scheduling verification. It might be extended to others backends.
<UL>
<LI> <A HREF="html/compcert.scheduling.abstractbb.AbstractBasicBlocksDef.html">AbstractBasicBlocksDef</A>: an IR for verifying some semantic properties on basic-blocks.
<LI> <A HREF="html/compcert.scheduling.abstractbb.Parallelizability.html">Parallelizability</A>: verifying that sequential and parallel semantics are equivalent for a given abstract basic-block.
<LI> <A HREF="html/compcert.scheduling.abstractbb.ImpSimuTest.html">ImpSimuTest</A>: verifying that a given abstract basic-block is simulated by another one for sequential semantics. This module refines <A HREF="html/compcert.scheduling.abstractbb.SeqSimuTheory.html">SeqSimuTheory</A> with hash-consing and uses <A HREF=https://github.com/boulme/ImpureDemo>the Impure library</A> to reason on physical equality and handling of imperative code in Coq.
</UL>

<font color=gray>
<H3>Definitions and theorems used in many parts of the development</H3>

<UL>
<LI> <A HREF="html/compcert.common.Errors.html">Errors</A>: the Error monad.
<LI> <A HREF="html/compcert.common.AST.html">AST</A>: identifiers, whole programs and other
common elements of abstract syntaxes.
<LI> <A HREF="html/compcert.common.Linking.html">Linking</A>: generic framework to define syntactic linking over the CompCert languages.
<LI> <A HREF="html/compcert.common.Values.html">Values</A>: run-time values.
<LI> <A HREF="html/compcert.common.Events.html">Events</A>: observable events and traces.
<LI> <A HREF="html/compcert.common.Memory.html">Memory</A>: memory model. <BR>
See also: <A HREF="html/compcert.common.Memdata.html">Memdata</A> (in-memory representation of data).
<LI> <A HREF="html/compcert.common.Globalenvs.html">Globalenvs</A>: global execution environments.
<LI> <A HREF="html/compcert.common.Smallstep.html">Smallstep</A>: tools for small-step semantics.
<LI> <A HREF="html/compcert.common.Behaviors.html">Behaviors</A>: from small-step semantics to observable behaviors of programs.
<LI> <A HREF="html/compcert.common.Determinism.html">Determinism</A>: determinism properties of small-step semantics.
<LI> <A HREF="html/compcert.kvx.Op.html"><I>Op</I></A>: operators, addressing modes and their
semantics.
<LI> <A HREF="html/compcert.common.Builtins.html">Builtins</A>: semantics of built-in functions. <BR>
See also: <A HREF="html/compcert.common.Builtins0.html">Builtins0</A> (target-independent part), <A HREF="html/compcert.kvx.Builtins1.html"><I>Builtins1</I></A> (target-dependent part).
<LI> <A HREF="html/compcert.common.Unityping.html">Unityping</A>: a solver for atomic unification constraints.
</UL>

<H3>Source, intermediate and target languages: syntax and semantics</H3>

<UL>
<LI> The CompCert C source language:
<A HREF="html/compcert.cfrontend.Csyntax.html">syntax</A> and
<A HREF="html/compcert.cfrontend.Csem.html">semantics</A> and
<A HREF="html/compcert.cfrontend.Cstrategy.html">determinized semantics</A> and
<A HREF="html/compcert.cfrontend.Ctyping.html">type system</A>.<BR>
See also: <A HREF="html/compcert.cfrontend.Ctypes.html">type expressions</A> and
<A HREF="html/compcert.cfrontend.Cop.html">operators (syntax and semantics)</A>.<BR>
See also: <A HREF="html/compcert.cfrontend.Cexec.html">reference interpreter</A>.
<LI> <A HREF="html/compcert.cfrontend.Clight.html">Clight</A>: a simpler version of CompCert C where expressions contain no side-effects.
<LI> <A HREF="html/compcert.cfrontend.Csharpminor.html">Csharpminor</A>: low-level
 structured language.
<LI> <A HREF="html/compcert.backend.Cminor.html">Cminor</A>: low-level structured
language, with explicit stack allocation of certain local variables.
<LI> <A HREF="html/compcert.backend.CminorSel.html">CminorSel</A>: like Cminor,
with machine-specific operators and addressing modes.
<LI> <A HREF="html/compcert.backend.RTL.html">RTL</A>: register transfer language (3-address
code, control-flow graph, infinitely many pseudo-registers). <BR>
See also: <A HREF="html/compcert.backend.Registers.html">Registers</A> (representation of
pseudo-registers).
<LI> <A HREF="html/compcert.backend.LTL.html">LTL</A>: location transfer language (3-address
code, control-flow graph of basic blocks, finitely many physical registers, infinitely
many stack slots). <BR>
See also: <A HREF="html/compcert.backend.Locations.html">Locations</A> (representation of
locations) and <A HREF="html/compcert.kvx.Machregs.html"><I>Machregs</I></A> (description of processor registers).
<LI> <A HREF="html/compcert.backend.Linear.html">Linear</A>: like LTL, but the CFG is
replaced by a linear list of instructions with explicit branches and labels.
<LI> <A HREF="html/compcert.backend.Mach.html">Mach</A>: like Linear, with a more concrete
view of the activation record.  
<LI> <A HREF="html/compcert.kvx.Asm.html"><I>Asm</I></A>: abstract syntax for PowerPC assembly
code.
</font>

<H4>Languages introduced in the VERIMAG version</H4>

Generic (or possibly adaptable) Intermediate Representations (IR):
<UL>
  <LI> <A HREF="html/compcert.scheduling.BTL.html">BTL</A>: an IR dedicated to defensive certification of middle-end optimizations (before register allocation).
  BTL stands for "Block Transfer Language". <!-- TODO add a link to some markdown draft here -->
  <LI> <A HREF="html/compcert.scheduling.postpass_lib.Machblock.html">Machblock</A>: a variant of Mach, with a syntax for basic-blocks, and a block-step semantics (execute one basic-block in one step).
  This IR is generic over the processor and used for KVX and Aarch64.
  <LI> <A HREF="html/compcert.kvx.Asmblock.html"><I>Asmblock</I></A>: a variant of Asm, with a big-step semantics of basic-blocks.
  This IR is an intermediate step between Machblock and Asm on backends featuring postpass scheduling (KVX and Aarch64).
  <LI> <A HREF="#abstractbb"><I>AbstractBasicBlocks</I></A>: the AbstractBasicBlocks Domain Specific Language (DSL) used in the postpass scheduling verification.
  This DSL is only used as a library on KVX and Aarch64.
</UL>

Specific to KVX:
<UL>
  <LI> <A HREF="html/compcert.kvx.Asmvliw.html"><I>Asmvliw</I></A>: abstract syntax and semantics for KVX VLIW assembly: atomic instructions are grouped by "bundles". These bundles are executed sequentially, but execution is parallel within bundles.
  <LI> <A HREF="html/compcert.kvx.Asm.html"><I>kvx/Asm</I></A>: a variant of Asmvliw with a flat syntax for bundles, instead of a structured one (bundle termination is encoded as a pseudo-instruction). This IR is mainly a wrapper of <I>Asmvliw</I> for a smooth integration in CompCert (and an easier pretty-printing of the abstract syntax).
</UL>

<H3>Compiler passes</H3>

<TABLE cellpadding="5%" style="color:#808080">
<TR valign="top">
  <TH align=left>Pass</TH>
  <TH align=left>Source &amp; target</TH>
  <TH align=left>Compiler&nbsp;code</TH>
  <TH align=left>Correctness&nbsp;proof</TH>
</TR>

<TR valign="top">
  <TD>Pulling side-effects out of expressions;<br>
      fixing an evaluation order</TD>
  <TD>CompCert C to Clight</TD>
  <TD><A HREF="html/compcert.cfrontend.SimplExpr.html">SimplExpr</A></TD>
  <TD><A HREF="html/compcert.cfrontend.SimplExprspec.html">SimplExprspec</A><br>
      <A HREF="html/compcert.cfrontend.SimplExprproof.html">SimplExprproof</A></TD>
</TR>
<TR valign="top">
  <TD>Pulling non-adressable scalar local variables out of memory</TD>
  <TD>Clight to Clight</TD>
  <TD><A HREF="html/compcert.cfrontend.SimplLocals.html">SimplLocals</A></TD>
  <TD><A HREF="html/compcert.cfrontend.SimplLocalsproof.html">SimplLocalsproof</A></TD>
</TR>
<TR valign="top">
  <TD>Simplification of control structures; <br>
      explication of type-dependent computations</TD>
  <TD>Clight to Csharpminor</TD>
  <TD><A HREF="html/compcert.cfrontend.Cshmgen.html">Cshmgen</A></TD>
  <TD><A HREF="html/compcert.cfrontend.Cshmgenproof.html">Cshmgenproof</A></TD>
</TR>
<TR valign="top">
  <TD>Stack allocation of local variables<br>
      whose address is taken;<br>
      simplification of switch statements</TD>
  <TD>Csharpminor to Cminor</TD>
  <TD><A HREF="html/compcert.cfrontend.Cminorgen.html">Cminorgen</A></TD>
  <TD><A HREF="html/compcert.cfrontend.Cminorgenproof.html">Cminorgenproof</A></TD>
</TR>

<TR valign="top">
  <TD>Recognition of operators<br>and addressing modes;<br>
      if-conversion</TD>
  <TD>Cminor to CminorSel</TD>
  <TD><A HREF="html/compcert.backend.Selection.html">Selection</A><br>
      <A HREF="html/compcert.kvx.SelectOp.html"><I>SelectOp</I></A><br>
      <A HREF="html/compcert.kvx.SelectLong.html"><I>SelectLong</I></A><br>
      <A HREF="html/compcert.backend.SelectDiv.html">SelectDiv</A><br>
      <A HREF="html/compcert.backend.SplitLong.html">SplitLong</A></TD>
  <TD><A HREF="html/compcert.backend.Selectionproof.html">Selectionproof</A><br>
      <A HREF="html/compcert.kvx.SelectOpproof.html"><I>SelectOpproof</I></A><br>
      <A HREF="html/compcert.kvx.SelectLongproof.html"><I>SelectLongproof</I></A><br>
      <A HREF="html/compcert.backend.SelectDivproof.html">SelectDivproof</A><br>
      <A HREF="html/compcert.backend.SplitLongproof.html">SplitLongproof</A></TD>
</TR>

<TR valign="top">
  <TD>Construction of the CFG, <br>3-address code generation</TD>
  <TD>CminorSel to RTL</TD>
  <TD><A HREF="html/compcert.backend.RTLgen.html">RTLgen</A></TD>
  <TD><A HREF="html/compcert.backend.RTLgenspec.html">RTLgenspec</A><BR>
      <A HREF="html/compcert.backend.RTLgenproof.html">RTLgenproof</A></TD>
</TR>

<TR valign="top">
  <TD>Recognition of tail calls</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.Tailcall.html">Tailcall</A></TD>
  <TD><A HREF="html/compcert.backend.Tailcallproof.html">Tailcallproof</A></TD>
</TR>

<TR valign="top">
  <TD>Function inlining</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.Inlining.html">Inlining</A></TD>
  <TD><A HREF="html/compcert.backend.Inliningspec.html">Inliningspec</A><BR>
      <A HREF="html/compcert.backend.Inliningproof.html">Inliningproof</A></TD>
</TR>

<TR valign="top" style="color:#000000">
  <TD colspan="4"><b>Passes introduced for profiling (for later use in trace selection)</b></TD>
</TR>
<TR valign="top" style="color:#000000">
  <TD>Insert profiling annotations (for recording experiments -- see PROFILE.md).
  </TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.Profiling.html">Profiling</A></TD>
  <TD><A HREF="html/compcert.backend.Profilingproof.html">Profilingproof</A></TD>
</TR>
<TR valign="top" style="color:#000000">
  <TD>Update ICond nodes (from recorded experiments -- see PROFILE.md).
  </TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.ProfilingExploit.html">ProfilingExploit</A></TD>
  <TD><A HREF="html/compcert.backend.ProfilingExploitproof.html">ProfilingExploitproof</A></TD>
</TR>

<TR valign="top" style="color:#000000">
  <TD>FirstNop: Inserting a no-op instruction at each RTL function entrypoint</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.FirstNop.html">FirstNop</A></TD>
  <TD><A HREF="html/compcert.backend.FirstNopproof.html">FirstNopproof</A></TD>
</TR>

<TR valign="top">
  <TD>Postorder renumbering of the CFG (1)</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.Renumber.html">Renumber</A></TD>
  <TD><A HREF="html/compcert.backend.Renumberproof.html">Renumberproof</A></TD>
</TR>

<TR valign="top">
  <TD>[CSE1] Common subexpression elimination (1)</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.CSE.html">CSE</A><BR>
      <A HREF="html/compcert.kvx.CombineOp.html"><I>CombineOp</I></A></TD>
  <TD><A HREF="html/compcert.backend.CSEproof.html">CSEproof</A><BR>
      <A HREF="html/compcert.kvx.CombineOpproof.html"><I>CombineOpproof</I></A></TD>
</TR>

<TR valign="top" style="color:#000000">
  <TD colspan="4"><b>[Duplicate pass] Static Prediction + Unroll single</b></TD>
<TR valign="top" style="color:#000000">
  <TD>Add static prediction information to Icond nodes<BR>
      Unrolls a single iteration of innermost loops
  </TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.Duplicate.html">Duplicate</A> (generic checker)</TD>
  <TD><A HREF="html/compcert.backend.Duplicateproof.html">Duplicateproof</A> (generic proof)<BR>
    <a href="html/compcert.backend.Duplicatepasses.html">Duplicatepasses</a> (several passes from several oracles)</TD>
</TR>

<TR valign="top">
  <TD>Postorder renumbering of the CFG (2)</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.Renumber.html">Renumber</A></TD>
  <TD><A HREF="html/compcert.backend.Renumberproof.html">Renumberproof</A></TD>
</TR>

<TR valign="top" style="color:#000000">
  <TD colspan="4"><b>[Duplicate pass] Tail Duplication</b></TD>
<TR valign="top" style="color:#000000">
  <TD>Performs tail duplication on interesting traces to form superblocks
  </TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.Duplicate.html">Duplicate</A> (generic checker)</TD>
  <TD><A HREF="html/compcert.backend.Duplicateproof.html">Duplicateproof</A> (generic proof)<BR>
    <a href="html/compcert.backend.Duplicatepasses.html">Duplicatepasses</a> (several passes from several oracles)</TD>
</TR>

<TR valign="top">
  <TD>Postorder renumbering of the CFG (3)</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.Renumber.html">Renumber</A></TD>
  <TD><A HREF="html/compcert.backend.Renumberproof.html">Renumberproof</A></TD>
</TR>

<TR valign="top" style="color:#000000">
  <TD colspan="4"><b>[Duplicate pass] Unroll body</b></TD>
<TR valign="top" style="color:#000000">
  <TD>Unrolling the body of innermost loops
  </TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.Duplicate.html">Duplicate</A> (generic checker)</TD>
  <TD><A HREF="html/compcert.backend.Duplicateproof.html">Duplicateproof</A> (generic proof)<BR>
    <a href="html/compcert.backend.Duplicatepasses.html">Duplicatepasses</a> (several passes from several oracles)</TD>
</TR>

<TR valign="top">
  <TD>Postorder renumbering of the CFG (4)</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.Renumber.html">Renumber</A></TD>
  <TD><A HREF="html/compcert.backend.Renumberproof.html">Renumberproof</A></TD>
</TR>

<TR valign="top">
  <TD>Constant propagation</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.Constprop.html">Constprop</A><br>
      <A HREF="html/compcert.kvx.ConstpropOp.html"><I>ConstpropOp</I></A></TD>
  <TD><A HREF="html/compcert.backend.Constpropproof.html">Constpropproof</A><br>
      <A HREF="html/compcert.kvx.ConstpropOpproof.html"><I>ConstproppOproof</I></A></TD>
</TR>

<TR valign="top">
  <TD>Postorder renumbering of the CFG (5)</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.Renumber.html">Renumber</A></TD>
  <TD><A HREF="html/compcert.backend.Renumberproof.html">Renumberproof</A></TD>
</TR>

<TR valign="top">
  <TD>[CSE1] Common subexpression elimination (1)</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.CSE.html">CSE</A><BR>
      <A HREF="html/compcert.kvx.CombineOp.html"><I>CombineOp</I></A></TD>
  <TD><A HREF="html/compcert.backend.CSEproof.html">CSEproof</A><BR>
      <A HREF="html/compcert.kvx.CombineOpproof.html"><I>CombineOpproof</I></A></TD>
</TR>

<TR valign="top" style="color:#000000">
  <TD>[CSE2] Common subexpression elimination</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.CSE2.html">CSE2</A><BR>
  </TD>
  <TD><A HREF="html/compcert.backend.CSE2proof.html">CSE2proof</A><BR>
  </TD>
</TR>

<TR valign="top" style="color:#000000">
  <TD>[CSE3] Common subexpression elimination (1)</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.CSE3.html">CSE3</A><BR>
  </TD>
  <TD><A HREF="html/compcert.backend.CSE3proof.html">CSE3proof</A><BR>
  </TD>
</TR>

<TR valign="top" style="color:#000000">
  <TD>KillUselessMoves: removing useless moves instructions after CSE3</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.KillUselessMoves.html">KillUselessMoves</A><BR>
  </TD>
  <TD><A HREF="html/compcert.backend.KillUselessMovesproof.html">KillUselessMovesproof</A><BR>
  </TD>
</TR>

<TR valign="top" style="color:#000000">
  <TD>Forwarding Moves</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.ForwardMoves.html">ForwardMoves</A><BR>
  </TD>
  <TD><A HREF="html/compcert.backend.ForwardMovesproof.html">ForwardMovesproof</A><BR>
  </TD>
</TR>

<TR valign="top">
  <TD>Redundancy elimination (1)</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.Deadcode.html">Deadcode</A></TD>
  <TD><A HREF="html/compcert.backend.Deadcodeproof.html">Deadcodeproof</A></TD>
</TR>

<TR valign="top" style="color:#000000">
  <TD>RTL Tunneling</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.RTLTunneling.html">RTLTunneling</A><BR>
  </TD>
  <TD><A HREF="html/compcert.backend.RTLTunnelingproof.html">RTLTunnelingproof</A><BR>
  </TD>
</TR>

<TR valign="top">
  <TD>Postorder renumbering of the CFG (6)</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.Renumber.html">Renumber</A></TD>
  <TD><A HREF="html/compcert.backend.Renumberproof.html">Renumberproof</A></TD>
</TR>

<TR valign="top" style="color:#000000">
  <TD colspan="4"><b>[Duplicate pass] Loop Rotate</b></TD>
<TR valign="top" style="color:#000000">
  <TD>Loop rotation
  </TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.Duplicate.html">Duplicate</A> (generic checker)</TD>
  <TD><A HREF="html/compcert.backend.Duplicateproof.html">Duplicateproof</A> (generic proof)<BR>
    <a href="html/compcert.backend.Duplicatepasses.html">Duplicatepasses</a> (several passes from several oracles)</TD>
</TR>

<TR valign="top">
  <TD>Postorder renumbering of the CFG (7)</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.Renumber.html">Renumber</A></TD>
  <TD><A HREF="html/compcert.backend.Renumberproof.html">Renumberproof</A></TD>
</TR>

<TR valign="top" style="color:#000000">
  <TD>Loop Invariant Code Motion
  </TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.LICM.html">LICM</A></TD>
  <TD><A HREF="html/compcert.backend.LICMproof.html">LICMproof</A>
  </TD>
</TR>

<TR valign="top">
  <TD>Postorder renumbering of the CFG (8)</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.Renumber.html">Renumber</A></TD>
  <TD><A HREF="html/compcert.backend.Renumberproof.html">Renumberproof</A></TD>
</TR>

<TR valign="top" style="color:#000000">
  <TD>[CSE3] Common subexpression elimination (2)</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.CSE3.html">CSE3</A><BR>
  </TD>
  <TD><A HREF="html/compcert.backend.CSE3proof.html">CSE3proof</A><BR>
  </TD>
</TR>

<TR valign="top">
  <TD>Redundancy elimination (2)</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.Deadcode.html">Deadcode</A></TD>
  <TD><A HREF="html/compcert.backend.Deadcodeproof.html">Deadcodeproof</A></TD>
</TR>

<TR valign="top" style="color:#000000">
  <TD>Allnontrap: transforming loads to non-trapping ones</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.Allnontrap.html">Allnontrap</A><BR>
  </TD>
  <TD><A HREF="html/compcert.backend.Allnontrapproof.html">Allnontrapproof</A><BR>
  </TD>
</TR>

<TR valign="top">
  <TD>Removal of unused static globals</TD>
  <TD>RTL to RTL</TD>
  <TD><A HREF="html/compcert.backend.Unusedglob.html">Unusedglob</A></TD>
  <TD><A HREF="html/compcert.backend.Unusedglobproof.html">Unusedglobproof</A></TD>
</TR>

<TR valign="top" style="color:#000000">
  <TD colspan="4"><b>Passes introduced for BTL</b></TD>
</TR>
<TR valign="top" style="color:#000000">
  <TD>Block selection (with Liveness information)</TD>
  <TD>RTL to BTL</TD>
  <TD><A HREF="html/compcert.scheduling.RTLtoBTL.html">RTLtoBTL</A></TD>
  <TD><A HREF="html/compcert.scheduling.RTLtoBTLproof.html">RTLtoBTLproof</A><BR>
  <A HREF="html/compcert.scheduling.BTLmatchRTL.html">BTLmatchRTL</A><BR>
  <A HREF="html/compcert.scheduling.BTL_Livecheck.html">BTL_Livecheck</A>
  </TD>
</TR>
<TR valign="top" style="color:#000000">
  <TD>Superblock prepass scheduling</TD>
  <TD>BTL to BTL</TD>
  <TD><A HREF="html/compcert.scheduling.BTL_Scheduler.html">BTL_Scheduler</A></TD>
  <TD><A HREF="html/compcert.scheduling.BTL_Schedulerproof.html">BTL_Schedulerproof</A><BR>
    with <A HREF="html/compcert.scheduling.BTL_SEtheory.html">BTL_SEtheory</A> (the theory of symbolic execution on BTL_)<BR>
    and <A HREF="html/compcert.scheduling.BTL_SEsimuref.html">BTL_SEsimuref</A> (the low-level specifications of the simulation checker)<BR>
    and <A HREF="html/compcert.scheduling.BTL_SEimpl.html">BTL_SEimpl</A> (the simulation checker with hash-consing)</TD>
</TR>
<TR valign="top" style="color:#000000">
  <TD>Forgeting blocks</TD>
  <TD>BTL to RTL</TD>
  <TD><A HREF="html/compcert.scheduling.BTLtoRTL.html">BTLtoRTL</A></TD>
  <TD><A HREF="html/compcert.scheduling.BTLtoRTLproof.html">BTLtoRTLproof</A><BR>
  <A HREF="html/compcert.scheduling.BTLmatchRTL.html">BTLmatchRTL</A>
  </TD>
</TR>

<TR valign="top">
  <TD colspan="4"><b>Passes from register allocation</b></TD>
</TR>

<TR valign="top">
  <TD>Register allocation (validation a posteriori)</TD>
  <TD>RTL to LTL</TD>
  <TD><A HREF="html/compcert.backend.Allocation.html">Allocation</A></TD>
  <TD><A HREF="html/compcert.backend.Allocationproof.html">Allocationproof</A></TD>
</TR>

<TR valign="top">
  <TD>Branch tunneling</TD>
  <TD>LTL to LTL</TD>
  <TD><A HREF="html/compcert.backend.LTLTunneling.html">LTLTunneling</A></TD>
  <TD><A HREF="html/compcert.backend.LTLTunnelingproof.html">LTLTunnelingproof</A></TD>
</TR>

<TR valign="top">
  <TD>Linearization of the CFG</TD>
  <TD>LTL to Linear</TD>
  <TD><A HREF="html/compcert.backend.Linearize.html">Linearize</A></TD>
  <TD><A HREF="html/compcert.backend.Linearizeproof.html">Linearizeproof</A></TD>
</TR>

<TR valign="top">
  <TD>Removal of unreferenced labels</TD>
  <TD>Linear to Linear</TD>
  <TD><A HREF="html/compcert.backend.CleanupLabels.html">CleanupLabels</A></TD>
  <TD><A HREF="html/compcert.backend.CleanupLabelsproof.html">CleanupLabelsproof</A></TD>
</TR>

<TR valign="top">
  <TD>Synthesis of debugging information</TD>
  <TD>Linear to Linear</TD>
  <TD><A HREF="html/compcert.backend.Debugvar.html">Debugvar</A></TD>
  <TD><A HREF="html/compcert.backend.Debugvarproof.html">Debugvarproof</A></TD>
</TR>

<TR valign="top">
  <TD>Laying out the activation records</TD>
  <TD>Linear to Mach</TD>
  <TD><A HREF="html/compcert.backend.Stacking.html">Stacking</A><BR>
      <A HREF="html/compcert.backend.Bounds.html">Bounds</A><BR>
      <A HREF="html/compcert.kvx.Stacklayout.html"><I>Stacklayout</I></A></TD>
  <TD><A HREF="html/compcert.backend.Stackingproof.html">Stackingproof</A><br>
      <A HREF="html/compcert.common.Separation.html">Separation</A></TD>
</TR>

<TR valign="top" style="color:#000000">
  <TD colspan="4"><b>Passes introduced for backends with postpass scheduling</b></TD>
</TR>
<TR valign="top" style="color:#000000">
  <TD>Reconstruction of basic-blocks at Mach level</TD>
  <TD>Mach to Machblock</TD>
  <TD><A HREF="html/compcert.scheduling.postpass_lib.Machblockgen.html">Machblockgen</A></TD>
  <TD><A HREF="html/compcert.scheduling.postpass_lib.ForwardSimulationBlock.html">ForwardSimulationBlock</A><BR>
      <A HREF="html/compcert.scheduling.postpass_lib.Machblockgenproof.html">Machblockgenproof</A></TD>
</TR>

<TR valign="top" style="color:#000000">
  <TD>Emission of purely sequential assembly code</TD>
  <TD>Machblock to Asmblock</TD>
  <TD><A HREF="html/compcert.kvx.Asmblockgen.html"><I>Asmblockgen</I></A></TD>
  <TD><A HREF="html/compcert.kvx.Asmblockgenproof0.html"><I>Asmblockgenproof0</I></A><BR>
      <A HREF="html/compcert.kvx.Asmblockgenproof1.html"><I>Asmblockgenproof1</I></A><BR>
      <A HREF="html/compcert.kvx.Asmblockgenproof.html"><I>Asmblockgenproof</I></A></TD>
</TR>

<TR valign="top" style="color:#000000">
  <TD>Bundling (and basic-block scheduling)</TD>
  <TD>Asmblock to Asmvliw</TD>
  <TD><A HREF="html/compcert.kvx.PostpassScheduling.html"><I>PostpassScheduling</I></A><BR>
    using <A HREF="html/compcert.kvx.Asmblockdeps.html"><I>Asmblockdeps</I></A><BR>
    and the <tt>abstractbb</tt> library</TD>
  <TD><A HREF="html/compcert.kvx.PostpassSchedulingproof.html"><I>PostpassSchedulingproof</I></A><BR>
    <A HREF="html/compcert.kvx.Asmblockprops.html"><I>Asmblockprops</I></A></TD>
</TR>

<TR valign="top" style="color:#000000">
  <TD>Flattening bundles (only a bureaucratic operation)</TD>
  <TD>Asmvliw to Asm</TD>
  <TD><A HREF="html/compcert.kvx.Asmgen.html"><I>Asmgen</I></A></TD>
  <TD><A HREF="html/compcert.kvx.Asmgenproof.html"><I>Asmgenproof</I></A> (whole simulation proof from <tt>Mach</tt> to <tt>Asm</tt>)</TD>
</TR>
</TABLE>

<H3>All together (there are many more passes than on vanilla CompCert: their order is specified in Compiler)</H3>
</font>
<font color=gray>

<UL>
<LI> <A HREF="html/compcert.driver.Compiler.html">Compiler</A>: composing the passes together;
whole-compiler semantic preservation theorems.
<LI> <A HREF="html/compcert.driver.Complements.html">Complements</A>: interesting consequences of the semantic preservation theorems.
</UL>

<H3>Static analyses</H3>

The following static analyses are performed over the RTL intermediate
representation to support optimizations such as constant propagation,
CSE, and dead code elimination.
<UL>
<LI> <A HREF="html/compcert.backend.Liveness.html">Liveness</A>: liveness analysis</A>.
<LI> <A HREF="html/compcert.backend.ValueAnalysis.html">ValueAnalysis</A>: value and alias analysis</A> <BR>
See also: <A HREF="html/compcert.backend.ValueDomain.html">ValueDomain</A>: the abstract domain for value analysis.<BR>
See also: <A HREF="html/compcert.kvx.ValueAOp.html"><I>ValueAOp</I></A>: processor-dependent parts of value analysis.
<LI> <A HREF="html/compcert.backend.Deadcode.html">Deadcode</A>: neededness analysis</A> <BR>
See also: <A HREF="html/compcert.backend.NeedDomain.html">NeedDomain</A>: the abstract domain for neededness analysis.<BR>
See also: <A HREF="html/compcert.kvx.NeedOp.html"><I>NeedOp</I></A>: processor-dependent parts of neededness analysis.
</UL>

<H3>Type systems</H3>

The <A HREF="html/compcert.cfrontend.Ctyping.html">type system of CompCert C</A> is fully formalized.  For some intermediate languages of the back-end, simpler type systems are used to statically capture well-formedness conditions.
<UL>
<LI> <A HREF="html/compcert.cfrontend.Ctyping.html">Ctyping</A>: typing for CompCert C + type-checking functions.
<LI> <A HREF="html/compcert.backend.RTLtyping.html">RTLtyping</A>: typing for RTL + type
reconstruction.
<LI> <A HREF="html/compcert.backend.Lineartyping.html">Lineartyping</A>: typing for Linear.
</UL>
</font>

</BODY>
</HTML>