Skip to content

Commit f1efc64

Browse files
authored
[Driver] Remove dead -freroll-loops flag (llvm#82254)
Remove the `-freroll-loops` flag, which has not had any effect since the migration to the new pass manager. The underlying pass has been removed entirely in llvm#80972 due to lack of maintenance and known bugs. Fixes llvm#59065.
1 parent 8bc0cbd commit f1efc64

File tree

4 files changed

+2
-16
lines changed

4 files changed

+2
-16
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ Modified Compiler Flags
167167
Removed Compiler Flags
168168
-------------------------
169169

170+
- The ``-freroll-loops`` flag has been removed. It had no effect since Clang 13.
171+
170172
Attribute Changes in Clang
171173
--------------------------
172174

clang/include/clang/Driver/Options.td

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3871,10 +3871,6 @@ def funroll_loops : Flag<["-"], "funroll-loops">, Group<f_Group>,
38713871
HelpText<"Turn on loop unroller">, Visibility<[ClangOption, CC1Option]>;
38723872
def fno_unroll_loops : Flag<["-"], "fno-unroll-loops">, Group<f_Group>,
38733873
HelpText<"Turn off loop unroller">, Visibility<[ClangOption, CC1Option]>;
3874-
defm reroll_loops : BoolFOption<"reroll-loops",
3875-
CodeGenOpts<"RerollLoops">, DefaultFalse,
3876-
PosFlag<SetTrue, [], [ClangOption, CC1Option], "Turn on loop reroller">,
3877-
NegFlag<SetFalse>>;
38783874
def ffinite_loops: Flag<["-"], "ffinite-loops">, Group<f_Group>,
38793875
HelpText<"Assume all loops are finite.">, Visibility<[ClangOption, CC1Option]>;
38803876
def fno_finite_loops: Flag<["-"], "fno-finite-loops">, Group<f_Group>,

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6660,11 +6660,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
66606660
CmdArgs.push_back("-fwrapv");
66616661
}
66626662

6663-
if (Arg *A = Args.getLastArg(options::OPT_freroll_loops,
6664-
options::OPT_fno_reroll_loops))
6665-
if (A->getOption().matches(options::OPT_freroll_loops))
6666-
CmdArgs.push_back("-freroll-loops");
6667-
66686663
Args.AddLastArg(CmdArgs, options::OPT_ffinite_loops,
66696664
options::OPT_fno_finite_loops);
66706665

clang/test/Driver/clang_f_opts.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,6 @@
4545
// CHECK-UNROLL-LOOPS: "-funroll-loops"
4646
// CHECK-NO-UNROLL-LOOPS: "-fno-unroll-loops"
4747

48-
// RUN: %clang -### -S -freroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-REROLL-LOOPS %s
49-
// RUN: %clang -### -S -fno-reroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-REROLL-LOOPS %s
50-
// RUN: %clang -### -S -fno-reroll-loops -freroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-REROLL-LOOPS %s
51-
// RUN: %clang -### -S -freroll-loops -fno-reroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-REROLL-LOOPS %s
52-
// CHECK-REROLL-LOOPS: "-freroll-loops"
53-
// CHECK-NO-REROLL-LOOPS-NOT: "-freroll-loops"
54-
5548
// RUN: %clang -### -S -fprofile-sample-accurate %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-SAMPLE-ACCURATE %s
5649
// CHECK-PROFILE-SAMPLE-ACCURATE: "-fprofile-sample-accurate"
5750

0 commit comments

Comments
 (0)