[PATCH] D114035: [DSE] Improve handling of `strncpy` in Dead Store Elimination

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 17 14:34:28 PST 2021


xbolva00 added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1445
+          if (!(TLI.getLibFunc(*CB, LF) && TLI.has(LF) &&
+                LF == LibFunc_strncpy))
+            return None;
----------------
Code comment please. Maybe use switch if there are more libcalls which could be added here?


================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1138
+                                  CB->getAAMetadata());
+          [[clang::fallthrough]];
+        case LibFunc_strcpy:
----------------
Use LLVM_FALLTHROUGH;


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

https://reviews.llvm.org/D114035



More information about the llvm-commits mailing list