My understanding is that compilers work just like originally described. I type out what I want. I feed that into a compiler. It takes that input of what I want and generates code.
Is that not your understanding of how compilers work? If a compiler does not work like that, what do you think a complier does instead?
A compiler does so deterministically and there is no AI involved.