Skip to content
  1. Jun 18, 2013
  2. Apr 22, 2013
  3. Feb 17, 2013
    • Cameron Zwarich's avatar
      Remove use of reverse iterators in repairIntervalsInRange(). While they were · 24955967
      Cameron Zwarich authored
      arguably better than forward iterators for this use case, they are confusing and
      there are some implementation problems with reverse iterators and MI bundles.
      
      llvm-svn: 175393
      24955967
    • Cameron Zwarich's avatar
      Fix a conversion from a forward iterator to a reverse iterator in · ddeabf78
      Cameron Zwarich authored
      MachineBasicBlock::SplitCriticalEdge. Since this is an iterator rather than
      an instr_iterator, the isBundled() check only passes if getFirstTerminator()
      returned end() and the garbage memory happens to lean that way.
      
      Multiple successors can be present without any terminator instructions in the
      case of exception handling with a fallthrough.
      
      llvm-svn: 175383
      ddeabf78
    • Cameron Zwarich's avatar
      Add support for updating the LiveIntervals of registers used by 'exotic' · bfebb419
      Cameron Zwarich authored
      terminators that actually have register uses when splitting critical edges.
      
      This commit also introduces a method repairIntervalsInRange() on LiveIntervals,
      which allows for repairing LiveIntervals in a small range after an arbitrary
      target hook modifies, inserts, and removes instructions. It's pretty limited
      right now, but I hope to extend it to support all of the things that are done
      by the convertToThreeAddress() target hooks.
      
      llvm-svn: 175382
      bfebb419
  4. Feb 12, 2013
  5. Feb 11, 2013
  6. Jan 02, 2013
    • 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
  7. Dec 18, 2012
    • Jakob Stoklund Olesen's avatar
      Tighten up the splice() API for bundled instructions. · 78eaf05f
      Jakob Stoklund Olesen authored
      Remove the instr_iterator versions of the splice() functions. It doesn't
      seem useful to be able to splice sequences of instructions that don't
      consist of full bundles.
      
      The normal splice functions that take MBB::iterator arguments are not
      changed, and they can move whole bundles around without any problems.
      
      llvm-svn: 170456
      78eaf05f
    • Jakob Stoklund Olesen's avatar
      Tighten the insert() API for bundled instructions. · 422e07b0
      Jakob Stoklund Olesen authored
      The normal insert() function takes an MBB::iterator position, and
      inserts a stand-alone MachineInstr as before.
      
      The insert() function that takes an MBB::instr_iterator position can
      insert instructions inside a bundle, and will now update the bundle
      flags correctly when that happens.
      
      When the insert position is between two bundles, it is unclear whether
      the instruction should be appended to the previous bundle, prepended to
      the next bundle, or stand on its own. The MBB::insert() function doesn't
      bundle the instruction in that case, use the MIBundleBuilder class for
      that.
      
      llvm-svn: 170437
      422e07b0
    • Jakob Stoklund Olesen's avatar
      Tighten up the erase/remove API for bundled instructions. · ccfb5fb4
      Jakob Stoklund Olesen authored
      Most code is oblivious to bundles and uses the MBB::iterator which only
      visits whole bundles. MBB::erase() operates on whole bundles at a time
      as before.
      
      MBB::remove() now refuses to remove bundled instructions. It is not safe
      to remove all instructions in a bundle without deleting them since there
      is no way of returning pointers to all the removed instructions.
      
      MBB::remove_instr() and MBB::erase_instr() will now update bundle flags
      correctly, lifting individual instructions out of bundles while leaving
      the remaining bundle intact.
      
      The MachineInstr convenience functions are updated so
      
        eraseFromParent() erases a whole bundle as before
        eraseFromBundle() erases a single instruction, leaving the rest of its bundle.
        removeFromParent() refuses to operate on bundled instructions, and
        removeFromBundle() lifts a single instruction out of its bundle.
      
      These functions will no longer accidentally split or coalesce bundles -
      bundle flags are updated to preserve the existing bundling, and explicit
      bundleWith* / unbundleFrom* functions should be used to change the
      instruction bundling.
      
      This API update is still a work in progress. I am going to update APIs
      first so they maintain bundle flags automatically when possible. Then
      I'll add stricter verification of the bundle flags.
      
      llvm-svn: 170384
      ccfb5fb4
  8. Dec 03, 2012
    • Chandler Carruth's avatar
      Use the new script to sort the includes of every file under lib. · ed0881b2
      Chandler Carruth authored
      Sooooo many of these had incorrect or strange main module includes.
      I have manually inspected all of these, and fixed the main module
      include to be the nearest plausible thing I could find. If you own or
      care about any of these source files, I encourage you to take some time
      and check that these edits were sensible. I can't have broken anything
      (I strictly added headers, and reordered them, never removed), but they
      may not be the headers you'd really like to identify as containing the
      API being implemented.
      
      Many forward declarations and missing includes were added to a header
      files to allow them to parse cleanly when included first. The main
      module rule does in fact have its merits. =]
      
      llvm-svn: 169131
      ed0881b2
  9. Nov 20, 2012
  10. Oct 26, 2012
  11. Oct 08, 2012
  12. Sep 12, 2012
    • James Molloy's avatar
      Add a function computeRegisterLiveness() to MachineBasicBlock. This uses... · c747cdae
      James Molloy authored
      Add a function computeRegisterLiveness() to MachineBasicBlock. This uses analyzePhysReg() from r163694 to heuristically try and determine the liveness state of a physical register upon arrival at a particular instruction in a block.
      
      The search for liveness is clipped to a specific number of instructions around the target MachineInstr, in order to avoid degenerating into an O(N^2) algorithm. It tries to use various clues about how instructions around (both before and after) a given MachineInstr use that register, to determine its state at the MachineInstr.
      
      llvm-svn: 163695
      c747cdae
    • Manman Ren's avatar
      Release build: guard dump functions with · 19f49ac6
      Manman Ren authored
      "#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)"
      
      No functional change. Update r163339.
      
      llvm-svn: 163653
      19f49ac6
  13. Sep 06, 2012
  14. Aug 22, 2012
  15. Aug 21, 2012
    • Jakob Stoklund Olesen's avatar
      Fix a quadratic algorithm in MachineBranchProbabilityInfo. · 6bae2a57
      Jakob Stoklund Olesen authored
      The getSumForBlock function was quadratic in the number of successors
      because getSuccWeight would perform a linear search for an already known
      iterator.
      
      This patch was originally committed as r161460, but reverted again
      because of assertion failures. Now that duplicate Machine CFG edges have
      been eliminated, this works properly.
      
      llvm-svn: 162233
      6bae2a57
  16. Aug 14, 2012
  17. Aug 10, 2012
    • Jakob Stoklund Olesen's avatar
      Update edge weights correctly in replaceSuccessor(). · 8c28ac9e
      Jakob Stoklund Olesen authored
      When replacing Old with New, it can happen that New is already a
      successor. Add the old and new edge weights instead of creating a
      duplicate edge.
      
      llvm-svn: 161653
      8c28ac9e
    • Jakob Stoklund Olesen's avatar
      Move use list management into MachineRegisterInfo. · c4102d49
      Jakob Stoklund Olesen authored
      Register MachineOperands are kept in linked lists accessible via MRI's
      reg_iterator interfaces. The linked list management was handled partly
      by MachineOperand methods, partly by MRI methods.
      
      Move all of the list management into MRI, delete
      MO::AddRegOperandToRegInfo() and MO::RemoveRegOperandFromRegInfo().
      
      Be more explicit about handling the cases where an MRI pointer isn't
      available.
      
      llvm-svn: 161632
      c4102d49
  18. Aug 08, 2012
  19. Jul 30, 2012
  20. Jul 19, 2012
  21. Jun 15, 2012
  22. Apr 24, 2012
  23. Apr 17, 2012
    • Chandler Carruth's avatar
      Fix updateTerminator to be resiliant to degenerate terminators where · 1f5580b6
      Chandler Carruth authored
      both fallthrough and a conditional branch target the same successor.
      Gracefully delete the conditional branch and introduce any unconditional
      branch needed to reach the actual successor. This fixes memory
      corruption in 2009-06-15-RegScavengerAssert.ll and possibly other tests.
      
      Also, while I'm here fix a latent bug I spotted by inspection. I never
      applied the same fundamental fix to this fallthrough successor finding
      logic that I did to the logic used when there are no conditional
      branches. As a consequence it would have selected landing pads had they
      be aligned in just the right way here. I don't have a test case as
      I spotted this by inspection, and the previous time I found this
      required have of TableGen's source code to produce it. =/ I hate backend
      bugs. ;]
      
      Thanks to Jim Grosbach for helping me reason through this and reviewing
      the fix.
      
      llvm-svn: 154867
      1f5580b6
  24. Mar 28, 2012
  25. Mar 07, 2012
  26. Feb 10, 2012
  27. Feb 09, 2012
  28. Jan 26, 2012
Loading