
Cambridge University Press 052182060X - Modern Compiler Implementation in Java, Second Edition Andrew W. Appel Index More information Index abstract data type, 5 associative, nonassociative abstract syntax, see syntax, abstract attribute grammar, 12 access link, see static link available expressions, 356 activation record, 6, 116–125 Ada, 336, 348, 349 Baker’s algorithm, 274 addressing mode, 183, 188 basic block, 170, 172, 361, 365, 382 ADT, see abstract data type beta reduction, see inline expansion Aiken-Nicolau algorithm, 444–448, 459 binding, 103–110, see also precedence alias in type environment, 111 analysis, 357, 369–374, 392 blacklist, 281 see in coalescing register allocation, 234 block structure, function, nested blocking, 477–480, 482 alignment, see cache alignment branch prediction, 456–459 alloca, 197 buffered input, 33 allocation bypass datapaths, 442, 444 of activation records, 116, 118, 156 of arrays and records, 151 C programming language of heap data, 275 linking to, 153 register, see register allocation writing compiler for, 18, 90, 116, 117, alphabet, 18 122, 130, 139, 144–146, 150, 151, ambiguous grammar, see grammar 197, 322, 369, 371, 374, 377 analysis C++, 291, 336, 369 dataflow, see dataflow analysis cache, 464–467 liveness, see liveness alignment, 468–470 antidependence, see dependence, write-after- and garbage collection, 267, 480–481 read cache alignment, 481 approximation CALL, 162, 163, 168 dataflow analysis, 209, 212, 352 call in garbage collection, 257 by name, 322 of spill effect, 220 by need, 323 of strictness, 331 by reference, 123, 124 argument, see parameter callee-save, see register, callee-save array, 144, 146, 151 caller-save, see register, caller-save bounds check, 148, 391–395 Canon module, 163 Assem module, 191 canonical tree, see intermediate represen- associativity, see right-associative, left- tation, canonical 495 © Cambridge University Press www.cambridge.org Cambridge University Press 052182060X - Modern Compiler Implementation in Java, Second Edition Andrew W. Appel Index More information INDEX card marking, 270 dangling else, 68 CISC, 180, 187–190, 459 dangling reference, 122 class descriptor, 285–289, 292–297 data type, abstract, see abstract data type classless language, 293 dataflow, see also liveness, reaching defi- cloning, 293 nitions, available expressions, etc. closure analysis, 6 conversion, 316–317, 320 bit vector, 361 , 27, 28, 33 equations, 205–210, 352, 354, 356, 368, function, 301, 303, 331 372, 379 Kleene, 19, 39 iteration, see iteration algorithms of LR state, 60, 63 work-list algorithms, 363 coalescing, 223–240, 245, 320, 360 dead code, 312, 326, 360, 364, 365, 368, conservative, 223 369, 389, 394, 417, 426–428 of SSA variables, 428 dead state, 23 code generation, see instruction selection def (of variable), 205 code-generator generator, 185 def-use chain, 399, 438 Codegen module, 196 deforestation, 327–328 coercion, 290 dependence coloring, see graph coloring control, see control dependence comma operator, see expression sequence data, 423, 442, 476 common-subexpression elimination, 356, loop-carried, 445 359 memory and array, 423–425, 445 commute, 164, 166–174 read-after-write, see dependence, data complex instruction set, see CISC write-after-read, 423, 441, 476 computer, see CISC and RISC write-after-write, 423, 441, 476 conditional jump, 140, 149, 162, 169 depth-first search conditional move, 454 for dataflow analysis, 207, 209, 362, conflict 363 in predictive parser, 46 garbage collection, 257, 268, 279 reduce-reduce, 68, 75 spanning tree, 410–411 resolution of, 72–75 derivation, 41 shift-reduce, 62, 67, 68, 72, 74 descriptor conservative approximation, see approxi- class, 276, 285–289, 292–297 mation level, 155 constant folding, 419 record, 276, 278 constant propagation, 356, 418–419 DFA, see finite automaton conditional, 419–422 display, 134 constraint, functional-unit, 441, 443 class hierarchy, 290, 295, 296 constructor, 8 dominance frontier, 404, 436 continuation, 304, 332 dominance property, see static single-assignment continuation-passing style, 435 form control dependence, 425–426 dominator, 379–382, 384, 392–395, 436 graph, 426 efficient calculation of, 410–416, 434 control flow, 170, see also flow graph dynamic programming control-flow graph, see flow graph for instruction selection, 182–186 coordinated induction variable, 388–392 for register allocation, 241–244 copy propagation, 359, 419, see also coa- dynamic scheduling, see out-of-order ex- lescing ecution 496 © Cambridge University Press www.cambridge.org Cambridge University Press 052182060X - Modern Compiler Implementation in Java, Second Edition Andrew W. Appel Index More information INDEX edge splitting, 408 nested, 117–118, 124–126, 131, 135, edge-split SSA, see static single-assignment 155, 298, 301–302, 369 form functional intermediate form, 430–435 else, dangling, 68 functional programming, 12, 104, 298–334, emission see also side effect in instruction selection phase, 183, 185 impure, 299–301 of assembly code, 5, 6, 198, 244 pure, 302–308 end-of-file marker, 45 symbol tables, 107–108 environment, 11, 103–111, 115, 284, 301, functional unit, 441, 442 317 multiple, 442 functional, 107 garbage collection, 151, 257–282, 321, 333 imperative, 106 and cache, 267, 480–481 multiple, 105 Baker’s algorithm, 274 equational reasoning, 298–302, 306, 321, compiler interface, 275–278 430 concurrent, 272 error message, 91 conservative, 281 error recovery, 53 copying, 264–269 escape, 124, 302, 321, 332, see also FindEscape cost, 259, 264, 268, 271, 275 ESEQ, 162–169 flip, 274 expression sequence, see also ESEQ generational, 269–271, 480 finite automaton, 18, 21–30 incremental, 272–275 deterministic, 22 mark-sweep, 257–262 minimization, 36 reference counts, 262–264 nondeterministic, 24 generic, 336, 348 Generic Java, 336 converting to DFA, 27 GJ, 336 FIRST set, 47–52, 63 grammar, 5, 40–45, see also syntax fixed point, 48, 206, 357, 374 ambiguous, 42, 50, 51, 67–68, 90, 185 least, 209, 218, 368, 419 attribute, 12 Flex, 34 factoring, 53 flow graph, 203 for intermediate representation, 7–9 reducible, 377 for parser generator, 89 flow, data, see dataflow hierarchy of classes, 66 FlowGraph module, 215 LALR, 66, 67 FOLLOW set, 48–50, 52, 54, 62 LL(1), 51 forward reference, see recursion, mutual of straight-line programs, 7 forwarding, 265–268 to specify instruction set, 183–186 fragmentation, 261 transformations, 51, 88, 90 frame, see activation record unambiguous, 51 Frame module, 127, 251 graph frame pointer, 118–120, 134, 143, 155, 197– coloring, 219–223, 250, 286, 360 198 optimistic, 221 on Pentium, 188 with coalescing, 223–240, 245, 320 freeze, 224, 233, 239 work-list algorithm, 232–240 function interference, see interference graph dead, 312 Graph module, 214 higher-order, 117, 298 graph, flow, see flow graph integration, see inline expansion leaf, 122 halting problem, 351, 374 497 © Cambridge University Press www.cambridge.org Cambridge University Press 052182060X - Modern Compiler Implementation in Java, Second Edition Andrew W. Appel Index More information INDEX hash table, 106, 114 liveness analysis, 206–207 hazard, 441, see also constraint, functional- LR parser construction, 60 unit minimization of finite automata, 36 reaching definitions, 355 IBM 360/91, 455 iterative modulo scheduling, see modulo induction variable, 385–391 scheduling coordinated, 388, 390, 392 linear, 387 Java, 336 inheritance, 283, 284 writing compiler for, 18, 90, 105, 145, multiple, 286 276, 282, 289, 290, 292, 297, 322, single, 285, 294, 295 370, 371, 392, 393 inline expansion, 276, 308–316, 332, 431 writing compiler in, 3, 9–11, 91 instanceof, 12, 93 JavaCC, 7, 68–89 instantiation of variable, 116 JavaCC parser generator, 89 instruction Jouette, 176–180, 192–195 fetch, 456, 470 Schizo, 184 Instr representation of, 191 Kleene closure, 19, 39 pipeline, see pipeline resource usage of, 442 label, 131 selection of, 6, 176–202 lambda calculus, 430 side effect of, 188, 196 lambda-calculus, 331 three-address, 188 landing pad, 435 two-address, 188, 193 lattice, 420 variable-length, 188 lazy evaluation, 321–327, 435 instruction set, see CISC and RISC leaf function, 122 instruction-level parallelism, 440 left-associative operator, 73, 74 Intel, see Pentium left-factoring, 53 interfaces, 5 left-recursion, 51 interference graph, 212–232, 244 Lengauer-Tarjan algorithm, 410–416, 434, construction of, 213, 216–217, 236 see also dominator for SSA form, 429 Lex, 6, 33 from SSA form, 429, 438 lexical analyzer, 6, 16–37, 93 intermediate representation, 6, 137–139, lexical scope, see function, nested see also Tree Lisp, 348 canonical, 162–169 live range, 203, 213 functional, 430–435 live-in, 205 interpreter, 91 live-out, 205 invariant, see loop invariant liveness, 6, 203–218, 236, 358, 360, 363, IR, see intermediate representation 365, 367, 368 item in SSA form, 429 LR(0), 59 of heap data, 257 LR(1), 63 LL(k), see parser, LL(k) iteration algorithms local variable, 116 alias analysis, 372 locality of reference, see cache dominators, 379 lookahead, 37 -closure, 28 loop, 376 efficient, 360–364 header, 376, 381–382 first and follow sets, 48 inner, 381 invention of, 374 interchange, 476–477 498 © Cambridge University Press www.cambridge.org Cambridge University Press 052182060X - Modern Compiler Implementation in Java, Second Edition Andrew W. Appel Index More information INDEX invariant, 314, 326, 382, 384–389, 398 parallel processing, instruction-level, 440 natural, 381–382 parameter, see also view shift nested, 382 actual, 194, 312, 319 postbody, see postbody
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages7 Page
-
File Size-