Skip to content
  1. Jan 08, 2013
  2. Jan 07, 2013
    • Eric Christopher's avatar
      Whitespace and 80-col. · b800ff70
      Eric Christopher authored
      llvm-svn: 171803
      b800ff70
    • Eric Christopher's avatar
      Add more comments to what's going on here. · fba22600
      Eric Christopher authored
      llvm-svn: 171780
      fba22600
    • Eric Christopher's avatar
      Add support for separating strings for the split debug info DWARF5 · 2cbd5767
      Eric Christopher authored
      proposal. This leaves the strings in the skeleton die as strp,
      but in all dwo files they're accessed now via DW_FORM_GNU_str_index.
      
      Add support for dumping these sections and modify the fission-cu.ll
      testcase to have the correct strings and form. Fix a small bug
      in the fixed form sizes routine that involved out of array accesses
      for the table and add a FIXME in the extractFast routine to fix
      this up.
      
      llvm-svn: 171779
      2cbd5767
    • Chandler Carruth's avatar
      Sink AddrMode back into TargetLowering, removing one of the most · 95f83e01
      Chandler Carruth authored
      peculiar headers under include/llvm.
      
      This struct still doesn't make a lot of sense, but it makes more sense
      down in TargetLowering than it did before.
      
      llvm-svn: 171739
      95f83e01
    • Chandler Carruth's avatar
      Switch the SCEV expander and LoopStrengthReduce to use · 26c59fa8
      Chandler Carruth authored
      TargetTransformInfo rather than TargetLowering, removing one of the
      primary instances of the layering violation of Transforms depending
      directly on Target.
      
      This is a really big deal because LSR used to be a "special" pass that
      could only be tested fully using llc and by looking at the full output
      of it. It also couldn't run with any other loop passes because it had to
      be created by the backend. No longer is this true. LSR is now just
      a normal pass and we should probably lift the creation of LSR out of
      lib/CodeGen/Passes.cpp and into the PassManagerBuilder. =] I've not done
      this, or updated all of the tests to use opt and a triple, because
      I suspect someone more familiar with LSR would do a better job. This
      change should be essentially without functional impact for normal
      compilations, and only change behvaior of targetless compilations.
      
      The conversion required changing all of the LSR code to refer to the TTI
      interfaces, which fortunately are very similar to TargetLowering's
      interfaces. However, it also allowed us to *always* expect to have some
      implementation around. I've pushed that simplification through the pass,
      and leveraged it to simplify code somewhat. It required some test
      updates for one of two things: either we used to skip some checks
      altogether but now we get the default "no" answer for them, or we used
      to have no information about the target and now we do have some.
      
      I've also started the process of removing AddrMode, as the TTI interface
      doesn't use it any longer. In some cases this simplifies code, and in
      others it adds some complexity, but I think it's not a bad tradeoff even
      there. Subsequent patches will try to clean this up even further and use
      other (more appropriate) abstractions.
      
      Yet again, almost all of the formatting changes brought to you by
      clang-format. =]
      
      llvm-svn: 171735
      26c59fa8
    • David Blaikie's avatar
      PR14759: Debug info support for C++ member pointers. · 5d3249b5
      David Blaikie authored
      This works fine with GDB for member variable pointers, but GDB's support for
      member function pointers seems to be quite unrelated to
      DW_TAG_ptr_to_member_type. (see GDB bug 14998 for details)
      
      llvm-svn: 171698
      5d3249b5
    • Chandler Carruth's avatar
      Move TargetTransformInfo to live under the Analysis library. This no · d3e73556
      Chandler Carruth authored
      longer would violate any dependency layering and it is in fact an
      analysis. =]
      
      llvm-svn: 171686
      d3e73556
    • Chandler Carruth's avatar
      Switch TargetTransformInfo from an immutable analysis pass that requires · 664e354d
      Chandler Carruth authored
      a TargetMachine to construct (and thus isn't always available), to an
      analysis group that supports layered implementations much like
      AliasAnalysis does. This is a pretty massive change, with a few parts
      that I was unable to easily separate (sorry), so I'll walk through it.
      
      The first step of this conversion was to make TargetTransformInfo an
      analysis group, and to sink the nonce implementations in
      ScalarTargetTransformInfo and VectorTargetTranformInfo into
      a NoTargetTransformInfo pass. This allows other passes to add a hard
      requirement on TTI, and assume they will always get at least on
      implementation.
      
      The TargetTransformInfo analysis group leverages the delegation chaining
      trick that AliasAnalysis uses, where the base class for the analysis
      group delegates to the previous analysis *pass*, allowing all but tho
      NoFoo analysis passes to only implement the parts of the interfaces they
      support. It also introduces a new trick where each pass in the group
      retains a pointer to the top-most pass that has been initialized. This
      allows passes to implement one API in terms of another API and benefit
      when some other pass above them in the stack has more precise results
      for the second API.
      
      The second step of this conversion is to create a pass that implements
      the TargetTransformInfo analysis using the target-independent
      abstractions in the code generator. This replaces the
      ScalarTargetTransformImpl and VectorTargetTransformImpl classes in
      lib/Target with a single pass in lib/CodeGen called
      BasicTargetTransformInfo. This class actually provides most of the TTI
      functionality, basing it upon the TargetLowering abstraction and other
      information in the target independent code generator.
      
      The third step of the conversion adds support to all TargetMachines to
      register custom analysis passes. This allows building those passes with
      access to TargetLowering or other target-specific classes, and it also
      allows each target to customize the set of analysis passes desired in
      the pass manager. The baseline LLVMTargetMachine implements this
      interface to add the BasicTTI pass to the pass manager, and all of the
      tools that want to support target-aware TTI passes call this routine on
      whatever target machine they end up with to add the appropriate passes.
      
      The fourth step of the conversion created target-specific TTI analysis
      passes for the X86 and ARM backends. These passes contain the custom
      logic that was previously in their extensions of the
      ScalarTargetTransformInfo and VectorTargetTransformInfo interfaces.
      I separated them into their own file, as now all of the interface bits
      are private and they just expose a function to create the pass itself.
      Then I extended these target machines to set up a custom set of analysis
      passes, first adding BasicTTI as a fallback, and then adding their
      customized TTI implementations.
      
      The fourth step required logic that was shared between the target
      independent layer and the specific targets to move to a different
      interface, as they no longer derive from each other. As a consequence,
      a helper functions were added to TargetLowering representing the common
      logic needed both in the target implementation and the codegen
      implementation of the TTI pass. While technically this is the only
      change that could have been committed separately, it would have been
      a nightmare to extract.
      
      The final step of the conversion was just to delete all the old
      boilerplate. This got rid of the ScalarTargetTransformInfo and
      VectorTargetTransformInfo classes, all of the support in all of the
      targets for producing instances of them, and all of the support in the
      tools for manually constructing a pass based around them.
      
      Now that TTI is a relatively normal analysis group, two things become
      straightforward. First, we can sink it into lib/Analysis which is a more
      natural layer for it to live. Second, clients of this interface can
      depend on it *always* being available which will simplify their code and
      behavior. These (and other) simplifications will follow in subsequent
      commits, this one is clearly big enough.
      
      Finally, I'm very aware that much of the comments and documentation
      needs to be updated. As soon as I had this working, and plausibly well
      commented, I wanted to get it committed and in front of the build bots.
      I'll be doing a few passes over documentation later if it sticks.
      
      Commits to update DragonEgg and Clang will be made presently.
      
      llvm-svn: 171681
      664e354d
  3. Jan 05, 2013
    • Chandler Carruth's avatar
      Funnel the actual TargetTransformInfo pass from the SelectionDAGISel · 42e9611f
      Chandler Carruth authored
      pass into the SelectionDAG itself rather than snooping on the
      implementation of that pass as exposed by the TargetMachine. This
      removes the last direct client of the ScalarTargetTransformInfo class
      outside of the TTI pass implementation.
      
      llvm-svn: 171625
      42e9611f
    • David Blaikie's avatar
      Emit DW_TAG_formal_parameter for unnamed parameters. · 800a916f
      David Blaikie authored
      This change essentially reverts r87069 which came without a test case. It
      causes no regressions in the GDB 7.5 test suite & fixes 25 xfails (commit
      to the test suite to follow). If anyone can present a test case that
      demonstrates why this check is necessary I'd be happy to account for it in one
      way or another.
      
      llvm-svn: 171609
      800a916f
    • Jakob Stoklund Olesen's avatar
      Don't call destructors on MachineInstr and MachineOperand. · dc5285f1
      Jakob Stoklund Olesen authored
      The series of patches leading up to this one makes llc -O0 run 8% faster.
      
      When deallocating a MachineFunction, there is no need to visit all
      MachineInstr and MachineOperand objects to deallocate them. All their
      memory come from a BumpPtrAllocator that is about to be purged, and they
      have empty destructors anyway.
      
      This only applies when deallocating the MachineFunction.
      DeleteMachineInstr() should still be used to recycle MI memory during
      the codegen passes.
      
      Remove the LeakDetector support for MachineInstr. I've never seen it
      used before, and now it definitely doesn't work. With this patch, leaked
      MachineInstrs would be much less of a problem since all of their memory
      will be reclaimed by ~MachineFunction().
      
      llvm-svn: 171599
      dc5285f1
    • Jakob Stoklund Olesen's avatar
      Use ArrayRecycler for MachineInstr operand lists. · 1bfeecb4
      Jakob Stoklund Olesen authored
      Instead of an std::vector<MachineOperand>, use MachineOperand arrays
      from an ArrayRecycler living in MachineFunction.
      
      This has several advantages:
      
      - MachineInstr now has a trivial destructor, making it possible to
        delete them in batches when destroying MachineFunction. This will be
        enabled in a later patch.
      
      - Bypassing malloc() and free() can be faster, depending on the system
        library.
      
      - MachineInstr objects and their operands are allocated from the same
        BumpPtrAllocator, so they will usually be next to each other in
        memory, providing better locality of reference.
      
      - Reduce MachineInstr footprint. A std::vector is 24 bytes, the new
        operand array representation only uses 8+4+1 bytes in MachineInstr.
      
      - Better control over operand array reallocations. In the old
        representation, the use-def chains would be reordered whenever a
        std::vector reached its capacity. The new implementation never changes
        the use-def chain order.
      
      Note that some decisions in the code generator depend on the use-def
      chain orders, so this patch may cause different assembly to be produced
      in a few cases.
      
      llvm-svn: 171598
      1bfeecb4
    • Jakob Stoklund Olesen's avatar
      Add MachineRegisterInfo::moveOperands(). · fe445cd6
      Jakob Stoklund Olesen authored
      This function works like memmove() for MachineOperands, except it also
      updates any use-def chains containing the moved operands.
      
      The use-def chains are updated without affecting the order of operands
      in the list. That isn't possible when using the
      removeRegOperandFromUseList() and addRegOperandToUseList() functions.
      
      Callers to follow soon.
      
      llvm-svn: 171597
      fe445cd6
  4. Jan 04, 2013
  5. Jan 03, 2013
    • Jakob Stoklund Olesen's avatar
      Fix PR14732 by handling all kinds of IMPLICIT_DEF live ranges. · 725d5768
      Jakob Stoklund Olesen authored
      Most IMPLICIT_DEF instructions are removed by the ProcessImplicitDefs
      pass, and a few are reinserted by PHIElimination when a PHI argument is
      <undef>.
      
      RegisterCoalescer was assuming that all IMPLICIT_DEF live ranges look
      like those created by PHIElimination, and that their live range never
      leaves the basic block.
      
      The PR14732 test case does tricks with PHI nodes that causes a longer
      IMPLICIT_DEF live range to appear. This happens very rarely, but
      RegisterCoalescer should be able to handle it.
      
      llvm-svn: 171435
      725d5768
  6. Jan 02, 2013
    • Tom Stellard's avatar
      DAGCombiner: Avoid generating illegal vector INT_TO_FP nodes · 567f886e
      Tom Stellard authored
      DAGCombiner::reduceBuildVecConvertToConvertBuildVec() was making two
      mistakes:
      
      1. It was checking the legality of scalar INT_TO_FP nodes and then generating
      vector nodes.
      
      2. It was passing the result value type to
      TargetLoweringInfo::getOperationAction() when it should have been
      passing the value type of the first operand.
      
      llvm-svn: 171420
      567f886e
    • Chandler Carruth's avatar
      Move all of the header files which are involved in modelling the LLVM IR · 9fb823bb
      Chandler Carruth authored
      into their new header subdirectory: include/llvm/IR. This matches the
      directory structure of lib, and begins to correct a long standing point
      of file layout clutter in LLVM.
      
      There are still more header files to move here, but I wanted to handle
      them in separate commits to make tracking what files make sense at each
      layer easier.
      
      The only really questionable files here are the target intrinsic
      tablegen files. But that's a battle I'd rather not fight today.
      
      I've updated both CMake and Makefile build systems (I think, and my
      tests think, but I may have missed something).
      
      I've also re-sorted the includes throughout the project. I'll be
      committing updates to Clang, DragonEgg, and Polly momentarily.
      
      llvm-svn: 171366
      9fb823bb
    • Chandler Carruth's avatar
      Resort the #include lines in include/... and lib/... with the · be81023d
      Chandler Carruth authored
      utils/sort_includes.py script.
      
      Most of these are updating the new R600 target and fixing up a few
      regressions that have creeped in since the last time I sorted the
      includes.
      
      llvm-svn: 171362
      be81023d
  7. Dec 30, 2012
  8. Dec 27, 2012
  9. Dec 25, 2012
    • Bob Wilson's avatar
      Rename LLVMContext diagnostic handler types and functions. · fe73ac34
      Bob Wilson authored
      These are now generally used for all diagnostics from the backend, not just
      for inline assembly, so this drops the "InlineAsm" from the names.  No
      functional change.  (I've left aliases for the old names but only for long
      enough to let me switch over clang to use the new ones.)
      
      llvm-svn: 171047
      fe73ac34
  10. Dec 24, 2012
    • Bob Wilson's avatar
      Add LLVMContext::emitWarning methods and use them. <rdar://problem/12867368> · 4ed23578
      Bob Wilson authored
      When the backend is used from clang, it should produce proper diagnostics
      instead of just printing messages to errs(). Other clients may also want to
      register their own error handlers with the LLVMContext, and the same handler
      should work for warnings in the same way as the existing emitError methods.
      
      llvm-svn: 171041
      4ed23578
  11. Dec 22, 2012
  12. Dec 21, 2012
  13. Dec 20, 2012
Loading