Skip to content
  1. Jul 30, 2013
  2. Jul 29, 2013
    • Nico Rieck's avatar
      Use proper section suffix for COFF weak symbols · 7fdaee8f
      Nico Rieck authored
      32-bit symbols have "_" as global prefix, but when forming the name of
      COMDAT sections this prefix is ignored. The current behavior assumes that
      this prefix is always present which is not the case for 64-bit and names
      are truncated.
      
      llvm-svn: 187356
      7fdaee8f
  3. Jul 27, 2013
  4. Jul 26, 2013
  5. Jul 25, 2013
    • Andrew Trick's avatar
      RegAllocGreedy comment. · f4b1ee34
      Andrew Trick authored
      llvm-svn: 187141
      f4b1ee34
    • Andrew Trick's avatar
      Evict local live ranges if they can be reassigned. · 8bb0a251
      Andrew Trick authored
      The previous change to local live range allocation also suppressed
      eviction of local ranges. In rare cases, this could result in more
      expensive register choices. This commit actually revives a feature
      that I added long ago: check if live ranges can be reassigned before
      eviction. But now it only happens in rare cases of evicting a local
      live range because another local live range wants a cheaper register.
      
      The benefit is improved code size for some benchmarks on x86 and armv7.
      
      I measured no significant compile time increase and performance
      changes are noise.
      
      llvm-svn: 187140
      8bb0a251
    • Andrew Trick's avatar
      Allocate local registers in order for optimal coloring. · 8485257d
      Andrew Trick authored
      Also avoid locals evicting locals just because they want a cheaper register.
      
      Problem: MI Sched knows exactly how many registers we have and assumes
      they can be colored. In cases where we have large blocks, usually from
      unrolled loops, greedy coloring fails. This is a source of
      "regressions" from the MI Scheduler on x86. I noticed this issue on
      x86 where we have long chains of two-address defs in the same live
      range. It's easy to see this in matrix multiplication benchmarks like
      IRSmk and even the unit test misched-matmul.ll.
      
      A fundamental difference between the LLVM register allocator and
      conventional graph coloring is that in our model a live range can't
      discover its neighbors, it can only verify its neighbors. That's why
      we initially went for greedy coloring and added eviction to deal with
      the hard cases. However, for singly defined and two-address live
      ranges, we can optimally color without visiting neighbors simply by
      processing the live ranges in instruction order.
      
      Other beneficial side effects:
      
      It is much easier to understand and debug regalloc for large blocks
      when the live ranges are allocated in order. Yes, global allocation is
      still very confusing, but it's nice to be able to comprehend what
      happened locally.
      
      Heuristics could be added to bias register assignment based on
      instruction locality (think late register pairing, banks...).
      
      Intuituvely this will make some test cases that are on the threshold
      of register pressure more stable.
      
      llvm-svn: 187139
      8485257d
    • Adrian Prantl's avatar
      typo. · e4daf52a
      Adrian Prantl authored
      llvm-svn: 187135
      e4daf52a
    • Andrew Trick's avatar
      MI Sched: Register pressure heuristics. · 401b6959
      Andrew Trick authored
      Consider which set is being increased or decreased before comparing.
      
      llvm-svn: 187110
      401b6959
    • Andrew Trick's avatar
    • Andrew Trick's avatar
      Dump LIS before regalloc. MI sched changes them. · 9706496b
      Andrew Trick authored
      llvm-svn: 187107
      9706496b
    • Bill Wendling's avatar
      Replace the "NoFramePointerElimNonLeaf" target option with a function attribute. · 440e9d81
      Bill Wendling authored
      There's no need to specify a flag to omit frame pointer elimination on non-leaf
      nodes...(Honestly, I can't parse that option out.) Use the function attribute
      stuff instead.
      
      llvm-svn: 187093
      440e9d81
  6. Jul 24, 2013
    • Quentin Colombet's avatar
      Fix a bug in IfConverter with nested predicates. · bdab227e
      Quentin Colombet authored
      Prior to this patch, IfConverter may widen the cases where a sequence of
      instructions were executed because of the way it uses nested predicates. This
      result in incorrect execution.
      
      For instance, Let A be a basic block that flows conditionally into B and B be a
      predicated block.
      B can be predicated with A.BrToBPredicate into A iff B.Predicate is less
      "permissive" than A.BrToBPredicate, i.e., iff A.BrToBPredicate subsumes
      B.Predicate.
      
      The IfConverter was checking the opposite: B.Predicate subsumes
      A.BrToBPredicate.
      
      <rdar://problem/14379453>
      
      llvm-svn: 187071
      bdab227e
    • Tom Stellard's avatar
      DAGCombiner: Pass the correct type to TargetLowering::isF(Abs|Neg)Free · c54731aa
      Tom Stellard authored
      This commit also implements these functions for R600 and removes a test
      case that was relying on the buggy behavior.
      
      llvm-svn: 187007
      c54731aa
    • Eric Christopher's avatar
      Reformat options. · 7f2b551d
      Eric Christopher authored
      llvm-svn: 186994
      7f2b551d
  7. Jul 22, 2013
  8. Jul 19, 2013
  9. Jul 17, 2013
  10. Jul 16, 2013
    • Rafael Espindola's avatar
      Add a wrapper for open. · 6d35481c
      Rafael Espindola authored
      This centralizes the handling of O_BINARY and opens the way for hiding more
      differences (like how open behaves with directories).
      
      llvm-svn: 186447
      6d35481c
    • Jakob Stoklund Olesen's avatar
      Remove floats from live range splitting costs. · efeb3a19
      Jakob Stoklund Olesen authored
      These floats all represented block frequencies anyway, so just use the
      BlockFrequency class directly.
      
      Some floating point computations remain in tryLocalSplit(). They are
      estimating spill weights which are still floats.
      
      llvm-svn: 186435
      efeb3a19
    • Jakob Stoklund Olesen's avatar
      Reapply r185393. · c5454ff0
      Jakob Stoklund Olesen authored
      Original commit message:
      
      Remove floating point computations from SpillPlacement.cpp.
      
      Patch by Benjamin Kramer!
      
      Use the BlockFrequency class instead of floats in the Hopfield network
      computations. This rescales the node Bias field from a [-2;2] float
      range to two block frequencies BiasN and BiasP pulling in opposite
      directions. This construct has a more predictable behavior when block
      frequencies saturate.
      
      The per-node scaling factors are no longer necessary, assuming the block
      frequencies around a bundle are consistent.
      
      This patch can cause the register allocator to make different spilling
      decisions. The differences should be small.
      
      llvm-svn: 186434
      c5454ff0
    • Craig Topper's avatar
      Add 'const' qualifiers to static const char* variables. · d3a34f81
      Craig Topper authored
      llvm-svn: 186371
      d3a34f81
    • Manman Ren's avatar
      PEI: Support for non-zero SPAdj at beginning of a basic block. · b827123c
      Manman Ren authored
      We can have a FrameSetup in one basic block and the matching FrameDestroy
      in a different basic block when we have struct byval. In that case, SPAdj
      is not zero at beginning of the basic block.
      
      Modify PEI to correctly set SPAdj at beginning of each basic block using
      DFS traversal. We used to assume SPAdj is 0 at beginning of each basic block.
      
      PEI had an assert SPAdjCount || SPAdj == 0.
      If we have a Destroy <n> followed by a Setup <m>, PEI will assert failure.
      We can add an extra condition to make sure the pairs are matched:
        The pairs start with a FrameSetup.
      But since we are doing a much better job in the verifier, this patch removes
      the check in PEI.
      
      PR16393
      
      llvm-svn: 186364
      b827123c
  11. Jul 15, 2013
    • Manman Ren's avatar
      Machine Verifier: verify FrameSetup and FrameDestroy · aa6875b1
      Manman Ren authored
      1> on every path through the CFG, a FrameSetup <n> is always followed by a
         FrameDestroy <n> and a FrameDestroy is always followed by a FrameSetup.
      2> stack adjustments are identical on all CFG edges to a merge point.
      3> frame is destroyed at end of a return block.
      
      PR16393
      
      llvm-svn: 186350
      aa6875b1
Loading