File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
mlir/lib/Target/LLVM/NVVM Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change 26
26
#include " mlir/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.h"
27
27
#include " mlir/Target/LLVMIR/Export.h"
28
28
29
+ #include " llvm/ADT/ScopeExit.h"
29
30
#include " llvm/Config/llvm-config.h"
30
31
#include " llvm/Support/FileSystem.h"
31
32
#include " llvm/Support/FileUtilities.h"
@@ -673,6 +674,7 @@ NVPTXSerializer::moduleToObject(llvm::Module &llvmModule) {
673
674
llvm::Timer moduleToObjectTimer (
674
675
" moduleToObjectTimer" ,
675
676
" Timer for perf llvm-ir -> isa and isa -> binary." );
677
+ auto clear = llvm::make_scope_exit ([&]() { moduleToObjectTimer.clear (); });
676
678
// Return LLVM IR if the compilation target is `offload`.
677
679
#define DEBUG_TYPE " serialize-to-llvm"
678
680
LLVM_DEBUG ({
You can’t perform that action at this time.
0 commit comments