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

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 14 16:47:39 PDT 2020


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.

The optimization introduced in D83271 <https://reviews.llvm.org/D83271> will verify a safety and a
precautionary condition. Until we find a proper solution for the former
we allow users to disable the check. If they do it and violate the
problematic (but probably unlikely) case, they will see UB, most likely
a crash when a non-function pointer is called. The flag has the word
`unsafe` in the name and the remarks are adjusted to provide some
insight what is happening.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83832

Files:
  clang/test/OpenMP/remarks_parallel_in_target_state_machine.c
  llvm/lib/Transforms/IPO/OpenMPOpt.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83832.278021.patch
Type: text/x-patch
Size: 12748 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200714/e89c1e20/attachment-0001.bin>


More information about the cfe-commits mailing list