[PATCH] D76941: [Module] Track intrinsic IDs in module to skip unnecessary lowering.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 27 12:36:11 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/include/llvm/IR/Module.h:196
 
+  Optional<DenseMap<unsigned, unsigned>> IntrinsicsInModule = None;
+
----------------
Hmm, this just stores the count, not the actual declarations?  I guess that's okay, depending on how you expect to use it.


================
Comment at: llvm/lib/IR/Function.cpp:246
+  if (isIntrinsic())
+    getParent()->intrinsicDeclarationRemoved(getIntrinsicID());
   getParent()->getFunctionList().erase(getIterator());
----------------
We should probably try to detect mutation on the list directly.  See SymbolTableListTraits.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76941





More information about the llvm-commits mailing list