[PATCH] D70551: [clang-offload-wrapper] Add data layout to the wrapper bitcode

2019-11-22 Thread Sergey Dmitriev via Phabricator via cfe-commits
sdmitriev added a comment. Wrapper tool is invoked at link phase, therefore there just could be no .bc files available to read data layout from. Ok, looks like there is no good solution for the data layout problem, so I will drop the idea of passing wrapper .bc directly to the linker when LTO

[PATCH] D70551: [clang-offload-wrapper] Add data layout to the wrapper bitcode

2019-11-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D70551#1757065 , @sdmitriev wrote: > I would agree with you if data layout was indeed available in the driver, but > unfortunately driver does not have access to any existing TargetInfo instance > (or maybe I just have not

[PATCH] D70551: [clang-offload-wrapper] Add data layout to the wrapper bitcode

2019-11-22 Thread Sergey Dmitriev via Phabricator via cfe-commits
sdmitriev added a comment. I would agree with you if data layout was indeed available in the driver, but unfortunately driver does not have access to any existing TargetInfo instance (or maybe I just have not found it). So, I have to create TargetInfo and build data layout even for the case

[PATCH] D70551: [clang-offload-wrapper] Add data layout to the wrapper bitcode

2019-11-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D70551#1756997 , @sdmitriev wrote: > Ok, it is possible to do it like you suggested, but I think that teaching > wrapper tool to set data layout without external help is more preferable. > There is a certain difference

[PATCH] D70551: [clang-offload-wrapper] Add data layout to the wrapper bitcode

2019-11-22 Thread Sergey Dmitriev via Phabricator via cfe-commits
sdmitriev added a comment. Ok, it is possible to do it like you suggested, but I think that teaching wrapper tool to set data layout without external help is more preferable. There is a certain difference between opt and wrapper tool – opt works on the existing .bc that is provided in command

[PATCH] D70551: [clang-offload-wrapper] Add data layout to the wrapper bitcode

2019-11-21 Thread Sergey Dmitriev via Phabricator via cfe-commits
sdmitriev added a comment. In D70551#1755768 , @ABataev wrote: > In D70551#1755761 , @sdmitriev wrote: > > > In D70551#1755583 , @ABataev wrote: > > > > > In D70551#173

[PATCH] D70551: [clang-offload-wrapper] Add data layout to the wrapper bitcode

2019-11-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D70551#1755761 , @sdmitriev wrote: > In D70551#1755583 , @ABataev wrote: > > > In D70551#173 , @sdmitriev > > wrote: > > > > > In

[PATCH] D70551: [clang-offload-wrapper] Add data layout to the wrapper bitcode

2019-11-21 Thread Sergey Dmitriev via Phabricator via cfe-commits
sdmitriev added a comment. In D70551#1755583 , @ABataev wrote: > In D70551#173 , @sdmitriev wrote: > > > In D70551#1755527 , @ABataev wrote: > > > > > Why do we need

[PATCH] D70551: [clang-offload-wrapper] Add data layout to the wrapper bitcode

2019-11-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D70551#173 , @sdmitriev wrote: > In D70551#1755527 , @ABataev wrote: > > > Why do we need this? > > > To pass wrapper bitcode directly to the linker when LTO is enabled. LTO >

[PATCH] D70551: [clang-offload-wrapper] Add data layout to the wrapper bitcode

2019-11-21 Thread Sergey Dmitriev via Phabricator via cfe-commits
sdmitriev added a comment. In D70551#1755527 , @ABataev wrote: > Why do we need this? To pass wrapper bitcode directly to the linker when LTO is enabled. LTO plugin does not accept bc if there is no data layout. Repository: rG LLVM Github Monorepo

[PATCH] D70551: [clang-offload-wrapper] Add data layout to the wrapper bitcode

2019-11-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Why do we need this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70551/new/ https://reviews.llvm.org/D70551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D70551: [clang-offload-wrapper] Add data layout to the wrapper bitcode

2019-11-21 Thread Sergey Dmitriev via Phabricator via cfe-commits
sdmitriev created this revision. sdmitriev added a reviewer: ABataev. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D70551 Files: clang/test/Driver/clang-offload-wrapper.c