diff options
| author | Singapuram Sanjay Srivallabh <singapuram.sanjay@gmail.com> | 2017-06-30 19:42:21 +0000 |
|---|---|---|
| committer | Singapuram Sanjay Srivallabh <singapuram.sanjay@gmail.com> | 2017-06-30 19:42:21 +0000 |
| commit | 02ca346e48b0348bb6cbaf88350a09add62d4fcf (patch) | |
| tree | 7b9b1a90bcf22835d37e89462e757528353e6f7b /polly/lib/CodeGen/CodeGeneration.cpp | |
| parent | 9f59da8d27e8195149dbb0221974838e46627057 (diff) | |
| download | llvm-02ca346e48b0348bb6cbaf88350a09add62d4fcf.zip llvm-02ca346e48b0348bb6cbaf88350a09add62d4fcf.tar.gz llvm-02ca346e48b0348bb6cbaf88350a09add62d4fcf.tar.bz2 | |
Introduce a hybrid target to generate code for either the GPU or CPU
Summary:
Introduce a "hybrid" `-polly-target` option to optimise code for either the GPU or CPU.
When this target is selected, PPCGCodeGeneration will attempt first to optimise a Scop. If the Scop isn't modified, it is then sent to the passes that form the CPU pipeline, i.e. IslScheduleOptimizerPass, IslAstInfoWrapperPass and CodeGeneration.
In case the Scop is modified, it is marked to be skipped by the subsequent CPU optimisation passes.
Reviewers: grosser, Meinersbur, bollu
Reviewed By: grosser
Subscribers: kbarton, nemanjai, pollydev
Tags: #polly
Differential Revision: https://reviews.llvm.org/D34054
llvm-svn: 306863
Diffstat (limited to 'polly/lib/CodeGen/CodeGeneration.cpp')
| -rw-r--r-- | polly/lib/CodeGen/CodeGeneration.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp index 0e80058..8617e1c 100644 --- a/polly/lib/CodeGen/CodeGeneration.cpp +++ b/polly/lib/CodeGen/CodeGeneration.cpp @@ -278,6 +278,10 @@ public: /// Generate LLVM-IR for the SCoP @p S. bool runOnScop(Scop &S) override { + // Skip SCoPs in case they're already code-generated by PPCGCodeGeneration. + if (S.isToBeSkipped()) + return false; + AI = &getAnalysis<IslAstInfoWrapperPass>().getAI(); LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo(); DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree(); |
