TIMETYPE assignment and the repeated global load¶
In ZHitman3::SetupBloodTrail, GCC loads g_pSysInterface again after assigning a time, while reusing the upper half of its address. Both the control flow in the caller and the return sites inside the inline assignment affect that reload.
The assignment first checks for self-assignment and returns *this there. On the other path it copies secs and returns *this at the end. Inlining leaves both branches occupied, so common subexpression elimination cannot carry the loaded pointer across the assignment. Replacing the enclosing positive test in the caller with an early return lets jump simplification eliminate the intermediate copies and merge the loads.
Use the shared assignment operator and keep the caller’s enclosing test. Movement time updates can use ordinary assignment as well. When the original deliberately keeps the system pointer across an assignment, as in the PS2 video constructor, its source can hold the pointer in a local.