[PATCH] D91756: [CSSPGO] Pseudo probes for function calls.
    Wei Mi via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Tue Dec  1 15:33:33 PST 2020
    
    
  
wmi added inline comments.
================
Comment at: llvm/lib/CodeGen/PseudoProbeInserter.cpp:50
+    for (MachineBasicBlock &MBB : MF) {
+      MachineInstr *FirstInstr = nullptr;
+      for (MachineInstr &MI : MBB) {
----------------
What is the usage of FirstInstr?
================
Comment at: llvm/lib/CodeGen/PseudoProbeInserter.cpp:54
+          FirstInstr = &MI;
+        if (MI.isCall()) {
+          if (DILocation *DL = MI.getDebugLoc()) {
----------------
Will tailcall or other optimizations convert call into something else before PseudoProbeInserter pass?
================
Comment at: llvm/lib/Transforms/IPO/SampleProfileProbe.cpp:136-138
+  for (auto &I : CallProbeIds) {
+    auto Call = I.first;
+    uint32_t Index = I.second;
----------------
for (auto &[Call, Index] : CallProbeIds) {
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91756/new/
https://reviews.llvm.org/D91756
    
    
More information about the cfe-commits
mailing list