Skip to content
  1. Oct 14, 2021
  2. Oct 13, 2021
    • Jeremy Morse's avatar
      [DebugInfo][InstrRef] Only calculate IDF for reg units · fbf269c7
      Jeremy Morse authored
      In D110173 we start using the existing LLVM IDF calculator to place PHIs as
      we reconstruct an SSA form of machine-code program. Sadly that's slower
      than the old (but broken) way, this patch attempts to recover some of that
      performance.
      
      The key observation: every time we def a register, we also have to def it's
      register units. If we def'd $rax, in the current implementation we
      independently calculate PHI locations for {al, ah, ax, eax, hax, rax}, and
      they will all have the same PHI positions. Instead of doing that, we can
      calculate the PHI positions for {al, ah} and place PHIs for any aliasing
      registers in the same positions. Any def of a super-register has to def
      the unit, and vice versa, so this is sound. It cuts down the SSA placement
      we need to do significantly.
      
      This doesn't work for stack slots, or registers we only ever read, so place
      PHIs normally for those. LiveDebugValues choses to ignore writes to SP at
      calls, and now have to ignore writes to SP register units too.
      
      Differential Revision: https://reviews.llvm.org/D111627
      fbf269c7
    • Jeremy Morse's avatar
      Follow up a3936a6c to work around an old compiler bug · e845ca2f
      Jeremy Morse authored
      Old versions of gcc want template specialisations to happen within the
      namespace where the template lives; this is still present in gcc 5.1, which
      we officially support, so it has to be worked around.
      e845ca2f
    • Jeremy Morse's avatar
      [DebugInfo][InstrRef] Use PHI placement utilities for machine locations · a3936a6c
      Jeremy Morse authored
      InstrRefBasedLDV used to try and determine which values are in which
      registers using a lattice approach; however this is hard to understand, and
      broken in various ways. This patch replaces that approach with a standard
      SSA approach using existing LLVM utilities. PHIs are placed at dominance
      frontiers; value propagation then eliminates un-necessary PHIs.
      
      This patch also adds a bunch of unit tests that should cover many of the
      weirder forms of control flow.
      
      Differential Revision: https://reviews.llvm.org/D110173
      a3936a6c
    • Kerry McLaughlin's avatar
      [SVE][CodeGen] Add patterns for ADD/SUB + element count · 1a2e9019
      Kerry McLaughlin authored
      This patch adds patterns to match the following with INC/DEC:
       - @llvm.aarch64.sve.cnt[b|h|w|d] intrinsics + ADD/SUB
       - vscale + ADD/SUB
      
      For some implementations of SVE, INC/DEC VL is not as cheap as ADD/SUB and
      so this behaviour is guarded by the "use-scalar-inc-vl" feature flag, which for SVE
      is off by default. There are no known issues with SVE2, so this feature is
      enabled by default when targeting SVE2.
      
      Reviewed By: david-arm
      
      Differential Revision: https://reviews.llvm.org/D111441
      1a2e9019
    • Heejin Ahn's avatar
      [WebAssembly] Make EH work with dynamic linking · 9261ee32
      Heejin Ahn authored
      This makes Wasm EH work with dynamic linking. So far we were only able
      to handle destructors, which do not use any tags or LSDA info.
      
      1. This uses `TargetExternalSymbol` for `GCC_except_tableN` symbols,
         which points to the address of per-function LSDA info. It is more
         convenient to use than `MCSymbol` because it can take additional
         target flags.
      
      2. When lowering `wasm_lsda` intrinsic, if PIC is enabled, make the
         symbol relative to `__memory_base` and generate the `add` node. If
         PIC is disabled, continue to use the absolute address.
      
      3. Make tag symbols (`__cpp_exception` and `__c_longjmp`) undefined in
         the backend, because it is hard to make it work with dynamic
         linking's loading order. Instead, we make all tag symbols undefined
         in the LLVM backend and import it from JS.
      
      4. Add support for undefined tags to the linker.
      
      Companion patches:
      - https://github.com/WebAssembly/binaryen/pull/4223
      - https://github.com/emscripten-core/emscripten/pull/15266
      
      Reviewed By: sbc100
      
      Differential Revision: https://reviews.llvm.org/D111388
      9261ee32
  3. Oct 12, 2021
  4. Oct 11, 2021
  5. Oct 10, 2021
  6. Oct 09, 2021
  7. Oct 08, 2021
  8. Oct 07, 2021
Loading