Skip to content
  1. Jul 28, 2009
  2. Jul 26, 2009
  3. Jul 25, 2009
    • Evan Cheng's avatar
      Change Thumb2 jumptable codegen to one that uses two level jumps: · f3a1fce8
      Evan Cheng authored
      Before:
            adr r12, #LJTI3_0_0
            ldr pc, [r12, +r0, lsl #2]
      LJTI3_0_0:
            .long    LBB3_24
            .long    LBB3_30
            .long    LBB3_31
            .long    LBB3_32
      
      After:
            adr r12, #LJTI3_0_0
            add pc, r12, +r0, lsl #2
      LJTI3_0_0:
            b.w    LBB3_24
            b.w    LBB3_30
            b.w    LBB3_31
            b.w    LBB3_32
      
      This has several advantages.
      1. This will make it easier to optimize this to a TBB / TBH instruction +
         (smaller) table.
      2. This eliminate the need for ugly asm printer hack to force the address
         into thumb addresses (bit 0 is one).
      3. Same codegen for pic and non-pic.
      4. This eliminate the need to align the table so constantpool island pass
         won't have to over-estimate the size.
      
      Based on my calculation, the later is probably slightly faster as well since
      ldr pc with shifter address is very slow. That is, it should be a win as long
      as the HW implementation can do a reasonable job of branch predict the second
      branch.
      
      llvm-svn: 77024
      f3a1fce8
  4. Jul 13, 2009
  5. Jul 01, 2009
  6. Jun 29, 2009
  7. Jun 23, 2009
  8. Jun 16, 2009
  9. May 20, 2009
  10. May 14, 2009
  11. May 13, 2009
  12. Apr 17, 2009
  13. Apr 01, 2009
  14. Feb 07, 2009
  15. Feb 03, 2009
  16. Jan 15, 2009
  17. Dec 01, 2008
    • Duncan Sands's avatar
      Change the interface to the type legalization method · 6ed40141
      Duncan Sands authored
      ReplaceNodeResults: rather than returning a node which
      must have the same number of results as the original
      node (which means mucking around with MERGE_VALUES,
      and which is also easy to get wrong since SelectionDAG
      folding may mean you don't get the node you expect),
      return the results in a vector.
      
      llvm-svn: 60348
      6ed40141
  18. Sep 23, 2008
  19. Jul 27, 2008
  20. Jul 04, 2008
    • Duncan Sands's avatar
      Rather than having a different custom legalization · 93e18034
      Duncan Sands authored
      hook for each way in which a result type can be
      legalized (promotion, expansion, softening etc),
      just use one: ReplaceNodeResults, which returns
      a node with exactly the same result types as the
      node passed to it, but presumably with a bunch of
      custom code behind the scenes.  No change if the
      new LegalizeTypes infrastructure is not turned on.
      
      llvm-svn: 53137
      93e18034
  21. Jun 06, 2008
    • Duncan Sands's avatar
      Wrap MVT::ValueType in a struct to get type safety · 13237ac3
      Duncan Sands authored
      and better control the abstraction.  Rename the type
      to MVT.  To update out-of-tree patches, the main
      thing to do is to rename MVT::ValueType to MVT, and
      rewrite expressions like MVT::getSizeInBits(VT) in
      the form VT.getSizeInBits().  Use VT.getSimpleVT()
      to extract a MVT::SimpleValueType for use in switch
      statements (you will get an assert failure if VT is
      an extended value type - these shouldn't exist after
      type legalization).
      This results in a small speedup of codegen and no
      new testsuite failures (x86-64 linux).
      
      llvm-svn: 52044
      13237ac3
  22. Apr 28, 2008
  23. Apr 14, 2008
  24. Apr 12, 2008
    • Dan Gohman's avatar
      Drop ISD::MEMSET, ISD::MEMMOVE, and ISD::MEMCPY, which are not Legal · 544ab2c5
      Dan Gohman authored
      on any current target and aren't optimized in DAGCombiner. Instead
      of using intermediate nodes, expand the operations, choosing between
      simple loads/stores, target-specific code, and library calls,
      immediately.
      
      Previously, the code to emit optimized code for these operations
      was only used at initial SelectionDAG construction time; now it is
      used at all times. This fixes some cases where rep;movs was being
      used for small copies where simple loads/stores would be better.
      
      This also cleans up code that checks for alignments less than 4;
      let the targets make that decision instead of doing it in
      target-independent code. This allows x86 to use rep;movs in
      low-alignment cases.
      
      Also, this fixes a bug that resulted in the use of rep;stos for
      memsets of 0 with non-constant memory size when the alignment was
      at least 4. It's better to use the library in this case, which
      can be significantly faster when the size is large.
      
      This also preserves more SourceValue information when memory
      intrinsics are lowered into simple loads/stores.
      
      llvm-svn: 49572
      544ab2c5
  25. Feb 13, 2008
  26. Feb 05, 2008
  27. Jan 30, 2008
  28. Dec 29, 2007
  29. Nov 27, 2007
  30. Nov 24, 2007
    • Chris Lattner's avatar
      Several changes: · f81d5886
      Chris Lattner authored
      1) Change the interface to TargetLowering::ExpandOperationResult to 
         take and return entire NODES that need a result expanded, not just
         the value.  This allows us to handle things like READCYCLECOUNTER,
         which returns two values.
      2) Implement (extremely limited) support in LegalizeDAG::ExpandOp for MERGE_VALUES.
      3) Reimplement custom lowering in LegalizeDAGTypes in terms of the new
         ExpandOperationResult.  This makes the result simpler and fully 
         general.
      4) Implement (fully general) expand support for MERGE_VALUES in LegalizeDAGTypes.
      5) Implement ExpandOperationResult support for ARM f64->i64 bitconvert and ARM
         i64 shifts, allowing them to work with LegalizeDAGTypes.
      6) Implement ExpandOperationResult support for X86 READCYCLECOUNTER and FP_TO_SINT,
         allowing them to work with LegalizeDAGTypes.
      
      LegalizeDAGTypes now passes several more X86 codegen tests when enabled and when
      type legalization in LegalizeDAG is ifdef'd out.
      
      llvm-svn: 44300
      f81d5886
  31. Nov 06, 2007
  32. Oct 31, 2007
  33. Oct 23, 2007
  34. Oct 19, 2007
  35. Oct 08, 2007
  36. Sep 11, 2007
Loading