Skip to content
  1. Jun 12, 2015
  2. Jun 10, 2015
  3. Jun 09, 2015
    • Akira Hatanaka's avatar
      Remove DisableTailCalls from TargetOptions and the code in resetTargetOptions · d9699bc7
      Akira Hatanaka authored
      that was resetting it.
      
      Remove the uses of DisableTailCalls in subclasses of TargetLowering and use
      the value of function attribute "disable-tail-calls" instead. Also,
      unconditionally add pass TailCallElim to the pipeline and check the function
      attribute at the start of runOnFunction to disable the pass on a per-function
      basis. 
       
      This is part of the work to remove TargetMachine::resetTargetOptions, and since
      DisableTailCalls was the last non-fast-math option that was being reset in that
      function, we should be able to remove the function entirely after the work to
      propagate IR-level fast-math flags to DAG nodes is completed.
      
      Out-of-tree users should remove the uses of DisableTailCalls and make changes
      to attach attribute "disable-tail-calls"="true" or "false" to the functions in
      the IR.
      
      rdar://problem/13752163
      
      Differential Revision: http://reviews.llvm.org/D10099
      
      llvm-svn: 239427
      d9699bc7
  4. Jun 08, 2015
  5. Jun 05, 2015
  6. Jun 03, 2015
    • Matthias Braun's avatar
      ARM: Thumb2 LDRD/STRD supports independent input/output regs · 125c9f5f
      Matthias Braun authored
      The existing code would unnecessarily break LDRD/STRD apart with
      non-adjacent registers, on thumb2 this is not necessary.
      
      Ideally on thumb2 we shouldn't match for ldrd/strd pre-regalloc anymore
      as there is not reason to set register hints anymore, changing that is
      something for a future patch however.
      
      Differential Revision: http://reviews.llvm.org/D9694
      
      Recommiting after the revert in r238821, the buildbot still failed with
      the patch removed so there seems to be another reason for the breakage.
      
      llvm-svn: 238935
      125c9f5f
  7. Jun 02, 2015
  8. Jun 01, 2015
  9. May 31, 2015
    • Tim Northover's avatar
      ARM: recommit r237590: allow jump tables to be placed as constant islands. · a603c407
      Tim Northover authored
      The original version didn't properly account for the base register
      being modified before the final jump, so caused miscompilations in
      Chromium and LLVM. I've fixed this and tested with an LLVM self-host
      (I don't have the means to build & test Chromium).
      
      The general idea remains the same: in pathological cases jump tables
      can be too far away from the instructions referencing them (like other
      constants) so they need to be movable.
      
      Should fix PR23627.
      
      llvm-svn: 238680
      a603c407
  10. May 26, 2015
  11. May 23, 2015
    • Akira Hatanaka's avatar
      Stop resetting NoFramePointerElim in TargetMachine::resetTargetOptions. · ddf76aa3
      Akira Hatanaka authored
      This is part of the work to remove TargetMachine::resetTargetOptions.
      
      In this patch, instead of updating global variable NoFramePointerElim in
      resetTargetOptions, its use in DisableFramePointerElim is replaced with a call
      to TargetFrameLowering::noFramePointerElim. This function determines on a
      per-function basis if frame pointer elimination should be disabled.
      
      There is no change in functionality except that cl:opt option "disable-fp-elim"
      can now override function attribute "no-frame-pointer-elim". 
      
      llvm-svn: 238080
      ddf76aa3
  12. May 22, 2015
  13. May 20, 2015
  14. May 18, 2015
    • Tim Northover's avatar
      ARM: allow jump tables to be placed as constant islands. · 12c41af0
      Tim Northover authored
      Previously, they were forced to immediately follow the actual branch
      instruction. This was usually OK (the LEAs actually accessing them got emitted
      nearby, and weren't usually separated much afterwards). Unfortunately, a
      sufficiently nasty phi elimination dumps many instructions right before the
      basic block terminator, and this can increase the range too much.
      
      This patch frees them up to be placed as usual by the constant islands pass,
      and consequently has to slightly modify the form of TBB/TBH tables to refer to
      a PC-relative label at the final jump. The other jump table formats were
      already position-independent.
      
      rdar://20813304
      
      llvm-svn: 237590
      12c41af0
    • Oliver Stannard's avatar
      Revert r237579, as it broke windows buildbots · 6cb23465
      Oliver Stannard authored
      llvm-svn: 237583
      6cb23465
    • Oliver Stannard's avatar
      [LLVM - ARM/AArch64] Add ACLE special register intrinsics · 0c553afe
      Oliver Stannard authored
      This patch implements LLVM support for the ACLE special register intrinsics in
      section 10.1, __arm_{w,r}sr{,p,64}.
      
      This patch is intended to lower the read/write_register instrinsics, used to
      implement the special register intrinsics in the clang patch for special
      register intrinsics (see http://reviews.llvm.org/D9697), to ARM specific
      instructions MRC,MCR,MSR etc. to allow reading an writing of coprocessor
      registers in AArch32 and AArch64. This is done by inspecting the register
      string passed to the intrinsic and then lowering to the appropriate
      instruction.
      
      Patch by Luke Cheeseman.
      
      Differential Revision: http://reviews.llvm.org/D9699
      
      llvm-svn: 237579
      0c553afe
  15. May 14, 2015
  16. May 13, 2015
  17. May 12, 2015
    • Sunil Srivastava's avatar
      Changed renaming of local symbols by inserting a dot vefore the numeric suffix. · d79dfcbc
      Sunil Srivastava authored
      One code change and several test changes to match that
      details in http://reviews.llvm.org/D9481
      
      llvm-svn: 237150
      d79dfcbc
    • John Brawn's avatar
      [ARM] Use AEABI aligned function variants · 70605f7d
      John Brawn authored
      AEABI defines aligned variants of memcpy etc. that can be faster than
      the default version due to not having to do alignment checks. When
      emitting target code for these functions make use of these aligned
      variants if possible. Also convert memset to memclr if possible.
      
      Differential Revision: http://reviews.llvm.org/D8060
      
      llvm-svn: 237127
      70605f7d
    • Eric Christopher's avatar
      Migrate existing backends that care about software floating point · 824f42f2
      Eric Christopher authored
      to use the information in the module rather than TargetOptions.
      
      We've had and clang has used the use-soft-float attribute for some
      time now so have the backends set a subtarget feature based on
      a particular function now that subtargets are created based on
      functions and function attributes.
      
      For the one middle end soft float check go ahead and create
      an overloadable TargetLowering::useSoftFloat function that
      just checks the TargetSubtargetInfo in all cases.
      
      Also remove the command line option that hard codes whether or
      not soft-float is set by using the attribute for all of the
      target specific test cases - for the generic just go ahead and
      add the attribute in the one case that showed up.
      
      llvm-svn: 237079
      824f42f2
  18. May 09, 2015
    • Pete Cooper's avatar
      [Fast-ISel] Don't mark the first use of a remat constant as killed. · d54fb899
      Pete Cooper authored
      When emitting something like 'add x, 1000' if we remat the 1000 then we should be able to
      mark the vreg containing 1000 as killed.  Given that we go bottom up in fast-isel, a later
      use of 1000 will be higher up in the BB and won't kill it, or be impacted by the lower kill.
      
      However, rematerialised constant expressions aren't generated bottom up.  The local value save area
      grows downwards.  This means that if you remat 2 constant expressions which both use 1000 then the
      first will kill it, then the second, which is *lower* in the BB will read a killed register.
      
      This is the case in the attached test where the 2 GEPs both need to generate 'add x, 6680' for the constant offset.
      
      Note that this commit only makes kill flag generation conservative.  There's nothing else obviously wrong with
      the local value save area growing downwards, and in fact it needs to for handling arbitrarily complex constant expressions.
      
      However, it would be nice if there was a solution which would let us generate more accurate kill flags, or just kill flags completely.
      
      llvm-svn: 236922
      d54fb899
    • Arnold Schwaighofer's avatar
      ScheduleDAGInstrs: In functions with tail calls PseudoSourceValues are not... · f54b73d6
      Arnold Schwaighofer authored
      ScheduleDAGInstrs: In functions with tail calls PseudoSourceValues are not non-aliasing distinct objects
      
      The code that builds the dependence graph assumes that two PseudoSourceValues
      don't alias. In a tail calling function two FixedStackObjects might refer to the
      same location. Worse 'immutable' fixed stack objects like function arguments are
      not immutable and will be clobbered.
      
      Change this so that a load from a FixedStackObject is not invariant in a tail
      calling function and don't return a PseudoSourceValue for an instruction in tail
      calling functions when building the dependence graph so that we handle function
      arguments conservatively.
      
      Fix for PR23459.
      
      rdar://20740035
      
      llvm-svn: 236916
      f54b73d6
  19. May 08, 2015
    • Pete Cooper's avatar
      [Fast-ISel] Clear kill flags on registers replaced by updateValueMap. · e4bb07ec
      Pete Cooper authored
      When selecting an extract instruction, we don't actually generate code but instead work out which register we are reading, and rewrite uses of the extract def to the source register.  This is done via updateValueMap,.
      
      However, its possible that the source register we are rewriting *to* to also have uses.  If those uses are after a kill of the value we are rewriting *from* then we have uses after a kill and the verifier fails.
      
      This code checks for the case where the to register is also used, and if so it clears all kill on the from register.  This is conservative, but better that always clearing kills on the from register.
      
      llvm-svn: 236897
      e4bb07ec
  20. May 07, 2015
    • Pete Cooper's avatar
      Clear kill flags in tail duplication. · ba593ad3
      Pete Cooper authored
      If we duplicate an instruction then we must also clear kill flags on any uses we rewrite.
      Otherwise we might be killing a register which was used in other BBs.
      
      For example, here the entry BB ended up with these instructions, the ADD having been tail duplicated.
      
      	%vreg24<def> = t2ADDri %vreg10<kill>, 1, pred:14, pred:%noreg, opt:%noreg; GPRnopc:%vreg24 rGPR:%vreg10
      	%vreg22<def> = COPY %vreg10; GPR:%vreg22 rGPR:%vreg10
      
      	The copy here is inserted after the add and so needs vreg10 to be live.
      
      llvm-svn: 236782
      ba593ad3
    • Pete Cooper's avatar
      Handle dead defs in the if converter. · 27483915
      Pete Cooper authored
      We had code such as this:
        r2 = ...
        t2Bcc
      
      label1:
        ldr ... r2
      
      label2;
        return r2<dead, def>
      
      The if converter was transforming this to
         r2<def> = ...
         return [pred] r2<dead,def>
         ldr <r2, kill>
         return
      
      which fails the machine verifier because the ldr now reads from a dead def.
      
      The fix here detects dead defs in stepForward and passes them back to the caller in the clobbers list.  The caller then clears the dead flag from the def is the value is live.
      
      llvm-svn: 236660
      27483915
    • Pete Cooper's avatar
      Fix incorrect kill flags in fastisel. · 54085cdc
      Pete Cooper authored
      If called twice in the same BB on the same constant, FastISel::fastEmit_ri_ was marking the materialized vreg as killed on each use, instead of only the last use.
      
      Change this to only mark the last use as killed by making earlier uses check if the vreg is already used elsewhere.
      
      llvm-svn: 236650
      54085cdc
  21. May 06, 2015
    • Pete Cooper's avatar
      [ARM] Fast-Isel was incorrectly selecting <2 x double> adds. · d927c6ea
      Pete Cooper authored
      With neon enabled, we reach SelectBinaryFPOp and are able to get registers for a <2 x double> add.
      
      However, we shouldn't actually attempt arithmetic on it as ARMIselLowering says "v2f64 is legal so that QR subregs can be extracted as f64 elements, but neither Neon nor VFP support any arithmetic operations on it."
      
      This commit disables SelectBinaryFPOp for any vector types.  There's already a FIXME to try handle neon.  Doing so would require fixing this conditional which isn't safe for vectors 'VT == MVT::f64 || VT == MVT::i64'
      
      llvm-svn: 236609
      d927c6ea
    • Artyom Skrobov's avatar
    • Ahmed Bougacha's avatar
      [ARM][FastISel] Use TST #1 instead of CMP #0 for select. · e8d0c4cc
      Ahmed Bougacha authored
      Since r234249, i1 are sext instead of zext; because of that, doing
      "CMP rN, #0; IT EQ/NE" isn't correct anymore.
      
      "TST #1" is the conservatively correct alternative - the tradeoff being
      that it doesn't have a 16-bit encoding -, so use that instead.
      
      llvm-svn: 236569
      e8d0c4cc
    • Pete Cooper's avatar
      Fix IfConverter to handle regmask machine operands. · ce9ad757
      Pete Cooper authored
      Note, this is a recommit of r236515 after fixing an error in r236514.  The buildbot ran fast enough that it picked up r236514 prior to r236515 and threw an error.  r236515 itself ran 'make check' without errors.
      
      Original commit message follows:
      
      A regmask (typically seen on a call) clobbers the set of registers it lists.  The IfConverter, in UpdatePredRedefs, was handling register defs, but not regmasks.
      
      These are slightly different to a def in that we need to add both an implicit use and def to appease the machine verifier.  Otherwise, uses after the if converted call could think they are reading an undefined register.
      
      Reviewed by Matthias Braun and Quentin Colombet.
      
      llvm-svn: 236550
      ce9ad757
  22. May 05, 2015
    • Pete Cooper's avatar
      Revert "Fix IfConverter to handle regmask machine operands." · 05b84d41
      Pete Cooper authored
      This reverts commit b27413cbfd78d959c18e713bfa271fb69e6b3303 (ie r236515).
      
      This is to get the bots green while i investigate the failures.
      
      llvm-svn: 236517
      05b84d41
    • Pete Cooper's avatar
      Fix IfConverter to handle regmask machine operands. · 6ebc2077
      Pete Cooper authored
      A regmask (typically seen on a call) clobbers the set of registers it lists.  The IfConverter, in UpdatePredRedefs, was handling register defs, but not regmasks.
      
      These are slightly different to a def in that we need to add both an implicit use and def to appease the machine verifier.  Otherwise, uses after the if converted call could think they are reading an undefined register.
      
      Reviewed by Matthias Braun and Quentin Colombet.
      
      llvm-svn: 236515
      6ebc2077
  23. May 01, 2015
Loading