[PATCH] D64943: [Clang][OpenMP offload] Eliminate use of OpenMP linker script

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 5 16:23:29 PDT 2019


ABataev added inline comments.


================
Comment at: clang/include/clang/Driver/Action.h:74
     OffloadUnbundlingJobClass,
+    OffloadWrapperJobClass,
 
----------------
Do we really need this new kind of job here, can we use bundler instead?


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9748
+  // If we have offloading in the current module, we need to emit the entries.
   createOffloadEntriesAndInfoMetadata();
 }
----------------
Do not emit it for the devices and simd only mode. Also, would be good to assert if no devices triples were specified.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.h:1470
+  /// was emitted in the current module.
+  virtual void emitOffloadTables();
 
----------------
Ithink, you can drop `virtual` here and remove overridden version from the CGOpenMPRuntimeSimd. Instead, just check for OpenMP simd mode in the original function and just early exit in this case.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64943/new/

https://reviews.llvm.org/D64943





More information about the cfe-commits mailing list