diff options
| author | Zhigang Gong <zhigang.gong@intel.com> | 2014-03-26 13:45:56 +0800 |
|---|---|---|
| committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-04-08 16:00:49 +0800 |
| commit | d93f4c9d494e16978bdbcdc2525314c13f0b6f2d (patch) | |
| tree | 129120c157ba2191696b5e5d2a9ee6e19f90acab /backend/src/CMakeLists.txt | |
| parent | 684608ba6459c8a987ead861a7efa22979e79c4c (diff) | |
GBE: Add a new pass to handle barrier function's noduplicate attribute correctly.
This pass is to remove or add noduplicate function attribute for barrier functions.
Basically, we want to set NoDuplicate for those __gen_barrier_xxx functions. But if
a sub function calls those barrier functions, the sub function will not be inlined
in llvm's inlining pass. This is what we don't want. As inlining such a function in
the caller is safe, we just don't want it to duplicate the call. So Introduce this
pass to remove the NoDuplicate function attribute before the inlining pass and restore
it after.
v2:
fix the module changed check.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
Diffstat (limited to 'backend/src/CMakeLists.txt')
| -rw-r--r-- | backend/src/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/backend/src/CMakeLists.txt b/backend/src/CMakeLists.txt index 6e37d95d..d6f2d3c6 100644 --- a/backend/src/CMakeLists.txt +++ b/backend/src/CMakeLists.txt @@ -144,6 +144,7 @@ else (GBE_USE_BLOB) llvm/llvm_passes.cpp llvm/llvm_scalarize.cpp llvm/llvm_intrinsic_lowering.cpp + llvm/llvm_barrier_nodup.cpp llvm/llvm_to_gen.cpp llvm/llvm_gen_backend.hpp llvm/llvm_gen_ocl_function.hxx |
