Changeset 104
- Timestamp:
- Dec 6, 2007, 3:03:17 PM (18 years ago)
- Author:
- neil.c.c.brown
- Message:
-
A few last minute tweaks to the presentation
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
docs/trunk/200711-tock-seminars/200711-B-tock-slides.tex
r103 r104 361 361 \frametitle{Control-flow graphs} 362 362 \begin{itemize} 363 \item We need to analyse the (削除) AST (削除ここまで)for various purposes363 \item We need to analyse the (追記) program (追記ここまで) for various purposes 364 364 \begin{itemize} 365 365 \item Parallel usage checking … … 413 413 \column{.35\textwidth} 414 414 \begin{itemize} 415 \item (削除) Compose ``paths'' (削除ここまで)as we descend the tree415 \item (追記) Wrap modifier functions (追記ここまで) as we descend the tree 416 416 \end{itemize} 417 417 \column{.65\textwidth} … … 430 430 \end{itemize} 431 431 \begin{lstlisting} 432 buildNode (While e s) (削除) route (削除ここまで)433 = do addNode (label e) (append (削除) route (削除ここまで)432 buildNode (While e s) (追記) modifier (追記ここまで) 433 = do addNode (label e) (append (追記) modifier (追記ここまで) 434 434 -- (Expr -> m Expr) -> (Statement -> m Statement) 435 435 (\f (While e s) -> do {e' <- f e ; return (While e' s)})) 436 buildNode p (append (削除) route (削除ここまで)436 buildNode p (append (追記) modifier (追記ここまで) 437 437 -- (Statement -> m Statement) -> (Statement -> m Statement) 438 (\f (While e s) -> f s >>= (削除) (削除ここまで)While e))438 (\f (While e s) -> f s >>= (追記) return . (追記ここまで)While e)) 439 439 ... 440 440 \end{lstlisting} … … 448 448 \end{itemize} 449 449 \begin{lstlisting} 450 buildNode (While e s) (削除) route (削除ここまで)451 = do addNode (label e) (change1of2 (削除) route (削除ここまで)While)452 buildNode s (change2of2 (削除) route (削除ここまで)While)450 buildNode (While e s) (追記) modifier (追記ここまで) 451 = do addNode (label e) (change1of2 (追記) modifier (追記ここまで) While) 452 buildNode s (change2of2 (追記) modifier (追記ここまで) While) 453 453 ... 454 change1of2 (削除) route con f = append route (削除ここまで)(modify2 con f return)455 change2of2 (削除) route con f = append route (削除ここまで)(modify2 con return f)454 change1of2 (追記) modifier con f = append modifier (追記ここまで) (modify2 con f return) 455 change2of2 (追記) modifier con f = append modifier (追記ここまで) (modify2 con return f) 456 456 457 457 modify2 :: Monad m => … … 506 506 \begin{itemize} 507 507 \item Compiler must detect and disallow unsafe parallel usage of objects 508 (追記) \item E.g. enforce CREW; Concurrent-Read, Exclusive-Write (追記ここまで) 508 509 \item Annotate AST/CFG nodes with objects used 509 510 \begin{itemize} … … 550 551 \begin{frame}[fragile] 551 552 \frametitle{Why compile to C/C++?} 553 (追記) \begin{itemize} (追記ここまで) 554 (追記) \item Want to support multiple platforms (追記ここまで) 555 (追記) \begin{itemize} (追記ここまで) 556 (追記) \item IA32, x86-64, PowerPC, Cell, ARM\ldots (追記ここまで) 557 (追記) \item Writing code generators is boring! (追記ここまで) 558 (追記) \end{itemize} (追記ここまで) 559 (追記) \item For C, use CCSP via the CIF interface (追記ここまで) 560 (追記) \item For C++, use C++CSP (追記ここまで) 561 (追記) \item Existing compilers are very mature and generate good code (追記ここまで) 562 (追記) \end{itemize} (追記ここまで) 563 (追記) \end{frame} (追記ここまで) 564 (追記) (追記ここまで) 565 (追記) \begin{frame} (追記ここまで) 566 (追記) \frametitle{Generating code} (追記ここまで) 552 567 \begin{columns} 553 568 \column{.4\textwidth} … … 561 576 \end{columns} 562 577 \begin{itemize} 563 (削除) \item Want to support multiple platforms (削除ここまで)564 (削除) \begin{itemize} (削除ここまで)565 (削除) \item IA32, x86-64, PowerPC, Cell, ARM\ldots (削除ここまで)566 (削除) \item Writing code generators is boring! (削除ここまで)567 (削除) \end{itemize} (削除ここまで)568 (削除) \item Existing compilers are very mature and generate good code (削除ここまで)569 (削除) \end{itemize} (削除ここまで)570 (削除) \end{frame} (削除ここまで)571 (削除) (削除ここまで)572 (削除) \begin{frame} (削除ここまで)573 (削除) \frametitle{Generating code} (削除ここまで)574 (削除) \begin{itemize} (削除ここまで)575 578 \item Generate idiomatic code -- as a human would 576 579 \begin{itemize} 577 580 \item That's what compilers are designed to handle 578 581 \end{itemize} 579 (削除) \item For C, use CCSP via the CIF interface (削除ここまで)580 (削除) \item For C++, use C++CSP (削除ここまで)581 582 \item Result: Tock's output is $\approx8ドルx faster than tranx86's for numeric code 582 583 \end{itemize} … … 650 651 \item Can't tell directly, because we're not doing the code generation 651 652 \item Could use a size that's ``always big enough'' -- but that's inefficient 652 (削除) \begin{itemize} (削除ここまで)653 (削除) \item C++CSP has to do this (削除ここまで)654 (削除) \end{itemize} (削除ここまで)655 653 \end{itemize} 656 654 \end{itemize}
Note:
See TracChangeset
for help on using the changeset viewer.