[PATCH] D156928: [Clang][AMDGPU] Fix handling of -mcode-object-version=none arg

2023-08-07 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam added a comment. In D156928#4565506 , @jhuber6 wrote: > In D156928#4562239 , > @JonChesterfield wrote: > >> Or, the front end could define those objects directly, without importing IR >> files that

[PATCH] D156928: [Clang][AMDGPU] Fix handling of -mcode-object-version=none arg

2023-08-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D156928#4562239 , @JonChesterfield wrote: > Or, the front end could define those objects directly, without importing IR > files that define the objects with the content clang used to choose the > object file. E.g. instead

[PATCH] D156928: [Clang][AMDGPU] Fix handling of -mcode-object-version=none arg

2023-08-04 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. In D156928#4562412 , @yaxunl wrote: > Some control variables are per-module. Clang cannot emit control variables > that have different values for different modules. Intrinsics should work > since it can take an argument

[PATCH] D156928: [Clang][AMDGPU] Fix handling of -mcode-object-version=none arg

2023-08-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D156928#4562239 , @JonChesterfield wrote: > Or, the front end could define those objects directly, without importing IR > files that define the objects with the content clang used to choose the > object file. E.g. instead of

[PATCH] D156928: [Clang][AMDGPU] Fix handling of -mcode-object-version=none arg

2023-08-04 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. Or, the front end could define those objects directly, without importing IR files that define the objects with the content clang used to choose the object file. E.g. instead of the argument daz=off (spelled differently) finding a file called daz.off.ll that

[PATCH] D156928: [Clang][AMDGPU] Fix handling of -mcode-object-version=none arg

2023-08-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D156928#4562023 , @yaxunl wrote: > In D156928#4561890 , > @JonChesterfield wrote: > >> In D156928#4561849 , @arsenm wrote: >> >>> In

[PATCH] D156928: [Clang][AMDGPU] Fix handling of -mcode-object-version=none arg

2023-08-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D156928#4561890 , @JonChesterfield wrote: > In D156928#4561849 , @arsenm wrote: > >> In D156928#4561811 , >> @JonChesterfield wrote: >> >>>

[PATCH] D156928: [Clang][AMDGPU] Fix handling of -mcode-object-version=none arg

2023-08-04 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. In D156928#4561849 , @arsenm wrote: > In D156928#4561811 , > @JonChesterfield wrote: > >> What does code objects version= none mean? > > Handle any version So... That should be

[PATCH] D156928: [Clang][AMDGPU] Fix handling of -mcode-object-version=none arg

2023-08-04 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D156928#4561811 , @JonChesterfield wrote: > What does code objects version= none mean? Handle any version Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156928/new/

[PATCH] D156928: [Clang][AMDGPU] Fix handling of -mcode-object-version=none arg

2023-08-04 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. What does code objects version= none mean? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156928/new/ https://reviews.llvm.org/D156928 ___ cfe-commits mailing list

[PATCH] D156928: [Clang][AMDGPU] Fix handling of -mcode-object-version=none arg

2023-08-04 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam marked 2 inline comments as done. saiislam added a comment. In D156928#4555121 , @yaxunl wrote: > `-mcode-object-version=none` was intentionally designed to work with `clang > -cc1` only, since it does not work with clang driver if users link

[PATCH] D156928: [Clang][AMDGPU] Fix handling of -mcode-object-version=none arg

2023-08-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D156928#4555121 , @yaxunl wrote: > `-mcode-object-version=none` was intentionally designed to work with `clang > -cc1` only, since it does not work with clang driver if users link with > device library. Device library can

[PATCH] D156928: [Clang][AMDGPU] Fix handling of -mcode-object-version=none arg

2023-08-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. `-mcode-object-version=none` was intentionally designed to work with `clang -cc1` only, since it does not work with clang driver if users link with device library. Device library can still use it by using it with `-Xclang`. Repository: rG LLVM Github Monorepo

[PATCH] D156928: [Clang][AMDGPU] Fix handling of -mcode-object-version=none arg

2023-08-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/include/clang/Basic/TargetOptions.h:90 +COV_Default = 400, +COV_MAX = 500 }; Typically we just put a `COV_LAST` to indicate that it's over the accepted enumerations. Comment at:

[PATCH] D156928: [Clang][AMDGPU] Fix handling of -mcode-object-version=none arg

2023-08-02 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. missing tests Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1066 +if (!IsCC1As) { + std::string CodeObjVerStr = (CodeObjVer ? Twine(CodeObjVer) : "none").str(); CmdArgs.insert(CmdArgs.begin() + 1, don't need to go

[PATCH] D156928: [Clang][AMDGPU] Fix handling of -mcode-object-version=none arg

2023-08-02 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam created this revision. saiislam added reviewers: jhuber6, yaxunl. Herald added subscribers: tpr, dstuttard, kzhuravl. Herald added a project: All. saiislam requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, wdng. Herald added a project: clang.