Skip to content
  1. Mar 19, 2018
    • Lei Huang's avatar
      [PowerPC][Power9]Legalize and emit code for quad-precision add/div/mul/sub · 6d1596a9
      Lei Huang authored
      Legalize and emit code for quad-precision floating point operations:
      
        * xsaddqp
        * xssubqp
        * xsdivqp
        * xsmulqp
      
      Differential Revision: https://reviews.llvm.org/D44506
      
      llvm-svn: 327878
      6d1596a9
    • Nemanja Ivanovic's avatar
      [PowerPC] Make AddrSpaceCast noop · d9d5bd30
      Nemanja Ivanovic authored
      PowerPC targets do not use address spaces. As a result, we can get selection
      failures with address space casts. This patch makes those casts noops.
      
      Patch by Valentin Churavy.
      
      Differential revision: https://reviews.llvm.org/D43781
      
      llvm-svn: 327877
      d9d5bd30
    • Zaara Syeda's avatar
      Revert [MachineLICM] This reverts commit rL327856 · 01f414ba
      Zaara Syeda authored
      Failing build bots. Revert the commit now.
      
      llvm-svn: 327864
      01f414ba
    • Zaara Syeda's avatar
      [MachineLICM] Add functions to MachineLICM to hoist invariant stores · ff05e2b0
      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: 327856
      ff05e2b0
    • Nicolai Haehnle's avatar
      TableGen: Explicitly test some cases of self-references and !cast errors · 18f1998a
      Nicolai Haehnle authored
      Summary:
      These are cases of self-references that exist today in practice. Let's
      add tests for them to avoid regressions.
      
      The self-references in PPCInstrInfo.td can be expressed in a simpler
      way. Allowing this type of self-reference while at the same time
      consistently doing late-resolve even for self-references is problematic
      because there are references to fields that aren't in any class. Since
      there's no need for this type of self-reference anyway, let's just
      remove it.
      
      Change-Id: I914e0b3e1ae7adae33855fac409b536879bc3f62
      
      Reviewers: arsenm, craig.topper, tra, MartinO
      
      Subscribers: nemanjai, wdng, kbarton, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D44474
      
      llvm-svn: 327848
      18f1998a
  2. Mar 15, 2018
  3. Mar 13, 2018
  4. Mar 12, 2018
  5. Mar 09, 2018
  6. Mar 08, 2018
  7. Mar 07, 2018
  8. 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
  9. Mar 05, 2018
  10. Mar 02, 2018
  11. Mar 01, 2018
  12. 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
  13. Feb 24, 2018
  14. 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
  15. 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
  16. Feb 20, 2018
  17. Feb 16, 2018
  18. Feb 09, 2018
  19. Feb 06, 2018
  20. 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
  21. 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
  22. Feb 01, 2018
  23. Jan 31, 2018
  24. Jan 30, 2018
    • Zaara Syeda's avatar
      Re-commit : [PowerPC] Add handling for ColdCC calling convention and a pass to mark · 1f59ae31
      Zaara Syeda authored
      candidates with coldcc attribute.
      
      This recommits r322721 reverted due to sanitizer memory leak build bot failures.
      
      Original commit message:
      This patch adds support for the coldcc calling convention for Power.
      This changes the set of non-volatile registers. It includes a pass to stress
      test the implementation by marking all static directly called functions with
      the coldcc attribute through the option -enable-coldcc-stress-test. It also
      includes an option, -ppc-enable-coldcc, to add the coldcc attribute to
      functions which are cold at all call sites based on BlockFrequencyInfo when
      the containing function does not call any non cold functions.
      
      Differential Revision: https://reviews.llvm.org/D38413
      
      llvm-svn: 323778
      1f59ae31
  25. Jan 29, 2018
  26. Jan 23, 2018
    • Tim Shen's avatar
      [PPC] Avoid incorrect fp-i128-fp lowering. · 7abe9887
      Tim Shen authored
      Summary:
      Fix an issue that's similar to what D41411 fixed:
        float(__int128(float_var)) shouldn't be optimized to xscvdpsxds +
        xscvsxdsp, as they mean (float)(int64_t)float_var.
      
      Reviewers: jtony, hfinkel, echristo
      
      Subscribers: sanjoy, nemanjai, hiraditya, llvm-commits, kbarton
      
      Differential Revision: https://reviews.llvm.org/D42400
      
      llvm-svn: 323270
      7abe9887
  27. Jan 17, 2018
    • Zaara Syeda's avatar
      Revert [PowerPC] This reverts commit rL322721 · c9dc7b45
      Zaara Syeda authored
      Failing build bots. Revert the commit now.
      
      llvm-svn: 322748
      c9dc7b45
    • Zaara Syeda's avatar
      [PowerPC] Add handling for ColdCC calling convention and a pass to mark · 8e951fd2
      Zaara Syeda authored
      candidates with coldcc attribute.
      
      This patch adds support for the coldcc calling convention for Power.
      This changes the set of non-volatile registers. It includes a pass to stress
      test the implementation by marking all static directly called functions with
      the coldcc attribute through the option -enable-coldcc-stress-test. It also
      includes an option, -ppc-enable-coldcc, to add the coldcc attribute to
      functions which are cold at all call sites based on BlockFrequencyInfo when
      the containing function does not call any non cold functions.
      
      Differential Revision: https://reviews.llvm.org/D38413
      
      llvm-svn: 322721
      8e951fd2
  28. Jan 16, 2018
    • Guozhi Wei's avatar
      [PPC] Add a new register XER aliased to CARRY · e6fb4e1f
      Guozhi Wei authored
      When "xer" is specified as clobbered register in inline assembler, clang can accept it, but llvm simply ignore it when lowered to machine instructions. It may cause problems later in scheduler.
      
      This patch adds a new register XER aliased to CARRY, and adds it to register class CARRYRC. Now PPCTargetLowering::getRegForInlineAsmConstraint can return correct register number for inline asm constraint "{xer}", and scheduler behave correctly.
      
      Differential Revision: https://reviews.llvm.org/D41967
      
      llvm-svn: 322591
      e6fb4e1f
  29. Jan 12, 2018
Loading