diff options
| author | Tobias Grosser <tobias@grosser.es> | 2016-07-24 06:43:17 +0000 |
|---|---|---|
| committer | Tobias Grosser <tobias@grosser.es> | 2016-07-24 06:43:17 +0000 |
| commit | e1a98343a1f8b00b2df9572baa9151ac80e77a29 (patch) | |
| tree | 8371bbd6d276c1f33ea3b647445b9d278b1f9bab /polly/lib/CodeGen/PPCGCodeGeneration.cpp | |
| parent | 1a06fe5f7ea47112a5e8ac6e0cc471ef96759591 (diff) | |
| download | bcm5719-llvm-e1a98343a1f8b00b2df9572baa9151ac80e77a29.tar.gz bcm5719-llvm-e1a98343a1f8b00b2df9572baa9151ac80e77a29.zip | |
GPGPU: Verify kernel IR before generating assembly
llvm-svn: 276550
Diffstat (limited to 'polly/lib/CodeGen/PPCGCodeGeneration.cpp')
| -rw-r--r-- | polly/lib/CodeGen/PPCGCodeGeneration.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp index 74dd31d91fc..420b3eec356 100644 --- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp +++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp @@ -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::createKernelASM() { } void GPUNodeBuilder::finalizeKernelFunction() { + // Verify module. + llvm::legacy::PassManager Passes; + Passes.add(createVerifierPass()); + Passes.run(*GPUModule); if (DumpKernelIR) outs() << *GPUModule << "\n"; |

