[all-commits] [llvm/llvm-project] 71b1fb: [MISched][NFC] Add documentation comment in pickNo...

Michael Maitland via All-commits all-commits at lists.llvm.org
Wed May 22 05:27:57 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 71b1fbdff6cf567ad278c51f0acdcdf23de0ac28
      https://github.com/llvm/llvm-project/commit/71b1fbdff6cf567ad278c51f0acdcdf23de0ac28
  Author: Michael Maitland <michaeltmaitland at gmail.com>
  Date:   2024-05-22 (Wed, 22 May 2024)

  Changed paths:
    M llvm/lib/CodeGen/MachineScheduler.cpp

  Log Message:
  -----------
  [MISched][NFC] Add documentation comment in pickNode for ReadyQueue maintenence (#92976)

I had some trouble understanding why `removeReady` removed nodes from
the Pending queue, since my intuition told me that the Pending queue did
not represent a node that was ready. I took a deeper look and found that
pickOnlyNode and pickNodeFromQueue only picked nodes from the Available
queue too.

I found that need to nodes from the Available and Pending queues that
correspond to the opposite direction that we ended up choosing from
(IsTopNode vs !IsTopNode).

It took me a little longer than I would have liked to understand this
fact, so I figured that I would add a comment in the code that makes it
clear for future readers.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list