The role of the compiler is to automatically perform the task of translating a program in a given programming language to a program that runs on a computer, making the best possible use of that computer's resources.
Writing a compiler with shallow understanding of the computer you're targeting is definitely possible, but ultimately wasteful.
Writing a compiler with shallow understanding of the computer you're targeting is definitely possible, but ultimately wasteful.