[PATCH] D87007: [clang-format] Correctly parse function declarations with TypenameMacros

2020-09-07 Thread Alexander Richardson 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 rG05147d330917: [clang-format] Correctly parse function declarations with TypenameMacros (authored by arichardson). Repository: rG LLVM Github Monor

[PATCH] D91055: [clang-tidy] Introduce misc No Integer To Pointer Cast check

2020-11-09 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. Nice! I wonder if this could be an off-by-default (maybe enabled by -Wpedantic) warning in clang instead? Diagnostics like this could be very useful for CHERI since our capabilities are in some way tracking provenance in hardware: we have bounds, permissions and a

[PATCH] D17993: [CodeGen] Apply 'nonnull' and 'dereferenceable(N)' to 'this' pointer arguments.

2020-11-17 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2169 +if (!CodeGenOpts.NullPointerIsValid && +getContext().getTargetAddressSpace(FI.arg_begin()->type) == 0) { + Attrs.addAttribute(llvm::Attribute::NonNull); Isn't the `

[PATCH] D17993: [CodeGen] Apply 'nonnull' and 'dereferenceable(N)' to 'this' pointer arguments.

2020-11-18 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2169 +if (!CodeGenOpts.NullPointerIsValid && +getContext().getTargetAddressSpace(FI.arg_begin()->type) == 0) { + Attrs.addAttribute(llvm::Attribute::NonNull); rjmccall wr

[PATCH] D17993: [CodeGen] Apply 'nonnull' and 'dereferenceable(N)' to 'this' pointer arguments.

2020-11-19 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2169 +if (!CodeGenOpts.NullPointerIsValid && +getContext().getTargetAddressSpace(FI.arg_begin()->type) == 0) { + Attrs.addAttribute(llvm::Attribute::NonNull); rjmccall wr

[PATCH] D84345: [AMDGPU] Set the default globals address space to 1

2020-11-20 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG51e09e1d5aa4: [AMDGPU] Set the default globals address space to 1 (authored by arichardson). Changed prior to commit: https://reviews.llvm.org/D84345?vs=289235&id=306693#toc Repository: rG LLVM Githu

[PATCH] D88952: [clang-format][tests] Fix MacroExpander lexer not parsing C++ keywords

2020-10-07 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: klimek, sammccall. Herald added a project: clang. Herald added a subscriber: cfe-commits. arichardson requested review of this revision. While debugging a different clang-format failure, I tried to reuse the MacroExpander lexer, but w

[PATCH] D86959: [clang-format] Fix formatting of _Atomic() qualifier

2020-10-07 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D86959#2313631 , @sammccall wrote: > Sorry to be really late here, but this patch regressed some macro definitions > like: > > #define lambda [](const decltype(x) &ptr) {} > > which now formats as > > #define lambda [](

[PATCH] D88956: [clang-format] Fix misformatted macro definitions after D86959

2020-10-07 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, sammccall, klimek, JakeMerdichAMD, curdeius. Herald added subscribers: cfe-commits, jfb. Herald added a project: clang. arichardson requested review of this revision. After D86959 the

[PATCH] D88956: [clang-format] Fix misformatted macro definitions after D86959

2020-10-07 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 296640. arichardson added a comment. remove unneccessary include Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88956/new/ https://reviews.llvm.org/D88956 Files: clang/lib/Format/TokenAnnotator.cpp clan

[PATCH] D86959: [clang-format] Fix formatting of _Atomic() qualifier

2020-10-07 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D86959#2316351 , @arichardson wrote: > In D86959#2313631 , @sammccall wrote: > >> Sorry to be really late here, but this patch regressed some macro >> definitions like: >> >> #defi

[PATCH] D88956: [clang-format] Fix misformatted macro definitions after D86959

2020-10-07 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:8333 +TEST_F(FormatTest, UnderstandsUsesOfStarAndAmpInMacroDefinition) { + // This is a regression test for mis-parsing the & after decltype as a binary klimek wrote: > I'd pu

[PATCH] D88227: [clang-format] Add a SpaceBeforePointerQualifiers style option

2020-10-07 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 296689. arichardson added a comment. Use an enum config option instead Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88227/new/ https://reviews.llvm.org/D88227 Files: clang/docs/ClangFormatStyleOptions.r

[PATCH] D87006: [clang-format][NFC] Store FormatToken::Type as an enum instead of bitfield

2020-10-07 Thread Alexander Richardson 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 rG0a3c82e85b73: [clang-format][NFC] Store FormatToken::Type as an enum instead of bitfield (authored by arichardson). Repository: rG LLVM Github Mon

[PATCH] D88952: [clang-format][tests] Fix MacroExpander lexer not parsing C++ keywords

2020-10-07 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGff6e4441b939: [clang-format][tests] Fix MacroExpander lexer not parsing C++ keywords (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D91428: Add support for multiple program address spaces

2020-11-23 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson requested changes to this revision. arichardson added a comment. I don't see why you would need multiple program address spaces to support calls to other address spaces. You can already do the following: define i32 @foo(i32) addrspace(1) { %ret = add i32 %0, 1 ret i32 %

[PATCH] D91428: Add support for multiple program address spaces

2020-11-23 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. The change to rename getProgramAddressSpace getDefaultProgramAddressSpace seems fine to me since it matches the GlobalsAddressSpace. By the way, your test already seems to work (if you add an explicit `call addrspace(1) void %ref()` for llc: https://godbolt.org/z/bq

[PATCH] D88227: [clang-format] Add a SpaceAroundPointerQualifiers style option

2020-10-18 Thread Alexander Richardson 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 rG9e27f38354e8: [clang-format] Add a SpaceAroundPointerQualifiers style option (authored by arichardson). Changed prior to commit: https://reviews.l

[PATCH] D88239: [clang-format] Fix spaces around */& in multi-variable declarations

2020-10-19 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88239/new/ https://reviews.llvm.org/D88239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D88956: [clang-format] Fix misformatted macro definitions after D86959

2020-10-19 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 299039. arichardson added a comment. Herald added a subscriber: mgorny. Split the token annotion test into a separate file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88956/new/ https://reviews.llvm.org/D

[PATCH] D88956: [clang-format] Fix misformatted macro definitions after D86959

2020-10-19 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 299054. arichardson added a comment. fix name of test class Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88956/new/ https://reviews.llvm.org/D88956 Files: clang/lib/Format/TokenAnnotator.cpp clang/uni

[PATCH] D84345: [AMDGPU] Set the default globals address space to 1

2020-10-19 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84345/new/ https://reviews.llvm.org/D84345 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D89708: Move clang/Tooling/Core/Lookup.h to clang/Tooling/Refactoring/Lookup.h

2020-10-19 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added a reviewer: bkramer. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. arichardson requested review of this revision. This allows removing the clangAST dependency from libclangToolingCore and therefore allows clang-fo

[PATCH] D89709: [clang-format] Drop clangFrontend dependency for FormatTests

2020-10-19 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: klimek, MyDeveloperDay. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. arichardson requested review of this revision. This allows building the clang-format unit tests in only 657 ninja steps rather than

[PATCH] D89708: Move clang/Tooling/Core/Lookup.h to clang/Tooling/Refactoring/Lookup.h

2020-10-20 Thread Alexander Richardson 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 rGa2214757e2ca: Move clang/Tooling/Core/Lookup.h to clang/Tooling/Refactoring/Lookup.h (authored by arichardson). Repository: rG LLVM Github Monorep

[PATCH] D89709: [clang-format] Drop clangFrontend dependency for FormatTests

2020-10-20 Thread Alexander Richardson 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 rG66a3b9073ac1: [clang-format] Drop clangFrontend dependency for FormatTests (authored by arichardson). Changed prior to commit: https://reviews.llv

[PATCH] D84345: [AMDGPU] Set the default globals address space to 1

2020-10-27 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. Herald added a subscriber: dexonsmith. ping @arsenm . I'd really like to land D70947 so that I can upstream further changes and that review is blocked on this one. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D88956: [clang-format] Fix misformatted macro definitions after D86959

2020-10-27 Thread Alexander Richardson 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 rG850325348ae8: [clang-format] Fix misformatted macro definitions after D86959 (authored by arichardson). Changed prior to commit: https://reviews.l

[PATCH] D90246: [clang-format] Improve BAS_DontAlign+AllowAllArgumentsOnNextLine=false

2020-10-27 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, klimek. Herald added subscribers: cfe-commits, krytarowski. Herald added a project: clang. arichardson requested review of this revision. TokenAnnotator::splitPenalty() was always returning 0 for openin

[PATCH] D90246: [clang-format] Improve BAS_DontAlign+AllowAllArgumentsOnNextLine=false

2020-11-02 Thread Alexander Richardson 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 rG906b9dbc9d74: [clang-format] Improve BAS_DontAlign+AllowAllArgumentsOnNextLine=false (authored by arichardson). Repository: rG LLVM Github Monorep

[PATCH] D109611: Fix CLANG_ENABLE_STATIC_ANALYZER=OFF building all analyzer source

2021-09-20 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6d7b3d6b3a8d: Fix CLANG_ENABLE_STATIC_ANALYZER=OFF building all analyzer source (authored by arichardson). Changed prior to commit: https://reviews.llvm.org/D109611?vs=371944&id=373554#toc Repository:

[PATCH] D109611: Fix CLANG_ENABLE_STATIC_ANALYZER=OFF building all analyzer source

2021-09-20 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D109611#3010353 , @thakis wrote: > This breaks the build for us: > > Running cmake -GNinja -DCMAKE_BUILD_TYPE=Release > -DLLVM_ENABLE_ASSERTIONS=ON > '-DLLVM_ENABLE_PROJECTS=clang;compiler-rt;lld;chrometools;clang-tools

[PATCH] D110612: [Utils] Use common substs in update_cc_test_checks

2021-09-28 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added reviewers: jdoerfert, ggeorgakoudis. arichardson added inline comments. Comment at: llvm/utils/update_cc_test_checks.py:223 def exec_run_line(exe): popen = subprocess.Popen(exe, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) std

[PATCH] D96838: CodeGen: Set !retain metadata on UsedAttr definitions for FreeBSD/Fuchsia/Linux

2021-02-18 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2071 + const llvm::Triple &T = getTarget().getTriple(); + if (T.isOSFreeBSD() || T.isOSLinux()) +GO->setMetadata(llvm::LLVMContext::MD_retain, phosek wrote: > Would it be pos

[PATCH] D104714: [UpdateCCTestChecks] Support --check-globals

2021-06-22 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson accepted this revision. arichardson added a comment. Thanks for working on this! We have some tests downstream that check globals and currently have to use `// UTC_ARGS: --disable` to manually retain them. The other update script tests compare to an expected output file instead of u

[PATCH] D95583: Frontend: Add -f{, no-}implicit-modules-uses-lock and -Rmodule-lock

2021-08-15 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/test/Modules/implicit-modules-use-lock.m:21 + +// CHECK-NO-LOCKS-NOT: remark: +// CHECK-LOCKS: remark: locking '{{.*}}.pcm' to build module 'X' [-Rmodule-lock] jansvoboda11 wrote: > dexonsmith wrote: > > jansv

[PATCH] D108110: Fix LLVM_ENABLE_THREADS check from 26a92d5852b2c6bf77efd26f6c0194c913f40285

2021-08-16 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: aaron.ballman, rsmith. Herald added a subscriber: dexonsmith. arichardson requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We should be using #if instead of #ifdef here since LL

[PATCH] D108211: Emit sizeof/alignof values as notes when a static_assert fails

2021-08-17 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: courbet, Quuxplusone, aaron.ballman. arichardson requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Trying to debug a static_assert(sizeof(foo) == ...) failure can be rather awkwa

[PATCH] D108212: Emit offsetof values as notes when a static_assert fails

2021-08-17 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: courbet, Quuxplusone, aaron.ballman. arichardson requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Trying to debug a static_assert(offset(foo, field) == ...) failure can be rathe

[PATCH] D105972: Fix __attribute__((annotate("")) with non-zero globals AS

2021-08-17 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 366911. arichardson added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105972/new/ https://reviews.llvm.org/D105972 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/lib/CodeGen/CodeG

[PATCH] D98113: [Driver] Also search FilePaths for compiler-rt before falling back

2021-07-12 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D98113#2872080 , @jroelofs wrote: >> compiler-rt depends on a libc, typically newlib, which then depends on your >> compiler > > The builtins should only depend on compiler-provided headers, and not on the > rest of libc.

[PATCH] D105972: Fix __attribute__((annotate("")) with non-zero globals AS

2021-07-14 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: rjmccall, nhaehnle, Tyker. Herald added subscribers: jrtc27, luismarques, s.egerton, PkmX, simoncook, tpr. arichardson requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The exist

[PATCH] D97068: Run non-filechecked commands in update_cc_test_checks.py

2021-03-08 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. IMO this should also handle the %t substitution and create a temporary directory. Otherwise we end up writing files to whatever the current cwd is. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97068/new/ https://revie

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-14 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py:1 +#!/usr/bin/python +# -*- coding: utf-8 -*- Maybe this should be `#!/use/bin/env python` (or python3) instead? Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D116735: [RISCV] Adjust RV64I data layout by using n32:64 in layout string

2022-10-27 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: llvm/docs/ReleaseNotes.rst:122 been removed. +* n32 was added to the RV64I datalayout string. Without additional context I don't think this makes much sense to most readers. Before looking at this patch descrip

[PATCH] D108211: Emit sizeof/alignof values as notes when a static_assert fails

2022-08-24 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 455258. arichardson marked 2 inline comments as done. arichardson added a comment. Herald added a project: All. rebase and address feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108211/new/ https://

[PATCH] D108211: Emit sizeof/alignof values as notes when a static_assert fails

2022-08-24 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a reviewer: tbaeder. arichardson added a comment. This is less useful now that 09117b21890c652994f7ada0229d309b35b44259 / D130894 has landed, but it might still be worth in

[PATCH] D132608: [CMake] Clean up CMake binary dir handling

2022-08-25 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: cmake/Modules/GNUBinaryDirs.cmake:6 +if (NOT DEFINED CMAKE_BINARY_BINDIR) + set(CMAKE_BINARY_BINDIR "${CMAKE_BINARY_BINDIR}/bin") +endif() I find this name a bit confusing, maybe something like `CMAKE_BUILD_BINDIR`

[PATCH] D108211: Emit sizeof/alignof values as notes when a static_assert fails

2022-09-22 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson abandoned this revision. arichardson added a comment. Would require significant work to still be useful now that we print the value of expressions (e.g. only print for more complex expressions). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D108212: Emit offsetof values as notes when a static_assert fails

2022-09-22 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson abandoned this revision. arichardson added a comment. Herald added a project: All. No longer needed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108212/new/ https://reviews.llvm.org/D108212

[PATCH] D134671: [Driver] Prevent Mips specific code from claiming -mabi argument on other targets.

2022-09-26 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/lib/Driver/Driver.cpp:637 // accordingly to provided ABI name. - A = Args.getLastArg(options::OPT_mabi_EQ); + A = Args.getLastArgNoClaim(options::OPT_mabi_EQ); if (A && Target.isMIPS()) { Would it make

[PATCH] D134671: [Driver] Prevent Mips specific code from claiming -mabi argument on other targets.

2022-09-27 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson accepted this revision. arichardson 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/D134671/new/ https://reviews.llvm.org/D134671 _

[PATCH] D134337: [clang] [Driver] More flexible rules for loading default configs

2022-09-28 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/test/Driver/config-file3.c:27 -//--- Invocation qqq-clang-g++ tries to find config file qqq-clang-g++.cfg first. +//--- Invocation x86_64-unknown-linux-gnu-clang-g++ tries x86_64-unknown-linux-gnu-clang++.cfg first. // ---

[PATCH] D134337: [clang] [Driver] More flexible rules for loading default configs

2022-09-28 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/test/Driver/config-file3.c:27 -//--- Invocation qqq-clang-g++ tries to find config file qqq-clang-g++.cfg first. +//--- Invocation x86_64-unknown-linux-gnu-clang-g++ tries x86_64-unknown-linux-gnu-clang++.cfg first. // ---

[PATCH] D134650: [runtimes] Remove all traces of the legacy testing configuration system

2022-10-03 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In case anyone else runs into this: It appears this change somehow broke incremental builds with `-DLLVM_ENABLE_RUNTIMES=libunwind` (even after deleting CMakeCache.txt in the main build dir): -- Using libunwind testing configuration: /home/alexrichardson/cheri/up

[PATCH] D44604: Make stdarg.h compatible with FreeBSD

2022-10-03 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson abandoned this revision. arichardson added a comment. Herald added a subscriber: jrtc27. Herald added a project: All. Hopefully no longer required. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D44604/new/ https://reviews.llvm.org/D44604 _

[PATCH] D135142: Use TI.hasBuiltinAtomic() when setting ATOMIC_*_LOCK_FREE values. NFCI

2022-10-04 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: rprichard, efriedma, hfinkel. Herald added a project: All. arichardson requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. I noticed that the values for __{CLANG,GCC}_ATOMIC_POINTE

[PATCH] D135171: FreeBSD: enable __float128 on x86

2022-10-04 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson accepted this revision. arichardson added a comment. Could you add a RUN: line to `clang/test/CodeGenCXX/float128-declarations.cpp? Code LGTM. // RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple x86_64-unknown-freebsd -std=c++11 \ // RUN: %s -o - | FileCheck %s -check-pr

[PATCH] D139114: [Clang][Sema] Enabled implicit conversion warning for CompoundAssignment operator.

2023-01-06 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:13402 + // intergral operands. + if (E->getLHS()->getType()->isIntegerType() && + E->getRHS()->getType()->isIntegerType() && !E->isShiftAssignOp()) Why is this restricted to int

[PATCH] D135142: Use TI.hasBuiltinAtomic() when setting ATOMIC_*_LOCK_FREE values. NFCI

2022-11-15 Thread Alexander Richardson 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 rG00b1f7a6ab2a: Use TI.hasBuiltinAtomic() when setting ATOMIC_*_LOCK_FREE values. NFCI (authored by arichardson). Repository: rG LLVM Github Monorep

[PATCH] D142048: [Phabricator] Fix __ptr32 arguments passed to builtins

2023-01-24 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. It sounds to me that the logic from b919c7d should have been restricted to actual LLVM intrinsics that are overloaded on the pointer args ( e.g. llvm.memcpy which was the test in that commit). Builtins that are just library calls with known semantics probably need t

[PATCH] D155456: [RISCV] Support -m[no-]strict-align options

2023-07-18 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/test/Driver/riscv-features.c:41 +// DEFAULT: "-target-feature" "-unaligned-scalar-mem" +// DEFAULT-NOT: "-target-feature" "+unaligned-scalar-mem" + This looks a bit fragile, can we just check all -target-featur

[PATCH] D153989: [compiler-rt] Move crt into builtins

2023-07-11 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. I think reduplication of build logic makes sense but these are conceptually separate things. The compiler rt builtins are needed in many cases where the C start-up code isn't (e.g. baremetal OS code). Would moving it to a subdirectory of builtins/ work too? That way

[PATCH] D153989: [compiler-rt] Move crt into builtins

2023-07-12 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D153989#4492342 , @phosek wrote: > In D153989#4492229 , @arichardson > wrote: > >> I think reduplication of build logic makes sense but these are conceptually >> separate things.

[PATCH] D111566: [SYCL] Fix function pointer address space

2022-11-18 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Herald added a project: All. Comment at: clang/lib/AST/ASTContext.cpp:11579 +unsigned ASTContext::getTargetAddressSpace(QualType T) const { + return T->isFunctionType() ? getTargetInfo().getProgramAddressSpace() + :

[PATCH] D138284: Fix incorrect cast in VisitSYCLUniqueStableNameExpr

2022-11-18 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: erichkeane, rjmccall, aaron.ballman. Herald added subscribers: Naghasan, Anastasia, ebevhan, yaxunl. Herald added a project: All. arichardson requested review of this revision. Herald added a project: clang. Herald added a subscriber:

[PATCH] D138295: [clang][TargetInfo] Use LangAS for getPointer{Width,Align}()

2022-11-18 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added a reviewer: clang. Herald added subscribers: steakhal, kosarev, mattd, gchakrabarti, asavonic, martong, kerbowa, atanasyan, jrtc27, jvesely, sdardis. Herald added a reviewer: aaron.ballman. Herald added a reviewer: NoQ. Herald added a project: A

[PATCH] D138296: [clang] Avoid duplicating ProgramAddressSpace in TargetInfo. NFCI

2022-11-18 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: eandrews, dylanmckay, bader, rjmccall. Herald added subscribers: jrtc27, luismarques, s.egerton, Jim, PkmX, atanasyan, simoncook, kristof.beyls, sdardis. Herald added a project: All. arichardson requested review of this revision. Hera

[PATCH] D138284: Fix incorrect cast in VisitSYCLUniqueStableNameExpr

2022-11-18 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D138284#3936846 , @erichkeane wrote: > In D138284#3936830 , @aaron.ballman > wrote: > >> Adding @bader as SYCL code owner. The changes look reasonable to me, but >> codegen is no

[PATCH] D138284: Fix incorrect cast in VisitSYCLUniqueStableNameExpr

2022-11-18 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1635 + Context.getTargetInfo().getConstantAddressSpace().value_or( + LangAS::Default)); llvm::Constant *GlobalConstStr = Builder.CreateGlobalStringPtr( arichardson

[PATCH] D138284: Fix incorrect cast in VisitSYCLUniqueStableNameExpr

2022-11-18 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 476470. arichardson added a comment. Fix to use addrspace(1) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138284/new/ https://reviews.llvm.org/D138284 Files: clang/lib/CodeGen/CGExprScalar.cpp clang/t

[PATCH] D138295: [clang][TargetInfo] Use LangAS for getPointer{Width,Align}()

2022-11-18 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 476472. arichardson added a comment. clang-format I could also use {} instead of `LangAS::Default`, but the latter seems more obvious Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138295/new/ https://revi

[PATCH] D138296: [clang] Avoid duplicating ProgramAddressSpace in TargetInfo. NFCI

2022-11-18 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 476473. arichardson added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138296/new/ https://reviews.llvm.org/D138296 Files: clang/include/clang/AST/ASTContext.h clang/include/cl

[PATCH] D138296: [clang] Avoid duplicating ProgramAddressSpace in TargetInfo. NFCI

2022-11-18 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D138296#3937224 , @eandrews wrote: > Functionally this looks ok to me. However I am not sure if CodeGenTypes is > the 'right' place for this function to live, considering that other functions > with similar functionality

[PATCH] D138316: [ASTContext] Avoid duplicating address space map. NFCI

2022-11-18 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: clang, pcc. Herald added a project: All. arichardson requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. ASTContext was holding onto a pointer to the Clang->LLVM address space map

[PATCH] D138284: Fix incorrect cast in VisitSYCLUniqueStableNameExpr

2022-11-19 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0745b0c0354a: Fix incorrect cast in VisitSYCLUniqueStableNameExpr (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138284/new/ https

[PATCH] D119541: [RISCV] Fix RISCVTargetInfo::initFeatureMap, add non-ISA features back after implication

2022-11-21 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. Herald added subscribers: sunshaoce, StephenFan, shiva0217. Herald added a project: All. I just noticed that target features (e.g. -mrelax) are broken in all LLVM 14 releases due to D113336 . This should have been cherry-picked back

[PATCH] D138681: [AVR] Fix broken bitcast for aliases in non-zero address space

2022-11-24 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson accepted this revision. arichardson 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/D138681/new/ https://reviews.llvm.org/D138681 _

[PATCH] D138722: Overload all llvm.annotation intrinsics for globals argument

2022-11-25 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: arsenm, bader, Tyker, nikic. Herald added subscribers: jrtc27, hiraditya. Herald added a project: All. arichardson requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, jdoerfert, wdng. Herald added pr

[PATCH] D135171: FreeBSD: enable __float128 on x86

2022-11-29 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. @brooks do you want me to commit this for you or do you have commit access? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135171/new/ https://reviews.llvm.org/D135171 ___ cfe

[PATCH] D138295: [clang][TargetInfo] Use LangAS for getPointer{Width,Align}()

2022-11-30 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 478867. arichardson marked 3 inline comments as done. arichardson added a comment. address review feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138295/new/ https://reviews.llvm.org/D138295 Files:

[PATCH] D138316: [ASTContext] Avoid duplicating address space map. NFCI

2022-11-30 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 478870. arichardson added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138316/new/ https://reviews.llvm.org/D138316 Files: clang/include/clang/AST/ASTContext.h clang/lib/AST/ASTConte

[PATCH] D138295: [clang][TargetInfo] Use LangAS for getPointer{Width,Align}()

2022-11-30 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1917 +EffectiveFieldSize = FieldSize = TI.Width; +FieldAlign = TI.Align; } else { rjmccall wrote: > This is a nice cleanup, but I actually can't figure out why we can'

[PATCH] D139006: [UpdateTestChecks] Match define for labels

2022-11-30 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. Agreed that the churn is annoying, but at least unlike the function-signature flag (which I'd quite like to have on by default tbh) it only affects a single line rather than also including variable captures. Comment at: llvm/test/tools/UpdateTest

[PATCH] D138295: [clang][TargetInfo] Use LangAS for getPointer{Width,Align}()

2022-11-30 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. arichardson marked an inline comment as done. Closed by commit rGa602f76a2406: [clang][TargetInfo] Use LangAS for getPointer{Width,Align}() (authored by arichardson). Changed prior to commit: https://reviews.llvm.org/D138

[PATCH] D138295: [clang][TargetInfo] Use LangAS for getPointer{Width,Align}()

2022-11-30 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:2228-2230 + Width = Target->getPointerWidth( + LangAS::Default); // C++ 3.9.1p11: sizeof(nullptr_t) + Align = Target->getPointerAlign(LangAS::Default); // == sizeof(void*) ---

[PATCH] D138296: [clang] Avoid duplicating ProgramAddressSpace in TargetInfo. NFCI

2022-12-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D138296#3937599 , @rjmccall wrote: > In D138296#3937486 , @arichardson > wrote: > >> In D138296#3937224 , @eandrews >> wrote: >> >>> Func

[PATCH] D138296: [clang] Avoid duplicating ProgramAddressSpace in TargetInfo. NFCI

2022-12-01 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf3a17d059509: [clang] Avoid duplicating ProgramAddressSpace in TargetInfo. NFCI (authored by arichardson). Changed prior to commit: https://reviews.llvm.org/D138296?vs=476473&id=479387#toc Repository:

[PATCH] D69564: Include the mangled name in -ast-dump=json

2019-11-06 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. Ping. Does this seem an acceptable change to the JSON output @aaron.ballman ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69564/new/ https://reviews.llvm.org/D69564 ___ c

[PATCH] D69564: Include the mangled name in -ast-dump=json

2019-11-12 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. I've split out the update script changes into D70119 to make this easier to review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69564/new/ https://reviews.llvm.org/D69564 _

[PATCH] D70119: Improve gen_ast_dump_json_test.py

2019-11-14 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson marked 2 inline comments as done. arichardson added inline comments. Comment at: clang/test/AST/gen_ast_dump_json_test.py:3 +from __future__ import print_function from collections import OrderedDict aaron.ballman wrote: > Is this needed? I don't se

[PATCH] D69564: Include the mangled name in -ast-dump=json

2019-11-16 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. @arphaman Should be fixed by rG09c7e51283dafbfd122cc0d7ab251476c451c9f5 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69564/new/ https://reviews.llv

[PATCH] D71026: Fix LLVM_ENABLE_MODULES=ON + BUILD_SHARED_LIBS=ON build

2019-12-04 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: EricWF, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. Using the same approach as d0782a69ff4c04dc4f1dc1c11cb2fb43c6b638f5 and 91cef98d2c41eff0dea474a760d2dce5ba873209. Repository: rG LLVM Github Mo

[PATCH] D71026: Fix LLVM_ENABLE_MODULES=ON + BUILD_SHARED_LIBS=ON build

2019-12-04 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D71026#1769340 , @arphaman wrote: > Is the `Tooling/Transformer` library used by clang-format? The problem might > be solved if the `Tooling/Transformer` library was its own module (just like > Clang_ToolingInclusions).

[PATCH] D71026: Fix LLVM_ENABLE_MODULES=ON + BUILD_SHARED_LIBS=ON build

2019-12-13 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D71026#1769340 , @arphaman wrote: > Is the `Tooling/Transformer` library used by clang-format? The problem might > be solved if the `Tooling/Transformer` library was its own module (just like > Clang_ToolingInclusions).

[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

2019-12-13 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: rsmith, aaron.ballman, theraven, fhahn. Herald added a project: clang. Herald added a subscriber: cfe-commits. This change introduces three new builtins (which work on both pointers and integers) that can be used instead of common bit

[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

2019-12-14 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson marked an inline comment as done. arichardson added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:14323 +Result = Builder.CreateIntrinsic( +Intrinsic::ptrmask, {Args.SrcType, SrcForMask->getType(), Args.IntType}, +{SrcForMask, Negat

[PATCH] D71026: Fix LLVM_ENABLE_MODULES=ON + BUILD_SHARED_LIBS=ON build

2019-12-15 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. If I build on macOS with `cmake -GNinja -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_PROJECTS=llvm;clang;lld;compiler-rt;libcxx;libcxxabi -DBUILD_SHARED_LIBS=ON -DLLVM_ENABLE_MODULES=ON`, I get lots of linker errors building e.g. libclangASTDiff.dy

[PATCH] D64128: [CodeGen] Generate llvm.ptrmask instead of inttoptr(and(ptrtoint, C)) if possible.

2019-12-15 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D64128#1576391 , @rjmccall wrote: > I wouldn't favor adding something really obscure that was only useful for > clang, but I think builtins to set and clear mask bits while promising to > preserve object-reference identity

[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

2019-12-16 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 234051. arichardson marked 6 inline comments as done. arichardson added a comment. - Add support for constant-evaluating pointer values - Add errors messages for constant evaluation - Extend tests for constant evaluation - Use ptrtoint+inttoptr instead of

<    1   2   3   4   >