Skip to content
  1. Feb 08, 2019
    • Craig Topper's avatar
      Implementation of asm-goto support in LLVM · 784929d0
      Craig Topper authored
      This patch accompanies the RFC posted here:
      http://lists.llvm.org/pipermail/llvm-dev/2018-October/127239.html
      
      This patch adds a new CallBr IR instruction to support asm-goto
      inline assembly like gcc as used by the linux kernel. This
      instruction is both a call instruction and a terminator
      instruction with multiple successors. Only inline assembly
      usage is supported today.
      
      This also adds a new INLINEASM_BR opcode to SelectionDAG and
      MachineIR to represent an INLINEASM block that is also
      considered a terminator instruction.
      
      There will likely be more bug fixes and optimizations to follow
      this, but we felt it had reached a point where we would like to
      switch to an incremental development model.
      
      Patch by Craig Topper, Alexander Ivchenko, Mikhail Dvoretckii
      
      Differential Revision: https://reviews.llvm.org/D53765
      
      llvm-svn: 353563
      784929d0
    • Vedant Kumar's avatar
      [CodeExtractor] Restore outputs after creating exit stubs · 0e5dd512
      Vedant Kumar authored
      When CodeExtractor saves the result of InvokeInst at the first insertion
      point of the 'normal destination' basic block, this block can be omitted
      in the outlined region, so store is placed outside of the function. The
      suggested solution is to process saving outputs after creating exit
      stubs for new function, and stores will be placed in that blocks before
      return in this case.
      
      Patch by Sergei Kachkov!
      
      Fixes llvm.org/PR40455.
      
      Differential Revision: https://reviews.llvm.org/D57919
      
      llvm-svn: 353562
      0e5dd512
    • Reid Kleckner's avatar
      [InstrProf] Implement static profdata registration · 987d331f
      Reid Kleckner authored
      Summary:
      The motivating use case is eliminating duplicate profile data registered
      for the same inline function in two object files. Before this change,
      users would observe multiple symbol definition errors with VC link, but
      links with LLD would succeed.
      
      Users (Mozilla) have reported that PGO works well with clang-cl and LLD,
      but when using LLD without this static registration, we would get into a
      "relocation against a discarded section" situation. I'm not sure what
      happens in that situation, but I suspect that duplicate, unused profile
      information was retained. If so, this change will reduce the size of
      such binaries with LLD.
      
      Now, Windows uses static registration and is in line with all the other
      platforms.
      
      Reviewers: davidxl, wmi, inglorion, void, calixte
      
      Subscribers: mgorny, krytarowski, eraman, fedor.sergeev, hiraditya, #sanitizers, dmajor, llvm-commits
      
      Tags: #sanitizers, #llvm
      
      Differential Revision: https://reviews.llvm.org/D57929
      
      llvm-svn: 353547
      987d331f
    • Teresa Johnson's avatar
      ArgumentPromotion should copy all metadata to new Function · 3ce8112d
      Teresa Johnson authored
      Summary:
      ArgumentPromotion had code to specifically move the dbg metadata over to
      the new function, but other metadata such as the function_entry_count
      !prof metadata was not. Replace code that moved dbg metadata with a call
      to copyMetadata. The old metadata is automatically removed when the old
      Function is removed.
      
      Reviewers: davidxl
      
      Subscribers: llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57846
      
      llvm-svn: 353537
      3ce8112d
    • Carlos Alberto Enciso's avatar
      [DWARF] LLVM ERROR: Broken function found, while removing Debug Intrinsics. · 08dc50f2
      Carlos Alberto Enciso authored
      Check that when SimplifyCFG is flattening a 'br', all their debug intrinsic instructions are removed, including any dbg.label referencing a label associated with the basic blocks being removed.
      
      Differential Revision: https://reviews.llvm.org/D57444
      
      llvm-svn: 353511
      08dc50f2
    • Max Kazantsev's avatar
      [LoopSimplifyCFG] Use DTU.applyUpdates instead of insert/deleteEdge · 6b63d3a2
      Max Kazantsev authored
      `insert/deleteEdge` methods in DTU can make updates incorrectly in some cases
      (see https://bugs.llvm.org/show_bug.cgi?id=40528), and it is recommended to
      use `applyUpdates` methods instead when it is needed to make a mass update in CFG.
      
      Differential Revision: https://reviews.llvm.org/D57316
      Reviewed By: kuhar
      
      llvm-svn: 353502
      6b63d3a2
    • Sergey Dmitriev's avatar
      [CodeExtractor] Update function's assumption cache after extracting blocks from it · 807960e6
      Sergey Dmitriev authored
      Summary: Assumption cache's self-updating mechanism does not correctly handle the case when blocks are extracted from the function by the CodeExtractor. As a result function's assumption cache may have stale references to the llvm.assume calls that were moved to the outlined function. This patch fixes this problem by removing extracted llvm.assume calls from the function’s assumption cache.
      
      Reviewers: hfinkel, vsk, fhahn, davidxl, sanjoy
      
      Reviewed By: hfinkel, vsk
      
      Subscribers: llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57215
      
      llvm-svn: 353500
      807960e6
  2. Feb 07, 2019
  3. Feb 06, 2019
  4. Feb 05, 2019
    • Sanjay Patel's avatar
      [InstCombine] limit extracting shuffle transform based on uses · cddb1e54
      Sanjay Patel authored
      As discussed in D53037, this can lead to worse codegen, and we
      don't generally expect the backend to be able to optimize
      arbitrary shuffles. If there's only one use of the 1st shuffle,
      that means it's getting removed, so that should always be
      safe.
      
      llvm-svn: 353235
      cddb1e54
    • Rong Xu's avatar
      [PGO] Use a function for creating variable for profile file name. NFC. · ce10d5ea
      Rong Xu authored
      Factored out the code for creating variable for profile file name to
      a function.
      
      llvm-svn: 353230
      ce10d5ea
    • Jeremy Morse's avatar
      [DebugInfo][NFCI] Split salvageDebugInfo into helper functions · 84ca706b
      Jeremy Morse authored
      Some use cases are appearing where salvaging is needed that does not
      correspond to an instruction being deleted -- for example an instruction
      being sunk, or a Value not being available in a block being isel'd.
      
      Enable more fine grained control over how salavging occurs by splitting
      the logic into helper functions, separating things that are specific to
      working on DbgVariableIntrinsics from those specific to interpreting IR
      and building DIExpressions.
      
      Differential Revision: https://reviews.llvm.org/D57696
      
      llvm-svn: 353156
      84ca706b
    • Max Kazantsev's avatar
      [LSR] Check SCEV on isZero() after extend. PR40514 · d5e595b7
      Max Kazantsev authored
      When LSR first adds SCEVs to BaseRegs, it only does it if `isZero()` has
      returned false. In the end, in invocation of `InsertFormula`, it asserts that
      all values there are still not zero constants. However between these two
      points, it makes some transformations, in particular extends them to wider
      type.
      
      SCEV does not give us guarantee that if `S` is not a constant zero, then
      `sext(S)` is also not a constant zero. It might have missed some optimizing
      transforms when it was calculating `S` and then made them when it took `sext`.
      For example, it may happen if previously optimizing transforms were limited
      by depth or somehow else.
      
      This patch adds a bailout when we may end up with a zero SCEV after extension.
      
      Differential Revision: https://reviews.llvm.org/D57565
      Reviewed By: samparker
      
      llvm-svn: 353136
      d5e595b7
    • Richard Trieu's avatar
      Fix narrowing issue from r353129 · a9354b2f
      Richard Trieu authored
      llvm-svn: 353134
      a9354b2f
    • Wei Mi's avatar
      [SamplePGO][NFC] Minor improvement to replace a temporary vector with a · 4901f371
      Wei Mi authored
      brace-enclosed init list.
      
      Differential Revision: https://reviews.llvm.org/D57726
      
      llvm-svn: 353129
      4901f371
    • Teresa Johnson's avatar
      [SamplePGO] Minor efficiency improvement in samplePGO ICP · 4bdf82ce
      Teresa Johnson authored
      Summary:
      When attaching prof metadata to promoted direct calls in SamplePGO
      mode, no need to construct and use a SmallVector to pass a single count
      to the ArrayRef parameter, we can simply use a brace-enclosed init list.
      
      This made a small but consistent improvement for a ThinLTO backend
      compile I was measuring.
      
      Reviewers: wmi
      
      Subscribers: mehdi_amini, dexonsmith, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57706
      
      llvm-svn: 353123
      4bdf82ce
  5. Feb 04, 2019
Loading