[all-commits] [llvm/llvm-project] eec183: [nfc] Refactor SlotIndex::getInstrDistance to bett...

Aiden Grossman via All-commits all-commits at lists.llvm.org
Mon Sep 12 16:34:02 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: eec183c171c271578ebd7ee35eafb5ef0ae29298
      https://github.com/llvm/llvm-project/commit/eec183c171c271578ebd7ee35eafb5ef0ae29298
  Author: Aiden Grossman <agrossman154 at yahoo.com>
  Date:   2022-09-12 (Mon, 12 Sep 2022)

  Changed paths:
    M llvm/include/llvm/CodeGen/SlotIndexes.h
    M llvm/lib/CodeGen/RegAllocGreedy.cpp

  Log Message:
  -----------
  [nfc] Refactor SlotIndex::getInstrDistance to better reflect actual functionality

This patch refactors SlotIndex::getInstrDistance to
SlotIndex::getApproxInstrDistance to better describe the actual
functionality of this function. This patch also adds in some additional
comments better documenting the assumptions that this function makes to
increase clarity.

Based on discussion on the LLVM Discourse:
https://discourse.llvm.org/t/odd-behavior-in-slotindex-getinstrdistance/64934/5

Reviewed By: mtrofin, foad

Differential Revision: https://reviews.llvm.org/D133386




More information about the All-commits mailing list