From 5d8f270d10439ce438c8d9d5058801f7146ff0f2 Mon Sep 17 00:00:00 2001 From: George Kyriazis Date: Wed, 24 Jan 2018 14:15:02 -0600 Subject: 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 --- src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/gallium') 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); -- cgit v1.2.3