1. Mar 06, 2024
    • Vadim D's avatar
      [clang] Add -Wmissing-designated-field-initializers (#81364) · 7df43ccf
      Vadim D authored
      #56628 changed the behavior of `-Wmissing-field-initializers`, which
      introduces many new warnings in C++ code that uses partial designated
      initializers. If such code is being built with `-Wextra -Werror`, this
      change will break the build.
      
      This PR adds a new flag that allows to disable these new warnings and
      keep the old ones, as was suggested by @AaronBallman in the original
      issue:
      https://github.com/llvm/llvm-project/issues/56628#issuecomment-1761510850
      
      Fixes  #68933
      7df43ccf
    • agozillon's avatar
      [Flang][MLIR][OpenMP] Create a deferred declare target marking process for Bridge.cpp (#78502) · afb05cd6
      agozillon authored
      This patch seeks to create a process that happens on module finalization
      for OpenMP, in which a list of operations that had declare target
      directives applied to them and were not generated at the time of
      processing the original declare target directive are re-checked to apply
      the appropriate declare target semantics.
      
      This works by maintaining a vector of declare target related data inside
      of the FIR converter, in this case the symbol and the two relevant
      unsigned integers representing the enumerators. This vector is added to
      via a new function called from Bridge.cpp, insertDeferredDeclareTargets,
      which happens prior to the processing of the directive (similarly to
      getDeclareTargetFunctionDevice currently for requires), it effectively
      checks if the Operation the declare target directive is applied to
      currently exists, if it doesn't it appends to the vector. This is a
      seperate function to the processing of the declare target via the
      overloaded genOMP as we unfortunately do not have access to the list
      without passing it through every call, as the AbstractConverter we pass
      will not allow access to it (I've seen no other cases of casting it to a
      FirConverter, so I opted to not do that).
      
      The list is then processed at the end of the module in the
      finalizeOpenMPLowering function in Bridge by calling a new function
      markDelayedDeclareTargetFunctions which marks the latently generated
      operations. In certain cases, some still will not be generated, e.g. if
      an interface is defined, marked as declare target, but has no definition
      or usage in the module then it will not be emitted to the module, so due
      to these cases we must silently ignore when an operation has not been
      found via it's symbol.
      
      The main use-case for this (although, I imagine there is others) is for
      processing interfaces that have been declared in a module with a declare
      target directive but do not have their implementation defined in the
      same module. For example, inside of a seperate C++ module that will be
      linked in. In cases where the interface is called inside of a target
      region it'll be marked as used on device appropriately (although,
      realistically a user should explicitly mark it to match the
      corresponding definition), however, in cases where it's used in a
      non-clear manner through something like a function pointer passed to an
      external call we require this explicit marking, which this patch adds
      support for (currently will cause the compiler to crash).
      
      This patch also adds documentation on the declare target process and 
      mechanisms within the compiler currently.
      afb05cd6
    • Simon Pilgrim's avatar
      [CostModel][X86] Add test coverage for 'concat subvector' style shuffles · 3b84b6f1
      Simon Pilgrim authored
      Shows 2 major issues:
       - SSE should be free as it splits everything to 128-bit
       - Negative costs for 128 -> 512 concat shuffles
      3b84b6f1
    • Alexey Bataev's avatar
    • Nick Desaulniers's avatar
      [libc] suppress readability-identifier-naming for std::numeric_limits interfaces (#83921) · 2aa22ca2
      Nick Desaulniers authored
      These templates are made to match the ergonomics of std::numeric_limits.
      Because our style for constexpr variables is ALL_CAPS, we must silence the
      linter for these manually.
      
      Link:
      https://clang.llvm.org/extra/clang-tidy/#suppressing-undesired-diagnostics
      2aa22ca2
    • Nick Desaulniers's avatar
      [libc] fix readability-identifier-naming in memory_utils/utils.h (#83919) · 640c8574
      Nick Desaulniers authored
      Fixes:
      
          libc/src/string/memory_utils/utils.h:345:13: warning: invalid case style
          for member 'offset_' [readability-identifier-naming]
      
      Having a trailing underscore for members is a google3 style, not LLVM style.
      Removing the underscore is insufficient, as we would then have 2 members with
      the same identifier which is not allowed (it is a compile time error). Remove
      the getter, and just access the renamed member that's now made public.
      640c8574
    • Nick Desaulniers's avatar
      [libc] fix more readability-identifier-naming lints (#83914) · 88d82b74
      Nick Desaulniers authored
      Found via:
      
          $ ninja -k2000 libc-lint 2>&1 | grep readability-identifier-naming
      
      Auto fixed via:
      
          $ clang-tidy -p build/compile_commands.json \
            -checks="-*,readability-identifier-naming" \
            <filename> --fix
      
      This doesn't fix all instances, just the obvious simple cases where it makes
      sense to change the identifier names.  Subsequent PRs will fix up the
      stragglers.
      88d82b74
    • David Goldman's avatar
      [clangd] Add metric for rename decl kind (#83867) · ec7062d9
      David Goldman authored
      This will give us insight into what users are renaming in practice - for
      instance, try to gauge the impact of the ObjC rename support.
      ec7062d9
    • Natalie Chouinard's avatar
      [infra] Add git to Linux container (#82687) · da63746b
      Natalie Chouinard authored
      Fixes #82646
      da63746b
  2. Mar 05, 2024