[all-commits] [llvm/llvm-project] df880b: [StackProtector] Speed up RequiresStackProtector

Nadav Rotem via All-commits all-commits at lists.llvm.org
Mon Jul 27 10:14:20 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: df880b77302d2e12d988e620eba242defdd6d4a7
      https://github.com/llvm/llvm-project/commit/df880b77302d2e12d988e620eba242defdd6d4a7
  Author: Nadav Rotem <nadav256 at gmail.com>
  Date:   2020-07-27 (Mon, 27 Jul 2020)

  Changed paths:
    M llvm/lib/CodeGen/StackProtector.cpp

  Log Message:
  -----------
  [StackProtector] Speed up RequiresStackProtector

Speed up the method RequiresStackProtector by checking the intrinsic
value of the call. The original code calls getName() that returns an
allocating std::string on each check. This change removes about 96072
std::string instances when compiling sqlite3.c; The function was
discovered with a Facebook-internal performance tool.

Differential Revision: https://reviews.llvm.org/D84620




More information about the All-commits mailing list