Skip to content

Commit 03706dd

Browse files
authored
Merge branch 'main' into hgh/libcxx/P2255R2-A_type_trait_to_detect_reference_binding_to_temporary
2 parents d0e0416 + 0ba4767 commit 03706dd

File tree

7 files changed

+21
-31
lines changed

7 files changed

+21
-31
lines changed

flang/test/Driver/config-file.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@
7777
! CHECK-LINKING-LIBOMP-GOES-AFTER: "--as-needed" "{{.*}}-{{.*}}.o" "-lmylib" "foo.a" "-lm" "-Bstatic" "-lhappy" "-Bdynamic" {{.*}}"-lomp"
7878
! CHECK-NOLINKING: Configuration file: {{.*}}Inputs{{.}}config-l.cfg
7979
! CHECK-NOLINKING: "-ffast-math"
80-
! CHECK-NOLINKING-NO: "-lm" "-Bstatic" "-lhappy" "-Bdynamic"
80+
! CHECK-NOLINKING-NOT: "-lm" "-Bstatic" "-lhappy" "-Bdynamic"
8181
! CHECK-NOLINKING-OPENMP: Configuration file: {{.*}}Inputs{{.}}config-l.cfg
8282
! CHECK-NOLINKING-OPENMP: "-ffast-math" {{.*}}"-fopenmp"
83-
! CHECK-NOLINKING-OPENMP-NO: "-lm" "-Bstatic" "-lhappy" "-Bdynamic" {{.}}"-lomp"
83+
! CHECK-NOLINKING-OPENMP-NOT: "-lm" "-Bstatic" "-lhappy" "-Bdynamic" {{.}}"-lomp"
8484
! CHECK-LINKING-MSVC: Configuration file: {{.*}}Inputs{{.}}config-l.cfg
8585
! CHECK-LINKING-MSVC: "-ffast-math"
8686
! CHECK-LINKING-MSVC: "--as-needed" "{{.*}}-{{.*}}.o" "mylib.lib" "foo.lib" "m.lib" "-Bstatic" "happy.lib" "-Bdynamic"
8787
! CHECK-NOLINKING-MSVC: Configuration file: {{.*}}Inputs{{.}}config-l.cfg
8888
! CHECK-NOLINKING-MSVC: "-ffast-math"
89-
! CHECK-NOLINKING-MSVC-NO: "m.lib" "-Bstatic" "happy.lib" "-Bdynamic"
89+
! CHECK-NOLINKING-MSVC-NOT: "m.lib" "-Bstatic" "happy.lib" "-Bdynamic"

flang/test/Lower/CUDA/cuda-data-transfer.cuf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,4 +393,4 @@ end subroutine
393393
! CHECK: %[[ALLOC_TMP:.*]] = fir.allocmem !fir.array<10xi32> {bindc_name = ".tmp", uniq_name = ""}
394394
! CHECK: %[[TMP:.*]]:2 = hlfir.declare %[[ALLOC_TMP]](%{{.*}}) {uniq_name = ".tmp"} : (!fir.heap<!fir.array<10xi32>>, !fir.shape<1>) -> (!fir.heap<!fir.array<10xi32>>, !fir.heap<!fir.array<10xi32>>)
395395
! CHECK: cuf.data_transfer %[[ADEV_DECL]]#1 to %[[TMP]]#0 {transfer_kind = #cuf.cuda_transfer<device_host>} : !fir.ref<!fir.array<10xi32>>, !fir.heap<!fir.array<10xi32>>
396-
! CHECL: hlfir.assign
396+
! CHECK: hlfir.assign

