Divergence analysis for GPU programs
authorJingyue Wu <jingyue@google.com>
Fri, 10 Apr 2015 05:03:50 +0000 (05:03 +0000)
committerJingyue Wu <jingyue@google.com>
Fri, 10 Apr 2015 05:03:50 +0000 (05:03 +0000)
commit5733100450b4935784b3d352160cfe6424cec226
treefe832198bac7008a9b7d66f26c3db3b59c3af5d9
parentd480d308b0d3e9d5b7657de69cd3ac24d2acd4cf
Divergence analysis for GPU programs

Summary:
Some optimizations such as jump threading and loop unswitching can negatively
affect performance when applied to divergent branches. The divergence analysis
added in this patch conservatively estimates which branches in a GPU program
can diverge. This information can then help LLVM to run certain optimizations
selectively.

Test Plan: test/Analysis/DivergenceAnalysis/NVPTX/diverge.ll

Reviewers: resistor, hfinkel, eliben, meheff, jholewinski

Subscribers: broune, bjarke.roune, madhur13490, tstellarAMD, dberlin, echristo, jholewinski, llvm-commits

Differential Revision: http://reviews.llvm.org/D8576

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234567 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
include/llvm/Analysis/Passes.h
include/llvm/Analysis/TargetTransformInfo.h
include/llvm/Analysis/TargetTransformInfoImpl.h
include/llvm/CodeGen/BasicTTIImpl.h
include/llvm/InitializePasses.h
include/llvm/LinkAllPasses.h
lib/Analysis/Analysis.cpp
lib/Analysis/CMakeLists.txt
lib/Analysis/DivergenceAnalysis.cpp [new file with mode: 0644]
lib/Analysis/TargetTransformInfo.cpp
lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp
lib/Target/NVPTX/NVPTXTargetTransformInfo.h
test/Analysis/DivergenceAnalysis/NVPTX/diverge.ll [new file with mode: 0644]
test/Analysis/DivergenceAnalysis/NVPTX/lit.local.cfg [new file with mode: 0644]