Skip to content
  • Jakob Stoklund Olesen's avatar
    Add a RegisterClassInfo class that lazily caches information about · c58894bc
    Jakob Stoklund Olesen authored
    register classes.
    
    It provides information for each register class that cannot be
    determined statically, like:
    
    - The number of allocatable registers in a class after filtering out the
      reserved and invalid registers.
    
    - The preferred allocation order with registers that overlap callee-saved
      registers last.
    
    - The last callee-saved register that overlaps a given physical register.
    
    This information usually doesn't change between functions, so it is
    reused for compiling multiple functions when possible.  The many
    possible combinations of reserved and callee saves registers makes it
    unfeasible to compute this information statically in TableGen.
    
    Use RegisterClassInfo to count available registers in various heuristics
    in SimpleRegisterCoalescing, making the pass run 4% faster.
    
    llvm-svn: 132450
    c58894bc
Loading