Skip to content
  1. Sep 06, 2012
    • Jakob Stoklund Olesen's avatar
      Allow overlaps between virtreg and physreg live ranges. · 866908c4
      Jakob Stoklund Olesen authored
      The RegisterCoalescer understands overlapping live ranges where one
      register is defined as a copy of the other. With this change, register
      allocators using LiveRegMatrix can do the same, at least for copies
      between physical and virtual registers.
      
      When a physreg is defined by a copy from a virtreg, allow those live
      ranges to overlap:
      
        %CL<def> = COPY %vreg11:sub_8bit; GR32_ABCD:%vreg11
        %vreg13<def,tied1> = SAR32rCL %vreg13<tied0>, %CL<imp-use,kill>
      
      We can assign %vreg11 to %ECX, overlapping the live range of %CL.
      
      llvm-svn: 163336
      866908c4
  2. Jun 16, 2012
  3. Jun 09, 2012
    • Jakob Stoklund Olesen's avatar
      Sketch a LiveRegMatrix analysis pass. · c26fbbfb
      Jakob Stoklund Olesen authored
      The LiveRegMatrix represents the live range of assigned virtual
      registers in a Live interval union per register unit. This is not
      fundamentally different from the interference tracking in RegAllocBase
      that both RABasic and RAGreedy use.
      
      The important differences are:
      
      - LiveRegMatrix tracks interference per register unit instead of per
        physical register. This makes interference checks cheaper and
        assignments slightly more expensive. For example, the ARM D7 reigster
        has 24 aliases, so we would check 24 physregs before assigning to one.
        With unit-based interference, we check 2 units before assigning to 2
        units.
      
      - LiveRegMatrix caches regmask interference checks. That is currently
        duplicated functionality in RABasic and RAGreedy.
      
      - LiveRegMatrix is a pass which makes it possible to insert
        target-dependent passes between register allocation and rewriting.
        Such passes could tweak the register assignments with interference
        checking support from LiveRegMatrix.
      
      Eventually, RABasic and RAGreedy will be switched to LiveRegMatrix.
      
      llvm-svn: 158255
      c26fbbfb
Loading