flang/test/Lower/HLFIR/type-info-components.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ subroutine test_1(x)
1717
type(sometype) :: x
1818
end subroutine
1919
! CHECK-LABEL: fir.type_info @_QFtest_1Tsometype
20-
! CHECK-SAME component_info {
20+
! CHECK-SAME: component_info {
2121
! CHECK: fir.dt_component "i" lbs [-1] init @_QFtest_1E.di.sometype.i
2222
! CHECK-NOT: fir.dt_component "j"
2323
! CHECK: fir.dt_component "p" init @_QFtest_1E.di.sometype.p
@@ -35,7 +35,7 @@ subroutine test_nesting(x)
3535
type(sometype2) :: x
3636
end subroutine
3737
! CHECK-LABEL: fir.type_info @_QFtest_nestingTsome_sub_type
38-
! CHECK-SAME component_info {
38+
! CHECK-SAME: component_info {
3939
! CHECK: fir.dt_component "i" init @_QFtest_nestingE.di.some_sub_type.i
4040
! CHECK: }
4141

@@ -50,6 +50,6 @@ subroutine data_like(x)
5050
type(sometype3) :: x
5151
end subroutine
5252
! CHECK-LABEL: fir.type_info @_QFdata_likeTsometype3
53-
! CHECK-SAME component_info {
53+
! CHECK-SAME: component_info {
5454
! CHECK: fir.dt_component "i" init @_QFdata_likeE.di.sometype3.i
5555
! CHECK: }

flang/test/Lower/OpenMP/DelayedPrivatization/target-private-multiple-variables.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ end subroutine target_allocatable
148148
! CHECK-SAME: map_entries(
149149
! CHECK-SAME: %[[MAPPED_MI0]] -> %[[MAPPED_ARG0:[^,]+]],
150150
! CHECK-SAME: %[[ALLOC_VAR_MAP]] -> %[[MAPPED_ARG1:[^,]+]]
151-
! CHECK-SAME %[[REAL_ARR_DESC_MAP]] -> %[[MAPPED_ARG2:[^,]+]]
152-
! CHECK_SAME %[[CHAR_VAR_DESC_MAP]] -> %[[MAPPED_ARG3:.[^,]+]] :
153-
! CHECK-SAME !fir.ref<i32>, !fir.ref<!fir.box<!fir.heap<i32>>>, !fir.ref<!fir.box<!fir.array<?xf32>>>, !fir.ref<!fir.boxchar<1>>)
151+
! CHECK-SAME: %[[REAL_ARR_DESC_MAP]] -> %[[MAPPED_ARG2:[^,]+]]
152+
! CHECK-SAME: %[[CHAR_VAR_DESC_MAP]] -> %[[MAPPED_ARG3:.[^,]+]] :
153+
! CHECK-SAME: !fir.ref<i32>, !fir.ref<!fir.box<!fir.heap<i32>>>, !fir.ref<!fir.box<!fir.array<?xf32>>>, !fir.ref<!fir.boxchar<1>>)
154154
! CHECK-SAME: private(
155155
! CHECK-SAME: @[[ALLOC_PRIVATIZER_SYM]] %{{[^[:space:]]+}}#0 -> %[[ALLOC_ARG:[^,]+]] [map_idx=1],
156156
! CHECK-SAME: @[[REAL_PRIVATIZER_SYM]] %{{[^[:space:]]+}}#0 -> %[[REAL_ARG:[^,]+]],

flang/test/Lower/OpenMP/copyprivate2.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
!CHECK: omp.single copyprivate(
4444
!CHECK-SAME: %[[A]]#0 -> @_copy_box_heap_Uxi32 : !fir.ref<!fir.box<!fir.heap<!fir.array<?xi32>>>>,
4545
!CHECK-SAME: %[[P]]#0 -> @_copy_box_ptr_i32 : !fir.ref<!fir.box<!fir.ptr<i32>>>)
46-
!CHEK: }
46+
!CHECK: }
4747
subroutine test_alloc_ptr()
4848
integer, allocatable :: a(:)
4949
integer, pointer :: p

flang/test/Lower/OpenMP/wsloop-reduction-mul-byref.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
! CHECK-SAME: alloc {
2828
! CHECK: %[[REF:.*]] = fir.alloca i64
2929
! CHECK: omp.yield(%[[REF]] : !fir.ref<i64>)
30-
! CHECK-LABE: } init {
30+
! CHECK-LABEL: } init {
3131
! CHECK: ^bb0(%[[VAL_0:.*]]: !fir.ref<i64>, %[[ALLOC:.*]]: !fir.ref<i64>):
3232
! CHECK: %[[VAL_1:.*]] = arith.constant 1 : i64
3333
! CHECK: fir.store %[[VAL_1]] to %[[ALLOC]] : !fir.ref<i64>

llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -151,23 +151,18 @@ PreservedAnalyses AMDGPUAtomicOptimizerPass::run(Function &F,
151151
}
152152

153153
bool AMDGPUAtomicOptimizerImpl::run() {
154-
155154
// Scan option None disables the Pass
156-
if (ScanImpl == ScanOptions::None) {
155+
if (ScanImpl == ScanOptions::None)
157156
return false;
158-
}
159157

160158
visit(F);
159+
if (ToReplace.empty())
160+
return false;
161161

162-
const bool Changed = !ToReplace.empty();
163-
164-
for (ReplacementInfo &Info : ToReplace) {
165-
optimizeAtomic(*Info.I, Info.Op, Info.ValIdx, Info.ValDivergent);
166-
}
167-
162+
for (auto &[I, Op, ValIdx, ValDivergent] : ToReplace)
163+
optimizeAtomic(*I, Op, ValIdx, ValDivergent);
168164
ToReplace.clear();
169-
170-
return Changed;
165+
return true;
171166
}
172167

173168
static bool isLegalCrossLaneType(Type *Ty) {
@@ -247,9 +242,7 @@ void AMDGPUAtomicOptimizerImpl::visitAtomicRMWInst(AtomicRMWInst &I) {
247242
// If we get here, we can optimize the atomic using a single wavefront-wide
248243
// atomic operation to do the calculation for the entire wavefront, so
249244
// remember the instruction so we can come back to it.
250-
const ReplacementInfo Info = {&I, Op, ValIdx, ValDivergent};
251-
252-
ToReplace.push_back(Info);
245+
ToReplace.push_back({&I, Op, ValIdx, ValDivergent});
253246
}
254247

255248
void AMDGPUAtomicOptimizerImpl::visitIntrinsicInst(IntrinsicInst &I) {
@@ -333,17 +326,14 @@ void AMDGPUAtomicOptimizerImpl::visitIntrinsicInst(IntrinsicInst &I) {
333326
// If any of the other arguments to the intrinsic are divergent, we can't
334327
// optimize the operation.
335328
for (unsigned Idx = 1; Idx < I.getNumOperands(); Idx++) {
336-
if (UA.isDivergentUse(I.getOperandUse(Idx))) {
329+
if (UA.isDivergentUse(I.getOperandUse(Idx)))
337330
return;
338-
}
339331
}
340332

341333
// If we get here, we can optimize the atomic using a single wavefront-wide
342334
// atomic operation to do the calculation for the entire wavefront, so
343335
// remember the instruction so we can come back to it.
344-
const ReplacementInfo Info = {&I, Op, ValIdx, ValDivergent};
345-
346-
ToReplace.push_back(Info);
336+
ToReplace.push_back({&I, Op, ValIdx, ValDivergent});
347337
}
348338

349339
// Use the builder to create the non-atomic counterpart of the specified

0 commit comments

Comments
 (0)