[polly] r276550 - GPGPU: Verify kernel IR before generating assembly
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 23 23:43:17 PDT 2016
Author: grosser
Date: Sun Jul 24 01:43:17 2016
New Revision: 276550
URL: http://llvm.org/viewvc/llvm-project?rev=276550&view=rev
Log:
GPGPU: Verify kernel IR before generating assembly
Modified:
polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp
Modified: polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp?rev=276550&r1=276549&r2=276550&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp (original)
+++ polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp Sun Jul 24 01:43:17 2016
@@ -28,6 +28,7 @@
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/IR/LegacyPassManager.h"
+#include "llvm/IR/Verifier.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Target/TargetMachine.h"
@@ -674,6 +675,10 @@ std::string GPUNodeBuilder::createKernel
}
void GPUNodeBuilder::finalizeKernelFunction() {
+ // Verify module.
+ llvm::legacy::PassManager Passes;
+ Passes.add(createVerifierPass());
+ Passes.run(*GPUModule);
if (DumpKernelIR)
outs() << *GPUModule << "\n";
More information about the llvm-commits
mailing list