[PATCH] D62687: [Attributor] Deduce "nofree" function attribute
    Roman Lebedev via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu May 30 09:27:19 PDT 2019
    
    
  
lebedev.ri added a comment.
Are langref changes missing?
How do these attributes get documented there?
================
Comment at: llvm/include/llvm/IR/Attributes.td:205
 
+/// No Free Call
+/// This is an experimental attribute.
----------------
Can this please be more explanatory?
I can read this as "`free()` isn't being called", "all calls here are non-free (as in non-cheap)" etc
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:186
+  if (Attr.isStringAttribute()) {
+    auto StringAttr = Attr.getKindAsString();
+    if (StringAttr == "nofree") {
----------------
StringRef
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:1089
+      AM.getResult<ModuleAnalysisManagerCGSCCProxy>(C, CG).getManager();
+  assert(C.size() > 0 && "Cannot handle an empty SCC!");
+  Module &M = *C.begin()->getFunction().getParent();
----------------
Hm, there is no .empty() ?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62687/new/
https://reviews.llvm.org/D62687
    
    
More information about the llvm-commits
mailing list