Skip to content

Commit e956bfc

Browse files
committed
Re-enable captures(none)
1 parent 645f6c3 commit e956bfc

File tree

5 files changed

+5
-8
lines changed

5 files changed

+5
-8
lines changed

flang/lib/Optimizer/Passes/Pipelines.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
/// Force setting the no-alias attribute on fuction arguments when possible.
1616
static llvm::cl::opt<bool> forceNoAlias("force-no-alias", llvm::cl::Hidden,
1717
llvm::cl::init(false));
18-
/// Force setting the no-capture attribute on fuction arguments when possible.
19-
static llvm::cl::opt<bool> forceNoCapture("force-no-capture", llvm::cl::Hidden,
20-
llvm::cl::init(false));
2118

2219
namespace fir {
2320

@@ -361,7 +358,7 @@ void createDefaultFIRCodeGenPassPipeline(mlir::PassManager &pm,
361358
// TODO: re-enable setNoAlias by default (when optimizing for speed) once
362359
// function specialization is fixed.
363360
bool setNoAlias = forceNoAlias;
364-
bool setNoCapture = forceNoCapture;
361+
bool setNoCapture = config.OptLevel.isOptimizingForSpeed();
365362

366363
pm.addPass(fir::createFunctionAttr(
367364
{framePointerKind, config.InstrumentFunctionEntry,

flang/test/Fir/polymorphic.fir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: tco --force-no-capture %s | FileCheck %s
1+
// RUN: tco %s | FileCheck %s
22

33
// Test code gen for unlimited polymorphic type descriptor.
44

flang/test/Fir/struct-passing-x86-64-byval.fir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Test X86-64 ABI rewrite of struct passed by value (BIND(C), VALUE derived types).
22
// This test test cases where the struct must be passed on the stack according
33
// to the System V ABI.
4-
// RUN: tco --target=x86_64-unknown-linux-gnu --force-no-capture --force-no-alias %s | FileCheck %s
4+
// RUN: tco --target=x86_64-unknown-linux-gnu --force-no-alias %s | FileCheck %s
55

66
module attributes {fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", llvm.target_triple = "x86_64-unknown-linux-gnu"} {
77

flang/test/Fir/target-rewrite-complex-10-x86.fir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Test COMPLEX(10) passing and returning on X86
22
// RUN: fir-opt --target-rewrite="target=x86_64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=AMD64
3-
// RUN: tco -target="x86_64-unknown-linux-gnu" --force-no-alias --force-no-capture %s | FileCheck %s --check-prefix=AMD64_LLVM
3+
// RUN: tco -target="x86_64-unknown-linux-gnu" --force-no-alias %s | FileCheck %s --check-prefix=AMD64_LLVM
44

55
module attributes {fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", llvm.target_triple = "x86_64-unknown-linux-gnu"} {
66

flang/test/Fir/target.fir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: tco --target=i386-unknown-linux-gnu --force-no-alias --force-no-capture %s | FileCheck %s --check-prefix=I32
1+
// RUN: tco --target=i386-unknown-linux-gnu --force-no-alias %s | FileCheck %s --check-prefix=I32
22
// RUN: tco --target=x86_64-unknown-linux-gnu %s | FileCheck %s --check-prefix=X64
33
// RUN: tco --target=aarch64-unknown-linux-gnu %s | FileCheck %s --check-prefix=AARCH64
44
// RUN: tco --target=powerpc64le-unknown-linux-gnu %s | FileCheck %s --check-prefix=PPC

0 commit comments

Comments
 (0)