From: George Kyriazis Date: Wed, 24 Jan 2018 20:15:02 +0000 (-0600) Subject: swr/rast: Optimize DumpToFile output size X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5d8f270d10439ce438c8d9d5058801f7146ff0f2;p=mesa.git swr/rast: Optimize DumpToFile output size Modify DumpToFile to only dump the function, not the entire module. Reduces file sizes and speeds up the dumping. Reviewed-by: Bruce Cherniak --- diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp index 675438be72f..71057660eb2 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp +++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp @@ -421,8 +421,7 @@ void JitManager::DumpToFile(Function *f, const char *fileName) sprintf(fName, "%s.%s.ll", funcName, fileName); #endif raw_fd_ostream fd(fName, EC, llvm::sys::fs::F_None); - Module* pModule = f->getParent(); - pModule->print(fd, nullptr); + f->print(fd, nullptr); #if defined(_WIN32) sprintf(fName, "%s\\cfg.%s.%s.dot", outDir.c_str(), funcName, fileName);