1. Feb 14, 2024
    • Nico Weber's avatar
      [lld/ELF] fix typos to cycle bots · bf3d5dbe
      Nico Weber authored
      bf3d5dbe
    • Nico Weber's avatar
      [gn] fix typo in 8c56e78e · 4bc2a4f6
      Nico Weber authored
      The missing trailing comma confuses the sync script.
      4bc2a4f6
    • Danila Malyutin's avatar
      [InstSimplify] Add trivial simplifications for gc.relocate intrinsic (#81639) · cb1a9f70
      Danila Malyutin authored
      Fold gc.relocate of undef and null to undef and null respectively.
      
      Similar transform is currently done by instcombine, but there is no
      reason to not include it here as well.
      cb1a9f70
    • Craig Topper's avatar
      [RISCV] Register fixed stack slots for callee saved registers for -msave-restore/Zcmp (#81392) · 0de2b269
      Craig Topper authored
      PEI previously used fake frame indices for these callee saved registers.
      These fake frame indices are not register with MachineFrameInfo. This
      required them to be deleted form CalleeSavedInfo after PEI to avoid
      breaking later passes. See #79535
      
      Unfortunately, removing the registers from CalleeSavedInfo pessimizes
      Interprocedural Register Allocation. The RegUsageInfoCollector pass runs
      after PEI and uses CalleeSavedInfo.
      
      This patch replaces #79535 by properly creating fixed stack objects
      through MachineFrameInfo. This changes the stack size and offsets
      returned by MachineFrameInfo which requires changes to how
      RISCVFrameLowering uses that information.
      
      In addition to the individual object for each register, I've also create
      a single large fixed object that covers the entire stack area covered by
      cm.push or the libcalls. cm.push must always push a multiple of 16 bytes
      and the save restore libcall pushes a multiple of stack align. I think
      this leaves holes in the stack where we could spill other registers, but
      it matches what we did previously. Maybe we can optimize this in the
      future.
      
      The only test changes are due to stack alignment handling after the
      callee save registers. Since we now have the fixed objects, on the stack
      the offset is non-zero when an aligned object is processed so the offset
      gets rounded up, increasing the stack size.
      
      I suspect we might need some more updates for RVV related code. There is
      very little or maybe even no testing of RVV mixed with Zcmp and
      save-restore.
      0de2b269
    • Artem Dergachev's avatar
      [attributes][analyzer] Generalize [[clang::suppress]] to declarations. (#80371) · 017675ff
      Artem Dergachev authored
      The attribute is now allowed on an assortment of declarations, to
      suppress warnings related to declarations themselves, or all warnings in
      the lexical scope of the declaration.
      
      I don't necessarily see a reason to have a list at all, but it does look
      as if some of those more niche items aren't properly supported by the
      compiler itself so let's maintain a short safe list for now.
      
      The initial implementation raised a question whether the attribute
      should apply to lexical declaration context vs. "actual" declaration
      context. I'm using "lexical" here because it results in less warnings
      suppressed, which is the conservative behavior: we can always expand it
      later if we think this is wrong, without breaking any existing code. I
      also think that this is the correct behavior that we will probably never
      want to change, given that the user typically desires to keep the
      suppressions as localized as possible.
      017675ff
    • jkorous-apple's avatar
      [-Wunsafe-buffer-usage] Emit fixits for array decayed to pointer (#80347) · e06f3522
      jkorous-apple authored
      Covers cases where DeclRefExpr referring to a const-size array decays to a
      pointer and is used "as a pointer" (e. g. passed to a pointer type
      parameter).
      
      Since std::array<T, N> doesn't implicitly convert to pointer to its element
      type T* the cast needs to be done explicitly as part of the fixit
      when we retrofit std::array to code that previously worked with constant
      size array. std::array::data() method is used for the explicit
      cast.
      
      In terms of the fixit machine this covers the UPC(DRE) case for Array fixit strategy.
      The emitted fixit inserts call to std::array::data() method similarly to
      analogous fixit for Span strategy.
      e06f3522
    • Slava Zakharin's avatar
      [flang] Register LLVMTranslationDialectInterface for FIR. (#81668) · 137bd782
      Slava Zakharin authored
      Register the LLVM IR translation interface for FIR to avoid
      warnings about "Unhandled parameter attribute" after #78228.
      137bd782
    • Jordan Rupprecht's avatar
      [lldb][test] Switch LLDB API tests from vendored unittest2 to unittest (#79945) · 5b386158
      Jordan Rupprecht authored
      This removes the dependency LLDB API tests have on
      lldb/third_party/Python/module/unittest2, and instead uses the standard
      one provided by Python.
      
      This does not actually remove the vendored dep yet, nor update the docs.
      I'll do both those once this sticks.
      
      Non-trivial changes to call out:
      - expected failures (i.e. "bugnumber") don't have a reason anymore, so
      those params were removed
      - `assertItemsEqual` is now called `assertCountEqual`
      - When a test is marked xfail, our copy of unittest2 considers failures
      during teardown to be OK, but modern unittest does not. See
      TestThreadLocal.py. (Very likely could be a real bug/leak).
      - Our copy of unittest2 was patched to print all test results, even ones
      that don't happen, e.g. `(5 passes, 0 failures, 1 errors, 0 skipped,
      ...)`, but standard unittest prints a terser message that omits test
      result types that didn't happen, e.g. `OK (skipped=1)`. Our lit
      integration parses this stderr and needs to be updated w/ that
      expectation.
      
      I tested this w/ `ninja check-lldb-api` on Linux. There's a good chance
      non-Linux tests have similar quirks, but I'm not able to uncover those.
      5b386158
    • Jessica Clarke's avatar
    • Jessica Clarke's avatar
    • lntue's avatar
      [libc][stdfix] Generate stdfix.h header with fixed point precision macros... · 84277fe9
      lntue authored
      [libc][stdfix] Generate stdfix.h header with fixed point precision macros according to ISO/IEC TR 18037:2008 standard, and add fixed point type support detection. (#81255)
      
      Fixed point extension standard:
      https://standards.iso.org/ittf/PubliclyAvailableStandards/c051126_ISO_IEC_TR_18037_2008.zip
      84277fe9
    • Arthur Eubanks's avatar
    • Heejin Ahn's avatar
      [WebAssembly] Demote PHIs in catchswitch BB only (#81570) · 473ef10b
      Heejin Ahn authored
      `DemoteCatchSwitchPHIOnly` option in `WinEHPrepare` pass was added in
      https://github.com/llvm/llvm-project/commit/99d60e0dabcf20f4db683da83cde905b7a1373de,
      because Wasm EH uses `WinEHPrepare`, but it doesn't need to demote all
      PHIs. PHIs in `catchswitch` BBs have to be removed (= demoted) because
      `catchswitch`s are removed in ISel and `catchswitch` BBs are removed as
      well, so they can't have other instructions.
      
      But because Wasm EH doesn't use funclets, so PHIs in `catchpad` or
      `cleanuppad` BBs don't need to be demoted. That was the reason
      `DemoteCatchSwitchPHIOnly` option was added, in order not to demote more
      instructions unnecessarily.
      
      The problem is it should have been set to `true` for Wasm EH. (Its
      default value is `false` for WinEH) And I mistakenly set it to `false`
      and wasn't aware about this for more than 5 years. This was not the end
      of the world; it just means we've been demoting more instructions than
      we should, possibly huting code size. In practice I think it would've
      had hardly any effect in real performance given that the occurrence of
      PHIs in `catchpad` or `cleanuppad` BBs are not very frequent and many
      people run other optimizers like Binaryen anyway.
      473ef10b
    • Zequan Wu's avatar
      [lldb-dap] Add support for data breakpoint. (#81541) · 8c56e78e
      Zequan Wu authored
      This implements functionality to handle `DataBreakpointInfo` request and
      `SetDataBreakpoints` request.
      
      If variablesReference is 0 or not provided, interpret name as ${number
      of bytes}@${expression} to set data breakpoint at the given expression
      because the spec
      https://microsoft.github.io/debug-adapter-protocol/specification#Requests_DataBreakpointInfo
      doesn't say how the client could specify the number of bytes to watch.
      
      This is based on top of https://github.com/llvm/llvm-project/pull/80753.
      8c56e78e
    • Philip Reames's avatar
      Revert "[SeparateConstOffsetFromGEP] Reorder trivial GEP chains to separate... · 99c5a66c
      Philip Reames authored
      Revert "[SeparateConstOffsetFromGEP] Reorder trivial GEP chains to separate constants (#73056)" and follow ups
      
      "ninja check-llvm" is failing on tip of tree.
      
      This reverts commit ec0aa164.
      This reverts commit 1b65742f.
      99c5a66c
    • Jeremy Morse's avatar
      [DebugInfo][RemoveDIs] Convert back to intrinsic form for ThinLTO · fa77e1f5
      Jeremy Morse authored
      As explained on discourse [0] (comment 12), to get the non-intrinsic form
      of debug-info records enabled and testing, we're only using it inside of
      the pass manager in LLVM right now. Things like the textual IR writer and
      bitcode writing _passes_ are instrumented to convert back to
      intrinsic-form when writing a module out, but it turns out we missed the
      ThinLTO bitcode writing pass. That causes uh, all variable location
      debug-info to be dropped in ThinLTO mode (oops).
      
      This patch adds that conversion; it should be low risk as it's identical to
      what happens in all the other passes. However should this commit turn out
      to cause trouble, please instead revert d759618d or whichever is the
      most recent commit to set UseNewDbgInfoFormat to default to true. That'll
      revert LLVM back to the definitely-correct behaviour.
      
      [0] https://discourse.llvm.org/t/rfc-instruction-api-changes-needed-to-eliminate-debug-intrinsics-from-ir/68939
      fa77e1f5
    • Felipe de Azevedo Piovezan's avatar
      [lldb][DWARFIndex] Use IDX_parent to implement GetFullyQualifiedType query (#79932) · 91f4a84a
      Felipe de Azevedo Piovezan authored
      This commit changes DebugNamesDWARFIndex so that it now overrides
      `GetFullyQualifiedType` and attempts to use DW_IDX_parent, when
      available, to speed up such queries. When this type of information is
      not available, the base-class implementation is used.
      
      With this commit, we now achieve the 4x speedups reported in [1].
      
      [1]:
      https://discourse.llvm.org/t/rfc-improve-dwarf-5-debug-names-type-lookup-parsing-speed/74151/38
      91f4a84a
    • Felipe de Azevedo Piovezan's avatar
      [DWARFDump] Make --verify handle all sections by default (#81559) · 52961491
      Felipe de Azevedo Piovezan authored
      The current behavior of --verify is that it only verifies debug_info,
      debug_abbrev and debug_names. This seems fairly arbitrary and might have
      been unintentional, as originally the absence of any section flags
      implied "all".
      
      This patch changes the behavior so that the verifier now verifies
      everything by default. It revealed two tests that had potentially
      invalid DWARF:
      
      1. dwarfdump-str-offsets.s is adding padding between two
      debug_str_offset contributions. The standard does not explicitly allow
      this behavior. See issue
      https://github.com/llvm/llvm-project/issues/81558
      
      2. dwarf5-macro.test uses a checked-in binary that has invalid
      debug_str_offsets. One of its entries points to the _middle_ of the
      string section:
      
      error: .debug_str_offsets: contribution 0x0: index 0x4: invalid string
      offset *0x18 == 0x455D, is neither zero nor immediately following a null
      character
      
      If we look at the closest offset to 0x455D in debug_str:
      
      ```
      0x0000454e: "__SLONG32_TYPE int"
      ```
      
      0x455D points to "int".
      52961491
    • Aart Bik's avatar
      [mlir][sparse] add assemble test for Batched-CSR and CSR-Dense (#81660) · 2400f704
      Aart Bik authored
      These are formats supported by PyTorch sparse, so good to make sure that
      our assemble instructions work on these.
      2400f704
    • Jim Ingham's avatar
      Temporarily disable the TestAddParsedCommand.py while I figure out · f0b271e4
      Jim Ingham authored
      why it's crashing on the x86_64 Debian Linux worker.
      f0b271e4
    • lntue's avatar
      [libc] Allow BigInt class to use base word types other than uint64_t. (#81634) · 4e005515
      lntue authored
      This will allow DyadicFloat class to replace NormalFloat class.
      4e005515
    • Craig Topper's avatar
      [TypePromotion] Remove an unreachable 'return false'. NFC · d0a1bf8b
      Craig Topper authored
      The if and the else above this both return so this is unreachable.
      Delete it and remove the else after return.
      d0a1bf8b
    • James Y Knight's avatar
      [Sparc] limit MaxAtomicSizeInBitsSupported to 32 for 32-bit Sparc. (#81655) · c1a99b2c
      James Y Knight authored
      When in 32-bit mode, the backend doesn't currently implement 64-bit
      atomics, even though the hardware is capable if you have specified a V9
      CPU. Thus, limit the width to 32-bit, for now, leaving behind a TODO.
      
      This fixes a regression triggered by PR #73176.
      c1a99b2c
    • Xing Xue's avatar
      [OpenMP][AIX]Define struct kmp_base_tas_lock with the order of two members... · ac97562c
      Xing Xue authored
      [OpenMP][AIX]Define struct kmp_base_tas_lock with the order of two members swapped for big-endian (#79188)
      
      The direct lock data structure has bit `0` (the least significant bit)
      of the first 32-bit word set to `1` to indicate it is a direct lock. On
      the other hand, the first word (in 32-bit mode) or first two words (in
      64-bit mode) of an indirect lock are the address of the entry allocated
      from the indirect lock table. The runtime checks bit `0` of the first
      32-bit word to tell if this is a direct or an indirect lock. This works
      fine for 32-bit and 64-bit little-endian because its memory layout of a
      64-bit address is (`low word`, `high word`). However, this causes
      problems for big-endian where the memory layout of a 64-bit address is
      (`high word`, `low word`). If an address of the indirect lock table
      entry is something like `0x110035300`, i.e., (`0x1`, `0x10035300`), it
      is treated as a direct lock. This patch defines `struct
      kmp_base_tas_lock` with the ordering of the two 32-bit members flippe...
      ac97562c
    • Jeffrey Byrnes's avatar
      [SeparateConstOffsetFromGEP] Fix test after 1b65742f · ec0aa164
      Jeffrey Byrnes authored
      Change-Id: I7ced7774c80997d21969ab7886fc30c0c1e1cc81
      ec0aa164
    • Kazu Hirata's avatar
      [mlir] Fix a warning · f5cc9612
      Kazu Hirata authored
      This patch fixes:
      
        mlir/lib/Target/LLVMIR/AttrKindDetail.h:65:1: error: unused function
        'getAttrNameToKindMapping' [-Werror,-Wunused-function]
      f5cc9612
    • Kiran Chandramohan's avatar
      27726920
    • Krystian Stasiowski's avatar
      [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier... · 3a48630a
      Krystian Stasiowski authored
      [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (#80171)
      
      According to [dcl.type.elab] p4:
      > If an _elaborated-type-specifier_ appears with the `friend` specifier
      as an entire _member-declaration_, the _member-declaration_ shall have
      one of the following forms:
      >     `friend` _class-key_ _nested-name-specifier_(opt) _identifier_ `;`
      >     `friend` _class-key_ _simple-template-id_ `;`
      > `friend` _class-key_ _nested-name-specifier_ `template`(opt)
      _simple-template-id_ `;`
      
      Notably absent from this list is the `enum` form of an
      _elaborated-type-specifier_ "`enum` _nested-name-specifier_(opt)
      _identifier_", which appears to be intentional per the resolution of
      CWG2363.
      
      Most major implementations accept these declarations, so the diagnostic
      is a pedantic warning across all C++ versions.
      
      In addition to the trivial cases previously diagnosed in C++98, we now
      diagnose cases where the _elaborated-type-specifier_ has a dependent
      _nested-name-specifier_:
      ```
      template<typename T>
      struct A
      {
          enum class E;
      };
      
      struct B
      {
          template<typename T>
          friend enum A<T>::E; // pedantic warning: elaborated enumeration type cannot be a friend
      };
      
      template<typename T>
      struct C
      {
          friend enum T::E;  // pedantic warning: elaborated enumeration type cannot be a friend
      };
      ```
      3a48630a
    • Jeffrey Byrnes's avatar
      [SeparateConstOffsetFromGEP] Reorder trivial GEP chains to separate constants (#73056) · 1b65742f
      Jeffrey Byrnes authored
      In this case, a trivial GEP chain has the form:
      
      ```
      %ptr = getelementptr sameType, %base, constant
      %val = getelementptr sameType, %ptr, %variable
      ```
      
      That is, a one-index GEP consumes another (of the same basis and result
      type) one-index GEP, where the inner GEP uses a constant index and the
      outer GEP uses a variable index. For chains of this type, it is trivial
      to reorder them (by simply swapping the indexes). The result of doing so
      is better AddrMode matching for users of the ultimate ptr produced by
      GEP chain.
      
      Future patches can extend this to support non-trivial GEP chains (e.g.
      those with different basis types and/or multiple indices).
      1b65742f
    • Richard Dzenis's avatar
    • David Truby's avatar
      [mlir][flang][openmp] Rework wsloop reduction operations (#80019) · be9f8ffd
      David Truby authored
      
      
      This patch reworks the way that wsloop reduction operations function to
      better match the expected semantics from the OpenMP specification,
      following the rework of parallel reductions.
      
      The new semantics create a private reduction variable as a block
      argument which should be used normally for all operations on that
      variable in the region; this private variable is then combined with the
      others into the shared variable. This way no special omp.reduction
      operations are needed inside the region. These block arguments follow
      the loop control block arguments.
      
      ---------
      
      Co-authored-by: default avatarKiran Chandramohan <kiran.chandramohan@arm.com>
      be9f8ffd
    • jimingham's avatar
      Add the ability to define a Python based command that uses CommandObjectParsed (#70734) · a69ecb24
      jimingham authored
      This allows you to specify options and arguments and their definitions
      and then have lldb handle the completions, help, etc. in the same way
      that lldb does for its parsed commands internally.
      
      This feature has some design considerations as well as the code, so I've
      also set up an RFC, but I did this one first and will put the RFC
      address in here once I've pushed it...
      
      Note, the lldb "ParsedCommand interface" doesn't actually do all the
      work that it should. For instance, saying the type of an option that has
      a completer doesn't automatically hook up the completer, and ditto for
      argument values. We also do almost no work to verify that the arguments
      match their definition, or do auto-completion for them. This patch
      allows you to make a command that's bug-for-bug compatible with built-in
      ones, but I didn't want to stall it on getting the auto-command checking
      to work all the way correctly.
      
      As an overall design note, my primary goal here was to make an interface
      that worked well in the script language. For that I needed, for
      instance, to have a property-based way to get all the option values that
      were specified. It was much more convenient to do that by making a
      fairly bare-bones C interface to define the options and arguments of a
      command, and set their values, and then wrap that in a Python class
      (installed along with the other bits of the lldb python module) which
      you can then derive from to make your new command. This approach will
      also make it easier to experiment.
      
      See the file test_commands.py in the test case for examples of how this
      works.
      a69ecb24
    • jimingham's avatar
      Don't count all the frames just to skip the current inlined ones. (#80918) · a04c6366
      jimingham authored
      The algorithm to find the DW_OP_entry_value requires you to find the
      nearest non-inlined frame. It did that by counting the number of stack
      frames so that it could use that as a loop stopper.
      
      That is unnecessary and inefficient. Unnecessary because GetFrameAtIndex
      will return a null frame when you step past the oldest frame, so you
      already have the "got to the end" signal without counting all the stack
      frames.
      And counting all the stack frames can be expensive.
      a04c6366
    • Mark de Wever's avatar
      [libc++][modules] Re-add build dir CMakeLists.txt. (#81370) · fc0e9c83
      Mark de Wever authored
      This CMakeLists.txt is used to build modules without build system
      support. This was removed in d06ae33e.
      This is used in the documentation how to use modules.
      
      Made some minor changes to make it work with the std.compat module using
      the std module.
      
      Note the CMakeLists.txt in the build dir should be removed once build
      system support is generally available.
      fc0e9c83
    • Matt Arsenault's avatar
      InstCombine: Enable SimplifyDemandedUseFPClass and remove flag (#81108) · 9dd2c593
      Matt Arsenault authored
      This completes the unrevert of ef388334.
      9dd2c593
    • Danila Malyutin's avatar
      [StatepointLowering] Use Constant instead of TargetConstant for undef value (#81635) · e20462a0
      Danila Malyutin authored
      
      
      Prevents isel errors when trying to lower gc relocate of undef value
      (which turns into CopyToReg of TargetConstant). Such relocates may occur
      after DCE (e.g. after GVN removes some dead blocks) if there are not
      passes like instcombine scheduled after to clean them up.
      
      Fixes #80294
      
      ---------
      
      Co-authored-by: default avatarMatt Arsenault <arsenm2@gmail.com>
      e20462a0
    • Prabhuk's avatar
      Revert "[clang] Remove #undef alloca workaround" (#81649) · f79f58d5
      Prabhuk authored
      Reverts llvm/llvm-project#81534
      
      llvm/llvm-project#81534 breaks building (Fuchsia) Clang toolchain on
      Windows.
      
      Log:
      https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8756186536543250705/+/u/clang/install/stdout
      Builder:
      https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-windows-x64/b8756186536543250705/overview
      
      ```
      FAILED: tools/clang/tools/extra/clang-include-fixer/tool/CMakeFiles/clang-include-fixer.dir/ClangIncludeFixer.cpp.obj 
      C:\b\s\w\ir\x\w\cipd\bin\clang-cl.exe  /nologo -TP -DCLANG_REPOSITORY_STRING=\"https://llvm.googlesource.com/llvm-project\" -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IC:\b\s\w\ir\x\w\llvm_build\tools\clang\tools\extra\clang-include-fixer\tool -IC:\b\s\w\ir\x\w\llvm-llvm-project\clang-tools-extra\clang-include-fixer\tool -IC:\b\s\w\ir\x\w\llvm-llvm-project\clang\include -IC:\b\s\w\ir\x\w\llvm_build\tools\clang\include -IC:\b\s\w\ir\x\w\recipe_cleanup\tensorflow-venv\store\python_venv-q9i5kpsp0iun0ktmqgab125ti8\contents\Lib\site-packages\tensorflow\include -IC:\b\s\w\ir\x\w\llvm_build\include -IC:\b\s\w\ir\x\w\llvm-llvm-project\llvm\include -IC:\b\s\w\ir\x\w\llvm-llvm-project\clang-tools-extra\clang-include-fixer\tool\.. -imsvcC:\b\s\w\ir\x\w\zlib_install_target\include -imsvcC:\b\s\w\ir\x\w\zstd_install\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:__cplusplus /Oi /Brepro /bigobj /permissive- /W4  -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported /Gw -no-canonical-prefixes /O2 /Ob2  -std:c++17 -MT  /EHs-c- /GR- -UNDEBUG /showIncludes /Fotools\clang\tools\extra\clang-include-fixer\tool\CMakeFiles\clang-include-fixer.dir\ClangIncludeFixer.cpp.obj /Fdtools\clang\tools\extra\clang-include-fixer\tool\CMakeFiles\clang-include-fixer.dir\ -c -- C:\b\s\w\ir\x\w\llvm-llvm-project\clang-tools-extra\clang-include-fixer\tool\ClangIncludeFixer.cpp
      In file included from C:\b\s\w\ir\x\w\llvm-llvm-project\clang-tools-extra\clang-include-fixer\tool\ClangIncludeFixer.cpp:11:
      In file included from C:\b\s\w\ir\x\w\llvm-llvm-project\clang-tools-extra\clang-include-fixer\tool\..\IncludeFixer.h:15:
      In file included from C:\b\s\w\ir\x\w\llvm-llvm-project\clang\include\clang/Sema/ExternalSemaSource.h:15:
      In file included from C:\b\s\w\ir\x\w\llvm-llvm-project\clang\include\clang/AST/ExternalASTSource.h:18:
      In file included from C:\b\s\w\ir\x\w\llvm-llvm-project\clang\include\clang/AST/DeclBase.h:18:
      In file included from C:\b\s\w\ir\x\w\llvm-llvm-project\clang\include\clang/AST/DeclarationName.h:18:
      In file included from C:\b\s\w\ir\x\w\llvm-llvm-project\clang\include\clang/Basic/IdentifierTable.h:18:
      In file included from C:\b\s\w\ir\x\w\llvm-llvm-project\clang\include\clang/Basic/Builtins.h:63:
      C:\b\s\w\ir\x\w\llvm_build\tools\clang\include\clang/Basic/Builtins.inc(151,1): error: redefinition of enumerator 'BI_alloca'
        151 | LANGBUILTIN(_alloca, "v*z", "n", ALL_MS_LANGUAGES)
            | ^
      C:\b\s\w\ir\x\w\llvm_build\tools\clang\include\clang/Basic/Builtins.inc(15,54): note: expanded from macro 'LANGBUILTIN'
         15 | #  define LANGBUILTIN(ID, TYPE, ATTRS, BUILTIN_LANG) BUILTIN(ID, TYPE, ATTRS)
            |                                                      ^
      C:\b\s\w\ir\x\w\llvm-llvm-project\clang\include\clang/Basic/Builtins.h(62,34): note: expanded from macro 'BUILTIN'
         62 | #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
            |                                  ^
      <scratch space>(72,1): note: expanded from here
         72 | BI_alloca
            | ^
      C:\b\s\w\ir\x\w\llvm_build\tools\clang\include\clang/Basic/Builtins.inc(150,1): note: previous definition is here
        150 | LIBBUILTIN(alloca, "v*z", "fn", STDLIB_H, ALL_GNU_LANGUAGES)
            | ^
      C:\b\s\w\ir\x\w\llvm_build\tools\clang\include\clang/Basic/Builtins.inc(11,61): note: expanded from macro 'LIBBUILTIN'
         11 | #  define LIBBUILTIN(ID, TYPE, ATTRS, HEADER, BUILTIN_LANG) BUILTIN(ID, TYPE, ATTRS)
            |                                                             ^
      C:\b\s\w\ir\x\w\llvm-llvm-project\clang\include\clang/Basic/Builtins.h(62,34): note: expanded from macro 'BUILTIN'
         62 | #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
            |                                  ^
      <scratch space>(71,1): note: expanded from here
         71 | BI_alloca
            | ^
      ```
      f79f58d5
    • Noah Goldstein's avatar
      [InstCombine] Extend `(lshr/shl (shl/lshr -1, x), x)` -> `(lshr/shl -1, x)` for multi-use · 79ce9331
      Noah Goldstein authored
      We previously did this iff the inner `(shl/lshr -1, x)` was
      one-use. No instructions are added even if the inner `(shl/lshr -1,
      x)` is multi-use and this canonicalization both makes the resulting
      instruction easier to analyze and shrinks its dependency chain.
      
      Closes #81576
      79ce9331
    • Mingming Liu's avatar
      [NFC][InstrProf]Factor out getCanonicalName to compute the canonical name... · 2422e969
      Mingming Liu authored
      [NFC][InstrProf]Factor out getCanonicalName to compute the canonical name given a pgo name. (#81547)
      
      - Also update the `InstrProf::addFuncWithName` to call the newly added
      `getCanonicalName`.
      2422e969
    • Joseph Huber's avatar
      [libc] Remove leftover target dependent intrinsic · c830c120
      Joseph Huber authored
      Summary:
      I forgot to remove these because I thought I did it already. This caused
      the build to fail when actually linked.
      c830c120