Languages and compilers actually do have constructs for programmers to make things easier for the compiler.
"inline" and "register" are two very known examples. Other examples are function attributes in gcc: https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html