[PATCH] D83832: [OpenMP] Provide a flag to disable safety checks for GPU optimizations

2020-07-15 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield accepted this revision. JonChesterfield added a comment. This revision is now accepted and ready to land. I think this is good. It's dangerous, but it's also undocumented and has unsafe in the name. I should be able to use this to sidestep limitations in the amdgpu function

[PATCH] D83832: [OpenMP] Provide a flag to disable safety checks for GPU optimizations

2020-07-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D83832#2152027 , @JonChesterfield wrote: > I think there's an unfortunate interaction with link time optimisation here. > If there are external regions, but their code is combined with llvm-link > before codegen, then a

[PATCH] D83832: [OpenMP] Provide a flag to disable safety checks for GPU optimizations

2020-07-14 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. I think there's an unfortunate interaction with link time optimisation here. If there are external regions, but their code is combined with llvm-link before codegen, then a user could reasonably assume this flag is safe. Would it would be correct to compile the

[PATCH] D83832: [OpenMP] Provide a flag to disable safety checks for GPU optimizations

2020-07-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: jhuber6, fghanim, JonChesterfield, grokos, AndreyChurbanov, ye-luo, tianshilei1992, ggeorgakoudis. Herald added subscribers: llvm-commits, cfe-commits, sstefan1, guansong, bollu, hiraditya, yaxunl. Herald added projects: clang, LLVM.