Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit d15fa08

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:d230bf3fce6d into amd-gfx:da5edb4170fd
Local branch amd-gfx da5edb4 Merged main:12ee3a6f53db into amd-gfx:b62921ced91f Remote branch main d230bf3 [mlir][complex] Support Fastmath flag in the conversion of exp,expm1 (llvm#67001)
2 parents da5edb4 + d230bf3 commit d15fa08

File tree

25 files changed

+189
-122
lines changed

25 files changed

+189
-122
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ C++ Specific Potentially Breaking Changes
5151
parameter lists or requires-clauses. This causes mangled names to change for
5252
function templates in the following cases:
5353

54+
- When a template parameter in a function template depends on a previous
55+
template parameter, such as ``template<typename T, T V> void f()``.
5456
- When the function has any constraints, whether from constrained template
5557
parameters or requires-clauses.
5658
- When the template parameter list includes a deduced type -- either

clang/lib/AST/TextNodeDumper.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,8 +1901,7 @@ void TextNodeDumper::VisitFunctionDecl(const FunctionDecl *D) {
19011901
auto Overrides = MD->overridden_methods();
19021902
OS << "Overrides: [ ";
19031903
dumpOverride(*Overrides.begin());
1904-
for (const auto *Override :
1905-
llvm::make_range(Overrides.begin() + 1, Overrides.end())) {
1904+
for (const auto *Override : llvm::drop_begin(Overrides)) {
19061905
OS << ", ";
19071906
dumpOverride(Override);
19081907
}

clang/lib/Sema/SemaOpenMP.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,9 +1187,7 @@ class DSAStackTy {
11871187
if (!Top)
11881188
return false;
11891189

1190-
return llvm::any_of(Top->IteratorVarDecls, [VD](const VarDecl *IteratorVD) {
1191-
return IteratorVD == VD->getCanonicalDecl();
1192-
});
1190+
return llvm::is_contained(Top->IteratorVarDecls, VD->getCanonicalDecl());
11931191
}
11941192
/// get captured field from ImplicitDefaultFirstprivateFDs
11951193
VarDecl *getImplicitFDCapExprDecl(const FieldDecl *FD) const {

lldb/test/API/commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Test stepping over watchpoints."""
1+
"""Test stepping over watchpoints and instruction stepping past watchpoints."""
22

33

44
import lldb
@@ -11,11 +11,25 @@ class TestStepOverWatchpoint(TestBase):
1111
NO_DEBUG_INFO_TESTCASE = True
1212

1313
def get_to_start(self, bkpt_text):
14-
"""Test stepping over watchpoints."""
14+
"""Test stepping over watchpoints and instruction stepping past watchpoints.."""
1515
self.build()
1616
target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
1717
self, bkpt_text, lldb.SBFileSpec("main.c")
1818
)
19+
return (target, process, thread, frame, read_watchpoint)
20+
21+
@add_test_categories(["basic_process"])
22+
@expectedFailureAll(
23+
oslist=["ios", "watchos", "tvos", "bridgeos", "macosx"],
24+
archs=["aarch64", "arm"],
25+
bugnumber="<rdar://problem/106868647>",
26+
)
27+
def test_step_over_read_watchpoint(self):
28+
self.build()
29+
target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
30+
self, "break here for read watchpoints", lldb.SBFileSpec("main.c")
31+
)
32+
1933
frame = thread.GetFrameAtIndex(0)
2034
self.assertTrue(frame.IsValid(), "Failed to get frame.")
2135

@@ -33,14 +47,6 @@ def get_to_start(self, bkpt_text):
3347
# stepping off from the breakpoint:
3448
bkpt.SetEnabled(False)
3549

36-
return (target, process, thread, frame, read_watchpoint)
37-
38-
# Read-write watchpoints not supported on SystemZ
39-
@expectedFailureAll(archs=["s390x"])
40-
@add_test_categories(["basic_process"])
41-
def test_step_over(self):
42-
target, process, thread, frame, wp = self.get_to_start("Set a breakpoint here")
43-
4450
thread.StepOver()
4551
self.assertStopReason(
4652
thread.GetStopReason(),
@@ -49,39 +55,36 @@ def test_step_over(self):
4955
)
5056
self.assertEquals(thread.GetStopDescription(20), "watchpoint 1")
5157

52-
# Skip everywhere while modify watchpoints are sorted out.
53-
@skipTestIfFn(lambda : True)
54-
@expectedFailureAll(
55-
oslist=["freebsd", "linux"],
56-
archs=["aarch64", "arm"],
57-
bugnumber="llvm.org/pr26031",
58-
)
59-
# Read-write watchpoints not supported on SystemZ
60-
@expectedFailureAll(archs=["s390x"])
58+
process.Continue()
59+
self.assertState(process.GetState(), lldb.eStateStopped, PROCESS_STOPPED)
60+
self.assertEquals(thread.GetStopDescription(20), "step over")
61+
62+
self.step_inst_for_watchpoint(1)
63+
64+
@add_test_categories(["basic_process"])
6165
@expectedFailureAll(
6266
oslist=["ios", "watchos", "tvos", "bridgeos", "macosx"],
6367
archs=["aarch64", "arm"],
64-
bugnumber="<rdar://problem/34027183>",
68+
bugnumber="<rdar://problem/106868647>",
6569
)
66-
@add_test_categories(["basic_process"])
67-
def test_step_instruction(self):
68-
target, process, thread, frame, wp = self.get_to_start(
69-
"Set breakpoint after call"
70+
def test_step_over_write_watchpoint(self):
71+
self.build()
72+
target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
73+
self, "break here for modify watchpoints", lldb.SBFileSpec("main.c")
7074
)
7175

72-
self.step_inst_for_watchpoint(1)
76+
# Disable the breakpoint we hit so we don't muddy the waters with
77+
# stepping off from the breakpoint:
78+
bkpt.SetEnabled(False)
79+
80+
frame = thread.GetFrameAtIndex(0)
81+
self.assertTrue(frame.IsValid(), "Failed to get frame.")
7382

7483
write_value = frame.FindValue("g_watch_me_write", lldb.eValueTypeVariableGlobal)
7584
self.assertTrue(write_value, "Failed to find write value.")
7685

77-
# Most of the MIPS boards provide only one H/W watchpoints, and S/W
78-
# watchpoints are not supported yet
79-
arch = self.getArchitecture()
80-
if re.match("^mips", arch) or re.match("powerpc64le", arch):
81-
self.runCmd("watchpoint delete 1")
82-
8386
error = lldb.SBError()
84-
# resolve_location=True, read=False, write=True
87+
# resolve_location=True, read=False, modify=True
8588
write_watchpoint = write_value.Watch(True, False, True, error)
8689
self.assertTrue(write_watchpoint, "Failed to set write watchpoint.")
8790
self.assertSuccess(error, "Error while setting watchpoint")
@@ -92,13 +95,13 @@ def test_step_instruction(self):
9295
lldb.eStopReasonWatchpoint,
9396
STOPPED_DUE_TO_WATCHPOINT,
9497
)
95-
self.assertEquals(thread.GetStopDescription(20), "watchpoint 2")
98+
self.assertEquals(thread.GetStopDescription(20), "watchpoint 1")
9699

97100
process.Continue()
98101
self.assertState(process.GetState(), lldb.eStateStopped, PROCESS_STOPPED)
99102
self.assertEquals(thread.GetStopDescription(20), "step over")
100103

101-
self.step_inst_for_watchpoint(2)
104+
self.step_inst_for_watchpoint(1)
102105

103106
def step_inst_for_watchpoint(self, wp_id):
104107
watchpoint_hit = False

lldb/test/API/commands/watchpoints/step_over_watchpoint/main.c

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,20 @@ void watch_read() {
66
g_temp = g_watch_me_read;
77
}
88

9-
void watch_write() {
10-
g_watch_me_write = g_temp;
9+
void watch_write() { g_watch_me_write = g_temp++; }
10+
11+
void read_watchpoint_testing() {
12+
watch_read(); // break here for read watchpoints
13+
g_temp = g_watch_me_read;
14+
}
15+
16+
void watch_breakpoint_testing() {
17+
watch_write(); // break here for modify watchpoints
18+
g_watch_me_write = g_temp;
1119
}
1220

1321
int main() {
14-
watch_read(); // Set a breakpoint here
15-
g_temp = g_watch_me_read; // Set breakpoint after call
16-
watch_write();
17-
g_watch_me_write = g_temp + 1;
18-
return 0;
22+
read_watchpoint_testing();
23+
watch_breakpoint_testing();
24+
return 0;
1925
}

llvm/include/llvm/Config/llvm-config.h.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/* Indicate that this is LLVM compiled from the amd-gfx branch. */
1818
#define LLVM_HAVE_BRANCH_AMD_GFX
19-
#define LLVM_MAIN_REVISION 475709
19+
#define LLVM_MAIN_REVISION 475719
2020

2121
/* Define if LLVM_ENABLE_DUMP is enabled */
2222
#cmakedefine LLVM_ENABLE_DUMP

llvm/lib/CodeGen/GlobalISel/Utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ llvm::getVectorSplat(const MachineInstr &MI, const MachineRegisterInfo &MRI) {
11731173
if (auto Splat = getIConstantSplatSExtVal(MI, MRI))
11741174
return RegOrConstant(*Splat);
11751175
auto Reg = MI.getOperand(1).getReg();
1176-
if (any_of(make_range(MI.operands_begin() + 2, MI.operands_end()),
1176+
if (any_of(drop_begin(MI.operands(), 2),
11771177
[&Reg](const MachineOperand &Op) { return Op.getReg() != Reg; }))
11781178
return std::nullopt;
11791179
return RegOrConstant(Reg);

llvm/lib/CodeGen/MachineCopyPropagation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,11 +1147,11 @@ void MachineCopyPropagation::EliminateSpillageCopies(MachineBasicBlock &MBB) {
11471147
return;
11481148

11491149
// If violate property#2, we don't fold the chain.
1150-
for (const MachineInstr *Spill : make_range(SC.begin() + 1, SC.end()))
1150+
for (const MachineInstr *Spill : drop_begin(SC))
11511151
if (CopySourceInvalid.count(Spill))
11521152
return;
11531153

1154-
for (const MachineInstr *Reload : make_range(RC.begin(), RC.end() - 1))
1154+
for (const MachineInstr *Reload : drop_end(RC))
11551155
if (CopySourceInvalid.count(Reload))
11561156
return;
11571157

llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,8 +516,7 @@ static RelaxAux initRelaxAux(LinkGraph &G) {
516516
RelaxAux Aux;
517517
Aux.Config.IsRV32 = G.getTargetTriple().isRISCV32();
518518
const auto &Features = G.getFeatures().getFeatures();
519-
Aux.Config.HasRVC =
520-
std::find(Features.begin(), Features.end(), "+c") != Features.end();
519+
Aux.Config.HasRVC = llvm::is_contained(Features, "+c");
521520

522521
for (auto &S : G.sections()) {
523522
if (!shouldRelax(S))

llvm/lib/IR/Instructions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Value *PHINode::removeIncomingValue(unsigned Idx, bool DeletePHIIfEmpty) {
130130
// clients might not expect this to happen. The code as it is thrashes the
131131
// use/def lists, which is kinda lame.
132132
std::copy(op_begin() + Idx + 1, op_end(), op_begin() + Idx);
133-
copyIncomingBlocks(make_range(block_begin() + Idx + 1, block_end()), Idx);
133+
copyIncomingBlocks(drop_begin(blocks(), Idx + 1), Idx);
134134

135135
// Nuke the last value.
136136
Op<-1>().set(nullptr);

0 commit comments

Comments
 (0)