Skip to content
  1. Jul 06, 2013
  2. Jun 28, 2013
    • Manman Ren's avatar
      Debug Info: clean up usage of Verify. · 983a16c0
      Manman Ren authored
      No functionality change.
      It should suffice to check the type of a debug info metadata, instead of
      calling Verify. For cases where we know the type of a DI metadata, use
      assert.
      
      Also update testing cases to make them conform to the format of DI classes.
      
      llvm-svn: 185135
      983a16c0
  3. Feb 05, 2013
  4. Jan 25, 2013
  5. Jan 11, 2013
    • Eric Christopher's avatar
      For inline asm: · 0cb6fd93
      Eric Christopher authored
      - recognize string "{memory}" in the MI generation
      - mark as mayload/maystore when there's a memory clobber constraint.
      
      PR14859.
      
      Patch by Krzysztof Parzyszek
      
      llvm-svn: 172228
      0cb6fd93
  6. Jan 10, 2013
  7. Jan 09, 2013
  8. Jan 08, 2013
  9. Jan 05, 2013
    • 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
  10. 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
  11. Dec 22, 2012
  12. Dec 20, 2012
  13. Dec 19, 2012
  14. Dec 18, 2012
    • Jakob Stoklund Olesen's avatar
      Don't allow the automatically updated MI flags to be set directly. · a33f504b
      Jakob Stoklund Olesen authored
      The bundle-related MI flags need to be kept in sync with the neighboring
      instructions. Don't allow the bulk flag-setting setFlags() function to
      change them.
      
      Also don't copy MI flags when cloning an instruction. The clone's bundle
      flags will be set when it is explicitly inserted into a bundle.
      
      llvm-svn: 170459
      a33f504b
    • 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
  15. Dec 07, 2012
    • Jakob Stoklund Olesen's avatar
      Add higher-level API for dealing with bundled MachineInstrs. · fead62d4
      Jakob Stoklund Olesen authored
      This is still a work in progress. The purpose is to make bundling and
      unbundling operations explicit, and to catch errors where bundles are
      broken or created inadvertently.
      
      The old IsInsideBundle flag is replaced by two MI flags: BundledPred
      which has the same meaning as IsInsideBundle, and BundledSucc which is
      set on instructions that are bundled with a successor. Having two flags
      provdes redundancy to detect when a bundle is inadvertently torn by a
      splice() or insert(), and it makes it possible to write bundle iterators
      that don't need to peek at adjacent instructions.
      
      The new flags can't be manipulated directly (once setIsInsideBundle is
      gone). Instead there are MI functions to make and break bundle bonds.
      
      The setIsInsideBundle function will be removed in a future commit. It
      should be replaced by bundleWithPred().
      
      llvm-svn: 169583
      fead62d4
  16. Dec 05, 2012
  17. 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
  18. Oct 31, 2012
  19. Oct 08, 2012
  20. Sep 12, 2012
    • Michael Liao's avatar
      Fix PR11985 · abb87d48
      Michael Liao authored
          
      - BlockAddress has no support of BA + offset form and there is no way to
        propagate that offset into machine operand;
      - Add BA + offset support and a new interface 'getTargetBlockAddress' to
        simplify target block address forming;
      - All targets are modified to use new interface and X86 backend is enhanced to
        support BA + offset addressing.
      
      llvm-svn: 163743
      abb87d48
    • 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
  21. Sep 06, 2012
  22. Sep 05, 2012
  23. Sep 04, 2012
    • Jakob Stoklund Olesen's avatar
      Typo. · d92e2bc2
      Jakob Stoklund Olesen authored
      llvm-svn: 163154
      d92e2bc2
    • Jakob Stoklund Olesen's avatar
      Actually use the MachineOperand field for isRegTiedToDefOperand(). · 9fceda74
      Jakob Stoklund Olesen authored
      The MachineOperand::TiedTo field was maintained, but not used.
      
      This patch enables it in isRegTiedToDefOperand() and
      isRegTiedToUseOperand() which are the actual functions use by the
      register allocator.
      
      llvm-svn: 163153
      9fceda74
    • Jakob Stoklund Olesen's avatar
      Allow tied uses and defs in different orders. · 0a09da83
      Jakob Stoklund Olesen authored
      After much agonizing, use a full 4 bits of precious MachineOperand space
      to encode this. This uses existing padding, and doesn't grow
      MachineOperand beyond its current 32 bytes.
      
      This allows tied defs among the first 15 operands on a normal
      instruction, just like the current MCInstrDesc constraint encoding.
      Inline assembly needs to be able to tie more than the first 15 operands,
      and gets special treatment.
      
      Tied uses can appear beyond 15 operands, as long as they are tied to a
      def that's in range.
      
      llvm-svn: 163151
      0a09da83
  24. Aug 31, 2012
    • Jakob Stoklund Olesen's avatar
      Add MachineInstr::tieOperands, remove setIsTied(). · 5c8eda0e
      Jakob Stoklund Olesen authored
      Manage tied operands entirely internally to MachineInstr. This makes it
      possible to change the representation of tied operands, as I will do
      shortly.
      
      The constraint that tied uses and defs must be in the same order was too
      restrictive.
      
      llvm-svn: 163021
      5c8eda0e
Loading