After the initial success I tried compiling several benchmarks with the -debug-ir enabled, but failed on most of them.
In one of the benchmarks I get the following assertion error in llc (after the opt -debug-ir pass)
llc: DwarfUnit.cpp:963: llvm::DIE* llvm::DwarfUnit::getOrCreateTypeDIE(const llvm::MDNode*): Assertion `ContextDIE’ failed
and in another benchmark I get this assertion error from opt (when using the -debug-ir) pass
opt: DataLayout.cpp:632: unsigned int llvm::DataLayout::getAlignment(llvm::Type*, bool) const: Assertion `Ty->isSized() && "Cannot getTypeInfo() on a type that is unsized!"’ failed
The -debug-ir pass does not work seamlessly. It may work for some applications if you’re lucky.
/Muneeb