[PATCH] D128845: [HLSL]Add -O and -Od option for dxc mode.

2022-07-12 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:575 + if (IK.getLanguage() == Language::HLSL) +DefaultOpt = llvm::CodeGenOpt::Aggressive; Is there a way to tie this to using the DXC driver instead of the language option?

[PATCH] D128462: [HLSL] add -I option for dxc mode.

2022-07-12 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Driver/Options.td:6851 Group, Flags<[DXCOption, NoXarchOption]>, Alias; +def dxc_I : DXCJoinedOrSeparateConflict<"I">, + HelpText<"Add directory to include search path">, This option has the same be

[PATCH] D128462: [HLSL] add -I option for dxc mode.

2022-07-12 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Driver/Options.td:6851 Group, Flags<[DXCOption, NoXarchOption]>, Alias; +def dxc_I : DXCJoinedOrSeparateConflict<"I">, + HelpText<"Add directory to include search path">, beanz wrote: > This option

[PATCH] D128462: [HLSL] add -I option for dxc mode.

2022-07-13 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Driver/Options.td:6824 +class DXCJoinedOrSeparateConflict : Option<["--", "/", "-"], name, + KIND_JOINED_OR_SEPARATE>, Group, Flags<[DXCOption, NoXarchOption]>; python3kgae wrote: > pow2clk wrote: >

[PATCH] D128462: [HLSL] add -I option for dxc mode.

2022-07-13 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Driver/Options.td:6824 +class DXCJoinedOrSeparateConflict : Option<["--", "/", "-"], name, + KIND_JOINED_OR_SEPARATE>, Group, Flags<[DXCOption, NoXarchOption]>; python3kgae wrote: > beanz wrote: > >

[PATCH] D109977: LLVM Driver Multicall tool

2022-07-14 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D109977#3652091 , @abrachet wrote: > In D109977#3611683 , @mgorny wrote: > >> This seems to have broken standalone builds for Gentoo. >> >> While building Clang, I get: >> >> CMake Erro

[PATCH] D128462: [HLSL] add -I option for dxc mode.

2022-07-14 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Driver/Options.td:6318 + HelpText<"CL.EXE COMPATIBILITY OPTIONS">; + def cl_compile_Group : OptionGroup<"">, Do we need this group or can it just be `cl_Group`? Repository: rG LLVM Github Monorepo

[PATCH] D128462: [HLSL] add -I option for dxc mode.

2022-07-14 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. This change works and avoids the duplicated group. The duplicated group results in the help spew duplicating the group heading, which is undesirable. diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 6dd4ec82d376..2dcdbae

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-07-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Parse/Parser.h:2820 SourceLocation *EndLoc = nullptr); + Decl *ParseCTBuffer(SourceLocation &DeclEnd, + SourceLocation InlineLoc = SourceLocation()); nit

[PATCH] D130016: [HLSL] Add __builtin_hlsl_create_handle

2022-07-18 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, Anastasia, kuhar, bogner, python3kgae. Herald added a project: All. beanz requested review of this revision. Herald added projects: clang, LLVM. Herald added a subscriber: llvm-commits. This is pretty straightforward, it just adds

[PATCH] D130017: [HLSL] Add RWBuffer default constructor

2022-07-18 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, Anastasia, kuhar, bogner, python3kgae. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. This fills out the default constructor for RWBuffer to assign the handle with the result of

[PATCH] D130018: [HLSL] Add HLSLResource attribute

2022-07-18 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, Anastasia, kuhar, bogner, python3kgae. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. HLSL Resource objects will have restrictions on use and codegen requirements. This patch is

[PATCH] D130019: [HLSL] CodeGen HLSL Resource annotations

2022-07-18 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, Anastasia, kuhar, bogner, python3kgae. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. HLSL Resource types need special annotations that the backend will use to build out metadat

[PATCH] D130016: [HLSL] Add __builtin_hlsl_create_handle

2022-07-18 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/CodeGenHLSL/builtins/create_handle.hlsl:4 +void fn() { + (void)__builtin_hlsl_create_handle(0); +} python3kgae wrote: > What does the parameter 0 mean here? > For the purposes of this test, the value doesn't m

