[PATCH] D63153: [clang][NewPM] Fix broken -O0 test from the AlwaysInliner

Leonard Chan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 11 10:47:35 PDT 2019


leonardchan created this revision.
leonardchan added reviewers: chandlerc, echristo, phosek, serge-sans-paille.
leonardchan added a project: clang.
Herald added subscribers: kristof.beyls, javed.absar.

This contains the part of D62225 <https://reviews.llvm.org/D62225> which prevents insertion of lifetime intrinsics when creating the AlwaysInliner. This fixes the following tests when the new PM is enabled by default:

  Clang :: CodeGen/aarch64-neon-across.c
  Clang :: CodeGen/aarch64-neon-fcvt-intrinsics.c
  Clang :: CodeGen/aarch64-neon-fma.c
  Clang :: CodeGen/aarch64-neon-perm.c
  Clang :: CodeGen/aarch64-neon-tbl.c
  Clang :: CodeGen/aarch64-poly128.c
  Clang :: CodeGen/aarch64-v8.2a-neon-intrinsics.c
  Clang :: CodeGen/arm-neon-fma.c
  Clang :: CodeGen/arm-neon-numeric-maxmin.c
  Clang :: CodeGen/arm-neon-vcvtX.c
  Clang :: CodeGen/avx-builtins.c
  Clang :: CodeGen/builtins-ppc-p9vector.c
  Clang :: CodeGen/builtins-ppc-vsx.c
  Clang :: CodeGen/lifetime.c
  Clang :: CodeGen/sse-builtins.c
  Clang :: CodeGen/sse2-builtins.c


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D63153

Files:
  clang/lib/CodeGen/BackendUtil.cpp


Index: clang/lib/CodeGen/BackendUtil.cpp
===================================================================
--- clang/lib/CodeGen/BackendUtil.cpp
+++ clang/lib/CodeGen/BackendUtil.cpp
@@ -1111,8 +1111,10 @@
         MPM.addPass(InstrProfiling(*Options, false));
 
       // Build a minimal pipeline based on the semantics required by Clang,
-      // which is just that always inlining occurs.
-      MPM.addPass(AlwaysInlinerPass());
+      // which is just that always inlining occurs. Further, disable generating
+      // lifetime intrinsics to avoid enabling further optimizations during
+      // code generation.
+      MPM.addPass(AlwaysInlinerPass(/*InsertLifetimeIntrinsics=*/false));
 
       // At -O0 we directly run necessary sanitizer passes.
       if (LangOpts.Sanitize.has(SanitizerKind::LocalBounds))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63153.204107.patch
Type: text/x-patch
Size: 821 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190611/8ee275b8/attachment-0001.bin>


More information about the cfe-commits mailing list