Skip to content
  1. Mar 26, 2018
  2. Mar 24, 2018
  3. Mar 23, 2018
    • Zaara Syeda's avatar
      Re-commit: [MachineLICM] Add functions to MachineLICM to hoist invariant stores · 65359936
      Zaara Syeda authored
      This patch adds functions to allow MachineLICM to hoist invariant stores.
      Currently, MachineLICM does not hoist any store instructions, however
      when storing the same value to a constant spot on the stack, the store
      instruction should be considered invariant and be hoisted. The function
      isInvariantStore iterates each operand of the store instruction and checks
      that each register operand satisfies isCallerPreservedPhysReg. The store
      may be fed by a copy, which is hoisted by isCopyFeedingInvariantStore.
      This patch also adds the PowerPC changes needed to consider the stack
      register as caller preserved.
      
      Differential Revision: https://reviews.llvm.org/D40196
      
      llvm-svn: 328326
      65359936
  4. Mar 21, 2018
    • David Blaikie's avatar
      Fix a couple of layering violations in Transforms · 2be39228
      David Blaikie authored
      Remove #include of Transforms/Scalar.h from Transform/Utils to fix layering.
      
      Transforms depends on Transforms/Utils, not the other way around. So
      remove the header and the "createStripGCRelocatesPass" function
      declaration (& definition) that is unused and motivated this dependency.
      
      Move Transforms/Utils/Local.h into Analysis because it's used by
      Analysis/MemoryBuiltins.cpp.
      
      llvm-svn: 328165
      2be39228
  5. Mar 20, 2018
    • Craig Topper's avatar
      [PowerPC][LegalizeFloatTypes] Move the PPC hacks for (i32... · c2dbd677
      Craig Topper authored
      [PowerPC][LegalizeFloatTypes] Move the PPC hacks for (i32 fp_to_sint/fp_to_uint (ppcf128 X)) out of LegalizeFloatTypes and into PPC specific code
      
      I'm not entirely sure these hacks are still needed. If you remove the hacks completely, the name of the library call that gets generated doesn't match the grep the test previously had. So the test wasn't really checking anything.
      
      If the hack is still needed it belongs in PPC specific code. I believe the FP_TO_SINT code here is the only place in the tree where a FP_ROUND_INREG node is created today. And I don't think its even being used correctly because the legalization returned a BUILD_PAIR with the same value twice. That doesn't seem right to me. By moving the code entirely to PPC we can avoid creating the FP_ROUND_INREG at all.
      
      I replaced the grep in the existing test with full checks generated by hacking update_llc_test_check.py to support ppc32 just long enough to generate it.
      
      Differential Revision: https://reviews.llvm.org/D44061
      
      llvm-svn: 328017
      c2dbd677
  6. Mar 19, 2018
  7. Mar 15, 2018
  8. Mar 13, 2018
  9. Mar 12, 2018
  10. Mar 09, 2018
  11. Mar 08, 2018
  12. Mar 07, 2018
  13. Mar 06, 2018
    • Craig Topper's avatar
      [TargetLowering] Rename DAGCombinerInfo::isAfterLegalizeVectorOps to... · 80d3bb3b
      Craig Topper authored
      [TargetLowering] Rename DAGCombinerInfo::isAfterLegalizeVectorOps to DAGCombiner::isAfterLegalizeDAG since that's what it checks. NFC
      
      The code checks Level == AfterLegalizeDAG which is the fourth and last of the possible DAG combine stages that we have.
      
      There is a Level called AfterLegalVectorOps, but that's the third DAG combine and it doesn't always run.
      
      A function called isAfterLegalVectorOps should imply it returns true in either of the DAG combines that runs after the legalize vector ops stage, but that's not what this function does.
      
      llvm-svn: 326832
      80d3bb3b
  14. Mar 05, 2018
  15. Mar 02, 2018
  16. Mar 01, 2018
  17. Feb 28, 2018
    • Chih-Hung Hsieh's avatar
      [TLS] use emulated TLS if the target supports only this mode · 9f9e4681
      Chih-Hung Hsieh authored
      Emulated TLS is enabled by llc flag -emulated-tls,
      which is passed by clang driver.
      When llc is called explicitly or from other drivers like LTO,
      missing -emulated-tls flag would generate wrong TLS code for targets
      that supports only this mode.
      Now use useEmulatedTLS() instead of Options.EmulatedTLS to decide whether
      emulated TLS code should be generated.
      Unit tests are modified to run with and without the -emulated-tls flag.
      
      Differential Revision: https://reviews.llvm.org/D42999
      
      llvm-svn: 326341
      9f9e4681
  18. Feb 24, 2018
  19. Feb 23, 2018
    • Stefan Pintilie's avatar
      [Power9] Add missing instructions to the Power 9 scheduler · 626b6510
      Stefan Pintilie authored
      This is the first in a series of patches that will define more
      instructions using InstRW so that we can move away from ItinRW
      and ultimately have a complete Power 9 scheduler.
      
      Differential Revision: https://reviews.llvm.org/D43635
      
      llvm-svn: 325956
      626b6510
    • Geoff Berry's avatar
      [MachineOperand][Target] MachineOperand::isRenamable semantics changes · f8bf2ec0
      Geoff Berry authored
      Summary:
      Add a target option AllowRegisterRenaming that is used to opt in to
      post-register-allocation renaming of registers.  This is set to 0 by
      default, which causes the hasExtraSrcRegAllocReq/hasExtraDstRegAllocReq
      fields of all opcodes to be set to 1, causing
      MachineOperand::isRenamable to always return false.
      
      Set the AllowRegisterRenaming flag to 1 for all in-tree targets that
      have lit tests that were effected by enabling COPY forwarding in
      MachineCopyPropagation (AArch64, AMDGPU, ARM, Hexagon, Mips, PowerPC,
      RISCV, Sparc, SystemZ and X86).
      
      Add some more comments describing the semantics of the
      MachineOperand::isRenamable function and how it is set and maintained.
      
      Change isRenamable to check the operand's opcode
      hasExtraSrcRegAllocReq/hasExtraDstRegAllocReq bit directly instead of
      relying on it being consistently reflected in the IsRenamable bit
      setting.
      
      Clear the IsRenamable bit when changing an operand's register value.
      
      Remove target code that was clearing the IsRenamable bit when changing
      registers/opcodes now that this is done conservatively by default.
      
      Change setting of hasExtraSrcRegAllocReq in AMDGPU target to be done in
      one place covering all opcodes that have constant pipe read limit
      restrictions.
      
      Reviewers: qcolombet, MatzeB
      
      Subscribers: aemerson, arsenm, jyknight, mcrosier, sdardis, nhaehnle, javed.absar, tpr, arichardson, kristof.beyls, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, jordy.potman.lists, apazos, sabuasal, niosHD, escha, nemanjai, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D43042
      
      llvm-svn: 325931
      f8bf2ec0
    • Stefan Pintilie's avatar
      [PowerPC] Code cleanup. Remove instructions that were withdrawn from Power 9. · 15e6b10e
      Stefan Pintilie authored
      The following set of instructions was originally planned to be added for Power 9
      and so code was added to support them. However, a decision was made later on to
      withdraw support for these instructions in the hardware.
      xscmpnedp
      xvcmpnesp
      xvcmpnedp
      This patch removes support for the instructions that were not added.
      
      Differential Revision: https://reviews.llvm.org/D43641
      
      llvm-svn: 325918
      15e6b10e
  20. Feb 22, 2018
    • Nemanja Ivanovic's avatar
      [PowerPC] Do not produce invalid CTR loop with an FRem · e54a9ee8
      Nemanja Ivanovic authored
      An FRem instruction inside a loop should prevent the loop from being converted
      into a CTR loop since this is not an operation that is legal on any PPC
      subtarget. This will always be a call to a library function which means the
      loop will be invalid if this instruction is in the body.
      
      Fixes PR36292.
      
      llvm-svn: 325739
      e54a9ee8
  21. Feb 20, 2018
  22. Feb 16, 2018
  23. Feb 09, 2018
  24. Feb 06, 2018
  25. Feb 05, 2018
    • Hiroshi Inoue's avatar
      [PowerPC] Check hot loop exit edge in PPCCTRLoops · c5ab1ab7
      Hiroshi Inoue authored
      PPCCTRLoops transform loops using mtctr/bdnz instructions if loop trip count is known and big enough to compensate for the cost of mtctr.
      But if there is a loop exit edge which is known to be frequently taken (by builtin_expect or by PGO), we should not transform the loop to avoid the cost of mtctr instruction. Here is an example of a loop with hot exit edge:
      
      for (unsigned i = 0; i < TripCount; i++) {
        // do something
        if (__builtin_expect(check(), 1))
          break;
        // do something
      }
      
      Differential Revision: https://reviews.llvm.org/D42637
      
      llvm-svn: 324229
      c5ab1ab7
  26. Feb 02, 2018
    • David Blaikie's avatar
      Remove non-modular header containing static utility functions · d8a6f93a
      David Blaikie authored
      The one place that uses these functions isn't particularly
      long/complicated, so it's easier to just have these inline at that
      location than trying to split it out into a true header. (in part also
      because of the use of the DEBUG macros, which make this not really a
      standalone header even if the static functions were made inline instead)
      
      llvm-svn: 324044
      d8a6f93a
  27. Feb 01, 2018
Loading