Open malharjajoo opened 8 years ago
What the compiler emits should be equivalent to what a human assembly writer would create in terms of functionality. If you had to write an assembly file (as you did last year), how would you work out what meta-data you had to insert? By the same argument as above, you wouldn't insert random meta-data from the assembler manual until it started working.
Some meta-data is clearly critical for the assembly and linking processes (e.g. the need to export names of functions). Other parts are just informational or designed to aid debugging and optimisation. Things that we've already seen are important are:
If you look at everything else the compiler is producing, you can guess (or investigate) what the meta-data does, and decide if it is actually needed. Would you need to put it in if you were writing assembly?
I just had a doubt , In the Codegen , how are we supposed to know which metadata we are supposed to remove or which we are supposed to not ?
We cant possibly do it by trial and error ...