1. Nov 28, 2023
    • Vitaly Buka's avatar
    • Aiden Grossman's avatar
      [NewPM] Remove LazyValueInfoPrinter Pass (#73408) · 0bdb9cb1
      Aiden Grossman authored
      This pass isn't used anywhere upstream and thus has no test coverage.
      For these reasons, remove it.
      0bdb9cb1
    • Peiming Liu's avatar
      4e2f1521
    • Nick Desaulniers's avatar
      [vim] set commentstring (#71838) · c0fe0719
      Nick Desaulniers authored
      I recently moved from using vim to lunarvim. I noticed that `gcc` (lol)
      wasn't able to comment out lines, because commentstring is not set.
      
      Thanks to Chase Colman for the suggestion in
      https://github.com/LunarVim/LunarVim/issues/4394.
      c0fe0719
    • spupyrev's avatar
      [BOLT] Use deterministic xxh3 for computing BF/BB hashes (#72542) · e7dd596c
      spupyrev authored
      std::hash and ADT/Hashing::hash_value are non-deterministic functions
      whose
      results might vary across implementation/process/execution. Using xxh3
      instead
      for computing hashes of BinaryFunctions and BinaryBasicBlock for stale
      profile
      matching.
      (A possible alternative is to use ADT/StableHashing.h based on FNV
      hashing but
      xxh3 seems to be more popular in LLVM)
      
      This is to address https://github.com/llvm/llvm-project/issues/65241.
      e7dd596c
    • Chris Bieneman's avatar
      [NFC] Map changed file through envar · 488d9002
      Chris Bieneman authored
      This sanitizes the string for printing.
      488d9002
    • Philip Reames's avatar
      [RISCV] Use subreg extract for extract_vector_elt when vlen is known (#72666) · cf17a24a
      Philip Reames authored
      This is the first in a planned patch series to teach our vector lowering
      how to exploit register boundaries in LMUL>1 types when VLEN is known to
      be an exact constant. This corresponds to code compiled by clang with
      the -mrvv-vector-bits=zvl option.
      
      For extract_vector_elt, if we have a constant index and a known vlen,
      then we can identify which register out of a register group is being
      accessed. Given this, we can do a sub-register extract for that
      register, and then shift any remaining index.
      
      This results in all constant index extracts becoming m1 operations, and
      thus eliminates the complexity concern for explode-vector idioms at high
      lmul.
      cf17a24a
    • Aart Bik's avatar
      [mlir][sparse] rename DimLevelType to LevelType (#73561) · 1944c4f7
      Aart Bik authored
      The "Dim" prefix is a legacy left-over that no longer makes sense, since
      we have a very strict "Dimension" vs. "Level" definition for sparse
      tensor types and their storage.
      1944c4f7
    • Cyndy Ishida's avatar
      [readtapi] Add Extract & Remove architecture functionality (#72657) · e1f69b86
      Cyndy Ishida authored
      This adds functionality to tbd files similar to what `lipo -extract`
      and `lipo -remove` does for binaries.
      e1f69b86
    • Dimitry Andric's avatar
    • Maksim Levental's avatar
      225648e9
    • Han-Chung Wang's avatar
    • Joseph Huber's avatar
      [OpenMP] Temporarily disable OMPT tests for x64 · 216040ee
      Joseph Huber authored
      Summary:
      These tests are currently failing, disable them so we can keep the bots
      green until we find a better solution. The x64 tests are not the core
      target so this is low priority.
      216040ee
    • Dimitry Andric's avatar
      [sanitizer] Add re-execution on FreeBSD when ASLR is detected (#73439) · 7440e4ed
      Dimitry Andric authored
      In the FreeBSD base system, re-executing the main binary when ASLR is
      detected was implemented in the following commits:
      
      * freebsd/freebsd-src@7cafe89f9ce33
      * freebsd/freebsd-src@96fe7c8ab0f65
      * freebsd/freebsd-src@930a7c2ac67e1
      * freebsd/freebsd-src@0a736f0a6aeb0
      * freebsd/freebsd-src@4c9a0adad1826
      
      Squash all these to bring them into upstream compiler-rt.
      
      When ASLR is detected to be enabled, this first force-disables ASLR for
      the current process, then calls ReExec(). The ReExec() function gets a
      FreeBSD specific implementation for finding the path of the executed
      program, via the ELF auxiliary vector. This is done without calling into
      the regular elf_aux_info(3) function, as that makes use of several
      already-intercepted functions.
      7440e4ed
    • Jason Molenda's avatar
      Include <vector> in WatchpointResource.h · a0a1ff3a
      Jason Molenda authored
      On macOS <vector> was already included via another
      header file, but this failed on the CI bots.  I'd
      tested on linux earlier in this patch's life when
      the headers were differently arranged.
      a0a1ff3a
    • michaelrj-google's avatar
      [libc] Move in_use into OptionalStorage (#73569) · f90f036e
      michaelrj-google authored
      The previous optional class would call the destructor on a non-trivially
      destructible object regardless of if it had already been reset. This
      patch fixes this by moving tracking for if the object exists into the
      internal storage class for optional.
      f90f036e
    • Yusra Syeda's avatar
      [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (#68926) · 9a38a72f
      Yusra Syeda authored
      
      
      This PR adds support for the PPA2 fields.
      
      ---------
      
      Co-authored-by: default avatarYusra Syeda <yusra.syeda@ibm.com>
      9a38a72f
    • Jason Molenda's avatar
      [lldb] [mostly NFC] Large WP foundation: WatchpointResources (#68845) · fc6b7252
      Jason Molenda authored
      This patch is rearranging code a bit to add WatchpointResources to
      Process. A WatchpointResource is meant to represent a hardware
      watchpoint register in the inferior process. It has an address, a size,
      a type, and a list of Watchpoints that are using this
      WatchpointResource.
      
      This current patch doesn't add any of the features of
      WatchpointResources that make them interesting -- a user asking to watch
      a 24 byte object could watch this with three 8 byte WatchpointResources.
      Or a Watchpoint on 1 byte at 0x1002 and a second watchpoint on 1 byte at
      0x1003, these must both be served by a single WatchpointResource on that
      doubleword at 0x1000 on a 64-bit target, if two hardware watchpoint
      registers were used to track these separately, one of them may not be
      hit. Or if you have one Watchpoint on a variable with a condition set,
      and another Watchpoint on that same variable with a command defined or
      different condition, or ignorecount, both of those Watchpoints need to
      evaluate their criteria/commands when their WatchpointResource has been
      hit.
      
      There's a bit of code movement to rearrange things in the direction I'll
      need for implementing this feature, so I want to start with reviewing &
      landing this mostly NFC patch and we can focus on the algorithmic
      choices about how WatchpointResources are shared and handled as they're
      triggeed, separately.
      
      This patch also stops printing "Watchpoint <n> hit: old value: <x>, new
      vlaue: <y>" for Read watchpoints. I could make an argument for print
      "Watchpoint <n> hit: current value <x>" but the current output doesn't
      make any sense, and the user can print the value if they are
      particularly interested. Read watchpoints are used primarily to
      understand what code is reading a variable.
      
      This patch adds more fallbacks for how to print the objects being
      watched if we have types, instead of assuming they are all integral
      values, so a struct will print its elements. As large watchpoints are
      added, we'll be doing a lot more of those.
      
      To track the WatchpointSP in the WatchpointResources, I changed the
      internal API which took a WatchpointSP and devolved it to a Watchpoint*,
      which meant touching several different Process files. I removed the
      watchpoint code in ProcessKDP which only reported that watchpoints
      aren't supported, the base class does that already.
      
      I haven't yet changed how we receive a watchpoint to identify the
      WatchpointResource responsible for the trigger, and identify all
      Watchpoints that are using this Resource to evaluate their conditions
      etc. This is the same work that a BreakpointSite needs to do when it has
      been tiggered, where multiple Breakpoints may be at the same address.
      
      There is not yet any printing of the Resources that a Watchpoint is
      implemented in terms of ("watchpoint list", or
      SBWatchpoint::GetDescription).
      
      "watchpoint set var" and "watchpoint set expression" take a size
      argument which was previously 1, 2, 4, or 8 (an enum). I've changed this
      to an unsigned int. Most hardware implementations can only watch 1, 2,
      4, 8 byte ranges, but with Resources we'll allow a user to ask for
      different sized watchpoints and set them in hardware-expressble terms
      soon.
      
      I've annotated areas where I know there is work still needed with
      LWP_TODO that I'll be working on once this is landed.
      
      I've tested this on aarch64 macOS, aarch64 Linux, and Intel macOS.
      
      https://discourse.llvm.org/t/rfc-large-watchpoint-support-in-lldb/72116
      fc6b7252
    • Quinn Dawkins's avatar
      [mlir][vector] Distribute all non-permutation or broadcasted masked transfer reads (#73539) · f385f6c9
      Quinn Dawkins authored
      The primary difficulty with distribution of masked transfers is when the
      permutation map permutes the vector, in which case the distribution
      logic needs to make sure the correct mask elements end up with the
      distributed transfer. This is only tricky when the permutation map has a
      permutation in it, so we can relax the condition for distribution.
      f385f6c9
    • Chris B's avatar
      [NFC] Cleanup and sort hlsl_intrinsics.h (#72414) · 0f189840
      Chris B authored
      This is just a simple cleanup of hlsl_intrinsics.h. I've broken this
      into two commits to make it easier to follow during review. The first
      commit replaces the `__attribute__` annotations with preprocessor macros
      to make it easier to read the function declarations. The second commit
      sorts the function declarations.
      
      Function declarations are sorted by function name alphabetically, then
      grouped by base element type. The declarations within each group are
      sorted in increasing order by number of elements, and the groups
      themselves are sorted by increasing element size. For elements of the
      same size they are then sorted by signed integers, then unsigned
      integers then floating point.
      0f189840
    • Felipe de Azevedo Piovezan's avatar
      [cross-project-tests] Fix struct-dse example so that it fails again (#73566) · a8837b49
      Felipe de Azevedo Piovezan authored
      The purpose of this example is to provide a case where the debugger /
      debug info experience could be improved. A recent commit by clang
      (0d2860b7) changed codegen such that it
      changes how "small structs" are initialized, in a way that the debugger
      is now able to correctly display the variable being targeted by this
      test.
      
      In order to keep the example relevant, i.e. failing, this commit makes
      it so that the struct is now "big enough" to not trigger the new
      codegen.
      a8837b49
    • Craig Topper's avatar
      179a2e04
    • Owen Pan's avatar
      [clang-format] Add BreakAdjacentStringLiterals option (#73432) · 39faf13d
      Owen Pan authored
      Closes #70451.
      39faf13d
    • Craig Topper's avatar
      [RISCV][GISel] Fix 2 indirect call bugs. (#73170) · 9e869196
      Craig Topper authored
      We can't set MO_PLT on an indirect call.
      We need to constrain the register class for the operand to the call
      instruction.
      9e869196
    • Craig Topper's avatar
      [InstCombine] Set disjoint flag when turning Add into Or. (#72702) · 03d4a9d9
      Craig Topper authored
      The disjoint flag was recently added to IR in #72583 
      03d4a9d9
    • Louis Dionne's avatar
      [libc++] Move compiler-detection Lit features first (#73544) · e666e274
      Louis Dionne authored
      Lit features are evaluated in order. Some checks may require the
      compiler detection to have run first in order to work properly, for
      example some checks being added in https://reviews.llvm.org/D154246
      which require GCC to have been detected. It is kind of brittle to rely
      on such ordering, but in practice moving the compiler detection first
      should never hurt.
      e666e274
    • Joseph Huber's avatar
      [OpenMP] Enable position independent code for libomptarget · 71e3082d
      Joseph Huber authored
      Summary:
      This option used to be passed manually by the `-fPIC` option that was
      always enabled by the LLVM flags. Since we now do this manually we want
      to specify that these are supposed for use fPIC code.
      71e3082d
    • Joseph Huber's avatar
      [OpenMP] Add back implicit flags manually · 4b7beab4
      Joseph Huber authored
      Summary:
      We used to inherit these flags from the LLVM options in a runtimes
      build. This patch adds them back in manually as they are helpful for
      diagnostics and optimizing the created binary.
      4b7beab4
    • Johannes Reifferscheid's avatar
      [Bazel] Fix for 7eccd528 · 3d87b9d5
      Johannes Reifferscheid authored
      3d87b9d5
    • Kirill Stoimenov's avatar
      4e0c48b9
    • Aiden Grossman's avatar
      [AArch64] Update comment on GHC CC (#72761) · 983a2757
      Aiden Grossman authored
      Currently, there are a couple dead links in the comment surrounding the
      tablegen implementtion of the GHC calling convention in AArch64. There
      was some refactoring in GHC that moved things around. This patch fixes
      up the comment to match the current state of the repository to make it
      easier for future readers to reference the relevant documentation.
      983a2757
    • Joseph Huber's avatar
      [llvm] Disable HandleLLVMOptions in runtimes mode (#73031) · ee922e6e
      Joseph Huber authored
      Summary:
      There are a few default options that LLVM adds that can be problematic
      for runtimes builds. These options are generally intended to handle
      building LLVM itself, but are also added when building in a runtimes
      mode. One such issue I've run into is that in `libc` we deliberately use
      `--target` to use a different device toolchain, which doesn't support
      some linker arguments passed via `-Wl`. This is observed in
      https://github.com/llvm/llvm-project/pull/73030 when attempting to use
      these options.
      
      This patch completely removes these default arguments.
      
      The consensus is that any issues created by this patch should ultimately
      be solved on a per-runtime basis.
      ee922e6e
    • Louis Dionne's avatar
      [libc++] Add missing REQUIRES for exception handling test · 2b7cca1c
      Louis Dionne authored
      It otherwise fails on Windows.
      2b7cca1c
    • Johannes Doerfert's avatar
      [OpenMP] Tear down GenericDeviceTy's with GenericPluginTy (#73557) · 7bfcce3e
      Johannes Doerfert authored
      There is no point in keeping GenericDeviceTy objects alive longer than
      the associated GenericPluginTy. Instead of the old API we now tear them
      down with the plugin, avoiding ordering issues.
      7bfcce3e
    • Duo Wang's avatar
      [unittest][Support] Fix bad negation of signed integer in LEB128Test.SLEB128Size (#72700) · e3f16de9
      Duo Wang authored
      I came across an undefined behavior when running Support unit tests with
      UBSAN on Windows.
      ```bash
      [ RUN      ] LEB128Test.SLEB128Size
      C:\llvm\unittests\Support\LEB128Test.cpp:382:3: runtime error: negation of -9223372036854775808 cannot be represented in type 'long long'; cast to an unsigned type to negate this value to itself
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior C:\llvm\unittests\Support\LEB128Test.cpp:382:3 in 
      ```
      
      UBSAN did not report the same error on macOS, but the negation still
      seemed invalid (`0x8000000000000000LL == -0x8000000000000000LL`
      evaluated to `true`).
      I can confirm that `-0x7fffffffffffffffLL - 1` results in the expected
      value on both platforms.
      e3f16de9
    • David Li's avatar
      Fix ISel crash when lowering BUILD_VECTOR (#73186) · c2ba2b21
      David Li authored
      512bit vpbroadcastw is available only with AVX512BW. Avoid lowering
      BUILD_VEC into vbroard_cast node when the condition is not met. This
      fixed a crash (see the added new test).
      c2ba2b21
    • Johannes Doerfert's avatar
      f9436464
    • Johannes Doerfert's avatar
      [OpenMP][NFC] Remove no-op __tgt_rtl_deinit_plugin · 2b2e711a
      Johannes Doerfert authored
      The order in which we deinit things, especially when shared libraries
      are involved, is complicated. To simplify our lives the nextgen plugin
      deinitializes the GenericPluginTy and subclasses automatically. The old
      __tgt_rtl_deinit_plugin is not needed anymore.
      2b2e711a
    • Johannes Doerfert's avatar
      [OpenMP][NFC] Remove unused (un)register_lib plugin API · 9c33bf62
      Johannes Doerfert authored
      These APIs have not been hooked up for a while. No need to carry them.
      9c33bf62
    • Amir Ayupov's avatar
      [BOLT][test] Replace /dev/null with temp file (#73485) · ab14eb23
      Amir Ayupov authored
      NFC processing time script identifies tests by output filename.
      When `/dev/null` is used as output filename, we're unable to tell the
      source test, and the reports are unhelpful.
      Replace `/dev/null/` with `%t.null` which resolves the issue.
      ab14eb23