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

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 22 09:49:14 PST 2019


ABataev added a comment.

In D70551#1756997 <https://reviews.llvm.org/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 between opt and wrapper tool – opt works on the existing .bc that is provided in command line and data-layout option just gives user an optional way to override input’s data layout while wrapper tool creates output .bc from scratch. With your proposal, data-layout would become sort of mandatory option for the wrapper tool which is not very convenient. I believe wrapper tool should be able to set it without external help, and we can always add an option to override data layout (similar to opt) if there would be a need for that.


Why it is not convenient? Plus, when you're trying to build the data layout yourself, you end up with the default one for the given target rather than rely on the one specified by the user when the driver was invoked. So, I think, it would be better to get the data layout from the driver rather than use the default one.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70551





More information about the cfe-commits mailing list