[llvm] Recommit "[LoopFlatten] Enable it by default" (PR #90473)

Ties Stuij via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 29 06:48:00 PDT 2024


https://github.com/stuij created https://github.com/llvm/llvm-project/pull/90473

The enablement of LoopFlatten got reverted by commit [8250180](https://github.com/llvm/llvm-project/commit/8250180238575ad81aed2104ca69b8fdc98d60df) because of a reported miscompilation in #59339. That issue got fixed by commit 161bfa5.

>From de7fe098eda93dd9939d86c1c39cfe2ca1c5767e Mon Sep 17 00:00:00 2001
From: Ties Stuij <ties.stuij at arm.com>
Date: Mon, 29 Apr 2024 11:13:33 +0100
Subject: [PATCH] Recommit "[LoopFlatten] Enable it by default"

The enablement of LoopFlatten got reverted by commit 8250180 because of a
reported miscompilation in #59339. That issue got fixed by commit 161bfa5.
---
 llvm/docs/ReleaseNotes.rst               | 2 +-
 llvm/lib/Passes/PassBuilderPipelines.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst
index 46d79d6c5822b1..b41d7a878fc225 100644
--- a/llvm/docs/ReleaseNotes.rst
+++ b/llvm/docs/ReleaseNotes.rst
@@ -42,7 +42,7 @@ Non-comprehensive list of changes in this release
    functionality, or simply have a lot to talk about), see the `NOTE` below
    for adding a new subsection.
 
-* ...
+* The LoopFlatten pass is now enabled by default.
 
 Update on required toolchains to build LLVM
 -------------------------------------------
diff --git a/llvm/lib/Passes/PassBuilderPipelines.cpp b/llvm/lib/Passes/PassBuilderPipelines.cpp
index 90ba3b541553e2..345c75ec530cc2 100644
--- a/llvm/lib/Passes/PassBuilderPipelines.cpp
+++ b/llvm/lib/Passes/PassBuilderPipelines.cpp
@@ -205,7 +205,7 @@ static cl::opt<bool> EnableUnrollAndJam("enable-unroll-and-jam",
                                         cl::init(false), cl::Hidden,
                                         cl::desc("Enable Unroll And Jam Pass"));
 
-static cl::opt<bool> EnableLoopFlatten("enable-loop-flatten", cl::init(false),
+static cl::opt<bool> EnableLoopFlatten("enable-loop-flatten", cl::init(true),
                                        cl::Hidden,
                                        cl::desc("Enable the LoopFlatten Pass"));
 



More information about the llvm-commits mailing list