[PATCH] D100492: [OpenCL] Change OpenCL builtin version encoding

2021-04-27 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. Thanks for experimenting! I have pushed 37bc1dc9877f ("[NFC] Workaround MSVC2019 32-bit compiler crash", 2021-04-27). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D100492: [OpenCL] Change OpenCL builtin version encoding

2021-04-26 Thread Steven Johnson via Phabricator via cfe-commits
srj added a comment. In D100492#2717235 , @svenvh wrote: > I am happy to make/accept any adjustments to this patch to fix the particular > build. I don't have access to MSVC though, would you be able to help figure > out what the problematic construct

[PATCH] D100492: [OpenCL] Change OpenCL builtin version encoding

2021-04-26 Thread Steven Johnson via Phabricator via cfe-commits
srj added a comment. (This is clearly just a weird bug on MSVC's part; there's nothing about the code here that seems obviously unreasonable or complex. Working around compiler bugs is a thing, alas.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D100492: [OpenCL] Change OpenCL builtin version encoding

2021-04-26 Thread Steven Johnson via Phabricator via cfe-commits
srj added a comment. From experimentation, it appears that just pulling the MinVersion and MaxVersion expressions from `BuiltinNameEmitter::EmitBuiltinTable` into separate statements will pacify MSVC, e.g. auto MinVersion = Overload.first->getValueAsDef("MinVersion")->getValueAsInt("ID");

[PATCH] D100492: [OpenCL] Change OpenCL builtin version encoding

2021-04-26 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. In D100492#2717232 , @srj wrote: > This change appears to be the injection point for > https://bugs.llvm.org/show_bug.cgi?id=50128 -- trying to build clang-tblgen > after this change crashes VC2019 if targeting 32-bit Windows (se

[PATCH] D100492: [OpenCL] Change OpenCL builtin version encoding

2021-04-26 Thread Steven Johnson via Phabricator via cfe-commits
srj added a comment. This change appears to be the injection point for https://bugs.llvm.org/show_bug.cgi?id=50128 -- trying to build clang-tblgen after this change crashes VC2019 if targeting 32-bit Windows (see below). While this is likely an MSVC bug, I presume we still want to support cross

[PATCH] D100492: [OpenCL] Change OpenCL builtin version encoding

2021-04-19 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG6cb7631df348: [OpenCL] Change OpenCL builtin version encoding (authored by svenvh). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D100492: [OpenCL] Change OpenCL builtin version encoding

2021-04-15 Thread Anton Zabaznov via Phabricator via cfe-commits
azabaznov added inline comments. Comment at: clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp:507 +if (VersionIDs[I] >= MinVersion && VersionIDs[I] < MaxVersion) { + Encoded |= 1 << I; +} svenvh wrote: > azabaznov wrote: > > nit: Encoded |= clang::

[PATCH] D100492: [OpenCL] Change OpenCL builtin version encoding

2021-04-15 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp:507 +if (VersionIDs[I] >= MinVersion && VersionIDs[I] < MaxVersion) { + Encoded |= 1 << I; +} azabaznov wrote: > nit: Encoded |= clang::encodeOpenCLVersion(V

[PATCH] D100492: [OpenCL] Change OpenCL builtin version encoding

2021-04-15 Thread Anton Zabaznov via Phabricator via cfe-commits
azabaznov accepted this revision. azabaznov added a comment. This revision is now accepted and ready to land. Great! And thanks for fixing misprint :) Comment at: clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp:507 +if (VersionIDs[I] >= MinVersion && VersionIDs[I] < MaxV

[PATCH] D100492: [OpenCL] Change OpenCL builtin version encoding

2021-04-14 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: azabaznov. svenvh added a project: clang. Herald added subscribers: ldrumm, yaxunl. svenvh requested review of this revision. Herald added a subscriber: cfe-commits. Instead of using a MinVersion and MaxVersion field, encode the version of a b