[PATCH] D61461: When removing inalloca, convert to static alloca

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 2 16:04:03 PDT 2019


efriedma added a comment.

An example of what I'm talking about with multiple calls:

  struct C { C() noexcept; C(const C&) noexcept; ~C() noexcept; };
  void f(C) noexcept, f2(C) noexcept;
  void g(bool b, bool b2) { if (b2) { b ? f(C()) : f2(C()); } }

With "clang -O2 --target=i686-pc-windows-msvc -emit-llvm", there's one alloca used by multiple calls; the alloca can't be hoisted until both inalloca attributes are stripped.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61461





More information about the llvm-commits mailing list