@@ -58,8 +58,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5858
5959#include " llvm/GenXIntrinsics/GenXIntrinsicInst.h"
6060
61- #include " common .h"
62- #include " visaBuilder_interface .h"
61+ #include " visa/include/visaBuilder_interface .h"
62+ #include " visa/common .h"
6363
6464#include " llvm/ADT/IndexedMap.h"
6565#include " llvm/ADT/StringExtras.h"
@@ -109,10 +109,6 @@ static cl::list<std::string>
109109static cl::opt<bool > EmitVisa (" emit-visa" , cl::init(false ), cl::Hidden,
110110 cl::desc(" Generate Visa instead of fat binary." ));
111111
112- static cl::opt<bool > GenerateDebugInfo (
113- " emit-debug-info" , cl::init(false ), cl::Hidden,
114- cl::desc(" Generate DWARF debug info for each compiled kernel" ));
115-
116112static cl::opt<std::string> AsmNameOpt (" asm-name" , cl::init(" " ), cl::Hidden,
117113 cl::desc(" Output assembly code to this file during compilation." ));
118114
@@ -5667,19 +5663,10 @@ class GenXFinalizer : public ModulePass {
56675663 AU.setPreservesAll ();
56685664 }
56695665
5670- void emitDebugInformation (VISABuilder &VB, const GenXModule &GM,
5671- const FunctionGroupAnalysis &FGA,
5672- const GenXSubtarget &ST);
5673-
56745666 bool runOnModule (Module &M) {
56755667 Ctx = &M.getContext ();
56765668
56775669 GenXModule &GM = getAnalysis<GenXModule>();
5678- FunctionGroupAnalysis &FGA = getAnalysis<FunctionGroupAnalysis>();
5679- const GenXSubtarget &ST = getAnalysis<TargetPassConfig>()
5680- .getTM <GenXTargetMachine>()
5681- .getGenXSubtarget ();
5682-
56835670 std::stringstream ss;
56845671 VISABuilder *CisaBuilder = GM.GetCisaBuilder ();
56855672 if (GM.HasInlineAsm ())
@@ -5688,9 +5675,6 @@ class GenXFinalizer : public ModulePass {
56885675
56895676 dbgs () << CisaBuilder->GetCriticalMsg ();
56905677
5691- if (GenerateDebugInfo)
5692- emitDebugInformation (*CisaBuilder, GM, FGA, ST);
5693-
56945678 Out << ss.str ();
56955679 return false ;
56965680 }
@@ -5703,33 +5687,6 @@ ModulePass *llvm::createGenXFinalizerPass(raw_pwrite_stream &o) {
57035687 return new GenXFinalizer (o);
57045688}
57055689
5706- void GenXFinalizer::emitDebugInformation (VISABuilder &VB, const GenXModule &GM,
5707- const FunctionGroupAnalysis &FGA,
5708- const GenXSubtarget &ST) {
5709- for (const auto *FG : FGA) {
5710- const auto *KF = FG->getHead ();
5711- llvm::SmallVector<char , 1000 > ElfImage;
5712-
5713- const genx::VisaDebugInfo &DbgInfo = *GM.getVisaDebugInfo (KF);
5714- VISAKernel *VK = VB.GetVISAKernel (KF->getName ().str ());
5715- IGC_ASSERT_MESSAGE (VK, " Kernel is null" );
5716- auto Err = genx::generateDebugInfo (ElfImage, *VK, DbgInfo, *KF,
5717- ST.getTargetTriple ().str ());
5718- if (Err)
5719- llvm::report_fatal_error (toString (std::move (Err)));
5720-
5721- std::error_code EC;
5722- llvm::raw_fd_ostream OS ((" dbg_" + KF->getName () + " .elf" ).str (), EC);
5723- if (!EC) {
5724- OS << StringRef (ElfImage.data (), ElfImage.size ());
5725- OS.close ();
5726- }
5727-
5728- if (EC)
5729- llvm::report_fatal_error (EC.message ());
5730- }
5731- }
5732-
57335690static SmallVector<const char *, 8 >
57345691collectFinalizerArgs (StringSaver &Saver, const GenXSubtarget &ST) {
57355692 SmallVector<const char *, 8 > Argv;
0 commit comments