1. Nov 09, 2023
    • jeffreytan81's avatar
      Improve VSCode DAP logpoint value summary (#71723) · f175b964
      jeffreytan81 authored
      
      
      Currently VSCode logpoint uses `SBValue::GetValue` to get the value for
      printing. This is not providing an intuitive result for std::string or
      char * -- it shows the pointer value instead of the string content.
      
      This patch improves by prefers `SBValue::GetSummary()` before using
      `SBValue::GetValue()`.
      
      ---------
      
      Co-authored-by: default avatarjeffreytan81 <jeffreytan@fb.com>
      f175b964
    • Rafael Auler's avatar
      [BOLT][AArch64] Fix ifuncs test header inclusion (#71741) · 4c9f6d6f
      Rafael Auler authored
      Summary: Do not include stdlib headers as these tests are built with
      -nostdlib. Tests outside of runtime folder also run cross-platforms, so
      an x86 machine wouldn't have access to the correct headers used in the
      aarch64 toolchain, even if it has an aarch64 compiler (clang itself).
      4c9f6d6f
    • Alex Langford's avatar
      Revert "[Pass][CodeGen] Add some necessary passes for codegen (#70903)" · d42b2ceb
      Alex Langford authored
      This change broke building LLVM with Module support enabled, i.e.
      `LLVM_ENABLE_MODULES=ON`.
      This reverts commit f40da072.
      d42b2ceb
    • Daniel Thornburgh's avatar
      [lld][MachO] Prevent doubled N_SO when comp_dir and name absolute (#71608) · 71de6125
      Daniel Thornburgh authored
      When forming MachO STABS, this change detects if the DW_AT_name of the
      compile unit is already absolute (as allowed by DWARF), and if so, does
      not prepend DW_AT_comp_dir.
      
      Fixes #70995
      71de6125
    • Konstantin Varlamov's avatar
    • Maksim Levental's avatar
      950f6899
    • Anthony Cabrera's avatar
      [flang][hlfir] patch for assumed shape dummy with VALUE keyword when lowering to HLFIR (#70391) · 8803211a
      Anthony Cabrera authored
      Adds functionality for assumed shape dummy with value keyword when
      lowering to HLFIR
      8803211a
    • Quinn Dawkins's avatar
      [mlir][vector] Add folders for full constant transfer masks (#71676) · f6d48720
      Quinn Dawkins authored
      When the mask bounds of a `vector.constant_mask` exactly equal the shape
      of the vector, any transfer op consuming that mask will be unaffected by
      it. Drop the mask in such cases.
      f6d48720
    • spupyrev's avatar
      [ELF] Fix assertion in cdsort (#71708) · ef6d1871
      spupyrev authored
      It seems that some functions (.text.unlikely.xxx) may have zero size,
      which
      makes some builds with enabled assertions fail. Removing the assertion
      and
      extending one test to fix the build.
      The sorting can process such zero-sized functions so no changes there
      are needed
      ef6d1871
    • Aleksei Nurmukhametov's avatar
    • Fabian Mora's avatar
      [flang] Change `uniqueCGIdent` separator from `.` to `X` (#71338) · fd389f46
      Fabian Mora authored
      Change the separator in the `uniqueCGIdent` method to `X`. This change
      is required to enable OpenMP offloading for the NVPTX target, as dots
      are not valid identifiers in PTX and `uniqueCGIdent` is used to mangle
      some literals. Follow up patches will change the remainder of `.`
      appearances in names to `X` and add support for the NVPTX target.
      fd389f46
    • Krzysztof Drewniak's avatar
      Fix SmallVector usage in SerailzeToHsaco (#71702) · 05fa923a
      Krzysztof Drewniak authored
      Enable merging #71439 by removing a definitely-wrong usage of
      std::unique_ptr<SmallVectorImpl<char>> as a return value with passing in
      a SmallVectorImpl<char>&
      
      Also change the following function to take ArrayRef<char> instead of
      const SmalVectorImpl<char>& .
      05fa923a
    • Arthur Eubanks's avatar
      Revert "Reland [clang] Canonicalize system headers in dependency file when... · 955dd880
      Arthur Eubanks authored
      Revert "Reland [clang] Canonicalize system headers in dependency file when -canonical-prefixes" (#71697)
      
      This reverts commit 578a4716.
      
      This causes multiple issues. Compile time slowdown due to more path
      canonicalization, and weird behavior on Windows.
      
      Will reland under a separate flag `-f[no-]canonical-system-headers` to
      match gcc in the future and further limit when it's passed by default.
      
      Fixes #70011.
      955dd880
    • Jun Wang's avatar
      [AMDGPU] Add inreg support for SGPR arguments (#67182) · 54470176
      Jun Wang authored
      
      
      Function parameters marked with inreg are supposed to be allocated to
      SGPRs. However, for compute functions, this is ignored and function
      parameters are allocated to VGPRs. This fix modifies CC_AMDGPU_Func in
      AMDGPUCallingConv.td to use SGPRs if input arg is marked inreg.
      ---------
      
      Co-authored-by: default avatarJun Wang <jun.wang7@amd.com>
      54470176
    • Peiming Liu's avatar
    • Konstantin Varlamov's avatar
      [libc++][hardening] Rework macros for enabling the hardening mode. (#70575) · 64d413ef
      Konstantin Varlamov authored
      1. Instead of using individual "boolean" macros, have an "enum" macro
      `_LIBCPP_HARDENING_MODE`. This avoids issues with macros being
      mutually exclusive and makes overriding the hardening mode within a TU
      more straightforward.
      
      2. Rename the safe mode to debug-lite.
      
      This brings the code in line with the RFC:
      https://discourse.llvm.org/t/rfc-hardening-in-libc/73925
      
      Fixes #65101
      64d413ef
    • LLVM GN Syncbot's avatar
      [gn build] Port c6cf3295 · b8a06206
      LLVM GN Syncbot authored
      b8a06206
    • Jacob Lambert's avatar
      [CodeGen] Implement post-opt linking option for builtin bitocdes (#69371) · c6cf3295
      Jacob Lambert authored
      In this patch, we create a new ModulePass that mimics the LinkInModules
      API from CodeGenAction.cpp, and a new command line option to enable the
      pass. As part of the implementation, we needed to refactor the
      BackendConsumer class definition into a new separate header (instead of
      embedded in CodeGenAction.cpp). With this new pass, we can now re-link
      bitcodes supplied via the -mlink-built-in bitcodes as part of the
      RunOptimizationPipeline.
      
      With the re-linking pass, we now handle cases where new device library
      functions are introduced as part of the optimization pipeline.
      Previously, these newly introduced functions (for example a fused sincos
      call) would result in a linking error due to a missing function
      definition. This new pass can be initiated via:
      
            -mllvm -relink-builtin-bitcode-postop
      
      Also note we intentionally exclude bitcodes supplied via the
      -mlink-bitcode-file option from the second linking step
      c6cf3295
    • Maksim Panchenko's avatar
      [BOLT] Follow-up to "Fix incorrect basic block output addresses" (#71630) · 254ccb95
      Maksim Panchenko authored
      In 8244ff67, I've introduced an
      assertion that incorrectly used BasicBlock::empty(). Some basic blocks
      may contain only pseudo instructions and thus BB->empty() will evaluate
      to false, while the actual code size will be zero.
      254ccb95
    • Greg Clayton's avatar
      Make DWARFUnitVector threadsafe. (#71487) · 5aa934e2
      Greg Clayton authored
      The DWARFUnitVector class lives inside of the DWARFContextState. Prior
      to this fix a non const reference was being handed out to clients. When
      fetching the DWO units, there used to be a "bool Lazy" parameter that
      could be passed that would allow the DWARFUnitVector to parse individual
      units on the fly. There were two major issues with this approach:
      - not thread safe and causes crashes
      - the accessor would check if DWARFUnitVector was empty and if not empty
      it would return a partially filled in DWARFUnitVector if it was
      constructed with "Lazy = true"
      
      This patch fixes the issues by always fully parsing the DWARFUnitVector
      when it is requested and only hands out a "const DWARFUnitVector &".
      This allows the thread safety mechanism built into the DWARFContext
      class to work corrrectly, and avoids the issue where if someone
      construct DWARFUnitVector with "Lazy = true", and then calls an API that
      partially fills in the DWARFUnitVector with individual entries, and then
      someone accesses the DWARFUnitVector, they would get a partial and
      incomplete listing of the DWARF units for the DWOs.
      5aa934e2
    • LLVM GN Syncbot's avatar
      [gn build] Port 7ef7a92e · 070fde30
      LLVM GN Syncbot authored
      070fde30
    • Jonas Devlieghere's avatar
      [lldb] Add Checksum class to lldbUtility (#71456) · 7ef7a92e
      Jonas Devlieghere authored
      This commit adds an MD5 checksum (`Checksum`) class to LLDB. Its purpose
      is to store the MD5 hash added to the DWARF 5 line table.
      7ef7a92e
    • Adrian Prantl's avatar
      Simplify ValueObject::GetQualifiedRepresentationIfAvailable(). (#71559) · 767ce07c
      Adrian Prantl authored
      I received a couple of nullptr-deref crash reports with no line numbers
      in this function. The way the function was written it was a bit
      diffucult to keep track of when result_sp could be null, so this patch
      simplifies the function to make it more obvious when a nullptr can be
      contained in the variable.
      767ce07c
    • Aart Bik's avatar
      [mlir][sparse][gpu] cleanup GPUDataTransferStrategy (#71615) · 5ef44679
      Aart Bik authored
      The flag seems to be doing practically the same thing for zero cost and
      pinned dma. In addition, the register host is not truly the right zero
      cost mechanism according to Thomas. So we are simplifying the setup for
      now, until we have a better definition for what to implement and test.
          
      https://github.com/llvm/llvm-project/issues/64316
      5ef44679
    • ChiaHungDuan's avatar
      [scudo] Calling initCache() in init() of SizeClassAllocatorLocalCache (#71427) · 048ece44
      ChiaHungDuan authored
      initCacheMaybe() will init all the size class arrays at once and it
      doesn't have much work to do even if it supports partial initialization.
      This avoids the call to initCacheMaybe in each allocate()/deallocate().
      048ece44
    • Graham Hunter's avatar
      34f83e86
    • Anna Thomas's avatar
      [GuardWidening] Require analyses only if necessary · 29f03bf4
      Anna Thomas authored
      We need to request analyses needed for guard widening only if there are
      guards/widenable conditions.
      29f03bf4
    • Mark de Wever's avatar
      [libc++][CI] Adds a new CMake version in Docker. (#71582) · 3d131f96
      Mark de Wever authored
      This allows testing the upcoming CMake 3.28 release in the CI. CMake
      3.28 will have non-experimental support for C++20 modules. So this would
      be a better CMake version for the modular builds.
      
      The goal is to remove CMake 3.27 from the CI when the builder work
      properly with 3.28.
      3d131f96
    • Mark de Wever's avatar
      Implement syncstream (p0053) · 7cc72a0a
      Mark de Wever authored
      This patch implements `std::basic_syncbuf` and `std::basic_osyncstream` as specified in paper p0053r7. ~~For ease of reviewing I am submitting this patch before submitting a patch for `std::basic_osyncstream`. ~~
      
      ~~Please note, this patch is not 100% complete. I plan on adding more tests (see comments), specifically I plan on adding tests for multithreading and synchronization.~~
      
      Edit: I decided that it would be far easier for me to keep track of this and make changes that affect both `std::basic_syncbuf` and `std::basic_osyncstream` if both were in one patch.
      
      The patch was originally written by @zoecarver
      
      Implements
      - P0053R7 - C++ Synchronized Buffered Ostream
      - LWG-3127 basic_osyncstream::rdbuf needs a const_cast
      - LWG-3334 basic_osyncstream move assignment and destruction calls basic_syncbuf::emit() twice
      - LWG-3570 basic_osyncstream::emit should be an unformatted output function
      - LWG-3867 Should std::basic_osyncstream's move assignment operator be noexcept?
      
      Reviewed...
      7cc72a0a
    • Jeremy Morse's avatar
      Reapply 7d77bbef, adding new debug-info classes · f1b0a544
      Jeremy Morse authored
      This reverts commit 957efa4c.
      
      Original commit message below -- in this follow up, I've shifted
      un-necessary inclusions of DebugProgramInstruction.h into being forward
      declarations (fixes clang-compile time I hope), and a memory leak in the
      DebugInfoTest.cpp IR unittests.
      
      I also tracked a compile-time regression in D154080, more explanation
      there, but the result of which is hiding some of the changes behind the
      EXPERIMENTAL_DEBUGINFO_ITERATORS compile-time flag. This is tested by the
      "new-debug-iterators" buildbot.
      
      [DebugInfo][RemoveDIs] Add prototype storage classes for "new" debug-info
      
      This patch adds a variety of classes needed to record variable location
      debug-info without using the existing intrinsic approach, see the rationale
      at [0].
      
      The two added files and corresponding unit tests are the majority of the
      plumbing required for this, but at this point isn't accessible from the
      rest of LLVM as we need to stage it into the repo gently. An overview is
      that classes are added for recording variable information attached to Real
      (TM) instructions, in the form of DPValues and DPMarker objects. The
      metadata-uses of DPValues is plumbed into the metadata hierachy, and a
      field added to class Instruction, which are all stimulated in the unit
      tests. The next few patches in this series add utilities to convert to/from
      this new debug-info format and add instruction/block utilities to have
      debug-info automatically updated in the background when various operations
      occur.
      
      This patch was reviewed in Phab in D153990 and D154080, I've squashed them
      together into this commit as there are dependencies between the two
      patches, and there's little profit in landing them separately.
      
      [0] https://discourse.llvm.org/t/rfc-instruction-api-changes-needed-to-eliminate-debug-intrinsics-from-ir/68939
      f1b0a544
    • Simon Pilgrim's avatar
      671d10ad
    • Simon Pilgrim's avatar
      [X86] vec_fabs.ll - add AVX2 test coverage · 45f1db48
      Simon Pilgrim authored
      45f1db48
    • Jonathan Peyton's avatar
      [OpenMP] Add skewed iteration distribution on hybrid systems (#69946) · 5cc603cb
      Jonathan Peyton authored
      This commit adds skewed distribution of iterations in
      nonmonotonic:dynamic schedule (static steal) for hybrid systems when
      thread affinity is assigned. Currently, it distributes the iterations at
      60:40 ratio. Consider this loop with dynamic schedule type,
      for (int i = 0; i < 100; ++i). In a hybrid system with 20 hardware
      threads (16 CORE and 4 ATOM core), 88 iterations will be assigned to
      performance cores and 12 iterations will be assigned to efficient cores.
      Each thread with CORE core will process 5 iterations + extras and with
      ATOM core will process 3 iterations.
      
      Differential Revision: https://reviews.llvm.org/D152955
      5cc603cb
    • Nikita Popov's avatar
      3dff2856
  2. Nov 08, 2023