Calibrating your fear of big bad optimizing compilers
Calibrating your fear of big bad optimizing compilers
Posted Oct 14, 2019 17:47 UTC (Mon) by rweikusat2 (subscriber, #117920)Parent article: Calibrating your fear of big bad optimizing compilers
The "optimized away" in gdb output does not mean the compiler "pessimized" the source code by adding gratuitious memory accesses to the generated machine code. It means that the value of some source-level named object isn't available to the debugger because it losts its identity in translation: There was no reason to allocate a memory location for it, hence, it became a 'virtual' entity whose value (or values) only ever live in a register or - over the course of a given codepath - some set of registers the debugger cannot map back to the name.
