[PATCH] D58042: [LiveDebugValues] Emit parameter's entry value

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 05:15:07 PDT 2019


djtodoro marked 6 inline comments as done.
djtodoro added inline comments.


================
Comment at: lib/CodeGen/LiveDebugValues.cpp:215
+        return Other.Kind < Kind;
+      return Loc.Hash < Other.Loc.Hash;
     }
----------------
aprantl wrote:
> FYI, I recently learned a neat trick:
> 
> `return std::tie(Var, Kind, Hash) < std::tie(Other.Var, Other.Kind, Other.Hash);`
> 
> IIUC, this is equivalent to the above code?
This looks better. Thanks :)


================
Comment at: lib/CodeGen/LiveDebugValues.cpp:219
 
+  using ParamSet = SmallVector<MachineInstr *, 6>;
   using VarLocMap = UniqueVector<VarLoc>;
----------------
aprantl wrote:
> How was 6 derived (I'm asking because a non-power-of 2 always looks very deliberate).
It should be 8.


================
Comment at: lib/CodeGen/LiveDebugValues.cpp:598
+
+  auto *TPC = getAnalysisIfAvailable<TargetPassConfig>();
+  auto &TM = TPC->getTM<TargetMachine>();
----------------
aprantl wrote:
> `IfAvailable` ... can this return a nullptr?
Yes, thanks.


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

https://reviews.llvm.org/D58042





More information about the llvm-commits mailing list