1. May 25, 2024
    • Michael Kruse's avatar
      Address review comment · 7ef1d9e9
      Michael Kruse authored
      7ef1d9e9
    • Michael Kruse's avatar
    • Michael Kruse's avatar
      Address review comment · 6c88e439
      Michael Kruse authored
      6c88e439
    • Michael Kruse's avatar
    • Xing Xue's avatar
      [OpenMP][AIX] Extend LIT test timeout limit (#93319) · 2669ee11
      Xing Xue authored
      When buildbots are crowded, the libomp LIT tests may hit timeouts so
      extend the limit from 1800 to 3000 seconds.
      2669ee11
    • Dmitry Vasilyev's avatar
      [lldb] Fixed the TestDebuggerAPI test on x86_64 Windows host (#90580) · 77369a7f
      Dmitry Vasilyev authored
      Disable the TestDebuggerAPI test in case of the remote target and
      Windows host.
      77369a7f
    • Slava Zakharin's avatar
    • Lei Wang's avatar
      [llvm-profgen] Improve sample profile density (#92144) · b9d40a7a
      Lei Wang authored
      The profile density feature(the amount of samples in the profile
      relative to the program size) is used to identify insufficient sample
      issue and provide hints for user to increase sample count. A low-density
      profile can be inaccurate due to statistical noise, which can hurt FDO
      performance.
      
      This change introduces two improvements to the current density work. 
      1. The density calculation/definition is changed. Previously, the
      density of a profile was calculated as the minimum density for all warm
      functions (a function was considered warm if its total samples were
      within the top N percent of the profile). However, there is a problem
      that a high total sample profile can have a very low density, which
      makes the density value unstable.
      - Instead, we want to find a density number such that if a function's
      density is below this value, it is considered low-density function. We
      consider the whole profile is bad if a group of low-density functions
      have the sum of samples that exceeds N percent cut-off of the total
      samples.
      
      - In implementation, we sort the function profiles by density, iterate
      them in descending order and keep accumulating the body samples until
      the sum exceeds the (100% - N) percentage of the total_samples, the
      profile-density is the last(minimum) function-density of processed
      functions. We introduce the a flag(`--profile-density-threshold`) for
      this percentage threshold.
      
      2. The density is now calculated based on final(compiler used) profiles
      instead of merged context-less profiles.
      b9d40a7a
    • Michael Maitland's avatar
      [RISCV] Do not check PostRAScheduler in enablePostRAScheduler (#92781) · 66b5f16b
      Michael Maitland authored
      On RISC-V, there are a few ways to control whether the
      PostMachineScheduler is enabled. If `-enable-post-misched` is passed or
      passed with a value of true, then the PostMachineScheduler is enabled.
      If it is passed with a value of false then the PostMachineScheduler is
      disabled. If the option is not passed at all, then
      `RISCVSubtarget::enablePostRAMachineScheduler` decides whether the pass
      should be enabled or not. `TargetSubtargetInfo::enablePostRAScheduler`
      and `TargetSubtargetInfo::enablePostRAMachineScheduler` who check the
      SchedModel value are not called by RISC-V backend.
      
      `RISCVSubtarget::enablePostRAMachineScheduler` currently checks if the
      active scheduler model sets `PostRAScheduler`. If it is set to true by
      the scheduler model, then the pass is enabled. If it is not set to true
      by the scheduler model, then the value of `UsePostRAScheduler` subtarget
      feature is used.
      
      I argue that the RISC-V backend should not use `PostRAScheduler` field
      of the scheduler model to control whether the PostMachineScheduler is
      enabled for the following reasons:
      
      1. No other targets use this value to control whether
      PostMachineScheduler is enabled. They only use it to check whether the
      legacy PostRASchedulerList scheduler is enabled.
      
      2. We can add the `UsePostRAScheduler` feature to the processor
      definition in RISCVProcessors.td to tie a processor to whether the pass
      should be enabled by default. This makes the feature and the sched model
      field redundant.
      
      3. Since these options are redundant, we should prefer the feature,
      since we can set `+` and `-` on the feature, but the value of the
      scheduler cannot be controlled on the command line.
      
      4. Keeping both options allows us to set the feature and the scheduler
      model value to conflicting values. Although the scheduler model value
      will win out, it feels awkward to allow it.
      66b5f16b
    • Shilei Tian's avatar
    • Aaron Siddhartha Mondal's avatar
      [Support] Remove terminfo dependency (#92865) · 6bf450c7
      Aaron Siddhartha Mondal authored
      The terminfo dependency introduces a significant nonhermeticity into the
      build. It doesn't respect `--no-undefined-version` meaning that it's not
      a dependency that can be built with Clang 17+. This forces maintainers
      of source-based distributions to implement patches or ignore linker
      errors.
      
      Remove it to reduce the closure size and improve portability of
      LLVM-based tools. Users can still use command line arguments to toggle
      color support expliticly.
      
      Fixes #75490
      Closes #53294 #23355
      6bf450c7
    • Shilei Tian's avatar
      [OpenMP][OMPX] No default argument for C API · 8c718a3a
      Shilei Tian authored
      8c718a3a
    • Timm Bäder's avatar
      5c40db1d
    • Shilei Tian's avatar
      [OpenMP][OMPX] Add shfl_down_sync (#93311) · 4fb02de9
      Shilei Tian authored
      4fb02de9
    • Helena Kotas's avatar
      Enable unguarded availability diagnostic on instantiated template functions (#91699) · d07362f7
      Helena Kotas authored
      Availability diagnostic in instantiated template functions was
      intentionally skipped in the original
      [commit](https://github.com/llvm/llvm-project/commit/5cd57177a51abc7b0bfe18f70566572dbccab9a0)
      years ago with a FIXME note.
      
      I ran into this when working on diagnostics for HLSL. When I remove the
      skip, it seems to be working just fine outputting expected messages. So,
      unless I am missing something, I would keep it enabled and use it for
      checking availability in HLSL templates as well.
      d07362f7
    • Kazu Hirata's avatar
      8d2258fd
    • Keith Smiley's avatar
      [bazel] Add missing dep after #93008 (#93325) · 41c057b0
      Keith Smiley authored
      This dep was removed in that change, but this library still needs it.
      41c057b0
    • Sayhaan Siddiqui's avatar
      [BOLT][NFC] Fix unused variable warning (#93323) · dc7897ae
      Sayhaan Siddiqui authored
      This fixes
      
      ```
      warning: variable 'AbbrDecl' set but not used [-Wunused-but-set-variable]
      
         76 |     if (const DWARFAbbreviationDeclaration *AbbrDecl =
      ```
      dc7897ae
    • Antonio Frighetto's avatar
      [ConstantRange][LVI] Add support for `multiplyWithNoWrap` · e897b0bb
      Antonio Frighetto authored
      Introduce support for computing multiplication ranges when nowrap
      flags are known. This is achieved by intersecting the multiplication
      range with the saturating one. Note that we may still conservatively
      return overdefined when handling non-wrapped/non-sign-wrapped ranges.
      e897b0bb
    • Zhaoshi Zheng's avatar
      [AArch64][SVE] Lower function arguments in types of arrays of predicates (#90122) · f4924712
      Zhaoshi Zheng authored
      Function arguments in types of arrays of scalable predicates, even in [1 x <vscale x 16 x i1>] type, should be allocated to available P0 ~ P3 registers, or to the stack and a point of the stack location is passed to the callee.
      
      See details in https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#parameter-passing, step C.7 and C.8
      f4924712
    • Ramkumar Ramachandra's avatar
      [LV] fix logical error in trunc cost (#91136) · bb0d29a7
      Ramkumar Ramachandra authored
      In LoopVectorizationCostModel::getInstructionCost(), when the condition
      canTruncateToMinimalBitwidth() is satisfied, for a trunc, the source
      type is computed as the smallest type of the source vector and the
      destination vector, and the destination type is computed as the largest
      type of the instruction and destination type. This is clearly a logical
      error, as the original source vector type could be smaller than the
      original destination vector type, and the trunc semantics are broken
      because we're attempting to widen.
      
      Fixes #47665.
      bb0d29a7
    • Craig Topper's avatar
    • Peter Klausler's avatar
      [flang] Silence bogus error about NULL() actual for assumed-rank dummy (#93225) · b8b90c2a
      Peter Klausler authored
      A NULL(without MOLD=) actual argument can be associated with an OPTIONAL
      assumed-rank non-allocatable non-pointer dummy argument; it simply
      signifies that the corresponding actual argument is absent, and thus
      none of its dynamic attributes, including rank, are meaningful.
      b8b90c2a
    • Ramkumar Ramachandra's avatar
      [LAA] rewrite a test to make it more robust (#93197) · 9e814669
      Ramkumar Ramachandra authored
      The test select-dependence.ll can be eliminated completely by dce, as it
      returns a constant, and doesn't write any arguments. Lift out the local
      allocas into arguments, so that it is less nonsensical. While at it,
      rename the variables for greater readability, and regenerate the test
      with UpdateTestChecks.
      9e814669
    • Hui's avatar
      [libc++][test] Close LWG3045 (#93053) · 96af54b9
      Hui authored
      96af54b9
    • Craig Topper's avatar
      [SelectionDAG][RISCV][VE] Rename VP_ASHR->VP_SRA VP_LSHR->VP_SRL. (#93221) · a1c9b967
      Craig Topper authored
      This maintains consistency with the non-VP ISD opcodes.
      a1c9b967
    • Kazu Hirata's avatar
      [memprof] Use a SetVector (NFC) (#93312) · 15135afa
      Kazu Hirata authored
      15135afa
    • Christopher Bate's avatar
      [mlir][Pass] Add new FileTreeIRPrinterConfig (#67840) · 9ad5da2d
      Christopher Bate authored
      This change expands the existing instrumentation that prints the IR
      before/after each pass to an output stream (usually stderr). It adds
      a new configuration that will print the output of each pass to a
      separate file. The files will be organized into a directory tree
      rooted at a specified directory. For existing tools, a CL option
      `-mlir-print-ir-tree-dir` is added to specify this directory and
      activate the new printing config.
      
      The created directory tree mirrors the nesting structure of the IR. For
      example,
      if the IR is congruent to the pass-pipeline
      "builtin.module(pass1,pass2,func.func(pass3,pass4),pass5)", and
      `-mlir-print-ir-tree-dir=/tmp/pipeline_output`, then then the tree file
      tree
      created will look like:
      
      ```
      /tmp/pass_output
      ├── builtin_module_the_symbol_name
      │   ├── 0_pass1.mlir
      │   ├── 1_pass2.mlir
      │   ├── 2_pass5.mlir
      │   ├── func_func_my_func_name
      │   │   ├── 1_0_pass3.mlir
      │   │   ├── 1_1_pass4.mlir
      │   ├── func_func_my_other_func_name
      │   │   ├── 1_0_pass3.mlir
      │   │   ├── 1_1_pass4.mlir
      ```
      
      The subdirectories are named by concatenating the relevant parent
      operation names and symbol name (if present). The printer keeps a
      counter associated with ops that are targeted by passes and their
      isolated-from-above parents. Each filename is given a numeric prefix
      using the counter value for the op that the pass is targeting and then
      prepending the counter values for each parent. This gives a naming
      where it is easy to distinguish which passes may have run concurrently
      vs. which have a clear ordering. In the above example, for both
      `1_1_pass4.mlir` files, the first `1` refers to the counter for the
      parent op, and the second refers to the counter for the respective
      function.
      9ad5da2d
  2. May 24, 2024