Changes

Jump to: navigation, search

Winter 2022 SPO600 Weekly Schedule

3,315 bytes added, 10:42, 11 February 2022
no edit summary
|3||Jan 24||[[#Week 3 - Class I|6502 Math / Jumps, Branches, and Subroutines]]||[[#Week 3 - Class II|6502 Strings]]||[[#Week 3 Deliverables|Lab 3]]
|-
|4||Jan 31||[[#Week 4 - Class I|Compiler Optimizations]]||[[#Week 4 - Class II|Building Code / Make and Makefiles / Autotools and Friends(No lecture - continue work on Lab 3)]]||[[#Week 4 Deliverables|Lab 43, January blog posts]]
|-
|5||Feb 07||[[#Week 5 - Class I|Introduction to 64-bit Assembly (x86_64 Building Code / Make and AArch64) Makefiles / Modern Architectural EnhancementsAutotools and Friends]]||[[#Week 5 - Class II|More Introduction to 64 Bit Assembler-bit Architectures - Registers (x86_64 and AArch64) / Memory Issues]]||[[#Week 5 Deliverables|Lab 53]]
|-
|6||Feb 14||[[#Week 6 - Class I|SIMD64-Bit Assembler]]||[[#Week 6 - Class II|SIMD / Inline Assembly]]||[[#Week 6 Deliverables|Lab 6]]
|-
|7||Feb 21||[[#Week 7 - Class I|Using ARMv9 instructions (for SVE2) on an ARMv8 system]]||[[#Week 7 - Class II|Project Selection]]||[[#Week 7 Deliverables|Lab 7]]
=== Week 4 Deliverables ===
* '''By the end of the day on Tuesday, February 1:''' Blogs for January are due (including any labs you're submitting for January). Make sure you've submitted the [[SPO600 Communication Tools|web form]] with your blog URL so I can find it!
* Finish [[6502 Math and Strings Lab|Lab 3]]
* Continue to blog
 
== Week 5 ==
 
=== Week 5 - Class I ===
 
==== Video ====
* No recording is available (bad audio)
 
==== Notes ====
* [[Make and Makefiles]]
 
===== Compiler Options =====
* (Modern compilers are similar in options, for the sake of this discussion I'm focusing on the GNU C Compiler (gcc), part of the GNU Compiler Collection)
* There are hundreds of compiler features available, many of which are optimization options.
* These features can be controlled from the compiler command line:
** To enable a feature, specify <code>-f</code> and the option name: <code>-f''builtin''</code>
** To disable a feature, specify <code>-f</code> and then <code>no-</code> and the option name: <code>-f''no-builtin''</code>
* Example:
gcc -fbuiltin -falign-functions -no-caller-saves ''foo''.c -o foo
* To see the available optimization features and what each does, view the gcc manpage and/or gcc manual
* It's a pain to specify hundreds of <code>-f</code> options on the command line, so these are grouped into commonly-used sets. The sets can be specified with the <code>-O</code> compiler option (note that that is a capital letter "O", not a lowercase "o" nor a zero "0"), followed by an optimization level:
** -O0 : almost no optimization
** -O1 : optimizations that can be quickly performed
** -O2 : all of the normal optimizations that can be safely applied to all programs (this is the usual default optimization level)
** -O3 : all normal optimization, including some that may in rare cases cause changes to the operation of the program (for example, counting +0 and -0 as the same number -- which is fine in the vast majority of cases, but might interfere with the correct operation of some scientific calculations)
** -Os : optimize for smallest size (of both the executable and the memory usage while executing)
** -Ofast : optimize for highest speed, even at the cost of more memory usage
** -Og : optimize for debugging -- avoid optimizations that will excessively convolute the code, making it harder to see the correlation between the source code and the object code
* Note that the set of optimizations considered "safe" may vary over time - for example, vector optimization were previously considered unsafe (<code>-O3</code>) in the gcc compiler, but with improvements and testing are not considered safe and are therefore included in the <code>-O2</code> level in newer versions of gcc.
* You can specify a group of options with <code>-O</code> and override the use of individual options with <code>-f</code> by placing the <code>-O</code> group first:
gcc -O2 -fno-builtin foo.c -o foo
* To see the optimizations that will be applied by a given set of command-line options, use <code>-Q --help=optimizers</code> to query the optimization list that the compiler will use:
gcc -O1 -Q --help=optimizers | less
 
=== Week 5 - Class I ===
 
==== Video ====
* https://web.microsoftstream.com/video/91554778-ac0f-4928-8a8b-f4636b96a427 x86_64 & AArch64 Introduction - Registers]
* [https://web.microsoftstream.com/video/880fb0f8-1084-457a-92e0-80f04ad62463 Memory Alignment and Performance]
* [https://web.microsoftstream.com/video/1bcab47b-514a-4f23-bdd4-f73662a0673f Paged Memory Systems]
 
=== Week 5 Deliverables ===
* Finish [[6502 Math and Strings Lab|Lab 3]]
* Continue to blog

Navigation menu