1. Sep 23, 2023
    • Christopher Ferris's avatar
      [scudo] Convert assert to CHECK macro. (#67184) · f71ba7d3
      Christopher Ferris authored
      This code is only for riscv, but use the CHECK macro to avoid unused
      parameters problems if assert is not defined.
      f71ba7d3
    • Frederic Cambus's avatar
    • Rahman Lavaee's avatar
      [BasicBlockSections] Introduce the basic block sections profile version 1. (#65506) · 6ac71a01
      Rahman Lavaee authored
      This patch introduces a new version for the basic block sections profile
      as was requested in D158442, while keeping backward compatibility for
      the old version.
      
      The new encoding is as follows:
      ```
      m <module_name>
      f <function_name_1> <function_name_2>...
      c <bb_id_1> <bb_id_2> <bb_id_3>
      c <bb_id_4> <bb_id_5>
      ...
      ```
      Module name specifier (starting with 'm') is optional and allows
      distinguishing profiles for internal-linkage functions with the same
      name. If not specified, profile will be applied to any function with the
      same name.
      Function name specifier (starting with 'f') can specify multiple
      function name aliases.
      Finally, basic block clusters are specified by 'c' and specify the
      cluster of basic blocks, and the internal order in which they must be
      placed in the same section.
      6ac71a01
    • Nemanja Ivanovic's avatar
      [PowerPC] Improve kill flag computation and add verification after MI peephole · 46d5d264
      Nemanja Ivanovic authored
      The MI Peephole pass has grown to include a large number of transformations over the years. Many of the transformations require re-computation of kill flags but don't do a good job of re-computing them. This causes us to have very common failures when the compiler is built with expensive checks. Over time, we added and augmented a function that is supposed to go and fix up kill flags after each transformation but we keep missing cases.
      This patch does the following:
      - Removes the function to re-compute kill flags
      - Adds LiveVariables to compute and maintain kill flags while transforming code
      - Adds re-computation of kill flags for the post-RA peepholes for each block that contains a transformed instruction
      
      Reviewed By: stefanp
      
      Differential Revision: https://reviews.llvm.org/D133103
      46d5d264
    • Arthur Eubanks's avatar
      [gn build] Manually port 8e87dc10 · 2aff14ef
      Arthur Eubanks authored
      2aff14ef
    • Alex Brachet's avatar
      [Fuchsia] Build with -fvisibility=default (#67067) · ab82c3d0
      Alex Brachet authored
      There was an issue with relative vtables when two TU's which define the
      same vtable object are built with different default visibilities. Some
      TU's are built with -fvisibility=hidden in the code base, grep for
      CMAKE_CXX_VISIBILITY_PRESET to find them. Our whole toolchain, is
      statically linked, and built with -fPIE anyway, so the cost of
      overriding local CMAKE_CXX_VISIBILITY_PRESET properties is not high.
      I've counted that adding this flag increases our llvm binary by 13
      relocations. Frankly I'm not sure where those are even coming from.
      
      It would be preferable to use hidden visibility, but that breaks liblld.
      This can be solved by setting LLDB_EXPORT_ALL_SYMBOLS. After that some
      ORC tests fail which do symbolic lookup in the tests. It seems that
      setting CMAKE_CXX_VISIBILITY_PRESET=hidden will not be worth the
      maintenance burden. Setting it to default works to unblock using
      relative vtables, so we can just go with that.
      ab82c3d0
    • Douglas Yung's avatar
    • Kazu Hirata's avatar
      [lldb] Fix a warning · 66e83983
      Kazu Hirata authored
      This patch fixes:
      
        lldb/include/lldb/Symbol/Function.h:270:3: error:
        'lldb_private::CallEdge' has virtual functions but non-virtual
        destructor [-Werror,-Wnon-virtual-dtor]
      66e83983
    • Jonas Devlieghere's avatar
      [dsymutil] Remove paper trail warnings (#67041) · 697b34fd
      Jonas Devlieghere authored
      Remove the paper trail warning from dsymutil and the DWARF linker. The
      original purpose of this functionality was to leave a paper trail in the
      output artifact about missing object files. The current implementation
      however has diverged and is the source of a pretty serious bug:
      
      - In the debug map parser, missing object files are not the only
        warnings we emit. When paper trail warnings are enabled, all of them end
        up in the dSYM which wasn't the goal.
        
      - When warnings are associated with a object file in the debug map, it
        is skipped by the DWARF linker. This only makes sense if the object file
        is missing and is obviously incorrect for any other type of warning
        (such as a missing symbol).
      
      The combination of the two means that we can generate broken DWARF when
      the feature is enabled. AFAIK it was only used by Apple and nobody I
      spoke to has relied on it, so rather than fixing the broken behavior I
      propose we remove it.
      697b34fd
    • Fangrui Song's avatar
      d7359bcc
    • Lang Hames's avatar
      Revert "[ORC] Add N_SO and N_OSO stabs entries to MachO debug objects." · 05b1a2cb
      Lang Hames authored
      This reverts commit db51e572.
      
      Reverted while I investigate build failures, e.g.
      https://lab.llvm.org/buildbot/#/builders/234/builds/12900
      05b1a2cb
    • Lang Hames's avatar
      [ORC] Add N_SO and N_OSO stabs entries to MachO debug objects. · db51e572
      Lang Hames authored
      No testcase: This code generates an in-memory object file that is shared with
      the debugger. The object file is malformed in ways that don't matter to the
      debugger, but mean that it can't be inspected by most tools.
      db51e572
    • Vitaly Buka's avatar
      a12c2977
    • Slava Zakharin's avatar
      [flang][hlfir] Fixed some finalization/deallocation issues. (#67047) · ab1db262
      Slava Zakharin authored
      This set of commits resolves some of the issues with elemental calls producing
      results that may require finalization, and also some memory leak issues due to
      the missing deallocation of allocatable components of the temporary buffers
      created by the bufferization pass.
      
      - [flang][runtime] Expose Finalize API for derived types.
      
      - [flang][hlfir] Add 'finalize' attribute for DestroyOp.
      
      - [flang][hlfir] Postpone result finalization for elemental calls.
      
          The results of elemental calls generated inside hlfir.elemental must not
          be finalized/destructed before they are copied into the resulting
          array. The finalization must be done on the array as a whole
          (e.g. there might be different scalar and array finalization routines).
          The finalization work is left to the hlfir.destroy corresponding
          to this hlfir.elemental.
      
      - [flang][hlfir] Tighten requirements on hlfir.end_associate operand.
      
          If component deallocation might be required for the operand of
          hlfir.end_associate, we have to be able to get the variable
          shape/params to create a descriptor for calling the runtime.
          This commit adds verification that we can do so.
      
      - [flang][hlfir] Lower argument clean-ups using valid hlfir.end_associate.
      
          The operand must be a Fortran entity, when allocatable component
          deallocation may be required.
      
      - [flang][hlfir] Properly clean-up temporary buffers in bufferization pass.
      
          This commit combines changes for proper finalization and component
          deallocation of the temporary buffers. The finalization part
          relates to hlfir.destroy operations with 'finalize' attribute.
          The component deallocation might be invoked for both hlfir.destroy
          and hlfir.end_associate, if the operand is of a derived type
          with allocatable component(s).
      
      The changes are mostly in one function, so I decided not to split them.
      
      - [flang][hlfir] Disable optimizations for hlfir.elemental requiring finalization.
      
          If hlfir.elemental is coupled with hlfir.destroy with 'finalize' attribute,
          the temporary array result of hlfir.elemental needs to be created
          for the purpose of finalization. We cannot do certain optimizations
          on such hlfir.elemental operations.
      
          I was not able to come up with a test for the OptimizedBufferization pass,
          but I put the check there as well.
      ab1db262
    • Philip Reames's avatar
    • Walter Erquinigo's avatar
      [lldb][NFC] Move some ctors and tors to cpp files (#67165) · c0a9722b
      Walter Erquinigo authored
      This prevents undefined vtable errors when linking these libraries from
      out-of-tree. I'm facing this issue as I work on my new language plugin.
      c0a9722b
    • Wang Pengcheng's avatar
      [Atomic][doc] Fix outdated hook name and description (#66989) · 8b2290d5
      Wang Pengcheng authored
      `setInsertFencesForAtomic` is `shouldInsertFencesForAtomic` now.
      8b2290d5
    • Wang Pengcheng's avatar
      [RISCV][NFC] Remove rdty arg of PseudoLoad and the default rdty value of PseudoFloatLoad (#67014) · 079b8bae
      Wang Pengcheng authored
      `rdty` of `PseudoLoad` is always `GPR` and it will never be `GPR` for
      `PseudoFloatLoad`.
      079b8bae
    • Craig Topper's avatar
      [RISCV][GISel] Add a post legalizer combiner and enable a couple comb… (#67053) · 8e87dc10
      Craig Topper authored
      …ines.
      
      We have an existing test that shows benefit from redundant_and and
      identity combines so use them as a starting point.
      8e87dc10
    • Craig Topper's avatar
      [RISCV] Truncate constants to eltwidth before checking simm5 when con… (#67062) · ec5b0ef7
      Craig Topper authored
      …verting VMV_V_X to VMV_X_S.
      
      Instruction selection knows the bits past EltWidth are ignored, we
      should do the same here.
      ec5b0ef7
    • Fabio D'Urso's avatar
      [scudo] Avoid deprecated-volatile warning in HybridMutex::delayLoop (#67135) · 2f91751d
      Fabio D'Urso authored
      That can prevent compilation with -Werror and -std=c++20:
      mutex.h:63:7: error: increment of object of volatile-qualified type 'volatile u32' (aka 'volatile unsigned int') is deprecated [-Werror,-Wdeprecated-volatile]
      2f91751d
    • Alex Langford's avatar
      [lldb][NFCI] Change parameter type in UserExpression::GetObjectPointer (#67055) · 55ec9db4
      Alex Langford authored
      GetObjectPointer (and other related methods) do not need `ConstString`
      parameters. The string parameter in these methods boil down to getting a
      StringRef and calling `StackFrame::GetValueForVariableExpressionPath`
      which takes a `StringRef` parameter. All the users of `GetObjectPointer`
      (and related methods) end up creating ConstString objects to pass to
      these methods, but they could just as easily be StringRefs (potentially
      saving us some allocations in the StringPool).
      55ec9db4
    • Kazu Hirata's avatar
      [Coverage] Fix a warning · 9c5b38b4
      Kazu Hirata authored
      This patch fixes:
      
        llvm/lib/ProfileData/Coverage/CoverageMapping.cpp:219:5: error:
        default label in switch which covers all enumeration values
        [-Werror,-Wcovered-switch-default]
      9c5b38b4
    • Aart Bik's avatar
      [mlir][sparse] replace "sparse compiler" with "sparsifier" in doc (#67082) · 2e7d83de
      Aart Bik authored
      Rationale:
      The term "sparse compiler", although dear to my heart, is often mistaken
      as a completely separate compiler, and not a pass within a full compiler
      pipeline. Therefore, we start migrating to the term "sparsifier".
      2e7d83de
    • Mikhail R. Gadelha's avatar
      [libc] Update integration test's linking options (#67158) · 2f98ff71
      Mikhail R. Gadelha authored
      This patch set the integration test's linking options to be the same one
      used in the hermetic tests.
      
      In particular, by removing -nostdlib the tests are linked with
      libgcc/compiler-rt and this fixes an issue undefined reference to
      __udivdi3 and __umoddi3 in rv32.
      2f98ff71
    • shen3qing1's avatar
      [NFC]Do not use recursion for CounterMappingContext::evaluate (#66961) · 487c784e
      shen3qing1 authored
      
      
      This causes stack overflows for real-world coverage reports.
      
      Ran $ build/bin/llvm-lit -a llvm/test/tools/llvm-cov locally and passed.
      
      Co-authored-by: default avatarQing Shen <qingshen@google.com>
      487c784e
    • Yinying Li's avatar
      [mlir][sparse] Add more error messages and avoid crashing in new parser (#67034) · 8466eb7d
      Yinying Li authored
      Updates:
      1. Added more invalid encodings to test the robustness of the new syntax
      2. Changed the asserts that caused crashing into returning booleans
      3. Modified some error messages to make them clearer and handled
      failures in parsing quotes as keyword for level formats and properties.
      8466eb7d
  2. Sep 22, 2023