Skip to content
  1. May 19, 2016
    • Rafael Espindola's avatar
      Delete Reloc::Default. · 8c34dd82
      Rafael Espindola authored
      Having an enum member named Default is quite confusing: Is it distinct
      from the others?
      
      This patch removes that member and instead uses Optional<Reloc> in
      places where we have a user input that still hasn't been maped to the
      default value, which is now clear has no be one of the remaining 3
      options.
      
      llvm-svn: 269988
      8c34dd82
  2. May 18, 2016
    • Rafael Espindola's avatar
      Trivial cleanups. · 38af4d63
      Rafael Espindola authored
      This just clang formats and cleans comments in an area I am about to
      post a patch for review.
      
      llvm-svn: 269946
      38af4d63
  3. May 17, 2016
    • Rafael Espindola's avatar
      Simplify handling of hidden stub. · 712f957c
      Rafael Espindola authored
      Since r207518 they are printed exactly like non-hidden stubs on x86 and
      since r207517 on ARM.
      
      This means we can use a single set for all stubs in those platforms.
      
      llvm-svn: 269776
      712f957c
    • Renato Golin's avatar
      [ARM] ARM mov InstAlias for MOVW lacks HasV6T2 · 57bfb69a
      Renato Golin authored
      The movw instruction is only available in ARM state for V6T2 and above.
      The MOVi16 instruction has requirement HasV6T2 but the InstAlias
      for mov rd, imm where the operand is imm0_65535_expr:$imm does not.
      
      This means that movw can incorrectly be used in ARMv4 and ARMv5 by
      writing mov rd, 0x1234. The simple fix is to the requirement HasV6T2
      to the InstAlias. Tests added to not-armv4.s.
      
      Patch by Peter Smith.
      
      llvm-svn: 269761
      57bfb69a
  4. May 14, 2016
    • Saleem Abdulrasool's avatar
      ARM: support export directives for Windows · 8df2f498
      Saleem Abdulrasool authored
      It seems that cl will emit the export directives for Windows ARM targets.  The
      fact that it did this had originally been missed and this functionality was
      never implemented.  This makes it possible to rely solely on the source code for
      indicating what the exported interfaces are and brings us more compatibility
      with cl.
      
      llvm-svn: 269574
      8df2f498
  5. May 13, 2016
    • Tim Northover's avatar
      ARM: use callee-saved list in the order they're actually saved. · f8b0a7af
      Tim Northover authored
      When setting the frame pointer, the offset from SP is calculated based on the
      stack slot it gets allocated, but this slot is in turn based on the order of
      the CSR list so that list should match the order we actually save the registers
      in. Mostly it did, but in the edge-case of MachO AAPCS targets it was wrong.
      
      llvm-svn: 269459
      f8b0a7af
  6. May 12, 2016
    • Renato Golin's avatar
      [ARM] Support and tests for transform of LDR rt, = to MOV · 608cb5de
      Renato Golin authored
      This change implements the transformation in processInstruction() for the
      LDR rt, =expression to MOV rt, expression when the expression can be evaluated
      and can fit into the immediate field of the MOV or a MVN.
      
      Across the ARM and Thumb instruction sets there are several cases to consider,
      each with a different range of representatble constants.
      
      In ARM we have:
       * Modified immediate (All ARM architectures)
       * MOVW (v6t2 and above)
      
      In Thumb we have:
       * Modified immediate (v6t2, v7m and v8m.mainline)
       * MOVW (v6t2, v7m, v8.mainline and v8m.baseline)
       * Narrow Thumb MOV that can be used in an IT block (non flag-setting)
      
      If the immediate fits any of the available alternatives then we make the transformation.
      
      Fixes 25722.
      
      Patch by Peter Smith.
      
      llvm-svn: 269354
      608cb5de
    • Renato Golin's avatar
      [ARM] Delay ARM constant pool creation. NFC. · 3f126138
      Renato Golin authored
      This change adds a new constant pool kind to ARMOperand. When parsing the
      operand for =immediate we create an instance of this operand rather than
      creating a constant pool entry and rewriting the operand.
      
      As the new operand kind is only created for ldr rt,= we can make ldr rt,=
      an explicit pseudo instruction in ARM, Thumb and Thumb2
      
      The pseudo instruction is expanded in processInstruction(). This creates the
      constant pool and transforms the pseudo instruction into a pc-relative ldr to
      the constant pool.
      
      There are no functional changes and no modifications needed to existing tests.
      
      Required by the patch that fixes PR25722.
      
      Patch by Peter Smith.
      
      llvm-svn: 269352
      3f126138
    • Renato Golin's avatar
      [scan-build] fix warnings emitted on LLVM ARM code base · f6ed8bbf
      Renato Golin authored
      Fix "Logic error" warnings of the type "Called C++ object pointer is
      null" reported by Clang Static Analyzer.
      
      Patch by Apelete Seketeli.
      
      llvm-svn: 269285
      f6ed8bbf
    • Justin Bogner's avatar
      SDAG: Implement Select instead of SelectImpl in ARMDAGToDAGISel · 45571366
      Justin Bogner authored
      This is a large change, but it's pretty mechanical:
      - Where we were returning a node before, call ReplaceNode instead.
      - Where we would return null to fall back to another selector, rename
        the method to try* and return a bool for success.
      - Where we were calling SelectNodeTo, just return afterwards.
      
      Part of llvm.org/pr26808.
      
      llvm-svn: 269258
      45571366
    • Justin Bogner's avatar
      SDAG: Clean up dangling nodes in ARMISelDAGToDAG::SelectImpl · ed4f3785
      Justin Bogner authored
      When we convert to the void Select interface, leaving unreferenced
      nodes around won't be allowed anymore.
      
      Part of llvm.org/pr26808.
      
      llvm-svn: 269256
      ed4f3785
  7. May 10, 2016
  8. May 08, 2016
  9. May 07, 2016
    • Vitaly Buka's avatar
      Revert r268810 becase it brakes msan bot. · e81d96be
      Vitaly Buka authored
      16802==WARNING: MemorySanitizer: use-of-uninitialized-value
          lib/Target/ARM/ARMFrameLowering.cpp:1632
      
      llvm-svn: 268833
      e81d96be
    • Weiming Zhao's avatar
      [ARM] Fix Scavenger assert due to underestimated stack size · 74f12d31
      Weiming Zhao authored
      (this is resubmit of r268529 with minor refactoring. r268529 was reverted
       at r268536 due a memory sanitizer failure.  I have not been able to
       reproduce that failure and I checked all the variable used in my change
       but I could not spot an issue. I did some refactoring and see if it will
       give a clearer hint)
      
      Summary:
      Currently, when checking if a stack is "BigStack" or not, it doesn't count into spills and arguments. Therefore, LLVM won't reserve spill slot for this actually "BigStack". This may cause scavenger failure.
      
      Reviewers: rengolin
      
      Subscribers: vitalybuka, aemerson, rengolin, tberghammer, danalbert, srhines, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D19896
      
      llvm-svn: 268810
      74f12d31
  10. May 06, 2016
    • Justin Bogner's avatar
      SDAG: Rename Select->SelectImpl and repurpose Select as returning void · b0126997
      Justin Bogner authored
      This is a step towards removing the rampant undefined behaviour in
      SelectionDAG, which is a part of llvm.org/PR26808.
      
      We rename SelectionDAGISel::Select to SelectImpl and update targets to
      match, and then change Select to return void and consolidate the
      sketchy behaviour we're trying to get away from there.
      
      Next, we'll update backends to implement `void Select(...)` instead of
      SelectImpl and eventually drop the base Select implementation.
      
      llvm-svn: 268693
      b0126997
  11. May 05, 2016
    • Tim Northover's avatar
      ARM: don't attempt to merge litpools referencing different PC-anchors. · df43264c
      Tim Northover authored
      Given something like:
      
          ldr r0, .LCPI0_0 (== pc-rel var)
          add r0, pc
      
          ldr r1, .LCPI0_1 (== pc-rel var)
          add r1, pc
      
      we cannot combine the 2 ldr instructions and litpools because they get added to
      a different pc to form the correct address. I think the original logic came
      from a time when we fused the LDRpci/PICADD instructions into one
      pseudo-instruction so the PC was always immediately at-hand. That's no longer
      the case.
      
      Should fix general-dynamic TLS access on Linux, and quite possibly other -fPIC
      code that relies on litpools (e.g. v6m and -Oz compilations) though trivial
      tweaks of the .ll test didn't provoke anything.
      
      llvm-svn: 268662
      df43264c
    • Justin Bogner's avatar
      ARM: Use a Handle to track SDNodes in case they're CSE'd. NFC · 8752be77
      Justin Bogner authored
      The code here is recursively Select-ing a new Node to avoid issues
      where N is CSE'd during replaceDAGValue and stops being valid. We can
      accomplish the same goal in a more principled way by using a
      HandleSDNode.
      
      This is essentially a less dodgy fix for PR25733 than the original
      attempt back in r255120.
      
      llvm-svn: 268590
      8752be77
  12. May 04, 2016
    • Vitaly Buka's avatar
      Revert r268529 because it caused use-of-uninitialized-value · 6b5c8926
      Vitaly Buka authored
      Summary: This reverts commit d88cc0862bf7da64850b89e9bb5ea9f95e7f1184.
      
      #0 0xfed467 in llvm::ARMFrameLowering::determineCalleeSaves(llvm::MachineFunction&, llvm::BitVector&, llvm::RegScavenger*) const /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Target/ARM/ARMFrameLowering.cpp:1625:52
      #1 0x330d4cc in (anonymous namespace)::PEI::runOnMachineFunction(llvm::MachineFunction&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/CodeGen/PrologEpilogInserter.cpp:186:3
      #2 0x3193e12 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/CodeGen/MachineFunctionPass.cpp:60:13
      #3 0x396237d in llvm::FPPassManager::runOnFunction(llvm::Function&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/IR/LegacyPassManager.cpp:1526:23
      #4 0x3962a23 in llvm::FPPassManager::runOnModule(llvm::Module&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/IR/LegacyPassManager.cpp:1547:16
      #5 0x3963d52 in runOnModule /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/IR/LegacyPassManager.cpp:1603:23
      #6 0x3963d52 in llvm::legacy::PassManagerImpl::run(llvm::Module&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/IR/LegacyPassManager.cpp:1706
      #7 0x6bb910 in compileModule(char**, llvm::LLVMContext&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/tools/llc/llc.cpp:412:5
      #8 0x6b3c25 in main /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/tools/llc/llc.cpp:218:22
      #9 0x7fd4a7d37ec4 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4)
      #10 0x625c93 in _start (/mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm_build_msan/bin/llc+0x625c93)
      
      Reviewers:
      
      Subscribers:
      
      llvm-svn: 268536
      6b5c8926
    • Weiming Zhao's avatar
      [ARM] Fix Scavenger assert due to underestimated stack size · 2373f769
      Weiming Zhao authored
      Summary:
      Currently, when checking if a stack is "BigStack" or not, it doesn't count into spills and arguments. Therefore, LLVM won't reserve spill slot for this actually "BigStack". This may cause scavenger failure.
      
      Reviewers: rengolin
      
      Subscribers: aemerson, rengolin, tberghammer, danalbert, srhines, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D19896
      
      llvm-svn: 268529
      2373f769
  13. May 03, 2016
    • Matthias Braun's avatar
      livePhysRegs: Pass MBB by reference in addLive{Ins|Outs}(); NFC · d1aabb28
      Matthias Braun authored
      The block must no be nullptr for the addLiveIns()/addLiveOuts()
      function.
      
      llvm-svn: 268340
      d1aabb28
    • Matthias Braun's avatar
      LivePhysRegs: Automatically determine presence of pristine regs. · 24f26e6d
      Matthias Braun authored
      Remove the AddPristinesAndCSRs parameters from
      addLiveIns()/addLiveOuts().
      
      We need to respect pristine registers after prologue epilogue insertion,
      Seeing that we got this wrong in at least two commits already, we should
      rather pay the small price to query MachineFrameInfo for it.
      
      There are three cases that did not set AddPristineAndCSRs to true even
      after register allocation:
      - ExecutionDepsFix: live-out registers are used as a hint that the
        register is used soon. This is not true for pristine registers so
        use the new addLiveOutsNoPristines() to maintain this behaviour.
      - SystemZShortenInst: Not setting AddPristineAndCSRs to true looks like
        a bug, should do the right thing automatically now.
      - StackMapLivenessAnalysis: Not adding pristine registers looks like a
        bug to me. Added a FIXME comment but maintain the current behaviour
        as a change may need to get coordinated with GC runtimes.
      
      llvm-svn: 268336
      24f26e6d
  14. May 02, 2016
    • Tim Northover's avatar
      ARM: fix handling of SUB immediates in peephole opt. · c08db184
      Tim Northover authored
      We were negating an immediate that was going to be used in a SUBri form
      unnecessarily. Since ADD/SUB are very similar we *can* do that, but we have to
      change the SUB to an ADD at the same time. This also applies to ADD, and allows
      us to handle a slightly larger range of immediates for those two operations.
      
      rdar://25992245
      
      llvm-svn: 268276
      c08db184
  15. Apr 29, 2016
    • Filipe Cabecinhas's avatar
      Unify XDEBUG and EXPENSIVE_CHECKS (into the latter), and add an option to the... · 0da99375
      Filipe Cabecinhas authored
      Unify XDEBUG and EXPENSIVE_CHECKS (into the latter), and add an option to the cmake build to enable them.
      
      Summary:
      Historically, we had a switch in the Makefiles for turning on "expensive
      checks". This has never been ported to the cmake build, but the
      (dead-ish) code is still around.
      
      This will also make it easier to turn it on in buildbots.
      
      Reviewers: chandlerc
      
      Subscribers: jyknight, mzolotukhin, RKSimon, gberry, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D19723
      
      llvm-svn: 268050
      0da99375
  16. Apr 28, 2016
  17. Apr 27, 2016
  18. Apr 26, 2016
  19. Apr 25, 2016
  20. Apr 24, 2016
    • Saleem Abdulrasool's avatar
      ARM: fix __chkstk Frame Setup on WoA · 96115186
      Saleem Abdulrasool authored
      This corrects the MI annotations for the stack adjustment following the __chkstk
      invocation.  We were marking the original SP usage as a Def rather than Kill.
      The (new) assigned value is the definition, the original reference is killed.
      
      Adjust the ISelLowering to mark Kills and FrameSetup as well.
      
      This partially resolves PR27480.
      
      llvm-svn: 267361
      96115186
Loading