Skip to content
  1. Mar 24, 2010
    • Bob Wilson's avatar
      Revert Edwin's change that is breaking MultiSource/Applications/ClamAV/clamscan. · 4d87012e
      Bob Wilson authored
      --- Reverse-merging r99400 into '.':
      D    test/CodeGen/Generic/2010-03-24-liveintervalleak.ll
      U    lib/CodeGen/LiveIntervalAnalysis.cpp
      
      llvm-svn: 99419
      4d87012e
    • Torok Edwin's avatar
      Fix memory leak in liveintervals: the destructor for VNInfos must be called, · 4bbfdd41
      Torok Edwin authored
      otherwise the SmallVector it contains doesn't free its memory.
      In most cases LiveIntervalAnalysis could get away by not calling the destructor,
      because VNInfos are bumpptr-allocated, and smallvectors usually don't grow.
      However when the SmallVector does grow it always leaks.
      
      This is the valgrind shown leak from the original testcase:
      ==8206== 18,304 bytes in 151 blocks are definitely lost in loss record 164 of 164
      ==8206==    at 0x4A079C7: operator new(unsigned long) (vg_replace_malloc.c:220)
      ==8206==    by 0x4DB7A7E: llvm::SmallVectorBase::grow_pod(unsigned long, unsigned long) (in /home/edwin/clam/git/builds/defaul
      t/libclamav/.libs/libclamav.so.6.1.0)
      ==8206==    by 0x4F90382: llvm::VNInfo::addKill(llvm::SlotIndex) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libcl
      amav.so.6.1.0)
      ==8206==    by 0x5126B5C: llvm::LiveIntervals::handleVirtualRegisterDef(llvm::MachineBasicBlock*, llvm::ilist_iterator<llvm::M
      achineInstr>, llvm::SlotIndex, llvm::MachineOperand&, unsigned int, llvm::LiveInterval&) (in /home/edwin/clam/git/builds/defau
      lt/libclamav/.libs/libclamav.so.6.1.0)
      ==8206==    by 0x512725E: llvm::LiveIntervals::handleRegisterDef(llvm::MachineBasicBlock*, llvm::ilist_iterator<llvm::MachineI
      nstr>, llvm::SlotIndex, llvm::MachineOperand&, unsigned int) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav
      .so.6.1.0)
      ==8206==    by 0x51278A8: llvm::LiveIntervals::computeIntervals() (in /home/edwin/clam/git/builds/default/libclamav/.libs/libc
      lamav.so.6.1.0)
      ==8206==    by 0x5127CB4: llvm::LiveIntervals::runOnMachineFunction(llvm::MachineFunction&) (in /home/edwin/clam/git/builds/de
      fault/libclamav/.libs/libclamav.so.6.1.0)
      ==8206==    by 0x4DAE935: llvm::FPPassManager::runOnFunction(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclama
      v/.libs/libclamav.so.6.1.0)
      ==8206==    by 0x4DAEB10: llvm::FunctionPassManagerImpl::run(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclama
      v/.libs/libclamav.so.6.1.0)
      ==8206==    by 0x4DAED3D: llvm::FunctionPassManager::run(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclamav/.l
      ibs/libclamav.so.6.1.0)
      ==8206==    by 0x4D8BE8E: llvm::JIT::runJITOnFunctionUnlocked(llvm::Function*, llvm::MutexGuard const&) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav.so.6.1.0)
      ==8206==    by 0x4D8CA72: llvm::JIT::getPointerToFunction(llvm::Function*) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav.so.6.1.0)
      
      llvm-svn: 99400
      4bbfdd41
  2. Mar 16, 2010
  3. Mar 11, 2010
    • Evan Cheng's avatar
      The check for coalescing a virtual register to a physical register, e.g. · 8c4df816
      Evan Cheng authored
      cl = EXTRACT_SUBREG reg1024, 1, is overly conservative. It should check
      for overlaps of vr's live interval with the super registers of the
      physical register (ECX in this case) and let JoinIntervals() handle checking
      the coalescing feasibility against the physical register (cl in this case).
      
      llvm-svn: 98251
      8c4df816
  4. Mar 10, 2010
  5. Mar 01, 2010
  6. Feb 23, 2010
  7. Feb 18, 2010
    • Jakob Stoklund Olesen's avatar
      Always normalize spill weights, also for intervals created by spilling. · c953acbd
      Jakob Stoklund Olesen authored
      Moderate the weight given to very small intervals.
      
      The spill weight given to new intervals created when spilling was not
      normalized in the same way as the original spill weights calculated by
      CalcSpillWeights. That meant that restored registers would tend to hang around
      because they had a much higher spill weight that unspilled registers.
      
      This improves the runtime of a few tests by up to 10%, and there are no
      significant regressions.
      
      llvm-svn: 96613
      c953acbd
  8. Feb 10, 2010
  9. Feb 09, 2010
  10. Feb 06, 2010
    • Evan Cheng's avatar
      Run codegen dce pass for all targets at all optimization levels. Previously it's · ea5c6be7
      Evan Cheng authored
      only run for x86 with fastisel. I've found it being very effective in
      eliminating some obvious dead code as result of formal parameter lowering
      especially when tail call optimization eliminated the need for some of the loads
      from fixed frame objects. It also shrinks a number of the tests. A couple of
      tests no longer make sense and are now eliminated.
      
      llvm-svn: 95493
      ea5c6be7
  11. Jan 22, 2010
  12. Jan 04, 2010
    • David Greene's avatar
      · 1a51a211
      David Greene authored
      Change errs() to dbgs().
      
      llvm-svn: 92529
      1a51a211
  13. Dec 22, 2009
  14. Dec 16, 2009
    • Jakob Stoklund Olesen's avatar
      Reuse lowered phi nodes. · ec20a88a
      Jakob Stoklund Olesen authored
      Tail duplication produces lots of identical phi nodes in different basic
      blocks. Teach PHIElimination to reuse the join registers when lowering a phi
      node that is identical to an already lowered node. This saves virtual
      registers, and more importantly it avoids creating copies the the coalescer
      doesn't know how to eliminate.
      
      Teach LiveIntervalAnalysis about the phi joins with multiple uses.
      
      This patch significantly reduces code size produced by -pre-regalloc-taildup.
      
      llvm-svn: 91549
      ec20a88a
  15. Dec 11, 2009
  16. Dec 10, 2009
    • Jakob Stoklund Olesen's avatar
      Also attempt trivial coalescing for live intervals that end in a copy. · 497161c4
      Jakob Stoklund Olesen authored
      The coalescer is supposed to clean these up, but when setting up parameters
      for a function call, there may be copies to physregs. If the defining
      instruction has been LICM'ed far away, the coalescer won't touch it.
      
      The register allocation hint does not always work - when the register
      allocator is backtracking, it clears the hints.
      
      This patch is more conservative than r90502, and does not break
      483.xalancbmk/i686. It still breaks the PowerPC bootstrap, so it is disabled
      by default, and can be enabled with the -trivial-coalesce-ends option.
      
      llvm-svn: 91049
      497161c4
  17. Dec 09, 2009
    • Lang Hames's avatar
      Added a new "splitting" spiller. · 1ab2b49e
      Lang Hames authored
      When a call is placed to spill an interval this spiller will first try to
      break the interval up into its component values. Single value intervals and
      intervals which have already been split (or are the result of previous splits)
      are spilled by the default spiller.
      
      Splitting intervals as described above may improve the performance of generated
      code in some circumstances. This work is experimental however, and it still
      miscompiles many benchmarks. It's not recommended for general use yet.
      
      llvm-svn: 90951
      1ab2b49e
  18. Dec 05, 2009
  19. Dec 04, 2009
    • Jakob Stoklund Olesen's avatar
      Also attempt trivial coalescing for live intervals that end in a copy. · ca9cf654
      Jakob Stoklund Olesen authored
      The coalescer is supposed to clean these up, but when setting up parameters
      for a function call, there may be copies to physregs. If the defining
      instruction has been LICM'ed far away, the coalescer won't touch it.
      
      The register allocation hint does not always work - when the register
      allocator is backtracking, it clears the hints.
      
      This patch takes care of a few more cases that r90163 missed.
      
      llvm-svn: 90502
      ca9cf654
  20. Dec 03, 2009
  21. Dec 01, 2009
    • Evan Cheng's avatar
      Fix PR5391: support early clobber physical register def tied with a use (ewwww) · 732351f7
      Evan Cheng authored
      - A valno should be set HasRedefByEC if there is an early clobber def in the middle of its live ranges. It should not be set if the def of the valno is defined by an early clobber.
      - If a physical register def is tied to an use and it's an early clobber, it just means the HasRedefByEC is set since it's still one continuous live range.
      - Add a couple of missing checks for HasRedefByEC in the coalescer. In general, it should not coalesce a vr with a physical register if the physical register has a early clobber def somewhere. This is overly conservative but that's the price for using such a nasty inline asm "feature".
      
      llvm-svn: 90269
      732351f7
  22. Nov 30, 2009
    • Jakob Stoklund Olesen's avatar
      New virtual registers created for spill intervals should inherit allocation... · 020d8d4c
      Jakob Stoklund Olesen authored
      New virtual registers created for spill intervals should inherit allocation hints from the original register.
      
      This helps us avoid silly copies when rematting values that are copied to a physical register:
      
      leaq	_.str44(%rip), %rcx
      movq	%rcx, %rsi
      call	_strcmp
      
      becomes:
      
      leaq	_.str44(%rip), %rsi
      call	_strcmp
      
      The coalescer will not touch the movq because that would tie down the physical register.
      
      llvm-svn: 90163
      020d8d4c
  23. Nov 20, 2009
  24. Nov 18, 2009
  25. Nov 09, 2009
  26. Nov 07, 2009
    • Jakob Stoklund Olesen's avatar
      Fix inverted conflict test in -early-coalesce. · 4141d8ee
      Jakob Stoklund Olesen authored
      A non-identity copy cannot be coalesced when the phi join destination register
      is live at the copy site.
      
      Also verify the condition that the PHI join source register is only used in
      the PHI join. Otherwise the coalescing is invalid.
      
      llvm-svn: 86322
      4141d8ee
  27. Nov 04, 2009
    • Lang Hames's avatar
      The Indexes Patch. · 05fb9637
      Lang Hames authored
      This introduces a new pass, SlotIndexes, which is responsible for numbering
      instructions for register allocation (and other clients). SlotIndexes numbering
      is designed to match the existing scheme, so this patch should not cause any
      changes in the generated code.
      
      For consistency, and to avoid naming confusion, LiveIndex has been renamed
      SlotIndex.
      
      The processImplicitDefs method of the LiveIntervals analysis has been moved
      into its own pass so that it can be run prior to SlotIndexes. This was
      necessary to match the existing numbering scheme.
      
      llvm-svn: 85979
      05fb9637
  28. Oct 20, 2009
  29. Oct 10, 2009
    • Dan Gohman's avatar
      Factor out LiveIntervalAnalysis' code to determine whether an instruction · 87b02d5b
      Dan Gohman authored
      is trivially rematerializable and integrate it into
      TargetInstrInfo::isTriviallyReMaterializable. This way, all places that
      need to know whether an instruction is rematerializable will get the
      same answer.
      
      This enables the useful parts of the aggressive-remat option by
      default -- using AliasAnalysis to determine whether a memory location
      is invariant, and removes the questionable parts -- rematting operations
      with virtual register inputs that may not be live everywhere.
      
      llvm-svn: 83687
      87b02d5b
  30. Oct 09, 2009
  31. Oct 07, 2009
  32. Oct 03, 2009
  33. Sep 26, 2009
Loading