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

Sergey Dmitriev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 16 18:10:31 PDT 2019


sdmitriev marked 2 inline comments as done.
sdmitriev added inline comments.


================
Comment at: clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp:72
+private:
+  IntegerType *getSizeTTy() {
+    switch (M.getDataLayout().getPointerTypeSize(Type::getInt8PtrTy(C))) {
----------------
ABataev wrote:
> 1. Markt it `const`.
> 2. This still is not the best solution, since `size_t` not necessarily has the pointer size. I don't know if there is a better solution. @hfinkel? If this is the best, why not just to use `getIntPtrType(C)`?
It cannot be const because of Type::getIntXXTy(LLVMContext &C) calls.


================
Comment at: clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp:171
+  // Global variable that represents BinDesc is returned.
+  GlobalVariable *createBinDesc(const SmallVectorImpl<MemoryBufferRef> &Bufs) {
+    // Create external begin/end symbols for the offload entries table.
----------------
ABataev wrote:
> Use `ArrayRef` instead of `const SmallVectorImpl &`
Done. And I have also changed MemoryBufferRef => ArrayRef (as you earlier suggested).


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

https://reviews.llvm.org/D64943





More information about the cfe-commits mailing list