[PATCH] D130019: [HLSL] CodeGen HLSL Resource annotations

2022-07-18 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 445572. beanz added a comment. Updating based on feedback from @python3kgae provided via chat. Because of the odd nature of DXIL, the DirectX backend needs to filter the module flags, for that reason it is easier to use a named metadata entry which can just be

[PATCH] D130055: Clang extensions yolo, woot & kaboom

2022-07-18 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, bogner, rnk, MaskRay, void. Herald added a subscriber: StephenFan. Herald added a reviewer: NoQ. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. Sometimes a default-initialized v

[PATCH] D130055: Clang extensions yolo, woot & kaboom

2022-07-19 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D130055#3662206 , @Szelethus wrote: > On another note, `kaboom` is interesting, shouldn't we assume all functions > to be `kaboom` unless proven to be `woot`? I won’t claim to have spent a whole lot of time thinking on this. Th

[PATCH] D130055: Clang extensions yolo, woot & kaboom

2022-07-19 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D130055#3663164 , @jkorous wrote: > It looks like there is a possibility that a free function, static method or a > method of another class (a `friend`?) should be `woot` for a specific > pointer/reference parameter. Oh! That'

[PATCH] D128462: [HLSL] add -I option for dxc mode.

2022-07-20 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128462/new/ https://reviews.llvm.org/D128462 ___ c

[PATCH] D125585: [HLSL][clang][Driver] Parse target profile early to update Driver::TargetTriple.

