Skip to content
  1. Sep 02, 2009
  2. Aug 31, 2009
  3. Aug 29, 2009
  4. Aug 19, 2009
  5. Aug 15, 2009
  6. Aug 11, 2009
  7. Aug 10, 2009
  8. Aug 06, 2009
  9. Aug 05, 2009
    • Dan Gohman's avatar
      Major calling convention code refactoring. · f9bbcd1a
      Dan Gohman authored
      Instead of awkwardly encoding calling-convention information with ISD::CALL,
      ISD::FORMAL_ARGUMENTS, ISD::RET, and ISD::ARG_FLAGS nodes, TargetLowering
      provides three virtual functions for targets to override:
      LowerFormalArguments, LowerCall, and LowerRet, which replace the custom
      lowering done on the special nodes. They provide the same information, but
      in a more immediately usable format.
      
      This also reworks much of the target-independent tail call logic. The
      decision of whether or not to perform a tail call is now cleanly split
      between target-independent portions, and the target dependent portion
      in IsEligibleForTailCallOptimization.
      
      This also synchronizes all in-tree targets, to help enable future
      refactoring and feature work.
      
      llvm-svn: 78142
      f9bbcd1a
  10. Aug 01, 2009
  11. Jul 30, 2009
    • Evan Cheng's avatar
      Optimize some common usage patterns of atomic built-ins __sync_add_and_fetch()... · e62288fd
      Evan Cheng authored
      Optimize some common usage patterns of atomic built-ins __sync_add_and_fetch() and __sync_sub_and_fetch. 
      
      When the return value is not used (i.e. only care about the value in the memory), x86 does not have to use add to implement these. Instead, it can use add, sub, inc, dec instructions with the "lock" prefix.
      
      This is currently implemented using a bit of instruction selection trick. The issue is the target independent pattern produces one output and a chain and we want to map it into one that just output a chain. The current trick is to select it into a merge_values with the first definition being an implicit_def. The proper solution is to add new ISD opcodes for the no-output variant. DAG combiner can then transform the node before it gets to target node selection.
      
      Problem #2 is we are adding a whole bunch of x86 atomic instructions when in fact these instructions are identical to the non-lock versions. We need a way to add target specific information to target nodes and have this information carried over to machine instructions. Asm printer (or JIT) can use this information to add the "lock" prefix.
      
      llvm-svn: 77582
      e62288fd
  12. Jul 29, 2009
  13. Jul 20, 2009
  14. Jul 09, 2009
  15. Jul 01, 2009
  16. Jun 05, 2009
    • Devang Patel's avatar
      Add new function attribute - noimplicitfloat · d1c7d349
      Devang Patel authored
      Update code generator to use this attribute and remove NoImplicitFloat target option.
      Update llc to set this attribute when -no-implicit-float command line option is used.
      
      llvm-svn: 72959
      d1c7d349
  17. Jun 02, 2009
    • Dale Johannesen's avatar
      Revert 72707 and 72709, for the moment. · 5234d379
      Dale Johannesen authored
      llvm-svn: 72712
      5234d379
    • Dale Johannesen's avatar
      Make the implicit inputs and outputs of target-independent · 0b8ca792
      Dale Johannesen authored
      ADDC/ADDE use MVT::i1 (later, whatever it gets legalized to)
      instead of MVT::Flag.  Remove CARRY_FALSE in favor of 0; adjust
      all target-independent code to use this format.
      
      Most targets will still produce a Flag-setting target-dependent
      version when selection is done.  X86 is converted to use i32
      instead, which means TableGen needs to produce different code
      in xxxGenDAGISel.inc.  This keys off the new supportsHasI1 bit
      in xxxInstrInfo, currently set only for X86; in principle this
      is temporary and should go away when all other targets have
      been converted.  All relevant X86 instruction patterns are
      modified to represent setting and using EFLAGS explicitly.  The
      same can be done on other targets.
      
      The immediate behavior change is that an ADC/ADD pair are no
      longer tightly coupled in the X86 scheduler; they can be
      separated by instructions that don't clobber the flags (MOV).
      I will soon add some peephole optimizations based on using
      other instructions that set the flags to feed into ADC.
      
      llvm-svn: 72707
      0b8ca792
  18. May 28, 2009
    • Evan Cheng's avatar
      Added optimization that narrow load / op / store and the 'op' is a bit... · a9cda8ab
      Evan Cheng authored
      Added optimization that narrow load / op / store and the 'op' is a bit twiddling instruction and its second operand is an immediate. If bits that are touched by 'op' can be done with a narrower instruction, reduce the width of the load and store as well. This happens a lot with bitfield manipulation code.
      e.g.
      orl     $65536, 8(%rax)
      =>
      orb     $1, 10(%rax)
      
      Since narrowing is not always a win, e.g. i32 -> i16 is a loss on x86, dag combiner consults with the target before performing the optimization.
      
      llvm-svn: 72507
      a9cda8ab
  19. May 23, 2009
    • Eli Friedman's avatar
      Make the x86 backend custom-lower UINT_TO_FP and FP_TO_UINT on 32-bit · dfe4f253
      Eli Friedman authored
      systems instead of attempting to promote them to a 64-bit SINT_TO_FP or 
      FP_TO_SINT.  This is in preparation for removing the type legalization 
      code from LegalizeDAG: once type legalization is gone from LegalizeDAG, 
      it won't be able to handle the i64 operand/result correctly.
      
      This isn't quite ideal, but I don't think any other operation for any 
      target ends up in this situation, so treating this case specially seems 
      reasonable.
      
      llvm-svn: 72324
      dfe4f253
  20. Apr 29, 2009
  21. Apr 27, 2009
    • Nate Begeman's avatar
      2nd attempt, fixing SSE4.1 issues and implementing feedback from duncan. · 8d6d4b92
      Nate Begeman authored
      PR2957
      
      ISD::VECTOR_SHUFFLE now stores an array of integers representing the shuffle
      mask internal to the node, rather than taking a BUILD_VECTOR of ConstantSDNodes
      as the shuffle mask.  A value of -1 represents UNDEF.
      
      In addition to eliminating the creation of illegal BUILD_VECTORS just to 
      represent shuffle masks, we are better about canonicalizing the shuffle mask,
      resulting in substantially better code for some classes of shuffles.
      
      llvm-svn: 70225
      8d6d4b92
  22. Apr 24, 2009
    • Rafael Espindola's avatar
      Revert 69952. Causes testsuite failures on linux x86-64. · b93db668
      Rafael Espindola authored
      llvm-svn: 69967
      b93db668
    • Nate Begeman's avatar
      PR2957 · bb881d66
      Nate Begeman authored
      ISD::VECTOR_SHUFFLE now stores an array of integers representing the shuffle
      mask internal to the node, rather than taking a BUILD_VECTOR of ConstantSDNodes
      as the shuffle mask.  A value of -1 represents UNDEF.
      
      In addition to eliminating the creation of illegal BUILD_VECTORS just to 
      represent shuffle masks, we are better about canonicalizing the shuffle mask,
      resulting in substantially better code for some classes of shuffles.
      
      A clean up of x86 shuffle code, and some canonicalizing in DAGCombiner is next.
      
      llvm-svn: 69952
      bb881d66
  23. Apr 08, 2009
    • Rafael Espindola's avatar
      Re-apply 68552. · 3b2df10c
      Rafael Espindola authored
      Tested by bootstrapping llvm-gcc and using that to build llvm.
      
      llvm-svn: 68645
      3b2df10c
    • Dan Gohman's avatar
      Implement support for using modeling implicit-zero-extension on x86-64 · ad3e549a
      Dan Gohman authored
      with SUBREG_TO_REG, teach SimpleRegisterCoalescing to coalesce
      SUBREG_TO_REG instructions (which are similar to INSERT_SUBREG
      instructions), and teach the DAGCombiner to take advantage of this on
      targets which support it. This eliminates many redundant
      zero-extension operations on x86-64.
      
      This adds a new TargetLowering hook, isZExtFree. It's similar to
      isTruncateFree, except it only applies to actual definitions, and not
      no-op truncates which may not zero the high bits.
      
      Also, this adds a new optimization to SimplifyDemandedBits: transform
      operations like x+y into (zext (add (trunc x), (trunc y))) on targets
      where all the casts are no-ops. In contexts where the high part of the
      add is explicitly masked off, this allows the mask operation to be
      eliminated. Fix the DAGCombiner to avoid undoing these transformations
      to eliminate casts on targets where the casts are no-ops.
      
      Also, this adds a new two-address lowering heuristic. Since
      two-address lowering runs before coalescing, it helps to be able to
      look through copies when deciding whether commuting and/or
      three-address conversion are profitable.
      
      Also, fix a bug in LiveInterval::MergeInClobberRanges. It didn't handle
      the case that a clobber range extended both before and beyond an
      existing live range. In that case, multiple live ranges need to be
      added. This was exposed by the new subreg coalescing code.
      
      Remove 2008-05-06-SpillerBug.ll. It was bugpoint-reduced, and the
      spiller behavior it was looking for no longer occurrs with the new
      instruction selection.
      
      llvm-svn: 68576
      ad3e549a
    • Bill Wendling's avatar
      Temporarily revert r68552. This was causing a failure in the self-hosting LLVM · 4aa25b79
      Bill Wendling authored
      builds.
      
      --- Reverse-merging (from foreign repository) r68552 into '.':
      U    test/CodeGen/X86/tls8.ll
      U    test/CodeGen/X86/tls10.ll
      U    test/CodeGen/X86/tls2.ll
      U    test/CodeGen/X86/tls6.ll
      U    lib/Target/X86/X86Instr64bit.td
      U    lib/Target/X86/X86InstrSSE.td
      U    lib/Target/X86/X86InstrInfo.td
      U    lib/Target/X86/X86RegisterInfo.cpp
      U    lib/Target/X86/X86ISelLowering.cpp
      U    lib/Target/X86/X86CodeEmitter.cpp
      U    lib/Target/X86/X86FastISel.cpp
      U    lib/Target/X86/X86InstrInfo.h
      U    lib/Target/X86/X86ISelDAGToDAG.cpp
      U    lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
      U    lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp
      U    lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h
      U    lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h
      U    lib/Target/X86/X86ISelLowering.h
      U    lib/Target/X86/X86InstrInfo.cpp
      U    lib/Target/X86/X86InstrBuilder.h
      U    lib/Target/X86/X86RegisterInfo.td
      
      llvm-svn: 68560
      4aa25b79
  24. Apr 07, 2009
  25. Mar 30, 2009
  26. Mar 26, 2009
  27. Mar 23, 2009
  28. Mar 12, 2009
  29. Mar 07, 2009
    • Dan Gohman's avatar
      Arithmetic instructions don't set EFLAGS bits OF and CF bits · ff659b5b
      Dan Gohman authored
      the same say the "test" instruction does in overflow cases,
      so eliminating the test is only safe when those bits aren't
      needed, as is the case for COND_E and COND_NE, or if it
      can be proven that no overflow will occur. For now, just
      restrict the optimization to COND_E and COND_NE and don't
      do any overflow analysis.
      
      llvm-svn: 66318
      ff659b5b
  30. Mar 04, 2009
Loading