I was just wondering what exactly causes a function without a prologue/epilogue to be generated? If a program is compiled with just stdcall/cdecl convention, why is it that there are some calls which lead to a subroutine that doesn't have the typical push ebp -> mov ebp,esp. Are these just sanity checks generated by the compiler? Are these subroutines important? Or is that impossible to say without actually analysing it? For example, would a compiler produce a call to a subroutine which moves one value into eax and then returns or would that be the programmer changing the binary of the executable?
The prologue and epilogue are not required by the CPU to execute functions, so most compilers only generate them when necessary, or optimization is not enabled. In particular, leaf functions (those that don't call other functions) do not usually need a prolog (unless required by the ABI) and the compiler may safely omit it.
Frame-Pointer Omission compiler option: https://msdn.microsoft.com/en-us/library/2kxx5t2c.aspx
For gcc see -fomit-frame-pointer https://gcc.gnu.org/onlinedocs/gcc-4.5.2/gcc/Optimize-Options.html