Skip to content
  1. Jan 10, 2011
  2. Jan 09, 2011
    • Chris Lattner's avatar
      Step #4 in improving trip count analysis: HowFarToZero can analyze · 28f140a3
      Chris Lattner authored
      NUW AddRec's much more aggressively.  We now get a trip count
      for @test2 in nsw.ll
      
      llvm-svn: 123138
      28f140a3
    • Jakob Stoklund Olesen's avatar
      Change virtual register numbering to make more space for physical registers. · 8828e482
      Jakob Stoklund Olesen authored
      The numbering plan is now:
      
      0           NoRegister.
      [1;2^30)    Physical registers.
      [2^30;2^31) Stack slots.
      [2^31;2^32) Virtual registers. (With -1u and -2u used by DenseMapInfo.)
      
      Each segment is filled from the left, so any mistaken interpretation should
      quickly cause crashes.
      
      FirstVirtualRegister has been removed. TargetRegisterInfo provides predicates
      conversion functions that should be used instead of interpreting register
      numbers manually.
      
      It is now legal to pass NoRegister to isPhysicalRegister() and
      isVirtualRegister(). The result is false in both cases.
      
      It is quite rare to represent stack slots in this way, so isPhysicalRegister()
      and isVirtualRegister() require that isStackSlot() be checked first if it can
      possibly return true. This allows a very fast implementation of the common
      predicates.
      
      llvm-svn: 123137
      8828e482
    • Chris Lattner's avatar
      rearrange some code, no functionality change. · dff679f4
      Chris Lattner authored
      llvm-svn: 123136
      dff679f4
    • Chandler Carruth's avatar
      Add a note about the inability to model FP -> int conversions which · d011d531
      Chandler Carruth authored
      perform rounding other than truncation in the IR. Common C code for this
      turns into really an LLVM intrinsic call that blocks a lot of further
      optimizations.
      
      llvm-svn: 123135
      d011d531
    • Francois Pichet's avatar
      Don't crash if SpecString is an empty string. · 96df71ad
      Francois Pichet authored
      llvm-svn: 123134
      96df71ad
    • Chris Lattner's avatar
      Step #3 to improving trip count analysis: If we fold · a44274cb
      Chris Lattner authored
      a + {b,+,stride} into {a+b,+,stride}  (because a is LIV),
      then the resultant AddRec is NUW/NSW if the client says it
      is.
      
      llvm-svn: 123133
      a44274cb
    • Greg Clayton's avatar
      Removed a few bad assert() statement regarding bitfields. · dc000fbf
      Greg Clayton authored
      llvm-svn: 123132
      dc000fbf
    • Chris Lattner's avatar
      Step #2 to improve trip count analysis for loops like this: · fc87752d
      Chris Lattner authored
      void f(int* begin, int* end) { std::fill(begin, end, 0); }
      
      which turns into a != exit expression where one pointer is
      strided and (thanks to step #1) known to not overflow, and 
      the other is loop invariant.
      
      The observation here is that, though the IV is strided by
      4 in this case, that the IV *has* to become equal to the
      end value.  It cannot "miss" the end value by stepping over
      it, because if it did, the strided IV expression would
      eventually wrap around.
      
      Handle this by turning A != B into "A-B != 0" where the A-B
      part is known to be NUW.
      
      llvm-svn: 123131
      fc87752d
    • Jakob Stoklund Olesen's avatar
      Remove MachineRegisterInfo::getLastVirtReg(), it was giving wrong results · d82ac375
      Jakob Stoklund Olesen authored
      when no virtual registers have been allocated.
      
      It was only used to resize IndexedMaps, so provide an IndexedMap::resize()
      method such that
      
       Map.grow(MRI.getLastVirtReg());
      
      can be replaced with the simpler
      
       Map.resize(MRI.getNumVirtRegs());
      
      This works correctly when no virtuals are allocated, and it bypasses the to/from
      index conversions.
      
      llvm-svn: 123130
      d82ac375
    • Chris Lattner's avatar
      sort this. · 878665b4
      Chris Lattner authored
      llvm-svn: 123129
      878665b4
    • Jakob Stoklund Olesen's avatar
      Teach TargetRegisterInfo how to cram stack slot indexes in with the virtual and · b83a6b23
      Jakob Stoklund Olesen authored
      physical register numbers.
      
      This makes the hack used in LiveInterval official, and lets LiveInterval be
      oblivious of stack slots.
      
      The isPhysicalRegister() and isVirtualRegister() predicates don't know about
      this, so when a variable may contain a stack slot, isStackSlot() should always
      be tested first.
      
      llvm-svn: 123128
      b83a6b23
    • Greg Clayton's avatar
      Put more smarts into the RegisterContext base class. Now the base class has · 3e06bd90
      Greg Clayton authored
      a method:
      
          void RegisterContext::InvalidateIfNeeded (bool force);
      
      Each time this function is called, when "force" is false, it will only call
      the pure virtual "virtual void RegisterContext::InvalideAllRegisters()" if
      the register context's stop ID doesn't match that of the process. When the
      stop ID doesn't match, or "force" is true, the base class will clear its
      cached registers and the RegisterContext will update its stop ID to match
      that of the process. This helps make it easier to correctly flush the register
      context (possibly from multiple locations depending on when and where new
      registers are availabe) without inadvertently clearing the register cache 
      when it doesn't need to be.
      
      Modified the ProcessGDBRemote plug-in to be much more efficient when it comes
      to:
      - caching the expedited registers in the stop reply packets (we were ignoring
        these before and it was causing us to read at least three registers every
        time we stopped that were already supplied in the stop reply packet).
      - When a thread has no stop reason, don't keep asking for the thread stopped
        info. Prior to this fix we would continually send a qThreadStopInfo packet
        over and over when any thread stop info was requested. We now note the stop
        ID that the stop info was requested for and avoid multiple requests.
      
      Cleaned up some of the expression code to not look for ClangExpressionVariable
      objects up by name since they are now shared pointers and we can just look for
      the exact pointer match and avoid possible errors.
      
      Fixed an bug in the ValueObject code that would cause children to not be 
      displayed.
      
      llvm-svn: 123127
      3e06bd90
    • Chandler Carruth's avatar
      Add a note about a missed FP optimization. · 0c68a668
      Chandler Carruth authored
      llvm-svn: 123126
      0c68a668
    • Jakob Stoklund Olesen's avatar
      Fix comment. · 8145f856
      Jakob Stoklund Olesen authored
      llvm-svn: 123125
      8145f856
Loading