Is there an option mapping assembly to IR through debug info?

As mentioned in the title, some info stored in generated object file in the format of dwarf or likewise.

Debug info in general, and DWARF in particular, map from assembly to source. It knows nothing about IR.

See ⚙ D40778 [DebugIR] Revive the Debug IR pass. [Added llvm-commits] (this never got merged, but you might be able to do something useful with it).