Skip to content
  1. Mar 21, 2012
    • Gregory Szorc's avatar
      Organize LLVM C API docs into doxygen modules; add docs · 34c863a0
      Gregory Szorc authored
      This gives a lot of love to the docs for the C API. Like Clang's
      documentation, the C API is now organized into a Doxygen "module"
      (LLVMC). Each C header file is a child of the main module. Some modules
      (like Core) have a hierarchy of there own. The produced documentation is
      thus better organized (before everything was in one monolithic list).
      
      This patch also includes a lot of new documentation for APIs in Core.h.
      It doesn't document them all, but is better than none. Function docs are
      missing @param and @return annotation, but the documentation body now
      commonly provides help details (like the expected llvm::Value sub-type
      to expect).
      
      llvm-svn: 153157
      34c863a0
  2. Mar 20, 2012
    • Anna Zaks's avatar
      Make sure ImmutableSet never inserts Tombstone/Entry into DenseMap. · a3b666ac
      Anna Zaks authored
      ImmutAVLTree uses random unsigned values as keys into a DenseMap,
      which could possibly happen to be the same value as the Tombstone or
      Entry keys in the DenseMap.
      
      Test case is hard to come up with. We randomly get failures on the
      internal static analyzer bot, which most likely hits this issue
      (hard to be 100% sure without the full stack).
      
      llvm-svn: 153148
      a3b666ac
  3. Mar 19, 2012
  4. Mar 17, 2012
  5. Mar 16, 2012
    • Benjamin Kramer's avatar
      Limit the number of memory operands in MachineInstr to 2^16 and store the number in padding. · d03878bd
      Benjamin Kramer authored
      Saves one machine word on MachineInstr (88->80 bytes on x86_64, 48->44 on i386).
      
      llvm-svn: 152930
      d03878bd
    • Chandler Carruth's avatar
      Start removing the use of an ad-hoc 'never inline' set and instead · d7a5f2ad
      Chandler Carruth authored
      directly query the function information which this set was representing.
      This simplifies the interface of the inline cost analysis, and makes the
      always-inline pass significantly more efficient.
      
      Previously, always-inline would first make a single set of every
      function in the module *except* those marked with the always-inline
      attribute. It would then query this set at every call site to see if the
      function was a member of the set, and if so, refuse to inline it. This
      is quite wasteful. Instead, simply check the function attribute directly
      when looking at the callsite.
      
      The normal inliner also had similar redundancy. It added every function
      in the module with the noinline attribute to its set to ignore, even
      though inside the cost analysis function we *already tested* the
      noinline attribute and produced the same result.
      
      The only tricky part of removing this is that we have to be able to
      correctly remove only the functions inlined by the always-inline pass
      when finalizing, which requires a bit of a hack. Still, much less of
      a hack than the set of all non-always-inline functions was. While I was
      touching this function, I switched a heavy-weight set to a vector with
      sort+unique. The algorithm already had a two-phase insert and removal
      pattern, we were just needlessly paying the uniquing cost on every
      insert.
      
      This probably speeds up some compiles by a small amount (-O0 compiles
      with lots of always-inline, so potentially heavy libc++ users), but I've
      not tried to measure it.
      
      I believe there is no functional change here, but yell if you spot one.
      None are intended.
      
      Finally, the direction this is going in is to greatly simplify the
      inline cost query interface so that we can replace its implementation
      with a much more clever one. Along the way, all the APIs get simplified,
      so it seems incrementally good.
      
      llvm-svn: 152903
      d7a5f2ad
    • Chandler Carruth's avatar
      Pull the implementation of the code metrics out of the inline cost · 3c256fbf
      Chandler Carruth authored
      analysis implementation. The header was already separated. Also cleanup
      all the comments in the header to follow a nice modern doxygen form.
      
      There is still plenty of cruft here, but some of that will fall out in
      subsequent refactorings and this was an easy step in the right
      direction. No functionality changed here.
      
      llvm-svn: 152898
      3c256fbf
    • Andrew Trick's avatar
      LSR fix: Add isSimplifiedLoopNest to IVUsers analysis. · 070e540a
      Andrew Trick authored
      Only record IVUsers that are dominated by simplified loop
      headers. Otherwise SCEVExpander will crash while looking for a
      preheader.
      
      I previously tried to work around this in LSR itself, but that was
      insufficient. This way, LSR can continue to run if some uses are not
      in simple loops, as long as we don't attempt to analyze those users.
      
      Fixes <rdar://problem/11049788> Segmentation fault: 11 in LoopStrengthReduce
      
      llvm-svn: 152892
      070e540a
    • NAKAMURA Takumi's avatar
      Revert r152613 (and r152614), "Inline the d'tor and add an anchor instead."... · a7e57ace
      NAKAMURA Takumi authored
      Revert r152613 (and r152614), "Inline the d'tor and add an anchor instead." for workaround of g++-4.4's miscompilation.
      
      It caused MSP430DAGToDAGISel::SelectIndexedBinOp() to be miscompiled.
      When two ReplaceUses()'s are expanded as inline, vtable in base class is stored to latter (ISelUpdater)ISU.
      
      llvm-svn: 152877
      a7e57ace
  6. Mar 15, 2012
    • Jakob Stoklund Olesen's avatar
      Revert r152202: "Use uint16_t to store InstrNameIndices in MCInstrInfo." · e3084895
      Jakob Stoklund Olesen authored
      We cannot limit the concatenated instruction names to 64K.  ARM is
      already at 32K, and it is easy to imagine a target with more
      instructions.
      
      llvm-svn: 152817
      e3084895
    • Chandler Carruth's avatar
      Remove the basic inliner. This was added in 2007, and hasn't really · be2ccf01
      Chandler Carruth authored
      changed since. No one was using it. It is yet another consumer of the
      InlineCost interface that I'd like to change.
      
      llvm-svn: 152769
      be2ccf01
    • Chandler Carruth's avatar
      Remove all remnants of partial specialization in the cost computation · 5b6ca5ca
      Chandler Carruth authored
      side of things. This is all dead code.
      
      llvm-svn: 152759
      5b6ca5ca
    • Chandler Carruth's avatar
      Extend the inline cost calculation to account for bonuses due to · 4d1d34fb
      Chandler Carruth authored
      correlated pairs of pointer arguments at the callsite. This is designed
      to recognize the common C++ idiom of begin/end pointer pairs when the
      end pointer is a constant offset from the begin pointer. With the
      C-based idiom of a pointer and size, the inline cost saw the constant
      size calculation, and this provides the same level of information for
      begin/end pairs.
      
      In order to propagate this information we have to search for candidate
      operations on a pair of pointer function arguments (or derived from
      them) which would be simplified if the pointers had a known constant
      offset. Then the callsite analysis looks for such pointer pairs in the
      argument list, and applies the appropriate bonus.
      
      This helps LLVM detect that half of bounds-checked STL algorithms
      (such as hash_combine_range, and some hybrid sort implementations)
      disappear when inlined with a constant size input. However, it's not
      a complete fix due the inaccuracy of our cost metric for constants in
      general. I'm looking into that next.
      
      Benchmarks showed no significant code size change, and very minor
      performance changes. However, specific code such as hashing is showing
      significantly cleaner inlining decisions.
      
      llvm-svn: 152752
      4d1d34fb
  7. Mar 14, 2012
    • Francois Pichet's avatar
      Fixes the MSVC build. · 118bad1a
      Francois Pichet authored
      Commit r152704 exposed a latent MSVC limitation (aka bug). 
      Both ilist and and iplist contains the same function:
        template<class InIt> void insert(iterator where, InIt first, InIt last) {
          for (; first != last; ++first) insert(where, *first);
        }
      
      Also ilist inherits from iplist and ilist contains a "using iplist<NodeTy>::insert".
      MSVC doesn't know which one to pick and complain with an error.
      
      I think it is safe to delete ilist::insert since it is redundant anyway.
      
      llvm-svn: 152746
      118bad1a
    • Andrew Trick's avatar
      misched: implemented a framework for top-down or bottom-up scheduling. · 8823decd
      Andrew Trick authored
      New flags: -misched-topdown, -misched-bottomup. They can be used with
      the default scheduler or with -misched=shuffle. Without either
      topdown/bottomup flag -misched=shuffle now alternates scheduling
      direction.
      
      LiveIntervals update is unimplemented with bottom-up scheduling, so
      only -misched-topdown currently works.
      
      Capped the ScheduleDAG hierarchy with a concrete ScheduleDAGMI class.
      ScheduleDAGMI is aware of the top and bottom of the unscheduled zone
      within the current region. Scheduling policy can be plugged into
      the ScheduleDAGMI driver by implementing MachineSchedStrategy.
      ConvergingScheduler is now the default scheduling algorithm.
      It exercises the new driver but still does no reordering.
      
      llvm-svn: 152700
      8823decd
    • Benjamin Kramer's avatar
      Move APInt::operator[] inline. · 78b505b0
      Benjamin Kramer authored
      llvm-svn: 152692
      78b505b0
    • Benjamin Kramer's avatar
  8. Mar 13, 2012
  9. Mar 11, 2012
  10. Mar 10, 2012
  11. Mar 09, 2012
Loading