2022-05-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Driver/ToolChains/HLSL.h:32 Action::OffloadKind DeviceOffloadKind) const override; - std::string ComputeEffectiveClangTriple(const llvm::opt::ArgList &Args, - types::ID I

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-05-24 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:9887 + break; +case llvm::Triple::EnvironmentType::Compute: + ShaderType = HLSLShaderAttr::ShaderType::Compute; If the `HLSLShaderAttr::ShaderType` enum is properly ord

[PATCH] D66068: cmake: Make building clang-shlib optional

2019-08-20 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D66068#1636240 , @jvesely wrote: > sorry for the delay. I fully understand the need to reduce the number of > options. Having always used SHARED_LIBS build I remember weekly shared build > breakages. This is exactly what we wa

[PATCH] D67321: Respect CLANG_LINK_CLANG_DYLIB=ON in libclang and c-index-test

2019-09-09 Thread Chris Bieneman via Phabricator via cfe-commits
beanz requested changes to this revision. beanz added inline comments. This revision now requires changes to proceed. Comment at: clang/tools/libclang/CMakeLists.txt:115 +clang_target_link_libraries(libclang + PRIVATE + ${CLANG_LIB_DEPS} tstellar wrote: > aaron

[PATCH] D30155: [clang-tools-extra] [test] Fix clang library dir in LD_LIBRARY_PATH For stand-alone build

2017-08-03 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. Looks reasonable to me. Repository: rL LLVM https://reviews.llvm.org/D30155 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

[PATCH] D36349: [CMake] Build sanitized C++ runtimes for Fuchsia

2017-08-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. This also looks good to me. Repository: rL LLVM https://reviews.llvm.org/D36349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

[PATCH] D36541: [CMake] Include LLVMFuzzer in Fuchsia toolchain

2017-08-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. LGTM! Repository: rL LLVM https://reviews.llvm.org/D36541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D89177: [cmake] Add support for multiple distributions

2020-10-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D89177#2332547 , @ldionne wrote: > Are the runtimes expected to support this multi-distribution configuration? I > don't think we'd want to move libc++ towards building multiple configurations > at once in a single CMake invocat

[PATCH] D89177: [cmake] Add support for multiple distributions

2020-10-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D89177#2332627 , @ldionne wrote: > That isn't what I meant. It's entirely okay for the runtimes to be driven via > `AddExternalProject` like the runtimes build does, since that's akin to > having a separate CMake invocation for

[PATCH] D103547: Don't delete the module you're inspecting

2021-06-02 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: steven_wu, arphaman. beanz requested review of this revision. Herald added a project: clang. Prior to this patch when you used `clang -module-file-info` clang would delete the module on completion because the module was treated as an output file

[PATCH] D103547: Don't delete the module you're inspecting

2021-06-02 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 349350. beanz added a comment. Breaking out a separate test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103547/new/ https://reviews.llvm.org/D103547 Files: clang/lib/Driver/Driver.cpp clang/test/Modu

[PATCH] D109865: [NFC] `goto fail` has failed us in the past...

2021-09-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: rsmith, harlanhaskins, bkramer. beanz requested review of this revision. Herald added a project: clang. This patch replaces reliance on `goto failure` pattern with `llvm::scope_exit`. Repository: rG LLVM Github Monorepo https://reviews.llvm.

[PATCH] D108567: Implement #pragma clang final extension

2021-09-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3968-3984 +Final Macros + + +Clang supports the pragma ``#pragma clang final``, which can be used to +mark macros as final, meaning they cannot be undef'd or re-defined. For example: + +.. cod

[PATCH] D108567: Implement #pragma clang final extension

2021-09-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 372862. beanz added a comment. Updates based on feedback from @aaron.ballman. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108567/new/ https://reviews.llvm.org/D108567 Files: clang/docs/LanguageExtensions.rst

[PATCH] D109977: LLVM Driver Multicall tool

2021-09-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: leonardchan, phosek, MaskRay, compnerd, mehdi_amini. Herald added subscribers: rupprecht, mgorny. Herald added a reviewer: JDevlieghere. Herald added a reviewer: alexander-shaposhnikov. Herald added a reviewer: rupprecht. Herald added a reviewer:

[PATCH] D109977: LLVM Driver Multicall tool

2021-09-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D109977#3006687 , @mehdi_amini wrote: > That's pretty nice! Have you thought about looking into a lit option > (triggered by a cmake flag maybe) that would change the substitution for the > tools that are enabled by llvm-drive

[PATCH] D109977: LLVM Driver Multicall tool

2021-09-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: llvm/tools/llvm-driver/CMakeLists.txt:17 + +add_llvm_tool(llvm-driver + llvm-driver.cpp phosek wrote: > As was already suggested on D104686, I'd prefer naming this just `llvm` so > you can invoke tools with `llvm name` w

[PATCH] D109977: LLVM Driver Multicall tool

2021-09-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 373300. beanz added a comment. Renaming llvm-driver binary to llvm. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109977/new/ https://reviews.llvm.org/D109977 Files: clang/cmake/modules/AddClang.cmake clang/

[PATCH] D109977: LLVM Driver Multicall tool

2021-09-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: llvm/tools/llvm-objcopy/llvm-objcopy.cpp:404 -int main(int argc, char **argv) { +int llvm_objcopy_main(int argc, char **argv) { InitLLVM X(argc, argv); aganea wrote: > Shouldn't we say: > ``` > int objcopy_main(int ar

[PATCH] D109865: [NFC] `goto fail` has failed us in the past...

2021-09-21 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG744ec74b305a: [NFC] `goto fail` has failed us in the past... (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109865/new/ https://reviews.

[PATCH] D109865: [NFC] `goto fail` has failed us in the past...

2021-09-21 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a subscriber: lhames. beanz added a comment. I was talking with @lhames the other day about building a `doWithCleanup` abstraction that could take a labmda to perform and a lambda to cleanup on failure. I was thinking I may take a stab at that this week. Repository: rG LLVM Gith

[PATCH] D110278: Adding doWithCleanup abstraction

2021-09-22 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: lhames, dblaikie. Herald added subscribers: dexonsmith, mgorny. beanz requested review of this revision. Herald added projects: clang, LLVM. This patch adds a new `doWithCleanup` abstraction to LLVM that works with `llvm::Error`, `int`, `bool`, a

[PATCH] D108567: Implement #pragma clang final extension

2021-09-22 Thread Chris Bieneman via Phabricator via cfe-commits
beanz marked 3 inline comments as done and an inline comment as not done. beanz added a comment. Will push updates in a second. Comment at: clang/test/Lexer/final-macro.c:14 +// expected-warning@+2{{macro 'Foo' has been marked as final and should not be redefined}} +// expecte

[PATCH] D108567: Implement #pragma clang final extension

2021-09-22 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 374377. beanz added a comment. Updates based on feedback from @aaron.ballman. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108567/new/ https://reviews.llvm.org/D108567 Files: clang/docs/LanguageExtensions.rst

[PATCH] D108567: Implement #pragma clang final extension

2021-09-27 Thread Chris Bieneman 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 rG1e48ef20358f: Implement #pragma clang final extension (authored by beanz). Changed prior to commit: https://reviews.llvm.org/D108567?vs=374377&id=

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-28 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, rsmith, RKSimon, dexonsmith. beanz requested review of this revision. Herald added a project: clang. When defining a statically sized array with explicit array initializers, having a warning for uninitialized members is nice. This

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-28 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 375711. beanz added a comment. Updating so that the warning doesn't fire on an empty initializer list. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110656/new/ https://reviews.llvm.org/D110656 Files: clang/in

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-29 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. I would greatly prefer to enable this by default, so let me build a toolchain and see how it holds up. The empty initializer list extension is pretty widely supported, so I single zero-initialization is way less common these days, but I'll look. Repository: rG LLVM Gi

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Even just building Clang with this enabled revealed... a lot... Some of them are easy to address (having tablegen disable the warning in generated code), some of them are exactly the kind of thing I wanted to warn on, and some of them are more complicated. Based on that

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D110656#3034083 , @xbolva00 wrote: > Why just no special case "= {0};" pattern and do not warn in that case? This case did show up, but was not the majority of issues for LLVM (although might be the majority we care about). The

[PATCH] D103547: Don't delete the module you're inspecting

2021-06-03 Thread Chris Bieneman 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 rG13a9b2220f22: Don't delete the module you're inspecting (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D107095: Implement #pragma clang header_unsafe

2021-08-02 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a reviewer: lattner. beanz added a subscriber: lattner. beanz added a comment. +@lattner, Chris provided some post-commit feedback on the macro deprecation patch, I'll address his feedback here since I'm touching the same code. Chris' feedback is: > /clang/lib/Lex/Preprocessor.cpp:

[PATCH] D107095: Implement #pragma clang header_unsafe

2021-08-02 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 363550. beanz added a comment. Updates based on post-commit feedback from @lattner on D106732 . This should inline the determination for emitting warnings, but keep the actual warning emission in a call. Repository: rG LLV

[PATCH] D107095: Implement #pragma clang header_unsafe

2021-08-09 Thread Chris Bieneman via Phabricator via cfe-commits
beanz marked 5 inline comments as done. beanz added a comment. @aaron.ballman, thanks for the feedback! Some comments, but I'll work on updated patches and try to get them up tonight or tomorrow morning. Comment at: clang/docs/LanguageExtensions.rst:3913 +Clang supports the p

[PATCH] D107095: Implement #pragma clang header_unsafe

2021-08-09 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 365322. beanz added a comment. Addressing feedback by @aaron.ballman. If the pattern I used for the note diagnostic is good here, I'll apply it to the deprecated extension too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D107095: Implement #pragma clang header_unsafe

2021-08-09 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 365324. beanz added a comment. Updating documentation to be more clear about the behavior. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107095/new/ https://reviews.llvm.org/D107095 Files: clang/docs/LanguageE

[PATCH] D107095: Implement #pragma clang header_unsafe

2021-08-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/Lexer/Inputs/unsafe-macro-2.h:23-26 +// not-expected-warning@+1{{macro 'UNSAFE_MACRO_2' has been marked as unsafe for use in headers}} +#undef UNSAFE_MACRO_2 +// not-expected-warning@+1{{macro 'UNSAFE_MACRO_2' has been marked a

[PATCH] D107095: Implement #pragma clang header_unsafe

2021-08-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/Lexer/Inputs/unsafe-macro-2.h:23-26 +// not-expected-warning@+1{{macro 'UNSAFE_MACRO_2' has been marked as unsafe for use in headers}} +#undef UNSAFE_MACRO_2 +// not-expected-warning@+1{{macro 'UNSAFE_MACRO_2' has been marked a

[PATCH] D107095: Implement #pragma clang header_unsafe

2021-08-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 365487. beanz added a comment. Updated docs, added header-unsafe-macro diag group, and added test case to verify that the -Wpedantic-macros warnings don't trip on eachother. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D107095: Implement #pragma clang header_unsafe

2021-08-11 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a reviewer: lebedev.ri. beanz added a subscriber: lebedev.ri. beanz added a comment. +@lebedev.ri @aaron.ballman thank you for all the feedback and support! I'm not really sure where to go on the naming. I'm not attached to `header_unsafe`, and totally understand the confusion. I do

[PATCH] D108567: Implement #pragma clang final extension

2021-11-11 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D108567#3110925 , @sberg wrote: > does not produce any warnings/errors for me and indicates that NULL silently > gets redefined as a null pointer constant in stddef.h. Is that intended? Nope, that's a bug. Fixed in 3e7ad1f2b2c

[PATCH] D98291: [compiler-rt] Fix stale incremental builds when using `LLVM_BUILD_EXTERNAL_COMPILER_RT=ON`.

2021-03-09 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. So... this patch is fine. (marked as approved). That said, we should really be working to remove the `LLVM_BUILD_EXTERNAL_COMPILER_RT` option entirely in favor of just using `LLVM_ENABLE_RUNTIME

[PATCH] D98291: [compiler-rt] Fix stale incremental builds when using `LLVM_BUILD_EXTERNAL_COMPILER_RT=ON`.

2021-03-09 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D98291#2615663 , @delcypher wrote: > The fact that we have 3 different ways to build compiler-rt in LLVM makes me > sad. There should only be 1. I don't have time to do it now but I've filed a > radar to do this work at some poi

[PATCH] D98291: [compiler-rt] Fix stale incremental builds when using `LLVM_BUILD_EXTERNAL_COMPILER_RT=ON`.

2021-03-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. This should not impact the Apple Clang releases since those are always clean builds. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98291/new/ https://reviews.llvm.org/D98291 ___ c

[PATCH] D135110: [NFC] [HLSL] Move common metadata to LLVMFrontend

2022-10-18 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. I think I have a fix for this and I'll get it up today. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135110/new/ https://reviews.llvm.org/D135110 ___ cfe-commits mailing list cfe-

[PATCH] D135110: [NFC] [HLSL] Move common metadata to LLVMFrontend

2022-10-18 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. The llvm-config test issue should be resolved in rGa4b010034f57 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135110/new/ https://reviews.llvm.org/D135110

[PATCH] D133983: [HLSL] Add SV_DispatchThreadID

2022-10-18 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133983/new/ https://reviews.llvm.org/D133983 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D135429: [HLSL] [DirectX backend] Move generateGlobalCtorDtorCalls into DirectX backend.

2022-10-19 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. I don’t think you should be deleting all those frontend tests. Those tests existed before your change to remove the global constructor global variable, they provide valuable coverage of the frontend constructor generation. Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D135429: [HLSL] [DirectX backend] Move generateGlobalCtorDtorCalls into DirectX backend.

2022-10-19 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In addition to restoring the test cases that you deleted, I think you should also reduce and simplify the test cases you're adding. These new tests are very large blobs of IR generated by clang. They include a lot of extra instructions that aren't needed to exercise the c

[PATCH] D135429: [HLSL] [DirectX backend] Move generateGlobalCtorDtorCalls into DirectX backend.

2022-10-19 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:193 - -void CGHLSLRuntime::generateGlobalCtorDtorCalls() { - llvm::Module &M = CGM.getModule(); I think you've been a bit too aggressive about what code you're moving. The code that ge

[PATCH] D135973: Move HLSL builtins into hlsl namespace

2022-10-19 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd146a5241c50: Move HLSL builtins into hlsl namespace (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135973/new/ https://reviews.llvm.org

[PATCH] D136271: [HLSL] Remove unused frontend-generated ID

2022-10-19 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added a reviewer: python3kgae. Herald added subscribers: Anastasia, hiraditya. Herald added a project: All. beanz requested review of this revision. Herald added projects: clang, LLVM. Herald added a subscriber: llvm-commits. As @python3kgae pointed out we're goi

[PATCH] D136134: [NFC] [DirectX backend] move ResourceClass into llvm.

2022-10-20 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:20 #include "clang/Sema/Sema.h" +#include "llvm/Frontend/HLSL/HLSLResource.h" You need to add FrontendHLSL to the Sema/CMakeLists.txt file too. Repository: rG LLVM Github Mo

[PATCH] D136134: [NFC] [DirectX backend] move ResourceClass into llvm.

2022-10-20 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:20 #include "clang/Sema/Sema.h" +#include "llvm/Frontend/HLSL/HLSLResource.h" python3kgae wrote: > python3kgae wrote: > > beanz wrote: > > > You need to add FrontendHLSL to the

[PATCH] D136271: [HLSL] Remove unused frontend-generated ID

2022-10-21 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4c7218e77026: [HLSL] Remove unused frontend-generated ID (authored by beanz). Changed prior to commit: https://reviews.llvm.org/D136271?vs=468961&id=469681#toc Repository: rG LLVM Github Monorepo CH

[PATCH] D131718: [HLSL] Add abs library function

2022-08-11 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: tex3d, python3kgae, bogner, pow2clk, bob80905. Herald added a subscriber: Anastasia. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. This change exposes the abs library function for HLSL scalar

[PATCH] D131718: [HLSL] Add abs library function

2022-08-11 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 451974. beanz added a comment. Adding missing test coverage for 64-bit types Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131718/new/ https://reviews.llvm.org/D131718 Files: clang/lib/Headers/hlsl/hlsl_intrin

[PATCH] D131799: [HLSL] clang codeGen for HLSLNumThreadsAttr

2022-08-12 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:98 + if (HLSLNumThreadsAttr *NumThreadsAttr = FD->getAttr()) { +const StringRef NumThreadsKindStr = "dx.numthreads"; +std::string NumThreadsStr; This isn't DirectX-specific, so

[PATCH] D128845: [HLSL]Add -O and -Od option for dxc mode.

2022-08-12 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:47 +void addDisableOptimizations(llvm::Module &M) { + StringRef Key = "dx.disable_optimizations"; + M.addModuleFlag(llvm::Module::ModFlagBehavior::Override, Key, 1); What does this tra

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-12 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/CodeGenHLSL/buffer-array-operator.hlsl:3 + +const RWBuffer In; +RWBuffer Out; python3kgae wrote: > Why add const instead of using Buffer directly? > Making this const forces the const methods to be used. It is

[PATCH] D130131: [HLSL] CodeGen hlsl cbuffer/tbuffer.

2022-08-12 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Now that I'm seeing the code in D131370 , I don't know that this is the right way to do things. I think using address spaces like this is odd. Address spaces aren't really intended for use differentiating high level access types, but rath

[PATCH] D131755: [CMake] Explicit bootstrap options override any passthrough ones.

2022-08-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. Looks good to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131755/new/ https://reviews.llvm.org/D131755

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/SemaHLSL/resource_binding_attr_error.hlsl:15 +// expected-error@+1 {{invalid space specifier 's2' used; expected 'space' followed by an integer, like space1}} +cbuffer a : register(b0, s2) { + aaron.ballman wro

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-16 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/CodeGenHLSL/buffer-array-operator.hlsl:3 + +const RWBuffer In; +RWBuffer Out; python3kgae wrote: > beanz wrote: > > python3kgae wrote: > > > Why add const instead of using Buffer directly? > > > > > Making this

[PATCH] D132056: [HLSL] Restrict to supported targets

2022-08-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, bogner, python3kgae, pow2clk, jcranmer-intel. Herald added subscribers: Anastasia, JDevlieghere. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. Someday we would like to support

[PATCH] D131203: [HLSL] Initial codegen for SV_GroupIndex

2022-08-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 453418. beanz added a comment. Handling function attributes appropriately. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131203/new/ https://reviews.llvm.org/D131203 Files: clang/lib/AST/Mangle.cpp clang/lib

[PATCH] D130207: [HLSL] Move DXIL validation version out of ModuleFlags

2022-08-18 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. A few nitpicks, otherwise this looks good. Comment at: llvm/lib/Target/DirectX/DXILTranslateMetadata.cpp:61 -static void cleanModuleFlags(Module &M) { - constexpr StringLiteral DeadKeys[] = {ValVerKey}; - // Collect DeadKeys in ModuleFlags. - StringS

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-19 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/AST/Attr.h:193 +class HLSLAnnotationAttr : public InheritableAttr { +protected: aaron.ballman wrote: > Is this intended to be used only for parameters (that's how I read the > summary for the patch)?

[PATCH] D131799: [HLSL] clang codeGen for HLSLNumThreadsAttr

2022-08-19 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:103 + << NumThreadsAttr->getZ(); +OS.flush(); +F->addFnAttr(NumThreadsKindStr, NumThreadsStr); You can replace this whole chunk of code with: ``` std::string NumThreadsStr

[PATCH] D132421: [NFC] [HLSL] Add HLSLExternalSemaSource as ExternalSemaSource instead of ASTContext::ExternalSource.

2022-08-22 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. This change doesn't look like it is NFC to me. If I'm understanding correctly it results in the HLSLExternalSemaSource being set for Sema, but allows a different external source to be set for the AST context. That doesn't seem unreasonable to me, but perhaps we should hav

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-22 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 454676. beanz added a comment. Updating based on PR feedback from @Aaron.ballman. I changed around the diagnostics so that the error is on the function decl with a note pointing at the parameter declaration. Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D131203: [HLSL] Initial codegen for SV_GroupIndex

2022-08-22 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 454677. beanz added a comment. Updates based on review feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131203/new/ https://reviews.llvm.org/D131203 Files: clang/lib/AST/Mangle.cpp clang/lib/CodeGen/C

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-22 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/AST/Attr.h:193 +class HLSLAnnotationAttr : public InheritableAttr { +protected: aaron.ballman wrote: > beanz wrote: > > aaron.ballman wrote: > > > Is this intended to be used only for parameters (that

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-23 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 454892. beanz added a comment. Updates based on review feedback: - Wraped diagnostic text in td - Added FIXME for return type annotations Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131625/new/ https://reviews

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-08-23 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/SemaHLSL/pch.hlsl:5 +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl \ +// RUN: -finclude-default-header -include-pch %t -ast-dump-all /dev/null \ +// RUN: | FileCheck %s I want to make sure

[PATCH] D131718: [HLSL] Add abs library function

2022-08-23 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 454962. beanz added a comment. Herald added a subscriber: MaskRay. Updating with a fix for half type parameters. This addresses the issue I filed here: https://github.com/llvm/llvm-project/issues/57100 The issue was caused by HLSL not implying options to allow

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-23 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/SemaHLSL/Semantics/missing_entry_annotation.hlsl:1 +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -fsyntax-only -hlsl-entry main -verify %s + aaron.ballman wrote: > That's not needed, right?

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-23 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/SemaHLSL/Semantics/missing_entry_annotation.hlsl:1 +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -fsyntax-only -hlsl-entry main -verify %s + beanz wrote: > aaron.ballman wrote: > > That's n

[PATCH] D131718: [HLSL] Add abs library function

2022-08-24 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Driver/Options.td:6130 MarshallingInfoFlag>, ImpliedByAnyOf<[fnative_half_arguments_and_returns.KeyPath]>; def fdefault_calling_conv_EQ : Joined<["-"], "fdefault-calling-conv=">, bob80905 wrote:

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-24 Thread Chris Bieneman 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 rGbdf1327fea63: [HLSL] Entry functions require param annotation (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D131203: [HLSL] Initial codegen for SV_GroupIndex

2022-08-25 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG22c477f934c4: [HLSL] Initial codegen for SV_GroupIndex (authored by beanz). Changed prior to commit: https://reviews.llvm.org/D131203?vs=454677&id=455616#toc Repository: rG LLVM Github Monorepo CHAN

<    3   4   5   6   7   8   9   10   >