[PATCH] D63388: WIP: experimenting with EH optimizations

Gor Nishanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 17 13:41:58 PDT 2019


GorNishanov added inline comments.


================
Comment at: lib/Transforms/Scalar/CXXSimplifyEH.cpp:624-639
+static bool isEptrRethrow(const CallBase *I) {
+  return CheckFnNames(
+      I, "_ZSt17rethrow_exceptionNSt15__exception_ptr13exception_ptrE", // gcc
+      "_ZSt17rethrow_exceptionSt13exception_ptr"); // libcxx
+}
+static bool isEptrCopyCtor(const CallBase *I) {
+  return CheckFnNames(I, "_ZNSt15__exception_ptr13exception_ptrC1ERKS0_",
----------------
Bigcheese wrote:
> This is a bit concerning.  I would much rather either the headers add an attribute saying what they are, or that clang detects what they are and adds an attribute.  I don't like llvm interpreting function names.
Yes. I am wondering what is the way of tackling the platform/lib specific naming. One approach to take is to add them to TargetLibraryInfo analysis.

On the other hand. Large number of these optimizations are C++ specific, therefore I am not sure if adding them to TLI make sense.

Possibly a dedicated C++EH helper class that collects and maintains the resolved names for all interesting functions related to C++ EH optimizations across platform / stdlib combinations.


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

https://reviews.llvm.org/D63388





More information about the llvm-commits mailing list