-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OpenMP] Remove 'keep_alive' functionality from the device RTL
The OpenMP DeviceRTL uses a hacky workaround to keep certain runtime calls alive. This used a function that prevented them from being optimized out. We needed this hack because the 'OpenMPOpt' pass likes to introduce new runtime calls into the TU. This then interacted badly with the method of linking the bitcode file per-TU like we do with Nvidia. The OpenMPOpt pass would then generate a runtime call to a function that was never linked in. This should not be a problem anymore because we unconditionally link in the `libomptarget.devicertl.a` runtime library. This should thus only extract symbols that are undefined. So, if we do end up with an unresolved reference it will be resolved by the static library. The downside to this is that if we are doing non-LTO NVPTX compilation that introduces one of these calls it will be linked outside the module and therefore provide the overhead of an external function call. However, removing this flag should make optimizing things easier. We will need to see if that performance is a problem. Reviewed By: ye-luo Differential Revision: https://reviews.llvm.org/D151324
- Loading branch information
Showing
3 changed files
with
4 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ __kmpc_* | |
|
||
_ZN4ompx* | ||
|
||
__keep_alive | ||
IsSPMDMode | ||
|
||
memcmp | ||
|