[PATCH] D72475: [WIP] Build assume from call

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 2 11:46:33 PST 2020


fhahn added a comment.

Is this approach documented somewhere in-tree? I think it would be good to document it, rather than just having a link to the mailing list.



================
Comment at: llvm/include/llvm/Transforms/Utils/KnowledgeRetention.h:9
+//
+// This file contain tools to preserve informations. They should be used before
+// performing a transformation moving and deleting instruction as those
----------------
I think it would be good to describe what kinds of information are preserved.


================
Comment at: llvm/lib/Transforms/Utils/KnowledgeRetention.cpp:25
+
+struct AssumedKnowledge {
+  const char *Name;
----------------
It would probably be good to document the members here.


================
Comment at: llvm/lib/Transforms/Utils/KnowledgeRetention.cpp:26
+struct AssumedKnowledge {
+  const char *Name;
+  Value *Argument;
----------------
Is this only used with attributes? If so, wouldn't it be better to use an Attribute*?


================
Comment at: llvm/lib/Transforms/Utils/KnowledgeRetention.cpp:34
+  /// Contain the argument and a flag if needed.
+  llvm::PointerIntPair<Value *, 2> WasOn;
+};
----------------
What is the use case for retaining an attribute without argument? Would also be good to mention.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72475





More information about the llvm-commits mailing list