[PATCH] D104997: [WIP][AMDGPU] Deduce attributes with the Attributor

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 27 14:50:53 PDT 2021


jdoerfert added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:128
+    ChangeStatus Change = ChangeStatus::UNCHANGED;
+    bool IsFunc = !AMDGPU::isEntryFunctionCC(F->getCallingConv());
+
----------------



================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:166
+        if (CalleeAttributes.count(AttrName))
+          AddAttribute(AttrName);
+    }
----------------
Why not just go over CalleeAttributes here?


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:191
+  const std::string getAsStr() const override {
+    return "AMDInfo[" + std::to_string(Attributes.size()) + "]";
+  }
----------------
might be more interesting to print them all out.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:222
+    return false;
+  }
+
----------------
It is odd we initialize with a call graph. I'm not sure we need this at all. The TM can be checked in the runOnModule and we might want to not support the old-PM right away.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104997



More information about the llvm-commits mailing list