1. Nov 15, 2023
  2. Nov 14, 2023
    • Alexey Bataev's avatar
      [SLP]Emit actual bitwidth for analyzed MinBitwidth nodes, NFCI. · f6ae50f7
      Alexey Bataev authored
      SLP includes analysis for the minimum bitwidth, the actual integer
      operations can be emitted. It allows to reduce register pressure and
      improve perf. Currently, it includes only cost model and the next
      transformation relies on InstructionCombiner. Better to do it directly
      in SLP, it allows to reduce compile time and fix cost model issues.
      f6ae50f7
    • Qiongsi Wu's avatar
      [SelectionDAG] Handling Oversized Alloca Types under 32 bit Mode to Avoid Code... · c8b11091
      Qiongsi Wu authored
      [SelectionDAG] Handling Oversized Alloca Types under 32 bit Mode to Avoid Code Generator Crash (#71472)
      
      Situations may arise leading to negative `NumElements` argument of an
      `alloca` instruction. In this case the `NumElements` is treated as a
      large unsigned value. Such large arrays may cause the size constant to
      overflow during code generation under 32 bit mode, leading to a crash.
      This PR limits the constant's bit width to the width of the pointer on
      the target. With this fix,
      ```
      alloca i32, i32 -1
      ```
      and
      ```
      alloca [4294967295 x i32], i32 1
      ```
      generates the exact same PowerPC assembly code under 32 bit mode.
      c8b11091
    • Aaron Ballman's avatar
      Fix the NATVIS visualizer for FileEntry · d554355d
      Aaron Ballman authored
      d554355d
    • Timm Baeder's avatar
      [clang][Interp] Fix stack peek offset for This ptr (#70663) · 216dfd5f
      Timm Baeder authored
      `Function::getArgSize()` include both the instance and the RVO pointer,
      so we need to subtract here.
      216dfd5f
    • Utkarsh Saxena's avatar
      Revert "[STLExtras] Remove incorrect hack to make indexed_accessor_range... · 94d6699b
      Utkarsh Saxena authored
      Revert "[STLExtras] Remove incorrect hack to make indexed_accessor_range operator== compatible with C++20" (#72265)
      
      Reverts llvm/llvm-project#72220
      
      This breaks C++20 build bot. Need to see if upgrading to clang-17 in the
      build bot would solve the issue.
      94d6699b
    • Momchil Velikov's avatar
      [CFIFixup] Allow function prologues to span more than one basic block (#68984) · 33374c44
      Momchil Velikov authored
      The CFIFixup pass assumes a function prologue is contained in a single
      basic block. This assumption is broken with upcoming support for stack
      probing (`-fstack-clash-protection`) in AArch64 - the emitted probing
      sequence in a prologue may contain loops, i.e. more than one basic
      block. The generated CFG is not arbitrary though:
       * CFI instructions are outside of any loops
      * for any two CFI instructions of the function prologue one dominates
      and is post-dominated by the other
      
      Thus, for the prologue CFI instructions, if one is executed then all are
      executed, there is a total order of executions, and the last instruction
      in that order can be considered the end of the prologoue for the purpose
      of inserting the initial `.cfi_remember_state` directive.
      
      That last instruction is found by finding the first block in the
      post-order traversal which contains prologue CFI instructions.
      33374c44
    • Alexey Bataev's avatar
      [SLP][NFCI]Improve compile time by using SmallBitVector and filtering · d4cec1ce
      Alexey Bataev authored
      trees with phis/buildvectors only.
      d4cec1ce
    • David Truby's avatar
      [flang] Add dependency to all runtime types to main target on Windows · 1256d1d1
      David Truby authored
      This patch fixes a small bug where the new flang runtime types for
      Windows (static, static_dbg, etc) are not built when the FortranRuntime
      is requested by adding the missing dependency.
      1256d1d1
    • David Spickett's avatar
      [GitHub] Add --fail to curl commands (#72238) · a39a28d2
      David Spickett authored
      This means that if we try to download a missing file, we do not get a
      document with the same file name, but containing only the http response
      code.
      
      ```
      $ curl -O -L --fail https://raw.githubusercontent.com/llvm/llvm-project/main/.github/workflows/not-a-file.py
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
        0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
      curl: (22) The requested URL returned error: 404
      $ $?
      22: command not found
      ```
      
      Which will be less confusing than python complaining about the file
      contents.
      a39a28d2
    • elhewaty's avatar
      [InstCombine] Fold xored one-complemented operand comparisons (#69882) · daddf402
      elhewaty authored
      - [InstCombine] Add test coverage for comparisons of operands including
      one-complemented oparands(NFC).
      - [InstCombine] Fold xored one-complemented operand comparisons.
      Alive2: https://alive2.llvm.org/ce/z/PZMJeB
      Fixes #69803.
      daddf402
    • Jeremy Morse's avatar
      [DebugInfo][RemoveDIs] Add flag to use "new" debug-info in opt (#71937) · da843aa0
      Jeremy Morse authored
      Our option to turn on the non-intrinsic form of debug-info
      (`--experimental-debuginfo-iterators`) currently requires that LLVM is
      built with the `LLVM_EXPERIMENTAL_DEBUGINFO_ITERATORS` cmake flag
      enabled, so that some (slight) performance regressions aren't
      on-by-default during the prototype/testing period. However, we still
      want to be able to _optionally_ run tests, if support is built into
      LLVM.
      
      To allow optionally exercising the non-intrinsic debug-info code, this
      patch adds `--try-experimental-debuginfo-iterators` to opt, which turns
      the `--experimental-debuginfo-iterators` flag on if support is built in,
      or leaves it off. This means we can run tests that:
       * Use normal dbg.value intrinsics if there's no support, or
       * Uses non-instruction DPValues if there is support.
        
      Which means we can start getting test coverage of DPValues/RemoveDIs
      behaviour, from in-tree tests, on our RemoveDIs buildbot. All the code
      to do with automagically converting from one form to the other landed in
      10a9e744.
      da843aa0