[PATCH] D6594: Fix for bug 8281 - Extremely slow assembling and disassembling of ptrtoint

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 15:43:42 PST 2021


jdoerfert accepted this revision.
jdoerfert added a comment.
This revision is now accepted and ready to land.

LGTM, one nit.



================
Comment at: llvm/lib/IR/ConstantFold.cpp:359
+  if (Cache.find(Ty) != Cache.end())
+    return Cache[Ty];
+
----------------
This looks up Ty in cache twice, you can do it once, e.g., remember the find result.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D6594



More information about the llvm-commits mailing list