JuliaHubOSS / llvm-cbe

resurrected LLVM "C Backend", with improvements
Other
838 stars 144 forks source link

Debugging: Use names from the debug info to name generated locals #176

Open dpaoliello opened 1 year ago

dpaoliello commented 1 year ago

Currently debugging LLVM-CBE code is horrible. One issue is that all the locals generated have names that don't correspond to the original source's names at all.

To improve this, we could name generated locals based off information from the debugging info, for example if the debugging info indicates that the value we are generating corresponds with the local index, then maybe we should name the generated local _1_index instead of _1.

This would require keeping track of these generated names so that downstream instructions will use the correct local name.