One of the purposes of using intermediate code in compilers is to :
1
make parsing and semantic analysis simpler
2
improve error recovery and error reporting
3
increase the chances of reusing the machine independent code optimizer in other compilers
4
improve the register allocation