Skip to content
  • Jim Grosbach's avatar
    Improve virtual frame base register allocation heuristics. · 365e931f
    Jim Grosbach authored
      1. Allocate them in the entry block of the function to enable function-wide
         re-use. The instructions to create them should be re-materializable, so
         there shouldn't be additional cost compared to creating them local
         to the basic blocks where they are used.
      2. Collect all of the frame index references for the function and sort them
         by the local offset referenced. Iterate over the sorted list to
         allocate the virtual base registers. This enables creation of base
         registers optimized for positive-offset access of frame references.
         (Note: This may be appropriate to later be a target hook to do the
         sorting in a target appropriate manner. For now it's done here for
         simplicity.)
    
    llvm-svn: 112609
    365e931f
Loading