[PATCH] D111627: [DebugInfo][InstrRef] Recover some performance by calculating IDF for register units instead of all their alises

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 12 03:48:06 PDT 2021


jmorse added inline comments.


================
Comment at: llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp:1772-1773
+    bool AnyIllegal = false;
+    for (MCRegUnitIterator RUI(R.asMCReg(), TRI); RUI.isValid(); ++RUI) {
+      for (MCRegUnitRootIterator URoots(*RUI, TRI); URoots.isValid(); ++URoots){
+        if (!MTracker->isRegisterTracked(*URoots)) {
----------------
NB: this seems to be the canonical way of enumerating register unit... registers? in the rest of LLVM. What MCRegUnitIterator  produces doesn't seem to necessarily correspond to a single register, therefore there's an additional process of enumerating the roots too.

Either way, it works for x86, and this pattern is used elsewhere in llvm. So It Must Be Right (TM).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111627/new/

https://reviews.llvm.org/D111627



More information about the llvm-commits mailing list