[Lldb-commits] [lldb] [mlir][OpenMP] Added translation for `omp.teams` to LLVM IR (PR #68042)
https://github.com/kiranchandramohan approved this pull request. LGTM. Will the wrapper function stay or be removed? https://github.com/llvm/llvm-project/pull/68042 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [mlir][OpenMP] Added translation for `omp.teams` to LLVM IR (PR #68042)
https://github.com/kiranchandramohan edited https://github.com/llvm/llvm-project/pull/68042 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [mlir][OpenMP] Added translation for `omp.teams` to LLVM IR (PR #68042)
@@ -0,0 +1,136 @@ +// RUN: mlir-translate -mlir-to-llvmir -split-input-file %s | FileCheck %s + +llvm.func @foo() + +// CHECK-LABEL: @omp_teams_simple +// CHECK: call void {{.*}} @__kmpc_fork_teams(ptr @{{.+}}, i32 0, ptr [[wrapperfn:.+]]) kiranchandramohan wrote: Could you convert the captured variables (eg. wrapperfn) to caps? This is to distinguish them easily from code. https://github.com/llvm/llvm-project/pull/68042 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [OpenMP] Improve omp offload profiler (PR #68016)
https://github.com/fel-cab updated https://github.com/llvm/llvm-project/pull/68016 >From dd44de067c26ba94b6561c5ed7fa4a5d812a3d1a Mon Sep 17 00:00:00 2001 From: Felipe Cabarcas Date: Mon, 18 Sep 2023 12:07:12 + Subject: [PATCH 01/11] testing Profiler features --- openmp/libomptarget/src/interface.cpp | 5 - openmp/libomptarget/src/private.h | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/openmp/libomptarget/src/interface.cpp b/openmp/libomptarget/src/interface.cpp index 5f21b16b3fbfb1e..f64e1e268a3952e 100644 --- a/openmp/libomptarget/src/interface.cpp +++ b/openmp/libomptarget/src/interface.cpp @@ -252,7 +252,10 @@ static inline int targetKernel(ident_t *Loc, int64_t DeviceId, int32_t NumTeams, static_assert(std::is_convertible_v, "Target AsyncInfoTy must be convertible to AsyncInfoTy."); - TIMESCOPE_WITH_IDENT(Loc); + //TIMESCOPE_WITH_IDENT(Loc); + TIMESCOPE(); + //TIMESCOPE_WITH_NAME_AND_IDENT("Hello", Loc); + //TIMESCOPE_WITH_RTM_AND_IDENT("Hello", Loc); DP("Entering target region for device %" PRId64 " with entry point " DPxMOD "\n", diff --git a/openmp/libomptarget/src/private.h b/openmp/libomptarget/src/private.h index cbce15b63a3eba2..dc6cd3944233955 100644 --- a/openmp/libomptarget/src/private.h +++ b/openmp/libomptarget/src/private.h @@ -433,7 +433,8 @@ class ExponentialBackoff { SourceInfo SI(IDENT); \ std::string ProfileLocation = SI.getProfileLocation(); \ std::string RTM = RegionTypeMsg; \ - llvm::TimeTraceScope TimeScope(__FUNCTION__, ProfileLocation + RTM) + llvm::TimeTraceScope TimeScope(ProfileLocation, ProfileLocation + RTM) + //llvm::TimeTraceScope TimeScope(__FUNCTION__, ProfileLocation + RTM) #else #define TIMESCOPE() #define TIMESCOPE_WITH_IDENT(IDENT) >From 92586bca6364100c7511ad38a30f41b0f86dea9c Mon Sep 17 00:00:00 2001 From: Felipe Cabarcas Date: Tue, 19 Sep 2023 12:02:53 + Subject: [PATCH 02/11] Improve Profiler 1 --- llvm/lib/Support/TimeProfiler.cpp | 2 +- openmp/libomptarget/src/interface.cpp | 17 + openmp/libomptarget/src/omptarget.cpp | 10 +- openmp/libomptarget/src/private.h | 5 +++-- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/llvm/lib/Support/TimeProfiler.cpp b/llvm/lib/Support/TimeProfiler.cpp index 4d625b3eb5b1709..e1458116f64ab47 100644 --- a/llvm/lib/Support/TimeProfiler.cpp +++ b/llvm/lib/Support/TimeProfiler.cpp @@ -227,7 +227,7 @@ struct llvm::TimeTraceProfiler { J.attribute("ph", "X"); J.attribute("ts", 0); J.attribute("dur", DurUs); -J.attribute("name", "Total " + Total.first); +J.attribute("name", "Total: " + Total.first); J.attributeObject("args", [&] { J.attribute("count", int64_t(Count)); J.attribute("avg ms", int64_t(DurUs / Count / 1000)); diff --git a/openmp/libomptarget/src/interface.cpp b/openmp/libomptarget/src/interface.cpp index f64e1e268a3952e..b8892cbe689107f 100644 --- a/openmp/libomptarget/src/interface.cpp +++ b/openmp/libomptarget/src/interface.cpp @@ -33,14 +33,14 @@ using namespace llvm::omp::target::ompt; /// adds requires flags EXTERN void __tgt_register_requires(int64_t Flags) { - TIMESCOPE(); + //TIMESCOPE(); PM->RTLs.registerRequires(Flags); } /// adds a target shared library to the target execution image EXTERN void __tgt_register_lib(__tgt_bin_desc *Desc) { - TIMESCOPE(); + //TIMESCOPE(); if (PM->maybeDelayRegisterLib(Desc)) return; @@ -61,7 +61,7 @@ EXTERN void __tgt_init_all_rtls() { PM->RTLs.initAllRTLs(); } /// unloads a target shared library EXTERN void __tgt_unregister_lib(__tgt_bin_desc *Desc) { - TIMESCOPE(); + //TIMESCOPE(); PM->RTLs.unregisterLib(Desc); for (auto &RTL : PM->RTLs.UsedRTLs) { if (RTL->unregister_lib) { @@ -82,7 +82,8 @@ targetData(ident_t *Loc, int64_t DeviceId, int32_t ArgNum, void **ArgsBase, static_assert(std::is_convertible_v, "TargetAsyncInfoTy must be convertible to AsyncInfoTy."); - TIMESCOPE_WITH_RTM_AND_IDENT(RegionTypeMsg, Loc); + //TIMESCOPE_WITH_RTM_AND_IDENT(RegionTypeMsg, Loc); + TIMESCOPE_WITH_RTM_AND_IDENT("targetData", Loc); DP("Entering data %s region for device %" PRId64 " with %d mappings\n", RegionName, DeviceId, ArgNum); @@ -253,9 +254,9 @@ static inline int targetKernel(ident_t *Loc, int64_t DeviceId, int32_t NumTeams, "Target AsyncInfoTy must be convertible to AsyncInfoTy."); //TIMESCOPE_WITH_IDENT(Loc); - TIMESCOPE(); + //TIMESCOPE(); //TIMESCOPE_WITH_NAME_AND_IDENT("Hello", Loc); -
[Lldb-commits] [lldb] [lldb][AArch64] Add isAArch64SMEFA64 check to SME testing (PR #68094)
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/68094 FEAT_SME_FA64 (smefa64 in Linux cpuinfo) allows the use of the full A64 instruction set while in streaming SVE mode. See https://developer.arm.com/documentation/ddi0616/latest/ for details. This means for example if we want to write to the ffr register during or use floating point registers while in streaming mode, we need this extension. I initially was using QEMU which has it by default, and switched to Arm's FVP which does not. So this change adds a more strict check and converts most of the tests to use that. It would be possible in some cases to avoid the offending instructions but it would be a lot of effort and liable to fail randomly as the C library changes. It is also my assumption that the majority of systems will have smefa64 as QEMU has chosen to have. If I turn out to be wrong, we can make the effort to get the tests working without smefa64. >From 3816b0fbc31825d3878b031a49fb78dd7c256278 Mon Sep 17 00:00:00 2001 From: David Spickett Date: Tue, 3 Oct 2023 11:44:17 +0100 Subject: [PATCH] [lldb][AArch64] Add isAArch64SMEFA64 check to SME testing FEAT_SME_FA64 (smefa64 in Linux cpuinfo) allows the use of the full A64 instruction set while in streaming SVE mode. See https://developer.arm.com/documentation/ddi0616/latest/ for details. This means for example if we want to write to the ffr register during or use floating point registers while in streaming mode, we need this extension. I initially was using QEMU which has it by default, and switched to Arm's FVP which does not. So this change adds a more strict check and converts most of the tests to use that. It would be possible in some cases to avoid the offending instructions but it would be a lot of effort and liable to fail randomly as the C library changes. It is also my assumption that the majority of systems will have smefa64 as QEMU has chosen to have. If I turn out to be wrong, we can make the effort to get the tests working without smefa64. --- lldb/packages/Python/lldbsuite/test/lldbtest.py| 6 ++ .../aarch64_dynamic_regset/TestArm64DynamicRegsets.py | 4 ++-- .../rw_access_dynamic_resize/TestSVEThreadedDynamic.py | 10 ++ .../rw_access_static_config/TestSVERegisters.py| 5 +++-- .../aarch64_sve_simd_registers/TestSVESIMDRegisters.py | 5 +++-- .../za_dynamic_resize/TestZAThreadedDynamic.py | 6 -- .../aarch64_za_register/za_dynamic_resize/main.c | 1 + .../za_save_restore/TestZARegisterSaveRestore.py | 4 ++-- 8 files changed, 27 insertions(+), 14 deletions(-) diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index c8670b208ec3f0c..2f4130d3ce68ae0 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -1271,6 +1271,12 @@ def isAArch64SVE(self): def isAArch64SME(self): return self.isAArch64() and "sme" in self.getCPUInfo() +def isAArch64SMEFA64(self): +# smefa64 allows the use of the full A64 instruction set in streaming +# mode. This is required by certain test programs to setup register +# state. +return self.isAArch64SME() and "smefa64" in self.getCPUInfo() + def isAArch64MTE(self): return self.isAArch64() and "mte" in self.getCPUInfo() diff --git a/lldb/test/API/commands/register/register/aarch64_dynamic_regset/TestArm64DynamicRegsets.py b/lldb/test/API/commands/register/register/aarch64_dynamic_regset/TestArm64DynamicRegsets.py index 2fb8b33126417c2..0ad69c268a9fd29 100644 --- a/lldb/test/API/commands/register/register/aarch64_dynamic_regset/TestArm64DynamicRegsets.py +++ b/lldb/test/API/commands/register/register/aarch64_dynamic_regset/TestArm64DynamicRegsets.py @@ -142,8 +142,8 @@ def make_za_value(self, vl, generator): def test_aarch64_dynamic_regset_config_sme(self): """Test AArch64 Dynamic Register sets configuration, but only SME registers.""" -if not self.isAArch64SME(): -self.skipTest("SME must be present.") +if not self.isAArch64SMEFA64(): +self.skipTest("SME and the smefa64 extension must be present") register_sets = self.setup_register_config_test("sme") diff --git a/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/TestSVEThreadedDynamic.py b/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/TestSVEThreadedDynamic.py index 8bcb76776459d01..b19039f0b5212b4 100644 --- a/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/TestSVEThreadedDynamic.py +++ b/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/TestSVEThreadedDynamic.py @@ -108,8 +108,9 @@ def run_sve_test(self, mode): if (mode == Mode.SVE) and not self.isAArch64SVE(
[Lldb-commits] [lldb] [lldb][AArch64] Add isAArch64SMEFA64 check to SME testing (PR #68094)
llvmbot wrote: @llvm/pr-subscribers-lldb Changes FEAT_SME_FA64 (smefa64 in Linux cpuinfo) allows the use of the full A64 instruction set while in streaming SVE mode. See https://developer.arm.com/documentation/ddi0616/latest/ for details. This means for example if we want to write to the ffr register during or use floating point registers while in streaming mode, we need this extension. I initially was using QEMU which has it by default, and switched to Arm's FVP which does not. So this change adds a more strict check and converts most of the tests to use that. It would be possible in some cases to avoid the offending instructions but it would be a lot of effort and liable to fail randomly as the C library changes. It is also my assumption that the majority of systems will have smefa64 as QEMU has chosen to have. If I turn out to be wrong, we can make the effort to get the tests working without smefa64. --- Full diff: https://github.com/llvm/llvm-project/pull/68094.diff 8 Files Affected: - (modified) lldb/packages/Python/lldbsuite/test/lldbtest.py (+6) - (modified) lldb/test/API/commands/register/register/aarch64_dynamic_regset/TestArm64DynamicRegsets.py (+2-2) - (modified) lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/TestSVEThreadedDynamic.py (+6-4) - (modified) lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_static_config/TestSVERegisters.py (+3-2) - (modified) lldb/test/API/commands/register/register/aarch64_sve_simd_registers/TestSVESIMDRegisters.py (+3-2) - (modified) lldb/test/API/commands/register/register/aarch64_za_register/za_dynamic_resize/TestZAThreadedDynamic.py (+4-2) - (modified) lldb/test/API/commands/register/register/aarch64_za_register/za_dynamic_resize/main.c (+1) - (modified) lldb/test/API/commands/register/register/aarch64_za_register/za_save_restore/TestZARegisterSaveRestore.py (+2-2) ``diff diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index c8670b208ec3f0c..2f4130d3ce68ae0 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -1271,6 +1271,12 @@ def isAArch64SVE(self): def isAArch64SME(self): return self.isAArch64() and "sme" in self.getCPUInfo() +def isAArch64SMEFA64(self): +# smefa64 allows the use of the full A64 instruction set in streaming +# mode. This is required by certain test programs to setup register +# state. +return self.isAArch64SME() and "smefa64" in self.getCPUInfo() + def isAArch64MTE(self): return self.isAArch64() and "mte" in self.getCPUInfo() diff --git a/lldb/test/API/commands/register/register/aarch64_dynamic_regset/TestArm64DynamicRegsets.py b/lldb/test/API/commands/register/register/aarch64_dynamic_regset/TestArm64DynamicRegsets.py index 2fb8b33126417c2..0ad69c268a9fd29 100644 --- a/lldb/test/API/commands/register/register/aarch64_dynamic_regset/TestArm64DynamicRegsets.py +++ b/lldb/test/API/commands/register/register/aarch64_dynamic_regset/TestArm64DynamicRegsets.py @@ -142,8 +142,8 @@ def make_za_value(self, vl, generator): def test_aarch64_dynamic_regset_config_sme(self): """Test AArch64 Dynamic Register sets configuration, but only SME registers.""" -if not self.isAArch64SME(): -self.skipTest("SME must be present.") +if not self.isAArch64SMEFA64(): +self.skipTest("SME and the smefa64 extension must be present") register_sets = self.setup_register_config_test("sme") diff --git a/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/TestSVEThreadedDynamic.py b/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/TestSVEThreadedDynamic.py index 8bcb76776459d01..b19039f0b5212b4 100644 --- a/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/TestSVEThreadedDynamic.py +++ b/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/TestSVEThreadedDynamic.py @@ -108,8 +108,9 @@ def run_sve_test(self, mode): if (mode == Mode.SVE) and not self.isAArch64SVE(): self.skipTest("SVE registers must be supported.") -if (mode == Mode.SSVE) and not self.isAArch64SME(): -self.skipTest("Streaming SVE registers must be supported.") +if (mode == Mode.SSVE) and not self.isAArch64SMEFA64(): +self.skipTest("Streaming SVE registers must be supported and the " + "smefa64 extension must be present.") self.build_for_mode(mode) @@ -201,8 +202,9 @@ def test_ssve_registers_dynamic_config(self): def setup_svg_test(self, mode): # Even when running in SVE mode, we need access to SVG for these tests. -if not self.isAArch64SME(): -
[Lldb-commits] [lldb] [lldb][AArch64] Invalidate SVG prior to reconfiguring ZA regdef (PR #66768)
DavidSpickett wrote: ping! https://github.com/llvm/llvm-project/pull/66768 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][AArch64] Add release notes and documentation for SME (PR #66767)
DavidSpickett wrote: ping! https://github.com/llvm/llvm-project/pull/66767 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][AArch64] Add isAArch64SMEFA64 check to SME testing (PR #68094)
https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/68094 >From 3816b0fbc31825d3878b031a49fb78dd7c256278 Mon Sep 17 00:00:00 2001 From: David Spickett Date: Tue, 3 Oct 2023 11:44:17 +0100 Subject: [PATCH 1/2] [lldb][AArch64] Add isAArch64SMEFA64 check to SME testing FEAT_SME_FA64 (smefa64 in Linux cpuinfo) allows the use of the full A64 instruction set while in streaming SVE mode. See https://developer.arm.com/documentation/ddi0616/latest/ for details. This means for example if we want to write to the ffr register during or use floating point registers while in streaming mode, we need this extension. I initially was using QEMU which has it by default, and switched to Arm's FVP which does not. So this change adds a more strict check and converts most of the tests to use that. It would be possible in some cases to avoid the offending instructions but it would be a lot of effort and liable to fail randomly as the C library changes. It is also my assumption that the majority of systems will have smefa64 as QEMU has chosen to have. If I turn out to be wrong, we can make the effort to get the tests working without smefa64. --- lldb/packages/Python/lldbsuite/test/lldbtest.py| 6 ++ .../aarch64_dynamic_regset/TestArm64DynamicRegsets.py | 4 ++-- .../rw_access_dynamic_resize/TestSVEThreadedDynamic.py | 10 ++ .../rw_access_static_config/TestSVERegisters.py| 5 +++-- .../aarch64_sve_simd_registers/TestSVESIMDRegisters.py | 5 +++-- .../za_dynamic_resize/TestZAThreadedDynamic.py | 6 -- .../aarch64_za_register/za_dynamic_resize/main.c | 1 + .../za_save_restore/TestZARegisterSaveRestore.py | 4 ++-- 8 files changed, 27 insertions(+), 14 deletions(-) diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index c8670b208ec3f0c..2f4130d3ce68ae0 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -1271,6 +1271,12 @@ def isAArch64SVE(self): def isAArch64SME(self): return self.isAArch64() and "sme" in self.getCPUInfo() +def isAArch64SMEFA64(self): +# smefa64 allows the use of the full A64 instruction set in streaming +# mode. This is required by certain test programs to setup register +# state. +return self.isAArch64SME() and "smefa64" in self.getCPUInfo() + def isAArch64MTE(self): return self.isAArch64() and "mte" in self.getCPUInfo() diff --git a/lldb/test/API/commands/register/register/aarch64_dynamic_regset/TestArm64DynamicRegsets.py b/lldb/test/API/commands/register/register/aarch64_dynamic_regset/TestArm64DynamicRegsets.py index 2fb8b33126417c2..0ad69c268a9fd29 100644 --- a/lldb/test/API/commands/register/register/aarch64_dynamic_regset/TestArm64DynamicRegsets.py +++ b/lldb/test/API/commands/register/register/aarch64_dynamic_regset/TestArm64DynamicRegsets.py @@ -142,8 +142,8 @@ def make_za_value(self, vl, generator): def test_aarch64_dynamic_regset_config_sme(self): """Test AArch64 Dynamic Register sets configuration, but only SME registers.""" -if not self.isAArch64SME(): -self.skipTest("SME must be present.") +if not self.isAArch64SMEFA64(): +self.skipTest("SME and the smefa64 extension must be present") register_sets = self.setup_register_config_test("sme") diff --git a/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/TestSVEThreadedDynamic.py b/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/TestSVEThreadedDynamic.py index 8bcb76776459d01..b19039f0b5212b4 100644 --- a/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/TestSVEThreadedDynamic.py +++ b/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/TestSVEThreadedDynamic.py @@ -108,8 +108,9 @@ def run_sve_test(self, mode): if (mode == Mode.SVE) and not self.isAArch64SVE(): self.skipTest("SVE registers must be supported.") -if (mode == Mode.SSVE) and not self.isAArch64SME(): -self.skipTest("Streaming SVE registers must be supported.") +if (mode == Mode.SSVE) and not self.isAArch64SMEFA64(): +self.skipTest("Streaming SVE registers must be supported and the " + "smefa64 extension must be present.") self.build_for_mode(mode) @@ -201,8 +202,9 @@ def test_ssve_registers_dynamic_config(self): def setup_svg_test(self, mode): # Even when running in SVE mode, we need access to SVG for these tests. -if not self.isAArch64SME(): -self.skipTest("Streaming SVE registers must be present.") +if not self.isAArch64SMEFA64(): +self.skipTest("Streaming SVE registers must be present and the " +
[Lldb-commits] [lldb] [OpenMP] Improve omp offload profiler (PR #68016)
@@ -79,15 +79,15 @@ struct TimeTraceProfilerEntry { // Calculate timings for FlameGraph. Cast time points to microsecond precision fel-cab wrote: Removed this file from this PR https://github.com/llvm/llvm-project/pull/68016 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][AArch64] Add isAArch64SMEFA64 check to SME testing (PR #68094)
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 9a408588d1b8b7899eff593c537de539a4a12651..3816b0fbc31825d3878b031a49fb78dd7c256278 lldb/packages/Python/lldbsuite/test/lldbtest.py lldb/test/API/commands/register/register/aarch64_dynamic_regset/TestArm64DynamicRegsets.py lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/TestSVEThreadedDynamic.py lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_static_config/TestSVERegisters.py lldb/test/API/commands/register/register/aarch64_sve_simd_registers/TestSVESIMDRegisters.py lldb/test/API/commands/register/register/aarch64_za_register/za_dynamic_resize/TestZAThreadedDynamic.py lldb/test/API/commands/register/register/aarch64_za_register/za_save_restore/TestZARegisterSaveRestore.py `` View the diff from darker here. ``diff --- test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/TestSVEThreadedDynamic.py 2023-10-03 12:14:52.00 + +++ test/API/commands/register/register/aarch64_sve_registers/rw_access_dynamic_resize/TestSVEThreadedDynamic.py 2023-10-03 12:28:00.613685 + @@ -107,12 +107,14 @@ def run_sve_test(self, mode): if (mode == Mode.SVE) and not self.isAArch64SVE(): self.skipTest("SVE registers must be supported.") if (mode == Mode.SSVE) and not self.isAArch64SMEFA64(): -self.skipTest("Streaming SVE registers must be supported and the " - "smefa64 extension must be present.") +self.skipTest( +"Streaming SVE registers must be supported and the " +"smefa64 extension must be present." +) self.build_for_mode(mode) supported_vg = self.get_supported_vg() @@ -201,12 +203,14 @@ self.run_sve_test(Mode.SSVE) def setup_svg_test(self, mode): # Even when running in SVE mode, we need access to SVG for these tests. if not self.isAArch64SMEFA64(): -self.skipTest("Streaming SVE registers must be present and the " - "smefa64 extension must be present.") +self.skipTest( +"Streaming SVE registers must be present and the " +"smefa64 extension must be present." +) self.build_for_mode(mode) supported_vg = self.get_supported_vg() --- test/API/commands/register/register/aarch64_sve_registers/rw_access_static_config/TestSVERegisters.py 2023-10-03 12:14:52.00 + +++ test/API/commands/register/register/aarch64_sve_registers/rw_access_static_config/TestSVERegisters.py 2023-10-03 12:28:00.718448 + @@ -84,12 +84,14 @@ def skip_if_needed(self, mode): if (mode == Mode.SVE) and not self.isAArch64SVE(): self.skipTest("SVE registers must be supported.") if (mode == Mode.SSVE) and not self.isAArch64SMEFA64(): -self.skipTest("SSVE registers must be supported and the smefa64 " - "extension must be present.") +self.skipTest( +"SSVE registers must be supported and the smefa64 " +"extension must be present." +) def sve_registers_configuration_impl(self, mode): self.skip_if_needed(mode) self.build(dictionary=self.get_build_flags(mode)) --- test/API/commands/register/register/aarch64_sve_simd_registers/TestSVESIMDRegisters.py 2023-10-03 12:14:52.00 + +++ test/API/commands/register/register/aarch64_sve_simd_registers/TestSVESIMDRegisters.py 2023-10-03 12:28:00.774799 + @@ -40,12 +40,14 @@ def skip_if_needed(self, mode): if (mode == Mode.SVE) and not self.isAArch64SVE(): self.skipTest("SVE registers must be supported.") if (mode == Mode.SSVE) and not self.isAArch64SMEFA64(): -self.skipTest("SSVE registers must be supported and the smefa64 " - "extension must be present.") +self.skipTest( +"SSVE registers must be supported and the smefa64 " +"extension must be present." +) def make_simd_value(self, n): pad = " ".join(["0x00"] * 7) return "{{0x{:02x} {} 0x{:02x} {}}}".format(n, pad, n, pad) `` https://github.com/llvm/llvm-project/pull/68094 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][FreeBSD] Add dynamic loader handle class for FreeBSD Kernel (PR #67106)
https://github.com/aokblast updated https://github.com/llvm/llvm-project/pull/67106 >From f4d7761c4abd2a16739a917ded31f90fdbbbf2fb Mon Sep 17 00:00:00 2001 From: SHENG-YI HONG Date: Tue, 3 Oct 2023 20:48:52 +0800 Subject: [PATCH] Add DynamicLoader Plugin Fore FreeBSD Kernel coredump This patch add dynamicloader plguin for freebsd kernel coredump on lldb. The implementation is by parsing linker_files structure and get all loaded kernel modules. This patch was part of FreeBSD's participation in Google Summer of Code 2023 --- .../Plugins/DynamicLoader/CMakeLists.txt | 1 + .../FreeBSD-Kernel/CMakeLists.txt | 13 + .../DynamicLoaderFreeBSDKernel.cpp| 789 ++ .../DynamicLoaderFreeBSDKernel.h | 171 .../Plugins/ObjectFile/ELF/ObjectFileELF.cpp | 43 +- .../FreeBSDKernel/ProcessFreeBSDKernel.cpp| 4 +- 6 files changed, 1014 insertions(+), 7 deletions(-) create mode 100644 lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/CMakeLists.txt create mode 100644 lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/DynamicLoaderFreeBSDKernel.cpp create mode 100644 lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/DynamicLoaderFreeBSDKernel.h diff --git a/lldb/source/Plugins/DynamicLoader/CMakeLists.txt b/lldb/source/Plugins/DynamicLoader/CMakeLists.txt index f357fea02efbe68..30607159acdc088 100644 --- a/lldb/source/Plugins/DynamicLoader/CMakeLists.txt +++ b/lldb/source/Plugins/DynamicLoader/CMakeLists.txt @@ -1,4 +1,5 @@ add_subdirectory(Darwin-Kernel) +add_subdirectory(FreeBSD-Kernel) add_subdirectory(MacOSX-DYLD) add_subdirectory(POSIX-DYLD) add_subdirectory(Static) diff --git a/lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/CMakeLists.txt b/lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/CMakeLists.txt new file mode 100644 index 000..76daf0a327cf97b --- /dev/null +++ b/lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/CMakeLists.txt @@ -0,0 +1,13 @@ +add_lldb_library(lldbPluginDynamicLoaderFreeBSDKernel PLUGIN + DynamicLoaderFreeBSDKernel.cpp + + LINK_LIBS +lldbBreakpoint +lldbCore +lldbHost +lldbInterpreter +lldbSymbol +lldbTarget +lldbUtility +lldbPluginObjectFileELF + ) diff --git a/lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/DynamicLoaderFreeBSDKernel.cpp b/lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/DynamicLoaderFreeBSDKernel.cpp new file mode 100644 index 000..bbb83ff0a118400 --- /dev/null +++ b/lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/DynamicLoaderFreeBSDKernel.cpp @@ -0,0 +1,789 @@ +//===-- DynamicLoaderFreeBSDKernel.cpp +//--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===--===// + +#include "lldb/Breakpoint/StoppointCallbackContext.h" +#include "lldb/Core/Debugger.h" +#include "lldb/Core/Module.h" +#include "lldb/Core/ModuleSpec.h" +#include "lldb/Core/PluginManager.h" +#include "lldb/Core/Section.h" +#include "lldb/Host/StreamFile.h" +#include "lldb/Interpreter/OptionValueProperties.h" +#include "lldb/Symbol/LocateSymbolFile.h" +#include "lldb/Symbol/ObjectFile.h" +#include "lldb/Target/OperatingSystem.h" +#include "lldb/Target/RegisterContext.h" +#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Target.h" +#include "lldb/Target/Thread.h" +#include "lldb/Target/ThreadPlanRunToAddress.h" +#include "lldb/Utility/DataBuffer.h" +#include "lldb/Utility/DataBufferHeap.h" +#include "lldb/Utility/LLDBLog.h" +#include "lldb/Utility/Log.h" +#include "lldb/Utility/State.h" + +#include "Plugins/ObjectFile/ELF/ObjectFileELF.h" + +#include "DynamicLoaderFreeBSDKernel.h" +#include +#include + +using namespace lldb; +using namespace lldb_private; + +LLDB_PLUGIN_DEFINE(DynamicLoaderFreeBSDKernel) + +void DynamicLoaderFreeBSDKernel::Initialize() { + PluginManager::RegisterPlugin(GetPluginNameStatic(), +GetPluginDescriptionStatic(), CreateInstance, +DebuggerInit); +} + +void DynamicLoaderFreeBSDKernel::Terminate() { + PluginManager::UnregisterPlugin(CreateInstance); +} + +llvm::StringRef DynamicLoaderFreeBSDKernel::GetPluginDescriptionStatic() { + return "The Dynamic Loader Plugin For FreeBSD Kernel"; +} + +static bool is_kernel(Module *module) { + if (!module) +return false; + + ObjectFile *objfile = module->GetObjectFile(); + if (!objfile) +return false; + if (objfile->GetType() != ObjectFile::eTypeExecutable) +return false; + if (objfile->GetStrata() != ObjectFile::eStrataUnknown && + objfile->GetStrata() != ObjectFile::eStrataKernel) +return false; + + return true; +} + +static bool is_kmod(Module *module) { + if (!module) +return false; + if (!module->GetObjectFil
[Lldb-commits] [lldb] [AMDGPU] Add another SIFoldOperands instance after shrink (PR #67878)
jayfoad wrote: I've just tested this on 1 graphics shaders and it seems to make no difference at all. I tried gfx900 and gfx1100. Can anyone else from the graphics team confirm this? https://github.com/llvm/llvm-project/pull/67878 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [AMDGPU] Add another SIFoldOperands instance after shrink (PR #67878)
Sisyph wrote: > I've just tested this on 1 graphics shaders and it seems to make no > difference at all. I tried gfx900 and gfx1100. Can anyone else from the > graphics team confirm this? I can confirm no difference on gfx1102 https://github.com/llvm/llvm-project/pull/67878 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Expose Platform::Attach through the SB API (PR #68050)
@@ -574,6 +576,29 @@ SBError SBPlatform::Launch(SBLaunchInfo &launch_info) { }); } +SBProcess SBPlatform::Attach(SBAttachInfo &attach_info, + const SBDebugger &debugger, SBTarget &target, JDevlieghere wrote: - `attach_info` cannot be const because `Platform::Attach` also takes a non-cost `AttachInfo`. There's at least one place (`PlatformPOSIX::Attach`) that modifies the `attach_info`. - `target` is an out parameter so making that const would be confusing. https://github.com/llvm/llvm-project/pull/68050 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Expose Platform::Attach through the SB API (PR #68050)
https://github.com/JDevlieghere updated https://github.com/llvm/llvm-project/pull/68050 >From c83435474699ba6ca5ff57bcb1dacaef0987f4b4 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Tue, 3 Oct 2023 08:41:01 -0700 Subject: [PATCH] [lldb] Expose Platform::Attach through the SB API Expose Platform::Attach through the SB API. rdar://116188959 --- lldb/include/lldb/API/SBAttachInfo.h | 1 + lldb/include/lldb/API/SBDebugger.h| 1 + lldb/include/lldb/API/SBPlatform.h| 5 ++ lldb/include/lldb/API/SBProcess.h | 1 + .../Python/lldbsuite/test/gdbclientutils.py | 6 ++ lldb/source/API/SBPlatform.cpp| 25 .../gdb_remote_client/TestPlatformAttach.py | 58 +++ 7 files changed, 97 insertions(+) create mode 100644 lldb/test/API/functionalities/gdb_remote_client/TestPlatformAttach.py diff --git a/lldb/include/lldb/API/SBAttachInfo.h b/lldb/include/lldb/API/SBAttachInfo.h index ea1145e625856f0..c18655fee77e0ac 100644 --- a/lldb/include/lldb/API/SBAttachInfo.h +++ b/lldb/include/lldb/API/SBAttachInfo.h @@ -197,6 +197,7 @@ class LLDB_API SBAttachInfo { protected: friend class SBTarget; + friend class SBPlatform; friend class lldb_private::ScriptInterpreter; diff --git a/lldb/include/lldb/API/SBDebugger.h b/lldb/include/lldb/API/SBDebugger.h index 29cf2c16fad4bd7..218113a7a391f35 100644 --- a/lldb/include/lldb/API/SBDebugger.h +++ b/lldb/include/lldb/API/SBDebugger.h @@ -487,6 +487,7 @@ class LLDB_API SBDebugger { friend class SBProcess; friend class SBSourceManager; friend class SBStructuredData; + friend class SBPlatform; friend class SBTarget; friend class SBTrace; diff --git a/lldb/include/lldb/API/SBPlatform.h b/lldb/include/lldb/API/SBPlatform.h index 6567277a5d161e7..e0acc7003a54bc3 100644 --- a/lldb/include/lldb/API/SBPlatform.h +++ b/lldb/include/lldb/API/SBPlatform.h @@ -10,6 +10,7 @@ #define LLDB_API_SBPLATFORM_H #include "lldb/API/SBDefines.h" +#include "lldb/API/SBProcess.h" #include @@ -18,6 +19,7 @@ struct PlatformShellCommand; namespace lldb { +class SBAttachInfo; class SBLaunchInfo; class LLDB_API SBPlatformConnectOptions { @@ -149,6 +151,9 @@ class LLDB_API SBPlatform { SBError Launch(SBLaunchInfo &launch_info); + SBProcess Attach(SBAttachInfo &attach_info, const SBDebugger &debugger, + SBTarget &target, SBError &error); + SBError Kill(const lldb::pid_t pid); SBError diff --git a/lldb/include/lldb/API/SBProcess.h b/lldb/include/lldb/API/SBProcess.h index 16527bb0291fcb4..8c1c81418f83d12 100644 --- a/lldb/include/lldb/API/SBProcess.h +++ b/lldb/include/lldb/API/SBProcess.h @@ -449,6 +449,7 @@ class LLDB_API SBProcess { friend class SBExecutionContext; friend class SBFunction; friend class SBModule; + friend class SBPlatform; friend class SBTarget; friend class SBThread; friend class SBValue; diff --git a/lldb/packages/Python/lldbsuite/test/gdbclientutils.py b/lldb/packages/Python/lldbsuite/test/gdbclientutils.py index a0104d36df8d903..1784487323ad6be 100644 --- a/lldb/packages/Python/lldbsuite/test/gdbclientutils.py +++ b/lldb/packages/Python/lldbsuite/test/gdbclientutils.py @@ -196,6 +196,9 @@ def respond(self, packet): return self.vFile(packet) if packet.startswith("vRun;"): return self.vRun(packet) +if packet.startswith("qLaunchGDBServer;"): +_, host = packet.partition(";")[2].split(":") +return self.qLaunchGDBServer(host) if packet.startswith("qLaunchSuccess"): return self.qLaunchSuccess() if packet.startswith("QEnvironment:"): @@ -329,6 +332,9 @@ def vFile(self, packet): def vRun(self, packet): return "" +def qLaunchGDBServer(self, host): +raise self.UnexpectedPacketException() + def qLaunchSuccess(self): return "" diff --git a/lldb/source/API/SBPlatform.cpp b/lldb/source/API/SBPlatform.cpp index f8300a5bab30e41..c31848fe04ea72c 100644 --- a/lldb/source/API/SBPlatform.cpp +++ b/lldb/source/API/SBPlatform.cpp @@ -7,12 +7,14 @@ //===--===// #include "lldb/API/SBPlatform.h" +#include "lldb/API/SBDebugger.h" #include "lldb/API/SBEnvironment.h" #include "lldb/API/SBError.h" #include "lldb/API/SBFileSpec.h" #include "lldb/API/SBLaunchInfo.h" #include "lldb/API/SBModuleSpec.h" #include "lldb/API/SBPlatform.h" +#include "lldb/API/SBTarget.h" #include "lldb/API/SBUnixSignals.h" #include "lldb/Host/File.h" #include "lldb/Target/Platform.h" @@ -574,6 +576,29 @@ SBError SBPlatform::Launch(SBLaunchInfo &launch_info) { }); } +SBProcess SBPlatform::Attach(SBAttachInfo &attach_info, + const SBDebugger &debugger, SBTarget &target, + SBError &error) { + LLDB_INSTRUMENT_VA(this, attach_info, debugger, target, error); + + if
[Lldb-commits] [lldb] [lldb] Expose Platform::Attach through the SB API (PR #68050)
https://github.com/bulbazord approved this pull request. Lgtm https://github.com/llvm/llvm-project/pull/68050 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Fix --persistent-result description (PR #68128)
https://github.com/kastiglione created https://github.com/llvm/llvm-project/pull/68128 The default is not static, it depends on context. For `expression`, the default is true, but for `dwim-print`, the default is false. >From 098ae1d2a09a406792e32e56b029a8e8a970630e Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Tue, 3 Oct 2023 09:38:25 -0700 Subject: [PATCH] [lldb] Fix --persistent-result description The default is not static, it depends on context. For `expression`, the default is true, but for `dwim-print`, the default is false. --- lldb/source/Commands/Options.td | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Commands/Options.td b/lldb/source/Commands/Options.td index 04830b8b990efae..cfdeaabfa007743 100644 --- a/lldb/source/Commands/Options.td +++ b/lldb/source/Commands/Options.td @@ -390,7 +390,7 @@ let Command = "expression" in { Arg<"Boolean">, Desc<"Persist expression result in a variable for subsequent use. " "Expression results will be labeled with $-prefixed variables, e.g. $0, " -"$1, etc. Defaults to true.">; +"$1, etc.">; } let Command = "frame diag" in { ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Fix --persistent-result description (PR #68128)
https://github.com/kastiglione edited https://github.com/llvm/llvm-project/pull/68128 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Fix --persistent-result description (PR #68128)
llvmbot wrote: @llvm/pr-subscribers-lldb Changes The default is not static, it depends on context. For `expression`, the default is true, but for `dwim-print`, the default is false. rdar://116320377 --- Full diff: https://github.com/llvm/llvm-project/pull/68128.diff 1 Files Affected: - (modified) lldb/source/Commands/Options.td (+1-1) ``diff diff --git a/lldb/source/Commands/Options.td b/lldb/source/Commands/Options.td index 04830b8b990efae..cfdeaabfa007743 100644 --- a/lldb/source/Commands/Options.td +++ b/lldb/source/Commands/Options.td @@ -390,7 +390,7 @@ let Command = "expression" in { Arg<"Boolean">, Desc<"Persist expression result in a variable for subsequent use. " "Expression results will be labeled with $-prefixed variables, e.g. $0, " -"$1, etc. Defaults to true.">; +"$1, etc.">; } let Command = "frame diag" in { `` https://github.com/llvm/llvm-project/pull/68128 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][FreeBSD] Add dynamic loader handle class for FreeBSD Kernel (PR #67106)
aokblast wrote: I try to change the committer of my patch and I think it works now. https://github.com/llvm/llvm-project/pull/67106 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [clang][Modules] Move `ASTSourceDescriptor` into its own file (PR #67930)
https://github.com/davidstone updated https://github.com/llvm/llvm-project/pull/67930 >From 3cb09af262cf53cecb73e2da342a7891bc9fe853 Mon Sep 17 00:00:00 2001 From: David Stone Date: Sun, 1 Oct 2023 12:02:48 -0600 Subject: [PATCH] [clang][Modules] Move `ASTSourceDescriptor` into its own file --- .../include/clang/Basic/ASTSourceDescriptor.h | 52 +++ clang/include/clang/Basic/Module.h| 26 -- clang/lib/AST/ExternalASTSource.cpp | 2 +- clang/lib/Basic/ASTSourceDescriptor.cpp | 33 clang/lib/Basic/CMakeLists.txt| 1 + clang/lib/Basic/Module.cpp| 15 -- clang/lib/CodeGen/CGDebugInfo.h | 3 +- clang/lib/Serialization/ASTReader.cpp | 1 + .../Plugins/ExpressionParser/Clang/ASTUtils.h | 8 ++- .../Clang/ClangExternalASTSourceCallbacks.cpp | 1 + .../Clang/ClangExternalASTSourceCallbacks.h | 8 ++- 11 files changed, 105 insertions(+), 45 deletions(-) create mode 100644 clang/include/clang/Basic/ASTSourceDescriptor.h create mode 100644 clang/lib/Basic/ASTSourceDescriptor.cpp diff --git a/clang/include/clang/Basic/ASTSourceDescriptor.h b/clang/include/clang/Basic/ASTSourceDescriptor.h new file mode 100644 index 000..175e0551db76562 --- /dev/null +++ b/clang/include/clang/Basic/ASTSourceDescriptor.h @@ -0,0 +1,52 @@ +//===- ASTSourceDescriptor.h -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===--===// +// +/// \file +/// Defines the clang::ASTSourceDescriptor class, which abstracts clang modules +/// and precompiled header files +// +//===--===// + +#ifndef LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H +#define LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H + +#include "clang/Basic/Module.h" +#include "llvm/ADT/StringRef.h" +#include +#include + +namespace clang { + +/// Abstracts clang modules and precompiled header files and holds +/// everything needed to generate debug info for an imported module +/// or PCH. +class ASTSourceDescriptor { + StringRef PCHModuleName; + StringRef Path; + StringRef ASTFile; + ASTFileSignature Signature; + Module *ClangModule = nullptr; + +public: + ASTSourceDescriptor() = default; + ASTSourceDescriptor(StringRef Name, StringRef Path, StringRef ASTFile, + ASTFileSignature Signature) + : PCHModuleName(std::move(Name)), Path(std::move(Path)), +ASTFile(std::move(ASTFile)), Signature(Signature) {} + ASTSourceDescriptor(Module &M); + + std::string getModuleName() const; + StringRef getPath() const { return Path; } + StringRef getASTFile() const { return ASTFile; } + ASTFileSignature getSignature() const { return Signature; } + Module *getModuleOrNull() const { return ClangModule; } +}; + +} // namespace clang + +#endif // LLVM_CLANG_BASIC_ASTSOURCEDESCRIPTOR_H diff --git a/clang/include/clang/Basic/Module.h b/clang/include/clang/Basic/Module.h index 676fd372493a3aa..60381472bbd4e59 100644 --- a/clang/include/clang/Basic/Module.h +++ b/clang/include/clang/Basic/Module.h @@ -850,32 +850,6 @@ class VisibleModuleSet { unsigned Generation = 0; }; -/// Abstracts clang modules and precompiled header files and holds -/// everything needed to generate debug info for an imported module -/// or PCH. -class ASTSourceDescriptor { - StringRef PCHModuleName; - StringRef Path; - StringRef ASTFile; - ASTFileSignature Signature; - Module *ClangModule = nullptr; - -public: - ASTSourceDescriptor() = default; - ASTSourceDescriptor(StringRef Name, StringRef Path, StringRef ASTFile, - ASTFileSignature Signature) - : PCHModuleName(std::move(Name)), Path(std::move(Path)), -ASTFile(std::move(ASTFile)), Signature(Signature) {} - ASTSourceDescriptor(Module &M); - - std::string getModuleName() const; - StringRef getPath() const { return Path; } - StringRef getASTFile() const { return ASTFile; } - ASTFileSignature getSignature() const { return Signature; } - Module *getModuleOrNull() const { return ClangModule; } -}; - - } // namespace clang #endif // LLVM_CLANG_BASIC_MODULE_H diff --git a/clang/lib/AST/ExternalASTSource.cpp b/clang/lib/AST/ExternalASTSource.cpp index 090ef02aa4224d6..00bc6b4b919abf7 100644 --- a/clang/lib/AST/ExternalASTSource.cpp +++ b/clang/lib/AST/ExternalASTSource.cpp @@ -15,10 +15,10 @@ #include "clang/AST/ExternalASTSource.h" #include "clang/AST/ASTContext.h" #include "clang/AST/DeclarationName.h" +#include "clang/Basic/ASTSourceDescriptor.h" #include "clang/Basic/FileManager.h" #include "clang/Basic/IdentifierTable.h" #include "clang/Basic/LLVM.h" -#include "clang/Basic/Module.h" #include "clang/B
[Lldb-commits] [lldb] [lldb] Fix --persistent-result description (PR #68128)
https://github.com/JDevlieghere approved this pull request. https://github.com/llvm/llvm-project/pull/68128 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] add stop-at-user-entry option to process launch (PR #67019)
=?utf-8?q?José?= L. Junior , =?utf-8?q?José?= L. Junior Message-ID: In-Reply-To: https://github.com/JDevlieghere edited https://github.com/llvm/llvm-project/pull/67019 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] add stop-at-user-entry option to process launch (PR #67019)
=?utf-8?q?José?= L. Junior , =?utf-8?q?José?= L. Junior Message-ID: In-Reply-To: @@ -95,21 +95,24 @@ class Language : public PluginInterface { class EitherTypeScavenger : public TypeScavenger { public: EitherTypeScavenger() : TypeScavenger() { - for (std::shared_ptr scavenger : { std::shared_ptr(new ScavengerTypes())... }) { + for (std::shared_ptr scavenger : + {std::shared_ptr(new ScavengerTypes())...}) { JDevlieghere wrote: Can this use `make_shared`? https://github.com/llvm/llvm-project/pull/67019 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] add stop-at-user-entry option to process launch (PR #67019)
=?utf-8?q?Jos=C3=A9?= L. Junior , =?utf-8?q?Jos=C3=A9?= L. Junior Message-ID: In-Reply-To: https://github.com/JDevlieghere requested changes to this pull request. https://github.com/llvm/llvm-project/pull/67019 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] add stop-at-user-entry option to process launch (PR #67019)
=?utf-8?q?José?= L. Junior , =?utf-8?q?José?= L. Junior Message-ID: In-Reply-To: @@ -335,6 +335,48 @@ BreakpointSP Target::GetBreakpointByID(break_id_t break_id) { return bp_sp; } +lldb::BreakpointSP lldb_private::Target::CreateBreakpointAtUserEntry() { + TargetSP target_sp = shared_from_this(); + Status error; + ModuleSP main_module_sp = target_sp->GetExecutableModule(); + FileSpecList shared_lib_filter; + shared_lib_filter.Append(main_module_sp->GetFileSpec()); + llvm::SetVector, + std::unordered_set> + entryPointNamesSet; + for (LanguageType lang_type : Language::GetSupportedLanguages()) { +Language *lang = Language::FindPlugin(lang_type); +if (!lang) { + error.SetErrorString("Language not found\n"); JDevlieghere wrote: The `error` is a local variable which nobody is reading. Should this be an out parameter? https://github.com/llvm/llvm-project/pull/67019 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] add stop-at-user-entry option to process launch (PR #67019)
=?utf-8?q?José?= L. Junior , =?utf-8?q?José?= L. Junior Message-ID: In-Reply-To: @@ -38,7 +41,13 @@ Status CommandOptionsProcessLaunch::SetOptionValue( case 's': // Stop at program entry point launch_info.GetFlags().Set(eLaunchFlagStopAtEntry); break; - + case 'm': // Stop at user entry point + { +TargetSP target_sp = +execution_context ? execution_context->GetTargetSP() : TargetSP(); JDevlieghere wrote: There's another option below (`'a'`) that also needs the `target_sp`. Let's hoist this out of the switch and reuse it in all the options. https://github.com/llvm/llvm-project/pull/67019 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] add stop-at-user-entry option to process launch (PR #67019)
=?utf-8?q?José?= L. Junior , =?utf-8?q?José?= L. Junior Message-ID: In-Reply-To: @@ -95,21 +95,24 @@ class Language : public PluginInterface { class EitherTypeScavenger : public TypeScavenger { public: EitherTypeScavenger() : TypeScavenger() { - for (std::shared_ptr scavenger : { std::shared_ptr(new ScavengerTypes())... }) { + for (std::shared_ptr scavenger : + {std::shared_ptr(new ScavengerTypes())...}) { medismailben wrote: FWIW, these changes were not introduced by @junior-jl, they're probably the result of running `clang-format` on the whole file. https://github.com/llvm/llvm-project/pull/67019 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] dd76375 - [lldb][NFCI] Apply IndexEntry to DWARFUnitHeader outside of extraction
Author: Alex Langford Date: 2023-10-03T10:27:18-07:00 New Revision: dd76375c80098be4d08b7e02290e39a8c1d00ab1 URL: https://github.com/llvm/llvm-project/commit/dd76375c80098be4d08b7e02290e39a8c1d00ab1 DIFF: https://github.com/llvm/llvm-project/commit/dd76375c80098be4d08b7e02290e39a8c1d00ab1.diff LOG: [lldb][NFCI] Apply IndexEntry to DWARFUnitHeader outside of extraction I plan on replacing LLDB's DWARFUnitHeader implementation with LLVM's. LLVM's DWARFUnitHeader::extract applies the DWARFUnitIndex::Entry to a given DWARFUnitHeader outside of the extraction because the index entry is only relevant to one place where we may parse DWARFUnitHeaders (specifically when we're creating a DWARFUnit in a DWO context). To ease the transition, I've reshaped LLDB's implementation to look closer to LLVM's. Reviewed By: aprantl, fdeazeve Differential Revision: https://reviews.llvm.org/D151919 Added: Modified: lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h Removed: diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp index 45e37b42f5e9566..b51cf04c7b724e5 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp @@ -877,11 +877,37 @@ const DWARFDebugAranges &DWARFUnit::GetFunctionAranges() { return *m_func_aranges_up; } -llvm::Expected -DWARFUnitHeader::extract(const DWARFDataExtractor &data, - DIERef::Section section, - lldb_private::DWARFContext &context, - lldb::offset_t *offset_ptr) { +llvm::Error DWARFUnitHeader::ApplyIndexEntry( +const llvm::DWARFUnitIndex::Entry *index_entry) { + // We should only be calling this function when the index entry is not set and + // we have a valid one to set it to. + assert(index_entry); + assert(!m_index_entry); + + if (m_abbr_offset) +return llvm::createStringError( +llvm::inconvertibleErrorCode(), +"Package unit with a non-zero abbreviation offset"); + + auto *unit_contrib = index_entry->getContribution(); + if (!unit_contrib || unit_contrib->getLength32() != m_length + 4) +return llvm::createStringError(llvm::inconvertibleErrorCode(), + "Inconsistent DWARF package unit index"); + + auto *abbr_entry = index_entry->getContribution(llvm::DW_SECT_ABBREV); + if (!abbr_entry) +return llvm::createStringError( +llvm::inconvertibleErrorCode(), +"DWARF package index missing abbreviation column"); + + m_abbr_offset = abbr_entry->getOffset(); + m_index_entry = index_entry; + return llvm::Error::success(); +} + +llvm::Expected DWARFUnitHeader::extract( +const DWARFDataExtractor &data, DIERef::Section section, +lldb_private::DWARFContext &context, lldb::offset_t *offset_ptr) { DWARFUnitHeader header; header.m_offset = *offset_ptr; header.m_length = data.GetDWARFInitialLength(offset_ptr); @@ -905,42 +931,6 @@ DWARFUnitHeader::extract(const DWARFDataExtractor &data, header.m_type_offset = data.GetDWARFOffset(offset_ptr); } - if (context.isDwo()) { -const llvm::DWARFUnitIndex *Index; -if (header.IsTypeUnit()) { - Index = &context.GetAsLLVM().getTUIndex(); - if (*Index) -header.m_index_entry = Index->getFromHash(header.m_type_hash); -} else { - Index = &context.GetAsLLVM().getCUIndex(); - if (*Index && header.m_version >= 5 && header.m_dwo_id) -header.m_index_entry = Index->getFromHash(*header.m_dwo_id); -} -if (!header.m_index_entry) - header.m_index_entry = Index->getFromOffset(header.m_offset); - } - - if (header.m_index_entry) { -if (header.m_abbr_offset) { - return llvm::createStringError( - llvm::inconvertibleErrorCode(), - "Package unit with a non-zero abbreviation offset"); -} -auto *unit_contrib = header.m_index_entry->getContribution(); -if (!unit_contrib || unit_contrib->getLength32() != header.m_length + 4) { - return llvm::createStringError(llvm::inconvertibleErrorCode(), - "Inconsistent DWARF package unit index"); -} -auto *abbr_entry = -header.m_index_entry->getContribution(llvm::DW_SECT_ABBREV); -if (!abbr_entry) { - return llvm::createStringError( - llvm::inconvertibleErrorCode(), - "DWARF package index missing abbreviation column"); -} -header.m_abbr_offset = abbr_entry->getOffset(); - } - bool length_OK = data.ValidOffset(header.GetNextUnitOffset() - 1); bool version_OK = SymbolFileDWARF::SupportedVersion(header.m_version); bool addr_size_OK = (header.m_addr_size == 2) || (header.m_addr_size == 4) || @@ -970,11 +960,30 @@ DWARFUnit::extract(SymbolFileDWARF &dwarf, user_id_t uid,
[Lldb-commits] [PATCH] D151919: [lldb][NFCI] Apply IndexEntry to DWARFUnitHeader outside of extraction
This revision was automatically updated to reflect the committed changes. Closed by commit rGdd76375c8009: [lldb][NFCI] Apply IndexEntry to DWARFUnitHeader outside of extraction (authored by bulbazord). Changed prior to commit: https://reviews.llvm.org/D151919?vs=529769&id=557568#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151919/new/ https://reviews.llvm.org/D151919 Files: lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h === --- lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h +++ lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h @@ -76,6 +76,8 @@ } uint32_t GetNextUnitOffset() const { return m_offset + m_length + 4; } + llvm::Error ApplyIndexEntry(const llvm::DWARFUnitIndex::Entry *index_entry); + static llvm::Expected extract(const lldb_private::DWARFDataExtractor &data, DIERef::Section section, lldb_private::DWARFContext &dwarf_context, Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp === --- lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp @@ -877,11 +877,37 @@ return *m_func_aranges_up; } -llvm::Expected -DWARFUnitHeader::extract(const DWARFDataExtractor &data, - DIERef::Section section, - lldb_private::DWARFContext &context, - lldb::offset_t *offset_ptr) { +llvm::Error DWARFUnitHeader::ApplyIndexEntry( +const llvm::DWARFUnitIndex::Entry *index_entry) { + // We should only be calling this function when the index entry is not set and + // we have a valid one to set it to. + assert(index_entry); + assert(!m_index_entry); + + if (m_abbr_offset) +return llvm::createStringError( +llvm::inconvertibleErrorCode(), +"Package unit with a non-zero abbreviation offset"); + + auto *unit_contrib = index_entry->getContribution(); + if (!unit_contrib || unit_contrib->getLength32() != m_length + 4) +return llvm::createStringError(llvm::inconvertibleErrorCode(), + "Inconsistent DWARF package unit index"); + + auto *abbr_entry = index_entry->getContribution(llvm::DW_SECT_ABBREV); + if (!abbr_entry) +return llvm::createStringError( +llvm::inconvertibleErrorCode(), +"DWARF package index missing abbreviation column"); + + m_abbr_offset = abbr_entry->getOffset(); + m_index_entry = index_entry; + return llvm::Error::success(); +} + +llvm::Expected DWARFUnitHeader::extract( +const DWARFDataExtractor &data, DIERef::Section section, +lldb_private::DWARFContext &context, lldb::offset_t *offset_ptr) { DWARFUnitHeader header; header.m_offset = *offset_ptr; header.m_length = data.GetDWARFInitialLength(offset_ptr); @@ -905,42 +931,6 @@ header.m_type_offset = data.GetDWARFOffset(offset_ptr); } - if (context.isDwo()) { -const llvm::DWARFUnitIndex *Index; -if (header.IsTypeUnit()) { - Index = &context.GetAsLLVM().getTUIndex(); - if (*Index) -header.m_index_entry = Index->getFromHash(header.m_type_hash); -} else { - Index = &context.GetAsLLVM().getCUIndex(); - if (*Index && header.m_version >= 5 && header.m_dwo_id) -header.m_index_entry = Index->getFromHash(*header.m_dwo_id); -} -if (!header.m_index_entry) - header.m_index_entry = Index->getFromOffset(header.m_offset); - } - - if (header.m_index_entry) { -if (header.m_abbr_offset) { - return llvm::createStringError( - llvm::inconvertibleErrorCode(), - "Package unit with a non-zero abbreviation offset"); -} -auto *unit_contrib = header.m_index_entry->getContribution(); -if (!unit_contrib || unit_contrib->getLength32() != header.m_length + 4) { - return llvm::createStringError(llvm::inconvertibleErrorCode(), - "Inconsistent DWARF package unit index"); -} -auto *abbr_entry = -header.m_index_entry->getContribution(llvm::DW_SECT_ABBREV); -if (!abbr_entry) { - return llvm::createStringError( - llvm::inconvertibleErrorCode(), - "DWARF package index missing abbreviation column"); -} -header.m_abbr_offset = abbr_entry->getOffset(); - } - bool length_OK = data.ValidOffset(header.GetNextUnitOffset() - 1); bool version_OK = SymbolFileDWARF::SupportedVersion(header.m_version); bool addr_size_OK = (header.m_addr_size == 2) || (header.m_addr_size == 4) || @@ -970,11 +960,30 @@ DIERef::Section section, lldb::offset_t *offset_ptr) { assert(debug_info.ValidOffset(*offset_ptr)); - auto expected_header = DWARFUnitHeader::extract( - debug_info, section, dwarf.GetDWARFContext(), offset_ptr); + DW
[Lldb-commits] [lldb] 2da99a1 - [lldb] Expose Platform::Attach through the SB API (#68050)
Author: Jonas Devlieghere Date: 2023-10-03T10:34:00-07:00 New Revision: 2da99a11196246ab5f9787117f01b2251480607a URL: https://github.com/llvm/llvm-project/commit/2da99a11196246ab5f9787117f01b2251480607a DIFF: https://github.com/llvm/llvm-project/commit/2da99a11196246ab5f9787117f01b2251480607a.diff LOG: [lldb] Expose Platform::Attach through the SB API (#68050) Expose Platform::Attach through the SB API. rdar://116188959 Added: lldb/test/API/functionalities/gdb_remote_client/TestPlatformAttach.py Modified: lldb/include/lldb/API/SBAttachInfo.h lldb/include/lldb/API/SBDebugger.h lldb/include/lldb/API/SBPlatform.h lldb/include/lldb/API/SBProcess.h lldb/packages/Python/lldbsuite/test/gdbclientutils.py lldb/source/API/SBPlatform.cpp Removed: diff --git a/lldb/include/lldb/API/SBAttachInfo.h b/lldb/include/lldb/API/SBAttachInfo.h index ea1145e625856f0..c18655fee77e0ac 100644 --- a/lldb/include/lldb/API/SBAttachInfo.h +++ b/lldb/include/lldb/API/SBAttachInfo.h @@ -197,6 +197,7 @@ class LLDB_API SBAttachInfo { protected: friend class SBTarget; + friend class SBPlatform; friend class lldb_private::ScriptInterpreter; diff --git a/lldb/include/lldb/API/SBDebugger.h b/lldb/include/lldb/API/SBDebugger.h index 29cf2c16fad4bd7..218113a7a391f35 100644 --- a/lldb/include/lldb/API/SBDebugger.h +++ b/lldb/include/lldb/API/SBDebugger.h @@ -487,6 +487,7 @@ class LLDB_API SBDebugger { friend class SBProcess; friend class SBSourceManager; friend class SBStructuredData; + friend class SBPlatform; friend class SBTarget; friend class SBTrace; diff --git a/lldb/include/lldb/API/SBPlatform.h b/lldb/include/lldb/API/SBPlatform.h index 6567277a5d161e7..e0acc7003a54bc3 100644 --- a/lldb/include/lldb/API/SBPlatform.h +++ b/lldb/include/lldb/API/SBPlatform.h @@ -10,6 +10,7 @@ #define LLDB_API_SBPLATFORM_H #include "lldb/API/SBDefines.h" +#include "lldb/API/SBProcess.h" #include @@ -18,6 +19,7 @@ struct PlatformShellCommand; namespace lldb { +class SBAttachInfo; class SBLaunchInfo; class LLDB_API SBPlatformConnectOptions { @@ -149,6 +151,9 @@ class LLDB_API SBPlatform { SBError Launch(SBLaunchInfo &launch_info); + SBProcess Attach(SBAttachInfo &attach_info, const SBDebugger &debugger, + SBTarget &target, SBError &error); + SBError Kill(const lldb::pid_t pid); SBError diff --git a/lldb/include/lldb/API/SBProcess.h b/lldb/include/lldb/API/SBProcess.h index 16527bb0291fcb4..8c1c81418f83d12 100644 --- a/lldb/include/lldb/API/SBProcess.h +++ b/lldb/include/lldb/API/SBProcess.h @@ -449,6 +449,7 @@ class LLDB_API SBProcess { friend class SBExecutionContext; friend class SBFunction; friend class SBModule; + friend class SBPlatform; friend class SBTarget; friend class SBThread; friend class SBValue; diff --git a/lldb/packages/Python/lldbsuite/test/gdbclientutils.py b/lldb/packages/Python/lldbsuite/test/gdbclientutils.py index a0104d36df8d903..1784487323ad6be 100644 --- a/lldb/packages/Python/lldbsuite/test/gdbclientutils.py +++ b/lldb/packages/Python/lldbsuite/test/gdbclientutils.py @@ -196,6 +196,9 @@ def respond(self, packet): return self.vFile(packet) if packet.startswith("vRun;"): return self.vRun(packet) +if packet.startswith("qLaunchGDBServer;"): +_, host = packet.partition(";")[2].split(":") +return self.qLaunchGDBServer(host) if packet.startswith("qLaunchSuccess"): return self.qLaunchSuccess() if packet.startswith("QEnvironment:"): @@ -329,6 +332,9 @@ def vFile(self, packet): def vRun(self, packet): return "" +def qLaunchGDBServer(self, host): +raise self.UnexpectedPacketException() + def qLaunchSuccess(self): return "" diff --git a/lldb/source/API/SBPlatform.cpp b/lldb/source/API/SBPlatform.cpp index f8300a5bab30e41..c31848fe04ea72c 100644 --- a/lldb/source/API/SBPlatform.cpp +++ b/lldb/source/API/SBPlatform.cpp @@ -7,12 +7,14 @@ //===--===// #include "lldb/API/SBPlatform.h" +#include "lldb/API/SBDebugger.h" #include "lldb/API/SBEnvironment.h" #include "lldb/API/SBError.h" #include "lldb/API/SBFileSpec.h" #include "lldb/API/SBLaunchInfo.h" #include "lldb/API/SBModuleSpec.h" #include "lldb/API/SBPlatform.h" +#include "lldb/API/SBTarget.h" #include "lldb/API/SBUnixSignals.h" #include "lldb/Host/File.h" #include "lldb/Target/Platform.h" @@ -574,6 +576,29 @@ SBError SBPlatform::Launch(SBLaunchInfo &launch_info) { }); } +SBProcess SBPlatform::Attach(SBAttachInfo &attach_info, + const SBDebugger &debugger, SBTarget &target, + SBError &error) { + LLDB_INSTRUMENT_VA(this, attach_info, debugger, target, error); + + if (Pla
[Lldb-commits] [lldb] [lldb] Expose Platform::Attach through the SB API (PR #68050)
https://github.com/JDevlieghere closed https://github.com/llvm/llvm-project/pull/68050 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] Implement data formatters for LibStdC++ std::variant (PR #68012)
jeffreytan81 wrote: Thanks for the heads-up. I have done some investigation. The test passes on my CentOS Linux and Macbook. It is unclear why it fails in this two bots. Unfortunately, I do not have the specific ubuntu machines to reproduce and logs do not provide enough clue. I will go a head and draft a fix to disable the failing test lines to unblock. > Hello, It looks like this broke 2 bots: lldb-aarch64-ubuntu : > https://lab.llvm.org/buildbot/#/builders/96/builds/46436 lldb-arm-ubuntu : > https://lab.llvm.org/buildbot/#/builders/17/builds/44011 Could you please > take a look ? https://github.com/llvm/llvm-project/pull/68012 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] add stop-at-user-entry option to process launch (PR #67019)
@@ -335,6 +335,48 @@ BreakpointSP Target::GetBreakpointByID(break_id_t break_id) { return bp_sp; } +lldb::BreakpointSP lldb_private::Target::CreateBreakpointAtUserEntry() { + TargetSP target_sp = shared_from_this(); + Status error; + ModuleSP main_module_sp = target_sp->GetExecutableModule(); + FileSpecList shared_lib_filter; + shared_lib_filter.Append(main_module_sp->GetFileSpec()); + llvm::SetVector, + std::unordered_set> + entryPointNamesSet; + for (LanguageType lang_type : Language::GetSupportedLanguages()) { +Language *lang = Language::FindPlugin(lang_type); +if (!lang) { + error.SetErrorString("Language not found\n"); junior-jl wrote: Oh, that's true. If I understood correctly, the method should be `lldb::BreakpointSP lldb_private::Target::CreateBreakpointAtUserEntry(Status &error)` and in `CommandOptionsProcessLaunch.cpp`, it should be called with `target_sp->CreateBreakpointAtUserEntry(error);`. Am I correct? https://github.com/llvm/llvm-project/pull/67019 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [mlir][OpenMP] Added translation for `omp.teams` to LLVM IR (PR #68042)
shraiysh wrote: > Will the wrapper function stay or be removed? I would like to get it removed, because that is unnecessary (I did not realize this earlier while submitting the patch). But because nobody is actively reviewing #67723, I do not want to delay progress for the construct. So, I will keep updating that PR with updates to testcases while I wait on reviews. The functions should not need any further changes there. https://github.com/llvm/llvm-project/pull/68042 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [mlir][OpenMP] Added translation for `omp.teams` to LLVM IR (PR #68042)
https://github.com/shraiysh updated https://github.com/llvm/llvm-project/pull/68042 >From c7c9e907d897ae667331761d8097ccb7852c5d93 Mon Sep 17 00:00:00 2001 From: Shraiysh Vaishay Date: Mon, 2 Oct 2023 16:43:13 -0500 Subject: [PATCH 1/2] [mlir][OpenMP] Added translation for `omp.teams` to LLVM IR This patch adds translation from `omp.teams` operation to LLVM IR using OpenMPIRBuilder. The clauses are not handled in this patch. --- .../OpenMP/OpenMPToLLVMIRTranslation.cpp | 21 +++ mlir/test/Target/LLVMIR/openmp-teams.mlir | 136 ++ 2 files changed, 157 insertions(+) create mode 100644 mlir/test/Target/LLVMIR/openmp-teams.mlir diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp index 8f7f1963b3e5a4f..b9643be40e13c01 100644 --- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp +++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp @@ -661,6 +661,24 @@ convertOmpSingle(omp::SingleOp &singleOp, llvm::IRBuilderBase &builder, return bodyGenStatus; } +// Convert an OpenMP Teams construct to LLVM IR using OpenMPIRBuilder +static LogicalResult convertOmpTeams(omp::TeamsOp op, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) { + using InsertPointTy = llvm::OpenMPIRBuilder::InsertPointTy; + LogicalResult bodyGenStatus = success(); + if(op.getNumTeamsLower() || op.getNumTeamsUpper() || op.getIfExpr() || op.getThreadLimit() || !op.getAllocatorsVars().empty() || op.getReductions()) { +return op.emitError("unhandled clauses for translation to LLVM IR"); + } + auto bodyCB = [&](InsertPointTy allocaIP, InsertPointTy codegenIP){ +LLVM::ModuleTranslation::SaveStack frame(moduleTranslation, allocaIP); +builder.restoreIP(codegenIP); +convertOmpOpRegions(op.getRegion(), "omp.teams.region", builder, moduleTranslation, bodyGenStatus); + }; + + llvm::OpenMPIRBuilder::LocationDescription ompLoc(builder); + builder.restoreIP(moduleTranslation.getOpenMPBuilder()->createTeams(ompLoc, bodyCB)); + return bodyGenStatus; +} + /// Converts an OpenMP task construct into LLVM IR using OpenMPIRBuilder. static LogicalResult convertOmpTaskOp(omp::TaskOp taskOp, llvm::IRBuilderBase &builder, @@ -2406,6 +2424,9 @@ LogicalResult OpenMPDialectLLVMIRTranslationInterface::convertOperation( .Case([&](omp::SingleOp op) { return convertOmpSingle(op, builder, moduleTranslation); }) + .Case([&](omp::TeamsOp op) { +return convertOmpTeams(op, builder, moduleTranslation); + }) .Case([&](omp::TaskOp op) { return convertOmpTaskOp(op, builder, moduleTranslation); }) diff --git a/mlir/test/Target/LLVMIR/openmp-teams.mlir b/mlir/test/Target/LLVMIR/openmp-teams.mlir new file mode 100644 index 000..c9005fca94a7c20 --- /dev/null +++ b/mlir/test/Target/LLVMIR/openmp-teams.mlir @@ -0,0 +1,136 @@ +// RUN: mlir-translate -mlir-to-llvmir -split-input-file %s | FileCheck %s + +llvm.func @foo() + +// CHECK-LABEL: @omp_teams_simple +// CHECK: call void {{.*}} @__kmpc_fork_teams(ptr @{{.+}}, i32 0, ptr [[wrapperfn:.+]]) +// CHECK: ret void +llvm.func @omp_teams_simple() { +omp.teams { +llvm.call @foo() : () -> () +omp.terminator +} +llvm.return +} + +// CHECK: define internal void @[[outlinedfn:.+]]() +// CHECK: call void @foo() +// CHECK: ret void +// CHECK: define void [[wrapperfn]](ptr %[[global_tid:.+]], ptr %[[bound_tid:.+]]) +// CHECK: call void @[[outlinedfn]] +// CHECK: ret void + +// - + +llvm.func @foo(i32) -> () + +// CHECK-LABEL: @omp_teams_shared_simple +// CHECK-SAME: (i32 [[arg0:%.+]]) +// CHECK: [[structArg:%.+]] = alloca { i32 } +// CHECK: br +// CHECK: [[gep:%.+]] = getelementptr { i32 }, ptr [[structArg]], i32 0, i32 0 +// CHECK: store i32 [[arg0]], ptr [[gep]] +// CHECK: call void {{.+}} @__kmpc_fork_teams(ptr @{{.+}}, i32 1, ptr [[wrapperfn:.+]], ptr [[structArg]]) +// CHECK: ret void +llvm.func @omp_teams_shared_simple(%arg0: i32) { +omp.teams { +llvm.call @foo(%arg0) : (i32) -> () +omp.terminator +} +llvm.return +} + +// CHECK: define internal void [[outlinedfn:@.+]](ptr [[structArg:%.+]]) +// CHECK: [[gep:%.+]] = getelementptr { i32 }, ptr [[structArg]], i32 0, i32 0 +// CHECK: [[loadgep:%.+]] = load i32, ptr [[gep]] +// CHECK: call void @foo(i32 [[loadgep]]) +// CHECK: ret void +// CHECK: define void [[wrapperfn]](ptr [[global_tid:.+]], ptr [[bound_tid:.+]], ptr [[structArg:.+]]) +// CHECK: call void [[outlinedfn]](ptr [[structArg]]) +// CHECK: ret void + +// - + +llvm.func @my_alloca_fn() -> !llvm.ptr +llvm.func @foo(i32, f32, !llvm.ptr, f128, !llvm.ptr, i32) -> () +llvm.func @bar() + +// CHECK-LABEL: @omp_teams_branching_shared +// CHECK-SAME: (i1 [[condition:%.+]], i32 [[arg0:%.+]], float [[arg1:%.+]], ptr [[arg2:%.+]], fp128 [[arg3:%.+]]) + +// Che
[Lldb-commits] [lldb] Fix std::variant test failure on certain buildbot (PR #68139)
https://github.com/jeffreytan81 created https://github.com/llvm/llvm-project/pull/68139 https://github.com/llvm/llvm-project/pull/68012 works on my CentOS Linux and Macbook but seems to fail for certain build bots. The error log complains "No Value" check failure for `std::variant` but not very actionable without a reproduce. To unblock the build bots, I am commenting out the "No Value" checks. >From 115c0f1dd53a06eac4bad9d651836d698b8cad69 Mon Sep 17 00:00:00 2001 From: jeffreytan81 Date: Tue, 3 Oct 2023 11:03:59 -0700 Subject: [PATCH] Fix std::variant test failure on certain buildbot --- .../libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py| 4 1 file changed, 4 insertions(+) diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py index 7a433fea5feca23..96a9c8d30c45b00 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py @@ -60,6 +60,9 @@ def test_with_run_command(self): "frame variable v3", substrs=["v3 = Active Type = char {", "Value = 'A'", "}"], ) +""" +TODO: temporarily disable No Value tests as they seem to fail on ubuntu/debian +bots. Pending reproduce and investigation. self.expect("frame variable v_no_value", substrs=["v_no_value = No Value"]) @@ -67,3 +70,4 @@ def test_with_run_command(self): "frame variable v_many_types_no_value", substrs=["v_many_types_no_value = No Value"], ) +""" ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] Fix std::variant test failure on certain buildbot (PR #68139)
https://github.com/jeffreytan81 ready_for_review https://github.com/llvm/llvm-project/pull/68139 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] Fix std::variant test failure on certain buildbot (PR #68139)
llvmbot wrote: @llvm/pr-subscribers-lldb Changes https://github.com/llvm/llvm-project/pull/68012 works on my CentOS Linux and Macbook but seems to fail for certain build bots. The error log complains "No Value" check failure for `std::variant` but not very actionable without a reproduce. To unblock the build bots, I am commenting out the "No Value" checks. --- Full diff: https://github.com/llvm/llvm-project/pull/68139.diff 1 Files Affected: - (modified) lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py (+4) ``diff diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py index 7a433fea5feca23..96a9c8d30c45b00 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py @@ -60,6 +60,9 @@ def test_with_run_command(self): "frame variable v3", substrs=["v3 = Active Type = char {", "Value = 'A'", "}"], ) +""" +TODO: temporarily disable No Value tests as they seem to fail on ubuntu/debian +bots. Pending reproduce and investigation. self.expect("frame variable v_no_value", substrs=["v_no_value = No Value"]) @@ -67,3 +70,4 @@ def test_with_run_command(self): "frame variable v_many_types_no_value", substrs=["v_many_types_no_value = No Value"], ) +""" `` https://github.com/llvm/llvm-project/pull/68139 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [AMDGPU] Add another SIFoldOperands instance after shrink (PR #67878)
rampitec wrote: > > I've just tested this on 1 graphics shaders and it seems to make no > > difference at all. I tried gfx900 and gfx1100. Can anyone else from the > > graphics team confirm this? > > I can confirm no difference on gfx1102 gfx11 is the same as gfx10, it just bails because of the VOP3 literal support. This is strange for gfx9. Do these shaders use -O2 or -O3? https://github.com/llvm/llvm-project/pull/67878 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][FreeBSD] Add dynamic loader handle class for FreeBSD Kernel (PR #67106)
https://github.com/emaste closed https://github.com/llvm/llvm-project/pull/67106 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] b3cc480 - [lldb][FreeBSD] Add dynamic loader handle class for FreeBSD Kernel (#67106)
Author: aokblast Date: 2023-10-03T14:16:32-04:00 New Revision: b3cc4804d45d6b612ac9b3cc47ebbb0da44ebc60 URL: https://github.com/llvm/llvm-project/commit/b3cc4804d45d6b612ac9b3cc47ebbb0da44ebc60 DIFF: https://github.com/llvm/llvm-project/commit/b3cc4804d45d6b612ac9b3cc47ebbb0da44ebc60.diff LOG: [lldb][FreeBSD] Add dynamic loader handle class for FreeBSD Kernel (#67106) The implemtation support parsing kernel module for FreeBSD Kernel and has been test on x86-64 and arm64. In summary, this class parse the linked list resides in the kernel memory that record all kernel module and load the debug symbol file to facilitate debug process Added: lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/CMakeLists.txt lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/DynamicLoaderFreeBSDKernel.cpp lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/DynamicLoaderFreeBSDKernel.h Modified: lldb/source/Plugins/DynamicLoader/CMakeLists.txt lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.cpp Removed: diff --git a/lldb/source/Plugins/DynamicLoader/CMakeLists.txt b/lldb/source/Plugins/DynamicLoader/CMakeLists.txt index f357fea02efbe68..30607159acdc088 100644 --- a/lldb/source/Plugins/DynamicLoader/CMakeLists.txt +++ b/lldb/source/Plugins/DynamicLoader/CMakeLists.txt @@ -1,4 +1,5 @@ add_subdirectory(Darwin-Kernel) +add_subdirectory(FreeBSD-Kernel) add_subdirectory(MacOSX-DYLD) add_subdirectory(POSIX-DYLD) add_subdirectory(Static) diff --git a/lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/CMakeLists.txt b/lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/CMakeLists.txt new file mode 100644 index 000..76daf0a327cf97b --- /dev/null +++ b/lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/CMakeLists.txt @@ -0,0 +1,13 @@ +add_lldb_library(lldbPluginDynamicLoaderFreeBSDKernel PLUGIN + DynamicLoaderFreeBSDKernel.cpp + + LINK_LIBS +lldbBreakpoint +lldbCore +lldbHost +lldbInterpreter +lldbSymbol +lldbTarget +lldbUtility +lldbPluginObjectFileELF + ) diff --git a/lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/DynamicLoaderFreeBSDKernel.cpp b/lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/DynamicLoaderFreeBSDKernel.cpp new file mode 100644 index 000..bbb83ff0a118400 --- /dev/null +++ b/lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/DynamicLoaderFreeBSDKernel.cpp @@ -0,0 +1,789 @@ +//===-- DynamicLoaderFreeBSDKernel.cpp +//--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===--===// + +#include "lldb/Breakpoint/StoppointCallbackContext.h" +#include "lldb/Core/Debugger.h" +#include "lldb/Core/Module.h" +#include "lldb/Core/ModuleSpec.h" +#include "lldb/Core/PluginManager.h" +#include "lldb/Core/Section.h" +#include "lldb/Host/StreamFile.h" +#include "lldb/Interpreter/OptionValueProperties.h" +#include "lldb/Symbol/LocateSymbolFile.h" +#include "lldb/Symbol/ObjectFile.h" +#include "lldb/Target/OperatingSystem.h" +#include "lldb/Target/RegisterContext.h" +#include "lldb/Target/StackFrame.h" +#include "lldb/Target/Target.h" +#include "lldb/Target/Thread.h" +#include "lldb/Target/ThreadPlanRunToAddress.h" +#include "lldb/Utility/DataBuffer.h" +#include "lldb/Utility/DataBufferHeap.h" +#include "lldb/Utility/LLDBLog.h" +#include "lldb/Utility/Log.h" +#include "lldb/Utility/State.h" + +#include "Plugins/ObjectFile/ELF/ObjectFileELF.h" + +#include "DynamicLoaderFreeBSDKernel.h" +#include +#include + +using namespace lldb; +using namespace lldb_private; + +LLDB_PLUGIN_DEFINE(DynamicLoaderFreeBSDKernel) + +void DynamicLoaderFreeBSDKernel::Initialize() { + PluginManager::RegisterPlugin(GetPluginNameStatic(), +GetPluginDescriptionStatic(), CreateInstance, +DebuggerInit); +} + +void DynamicLoaderFreeBSDKernel::Terminate() { + PluginManager::UnregisterPlugin(CreateInstance); +} + +llvm::StringRef DynamicLoaderFreeBSDKernel::GetPluginDescriptionStatic() { + return "The Dynamic Loader Plugin For FreeBSD Kernel"; +} + +static bool is_kernel(Module *module) { + if (!module) +return false; + + ObjectFile *objfile = module->GetObjectFile(); + if (!objfile) +return false; + if (objfile->GetType() != ObjectFile::eTypeExecutable) +return false; + if (objfile->GetStrata() != ObjectFile::eStrataUnknown && + objfile->GetStrata() != ObjectFile::eStrataKernel) +return false; + + return true; +} + +static bool is_kmod(Module *module) { + if (!module) +return false; + if (!module->GetObjectFile()) +return false; + ObjectFile *ob
[Lldb-commits] [lldb] [mlir][OpenMP] Added translation for `omp.teams` to LLVM IR (PR #68042)
https://github.com/shraiysh updated https://github.com/llvm/llvm-project/pull/68042 >From c7c9e907d897ae667331761d8097ccb7852c5d93 Mon Sep 17 00:00:00 2001 From: Shraiysh Vaishay Date: Mon, 2 Oct 2023 16:43:13 -0500 Subject: [PATCH 1/3] [mlir][OpenMP] Added translation for `omp.teams` to LLVM IR This patch adds translation from `omp.teams` operation to LLVM IR using OpenMPIRBuilder. The clauses are not handled in this patch. --- .../OpenMP/OpenMPToLLVMIRTranslation.cpp | 21 +++ mlir/test/Target/LLVMIR/openmp-teams.mlir | 136 ++ 2 files changed, 157 insertions(+) create mode 100644 mlir/test/Target/LLVMIR/openmp-teams.mlir diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp index 8f7f1963b3e5a4f..b9643be40e13c01 100644 --- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp +++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp @@ -661,6 +661,24 @@ convertOmpSingle(omp::SingleOp &singleOp, llvm::IRBuilderBase &builder, return bodyGenStatus; } +// Convert an OpenMP Teams construct to LLVM IR using OpenMPIRBuilder +static LogicalResult convertOmpTeams(omp::TeamsOp op, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) { + using InsertPointTy = llvm::OpenMPIRBuilder::InsertPointTy; + LogicalResult bodyGenStatus = success(); + if(op.getNumTeamsLower() || op.getNumTeamsUpper() || op.getIfExpr() || op.getThreadLimit() || !op.getAllocatorsVars().empty() || op.getReductions()) { +return op.emitError("unhandled clauses for translation to LLVM IR"); + } + auto bodyCB = [&](InsertPointTy allocaIP, InsertPointTy codegenIP){ +LLVM::ModuleTranslation::SaveStack frame(moduleTranslation, allocaIP); +builder.restoreIP(codegenIP); +convertOmpOpRegions(op.getRegion(), "omp.teams.region", builder, moduleTranslation, bodyGenStatus); + }; + + llvm::OpenMPIRBuilder::LocationDescription ompLoc(builder); + builder.restoreIP(moduleTranslation.getOpenMPBuilder()->createTeams(ompLoc, bodyCB)); + return bodyGenStatus; +} + /// Converts an OpenMP task construct into LLVM IR using OpenMPIRBuilder. static LogicalResult convertOmpTaskOp(omp::TaskOp taskOp, llvm::IRBuilderBase &builder, @@ -2406,6 +2424,9 @@ LogicalResult OpenMPDialectLLVMIRTranslationInterface::convertOperation( .Case([&](omp::SingleOp op) { return convertOmpSingle(op, builder, moduleTranslation); }) + .Case([&](omp::TeamsOp op) { +return convertOmpTeams(op, builder, moduleTranslation); + }) .Case([&](omp::TaskOp op) { return convertOmpTaskOp(op, builder, moduleTranslation); }) diff --git a/mlir/test/Target/LLVMIR/openmp-teams.mlir b/mlir/test/Target/LLVMIR/openmp-teams.mlir new file mode 100644 index 000..c9005fca94a7c20 --- /dev/null +++ b/mlir/test/Target/LLVMIR/openmp-teams.mlir @@ -0,0 +1,136 @@ +// RUN: mlir-translate -mlir-to-llvmir -split-input-file %s | FileCheck %s + +llvm.func @foo() + +// CHECK-LABEL: @omp_teams_simple +// CHECK: call void {{.*}} @__kmpc_fork_teams(ptr @{{.+}}, i32 0, ptr [[wrapperfn:.+]]) +// CHECK: ret void +llvm.func @omp_teams_simple() { +omp.teams { +llvm.call @foo() : () -> () +omp.terminator +} +llvm.return +} + +// CHECK: define internal void @[[outlinedfn:.+]]() +// CHECK: call void @foo() +// CHECK: ret void +// CHECK: define void [[wrapperfn]](ptr %[[global_tid:.+]], ptr %[[bound_tid:.+]]) +// CHECK: call void @[[outlinedfn]] +// CHECK: ret void + +// - + +llvm.func @foo(i32) -> () + +// CHECK-LABEL: @omp_teams_shared_simple +// CHECK-SAME: (i32 [[arg0:%.+]]) +// CHECK: [[structArg:%.+]] = alloca { i32 } +// CHECK: br +// CHECK: [[gep:%.+]] = getelementptr { i32 }, ptr [[structArg]], i32 0, i32 0 +// CHECK: store i32 [[arg0]], ptr [[gep]] +// CHECK: call void {{.+}} @__kmpc_fork_teams(ptr @{{.+}}, i32 1, ptr [[wrapperfn:.+]], ptr [[structArg]]) +// CHECK: ret void +llvm.func @omp_teams_shared_simple(%arg0: i32) { +omp.teams { +llvm.call @foo(%arg0) : (i32) -> () +omp.terminator +} +llvm.return +} + +// CHECK: define internal void [[outlinedfn:@.+]](ptr [[structArg:%.+]]) +// CHECK: [[gep:%.+]] = getelementptr { i32 }, ptr [[structArg]], i32 0, i32 0 +// CHECK: [[loadgep:%.+]] = load i32, ptr [[gep]] +// CHECK: call void @foo(i32 [[loadgep]]) +// CHECK: ret void +// CHECK: define void [[wrapperfn]](ptr [[global_tid:.+]], ptr [[bound_tid:.+]], ptr [[structArg:.+]]) +// CHECK: call void [[outlinedfn]](ptr [[structArg]]) +// CHECK: ret void + +// - + +llvm.func @my_alloca_fn() -> !llvm.ptr +llvm.func @foo(i32, f32, !llvm.ptr, f128, !llvm.ptr, i32) -> () +llvm.func @bar() + +// CHECK-LABEL: @omp_teams_branching_shared +// CHECK-SAME: (i1 [[condition:%.+]], i32 [[arg0:%.+]], float [[arg1:%.+]], ptr [[arg2:%.+]], fp128 [[arg3:%.+]]) + +// Che
[Lldb-commits] [lldb] [lldb] add stop-at-user-entry option to process launch (PR #67019)
https://github.com/junior-jl updated https://github.com/llvm/llvm-project/pull/67019 From 6de148adcdd1eedea7e23b4e267c6f42bb68bc45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20L=2E=20Junior?= Date: Tue, 3 Oct 2023 15:28:45 -0300 Subject: [PATCH] [lldb] add stop-at-user-entry option to process launch --- lldb/include/lldb/Target/Language.h | 4 ++ lldb/include/lldb/Target/Target.h | 2 + .../Commands/CommandOptionsProcessLaunch.cpp | 13 +- lldb/source/Commands/Options.td | 4 ++ .../Language/CPlusPlus/CPlusPlusLanguage.h| 2 + .../Plugins/Language/ObjC/ObjCLanguage.h | 2 + .../ObjCPlusPlus/ObjCPlusPlusLanguage.h | 2 + lldb/source/Target/Target.cpp | 42 +++ .../command-process-launch-user-entry.test| 8 9 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 lldb/test/Shell/Commands/command-process-launch-user-entry.test diff --git a/lldb/include/lldb/Target/Language.h b/lldb/include/lldb/Target/Language.h index a6b9ccaf31b3c42..d53089ba4a59974 100644 --- a/lldb/include/lldb/Target/Language.h +++ b/lldb/include/lldb/Target/Language.h @@ -160,6 +160,10 @@ class Language : public PluginInterface { virtual lldb::LanguageType GetLanguageType() const = 0; + // Implement this function to return the user-defined entry point name + // for the language + virtual llvm::StringRef GetUserEntryPointName() const { return {}; } + virtual bool IsTopLevelFunction(Function &function); virtual bool IsSourceFile(llvm::StringRef file_path) const = 0; diff --git a/lldb/include/lldb/Target/Target.h b/lldb/include/lldb/Target/Target.h index e9e531d0e12640a..82a343ee03fb516 100644 --- a/lldb/include/lldb/Target/Target.h +++ b/lldb/include/lldb/Target/Target.h @@ -654,6 +654,8 @@ class Target : public std::enable_shared_from_this, lldb::BreakpointSP GetBreakpointByID(lldb::break_id_t break_id); + lldb::BreakpointSP CreateBreakpointAtUserEntry(); + // Use this to create a file and line breakpoint to a given module or all // module it is nullptr lldb::BreakpointSP CreateBreakpoint(const FileSpecList *containingModules, diff --git a/lldb/source/Commands/CommandOptionsProcessLaunch.cpp b/lldb/source/Commands/CommandOptionsProcessLaunch.cpp index 85ad8ff5e07132c..3055e4ca45bd230 100644 --- a/lldb/source/Commands/CommandOptionsProcessLaunch.cpp +++ b/lldb/source/Commands/CommandOptionsProcessLaunch.cpp @@ -8,6 +8,7 @@ #include "CommandOptionsProcessLaunch.h" +#include "lldb/Core/Module.h" #include "lldb/Host/FileSystem.h" #include "lldb/Host/HostInfo.h" #include "lldb/Host/OptionParser.h" @@ -15,11 +16,13 @@ #include "lldb/Interpreter/CommandObject.h" #include "lldb/Interpreter/CommandOptionArgumentTable.h" #include "lldb/Interpreter/OptionArgParser.h" +#include "lldb/Symbol/ObjectFile.h" #include "lldb/Target/ExecutionContext.h" +#include "lldb/Target/Language.h" #include "lldb/Target/Platform.h" #include "lldb/Target/Target.h" - #include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/SetVector.h" using namespace llvm; using namespace lldb; @@ -38,7 +41,13 @@ Status CommandOptionsProcessLaunch::SetOptionValue( case 's': // Stop at program entry point launch_info.GetFlags().Set(eLaunchFlagStopAtEntry); break; - + case 'm': // Stop at user entry point + { +TargetSP target_sp = +execution_context ? execution_context->GetTargetSP() : TargetSP(); +target_sp->CreateBreakpointAtUserEntry(); +break; + } case 'i': // STDIN for read only { FileAction action; diff --git a/lldb/source/Commands/Options.td b/lldb/source/Commands/Options.td index 04830b8b990efae..dd4cf5c4dc043e7 100644 --- a/lldb/source/Commands/Options.td +++ b/lldb/source/Commands/Options.td @@ -675,6 +675,10 @@ let Command = "platform shell" in { let Command = "process launch" in { def process_launch_stop_at_entry : Option<"stop-at-entry", "s">, Desc<"Stop at the entry point of the program when launching a process.">; + def process_launch_stop_at_user_entry : Option<"stop-at-user-entry", "m">, +Desc<"Stop at the user entry point when launching a process. For C based " +"languages this will be the 'main' function, but this might differ for " +"other languages.">; def process_launch_disable_aslr : Option<"disable-aslr", "A">, Arg<"Boolean">, Desc<"Set whether to disable address space layout randomization when launching a process.">; def process_launch_plugin : Option<"plugin", "P">, Arg<"Plugin">, diff --git a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h index 7712a60b7795951..623d481bf117f48 100644 --- a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h +++ b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h @@ -103,6 +103,8 @@ class CPlusPlusLanguage : public Language { return lldb::eLanguageTypeC_plus_plus; } + l
[Lldb-commits] [lldb] [lldb] add stop-at-user-entry option to process launch (PR #67019)
@@ -95,21 +95,24 @@ class Language : public PluginInterface { class EitherTypeScavenger : public TypeScavenger { public: EitherTypeScavenger() : TypeScavenger() { - for (std::shared_ptr scavenger : { std::shared_ptr(new ScavengerTypes())... }) { + for (std::shared_ptr scavenger : + {std::shared_ptr(new ScavengerTypes())...}) { junior-jl wrote: Yes, that was indeed the case. I believe I removed all the unrelated modifications from the PR in this last push. https://github.com/llvm/llvm-project/pull/67019 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [mlir][sparse] Print new syntax (PR #68130)
https://github.com/yinying-lisa-li updated https://github.com/llvm/llvm-project/pull/68130 >From 47b34bb327e1078678d3ba0c96ebce3fc89cf2ae Mon Sep 17 00:00:00 2001 From: Yinying Li Date: Tue, 3 Oct 2023 16:43:50 + Subject: [PATCH 1/2] [mlir][sparse] Print new syntax Printing changes from #sparse_tensor.encoding<{ lvlTypes = [ "compressed" ] }> to map = (d0) -> (d0 : compressed). Level properties, ELL and slice are also supported. --- .../mlir/Dialect/SparseTensor/IR/Enums.h | 20 +-- .../SparseTensor/IR/SparseTensorDialect.cpp | 64 --- mlir/test/Dialect/SparseTensor/codegen.mlir | 8 +- .../SparseTensor/roundtrip_encoding.mlir | 32 ++-- .../Dialect/SparseTensor/sparse_reshape.mlir | 8 +- .../SparseTensor/sparse_tensor_reshape.mlir | 2 +- .../python/dialects/sparse_tensor/dialect.py | 160 +- 7 files changed, 159 insertions(+), 135 deletions(-) diff --git a/mlir/include/mlir/Dialect/SparseTensor/IR/Enums.h b/mlir/include/mlir/Dialect/SparseTensor/IR/Enums.h index bc351ec52c0946b..2920ef79f461c6a 100644 --- a/mlir/include/mlir/Dialect/SparseTensor/IR/Enums.h +++ b/mlir/include/mlir/Dialect/SparseTensor/IR/Enums.h @@ -215,29 +215,29 @@ constexpr const char *toMLIRString(DimLevelType dlt) { case DimLevelType::Compressed: return "compressed"; case DimLevelType::CompressedNu: -return "compressed_nu"; +return "compressed(nonunique)"; case DimLevelType::CompressedNo: -return "compressed_no"; +return "compressed(nonordered)"; case DimLevelType::CompressedNuNo: -return "compressed_nu_no"; +return "compressed(nonunique, nonordered)"; case DimLevelType::Singleton: return "singleton"; case DimLevelType::SingletonNu: -return "singleton_nu"; +return "singleton(nonunique)"; case DimLevelType::SingletonNo: -return "singleton_no"; +return "singleton(nonordered)"; case DimLevelType::SingletonNuNo: -return "singleton_nu_no"; +return "singleton(nonunique, nonordered)"; case DimLevelType::LooseCompressed: return "loose_compressed"; case DimLevelType::LooseCompressedNu: -return "loose_compressed_nu"; +return "loose_compressed(nonunique)"; case DimLevelType::LooseCompressedNo: -return "loose_compressed_no"; +return "loose_compressed(nonordered)"; case DimLevelType::LooseCompressedNuNo: -return "loose_compressed_nu_no"; +return "loose_compressed(nonunique, nonordered)"; case DimLevelType::TwoOutOfFour: -return "compressed24"; +return "block2_4"; } return ""; } diff --git a/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp b/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp index 3897e1b9ea3597c..4c8dccdda6c0c7c 100644 --- a/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp +++ b/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp @@ -586,30 +586,56 @@ Attribute SparseTensorEncodingAttr::parse(AsmParser &parser, Type type) { } void SparseTensorEncodingAttr::print(AsmPrinter &printer) const { - // Print the struct-like storage in dictionary fashion. - printer << "<{ lvlTypes = [ "; - llvm::interleaveComma(getLvlTypes(), printer, [&](DimLevelType dlt) { -printer << "\"" << toMLIRString(dlt) << "\""; - }); - printer << " ]"; + auto map = static_cast(getDimToLvl()); + auto lvlTypes = getLvlTypes(); + // Empty affine map indicates identity map + if (!map) { +map = AffineMap::getMultiDimIdentityMap(getLvlTypes().size(), getContext()); + } + // Modified version of AsmPrinter::Impl::printAffineMap. + printer << "<{ map = "; + // Symbolic identifiers. + if (map.getNumSymbols() != 0) { +printer << '['; +for (unsigned i = 0; i < map.getNumSymbols() - 1; ++i) + printer << 's' << i << ", "; +if (map.getNumSymbols() >= 1) + printer << 's' << map.getNumSymbols() - 1; +printer << ']'; + } + // Dimension identifiers. + printer << '('; + auto dimSlices = getDimSlices(); + if (!dimSlices.empty()) { +for (unsigned i = 0; i < map.getNumDims() - 1; ++i) + printer << 'd' << i << " : " << dimSlices[i] << ", "; +if (map.getNumDims() >= 1) + printer << 'd' << map.getNumDims() - 1 << " : " + << dimSlices[map.getNumDims() - 1]; + } else { +for (unsigned i = 0; i < map.getNumDims() - 1; ++i) + printer << 'd' << i << ", "; +if (map.getNumDims() >= 1) + printer << 'd' << map.getNumDims() - 1; + } + printer << ')'; + // Level format and properties. + printer << " -> ("; + for (unsigned i = 0; i < map.getNumResults() - 1; ++i) { +map.getResult(i).print(printer.getStream()); +printer << " : " << toMLIRString(lvlTypes[i]) << ", "; + } + if (map.getNumResults() >= 1) { +auto lastIndex = map.getNumResults() - 1; +map.getResult(lastIndex).print(printer.getStream()); +printer << " : " << toMLIRString(lvlTypes[lastIndex]); + } + printer << ')'; // Print remaining members only for non-default values. - if
[Lldb-commits] [lldb] [mlir][sparse] Print new syntax (PR #68130)
https://github.com/yinying-lisa-li edited https://github.com/llvm/llvm-project/pull/68130 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] 3674a06 - [NFC][LLDB] Remove an unnecessary virtual destructor
Author: walter erquinigo Date: 2023-10-03T15:43:22-04:00 New Revision: 3674a0610a71becc54eab715905c4017d65471c4 URL: https://github.com/llvm/llvm-project/commit/3674a0610a71becc54eab715905c4017d65471c4 DIFF: https://github.com/llvm/llvm-project/commit/3674a0610a71becc54eab715905c4017d65471c4.diff LOG: [NFC][LLDB] Remove an unnecessary virtual destructor DWARFExpression has a virtual destructor but no other virtual methods, so we can safely remove the virtual keyword. Added: Modified: lldb/include/lldb/Expression/DWARFExpression.h Removed: diff --git a/lldb/include/lldb/Expression/DWARFExpression.h b/lldb/include/lldb/Expression/DWARFExpression.h index 380910ba0ea3d61..5e03f539a272cac 100644 --- a/lldb/include/lldb/Expression/DWARFExpression.h +++ b/lldb/include/lldb/Expression/DWARFExpression.h @@ -45,7 +45,7 @@ class DWARFExpression { DWARFExpression(const DataExtractor &data); /// Destructor - virtual ~DWARFExpression(); + ~DWARFExpression(); /// Return true if the location expression contains data bool IsValid() const; ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [LLDB][NFC] Create a namespace for the DWARF plugin (PR #68150)
https://github.com/walter-erquinigo created https://github.com/llvm/llvm-project/pull/68150 As a followup of https://github.com/llvm/llvm-project/pull/67851, I'm defining a new namespace `lldb_plugin::dwarf` for the classes in this Plugins/SymbolFile/DWARF folder. This change is very NFC and helped me with exporting the necessary symbols for my out-of-tree language plugin. The only two classes that I didn't change are DWARFDataExtractor, because that's being explicitly exported as part of lldb_private in `lldb-forward.h` , and the ClangDWARFASTParser, because that shouldn't be in the same namespace as the generic language-agnostic dwarf parser, but I'm okay with changing that. In any case, even if I didn't need this for my work, adding this namespace could be considered a good practice. >From c8886aa7bf978ef35a7bedd1dc34dda7d8f840b3 Mon Sep 17 00:00:00 2001 From: walter erquinigo Date: Mon, 2 Oct 2023 16:56:16 -0400 Subject: [PATCH] [LLDB][NFC] Create a namespace for the DWARF plugin As a followup of https://github.com/llvm/llvm-project/pull/67851, I'm defining a new namespace `lldb_plugin::dwarf` for the classes in this Plugins/SymbolFile/DWARF folder. This change is very NFC and helped me with exporting the necessary symbols for my out-of-tree language plugin. The only two classes that I didn't change are DWARFDataExtractor, because that's being explicitly exported as part of lldb_private in `lldb-forward.h` , and the ClangDWARFASTParser, because that shouldn't be in the same namespace as the generic language-agnostic dwarf parser, but I'm okay with changing that. In any case, even if I didn't need this for my work, adding this namespace could be considered a good practice. --- .../include/lldb/Expression/DWARFExpression.h | 24 ++- .../lldb/Expression/DWARFExpressionList.h | 9 +- lldb/include/lldb/Symbol/TypeSystem.h | 8 +- lldb/source/Expression/DWARFExpression.cpp| 1 + .../SymbolFile/DWARF/AppleDWARFIndex.cpp | 1 + .../SymbolFile/DWARF/AppleDWARFIndex.h| 35 ++-- .../Plugins/SymbolFile/DWARF/DIERef.cpp | 1 + lldb/source/Plugins/SymbolFile/DWARF/DIERef.h | 7 +- .../SymbolFile/DWARF/DWARFASTParser.cpp | 1 + .../Plugins/SymbolFile/DWARF/DWARFASTParser.h | 5 +- .../SymbolFile/DWARF/DWARFASTParserClang.cpp | 2 + .../SymbolFile/DWARF/DWARFASTParserClang.h| 158 ++ .../SymbolFile/DWARF/DWARFAttribute.cpp | 1 + .../Plugins/SymbolFile/DWARF/DWARFAttribute.h | 3 + .../Plugins/SymbolFile/DWARF/DWARFBaseDIE.cpp | 5 +- .../Plugins/SymbolFile/DWARF/DWARFBaseDIE.h | 2 + .../SymbolFile/DWARF/DWARFCompileUnit.cpp | 1 + .../SymbolFile/DWARF/DWARFCompileUnit.h | 2 + .../Plugins/SymbolFile/DWARF/DWARFContext.cpp | 1 + .../Plugins/SymbolFile/DWARF/DWARFContext.h | 48 +++--- .../Plugins/SymbolFile/DWARF/DWARFDIE.cpp | 1 + .../Plugins/SymbolFile/DWARF/DWARFDIE.h | 2 + .../SymbolFile/DWARF/DWARFDataExtractor.h | 2 +- .../SymbolFile/DWARF/DWARFDebugAbbrev.cpp | 1 + .../SymbolFile/DWARF/DWARFDebugAbbrev.h | 2 + .../SymbolFile/DWARF/DWARFDebugArangeSet.cpp | 1 + .../SymbolFile/DWARF/DWARFDebugArangeSet.h| 2 + .../SymbolFile/DWARF/DWARFDebugAranges.cpp| 1 + .../SymbolFile/DWARF/DWARFDebugAranges.h | 2 + .../SymbolFile/DWARF/DWARFDebugInfo.cpp | 4 +- .../Plugins/SymbolFile/DWARF/DWARFDebugInfo.h | 12 +- .../SymbolFile/DWARF/DWARFDebugInfoEntry.cpp | 1 + .../SymbolFile/DWARF/DWARFDebugInfoEntry.h| 2 + .../SymbolFile/DWARF/DWARFDebugMacro.cpp | 1 + .../SymbolFile/DWARF/DWARFDebugMacro.h| 6 +- .../SymbolFile/DWARF/DWARFDebugRanges.cpp | 1 + .../SymbolFile/DWARF/DWARFDebugRanges.h | 6 +- .../SymbolFile/DWARF/DWARFDeclContext.cpp | 1 + .../SymbolFile/DWARF/DWARFDeclContext.h | 2 + .../Plugins/SymbolFile/DWARF/DWARFDefines.cpp | 4 +- .../Plugins/SymbolFile/DWARF/DWARFDefines.h | 4 +- .../SymbolFile/DWARF/DWARFFormValue.cpp | 1 + .../Plugins/SymbolFile/DWARF/DWARFFormValue.h | 4 +- .../Plugins/SymbolFile/DWARF/DWARFIndex.cpp | 1 + .../Plugins/SymbolFile/DWARF/DWARFIndex.h | 43 ++--- .../SymbolFile/DWARF/DWARFTypeUnit.cpp| 1 + .../Plugins/SymbolFile/DWARF/DWARFTypeUnit.h | 2 + .../Plugins/SymbolFile/DWARF/DWARFUnit.cpp| 4 +- .../Plugins/SymbolFile/DWARF/DWARFUnit.h | 17 +- .../SymbolFile/DWARF/DebugNamesDWARFIndex.cpp | 3 +- .../SymbolFile/DWARF/DebugNamesDWARFIndex.h | 39 ++--- .../SymbolFile/DWARF/ManualDWARFIndex.cpp | 1 + .../SymbolFile/DWARF/ManualDWARFIndex.h | 37 ++-- .../Plugins/SymbolFile/DWARF/NameToDIE.cpp| 1 + .../Plugins/SymbolFile/DWARF/NameToDIE.h | 5 +- .../SymbolFile/DWARF/SymbolFileDWARF.cpp | 10 +- .../SymbolFile/DWARF/SymbolFileDWARF.h| 12 +- .../DWARF/SymbolFileDWARFDebugMap.cpp | 3 + .../DWARF/SymbolF
[Lldb-commits] [lldb] [LLDB][NFC] Create a namespace for the DWARF plugin (PR #68150)
https://github.com/walter-erquinigo ready_for_review https://github.com/llvm/llvm-project/pull/68150 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [LLDB][NFC] Create a namespace for the DWARF plugin (PR #68150)
https://github.com/walter-erquinigo updated https://github.com/llvm/llvm-project/pull/68150 >From 98c009c5f33b81d579fd11d11a660026f33836ae Mon Sep 17 00:00:00 2001 From: walter erquinigo Date: Mon, 2 Oct 2023 16:56:16 -0400 Subject: [PATCH] [LLDB][NFC] Create a namespace for the DWARF plugin As a followup of https://github.com/llvm/llvm-project/pull/67851, I'm defining a new namespace `lldb_plugin::dwarf` for the classes in this Plugins/SymbolFile/DWARF folder. This change is very NFC and helped me with exporting the necessary symbols for my out-of-tree language plugin. The only two classes that I didn't change are DWARFDataExtractor, because that's being explicitly exported as part of lldb_private in `lldb-forward.h` , and the ClangDWARFASTParser, because that shouldn't be in the same namespace as the generic language-agnostic dwarf parser, but I'm okay with changing that. In any case, even if I didn't need this for my work, adding this namespace could be considered a good practice. --- .../include/lldb/Expression/DWARFExpression.h | 24 ++- .../lldb/Expression/DWARFExpressionList.h | 9 +- lldb/include/lldb/Symbol/TypeSystem.h | 8 +- lldb/source/Expression/DWARFExpression.cpp| 1 + .../SymbolFile/DWARF/AppleDWARFIndex.cpp | 1 + .../SymbolFile/DWARF/AppleDWARFIndex.h| 35 ++-- .../Plugins/SymbolFile/DWARF/DIERef.cpp | 1 + lldb/source/Plugins/SymbolFile/DWARF/DIERef.h | 7 +- .../SymbolFile/DWARF/DWARFASTParser.cpp | 1 + .../Plugins/SymbolFile/DWARF/DWARFASTParser.h | 5 +- .../SymbolFile/DWARF/DWARFASTParserClang.cpp | 2 + .../SymbolFile/DWARF/DWARFASTParserClang.h| 158 ++ .../SymbolFile/DWARF/DWARFAttribute.cpp | 1 + .../Plugins/SymbolFile/DWARF/DWARFAttribute.h | 3 + .../Plugins/SymbolFile/DWARF/DWARFBaseDIE.cpp | 5 +- .../Plugins/SymbolFile/DWARF/DWARFBaseDIE.h | 2 + .../SymbolFile/DWARF/DWARFCompileUnit.cpp | 1 + .../SymbolFile/DWARF/DWARFCompileUnit.h | 4 +- .../Plugins/SymbolFile/DWARF/DWARFContext.cpp | 1 + .../Plugins/SymbolFile/DWARF/DWARFContext.h | 48 +++--- .../Plugins/SymbolFile/DWARF/DWARFDIE.cpp | 1 + .../Plugins/SymbolFile/DWARF/DWARFDIE.h | 2 + .../SymbolFile/DWARF/DWARFDataExtractor.h | 2 +- .../SymbolFile/DWARF/DWARFDebugArangeSet.cpp | 1 + .../SymbolFile/DWARF/DWARFDebugArangeSet.h| 2 + .../SymbolFile/DWARF/DWARFDebugAranges.cpp| 1 + .../SymbolFile/DWARF/DWARFDebugAranges.h | 2 + .../SymbolFile/DWARF/DWARFDebugInfo.cpp | 4 +- .../Plugins/SymbolFile/DWARF/DWARFDebugInfo.h | 12 +- .../SymbolFile/DWARF/DWARFDebugInfoEntry.cpp | 1 + .../SymbolFile/DWARF/DWARFDebugInfoEntry.h| 2 + .../SymbolFile/DWARF/DWARFDebugMacro.cpp | 1 + .../SymbolFile/DWARF/DWARFDebugMacro.h| 6 +- .../SymbolFile/DWARF/DWARFDebugRanges.cpp | 1 + .../SymbolFile/DWARF/DWARFDebugRanges.h | 6 +- .../SymbolFile/DWARF/DWARFDeclContext.cpp | 1 + .../SymbolFile/DWARF/DWARFDeclContext.h | 2 + .../Plugins/SymbolFile/DWARF/DWARFDefines.cpp | 4 +- .../Plugins/SymbolFile/DWARF/DWARFDefines.h | 4 +- .../SymbolFile/DWARF/DWARFFormValue.cpp | 1 + .../Plugins/SymbolFile/DWARF/DWARFFormValue.h | 4 +- .../Plugins/SymbolFile/DWARF/DWARFIndex.cpp | 1 + .../Plugins/SymbolFile/DWARF/DWARFIndex.h | 43 ++--- .../SymbolFile/DWARF/DWARFTypeUnit.cpp| 1 + .../Plugins/SymbolFile/DWARF/DWARFTypeUnit.h | 4 +- .../Plugins/SymbolFile/DWARF/DWARFUnit.cpp| 21 ++- .../Plugins/SymbolFile/DWARF/DWARFUnit.h | 17 +- .../SymbolFile/DWARF/DebugNamesDWARFIndex.cpp | 3 +- .../SymbolFile/DWARF/DebugNamesDWARFIndex.h | 39 ++--- .../SymbolFile/DWARF/ManualDWARFIndex.cpp | 1 + .../SymbolFile/DWARF/ManualDWARFIndex.h | 37 ++-- .../Plugins/SymbolFile/DWARF/NameToDIE.cpp| 1 + .../Plugins/SymbolFile/DWARF/NameToDIE.h | 5 +- .../SymbolFile/DWARF/SymbolFileDWARF.cpp | 10 +- .../SymbolFile/DWARF/SymbolFileDWARF.h| 12 +- .../DWARF/SymbolFileDWARFDebugMap.cpp | 3 + .../DWARF/SymbolFileDWARFDebugMap.h | 13 +- .../SymbolFile/DWARF/SymbolFileDWARFDwo.cpp | 1 + .../SymbolFile/DWARF/SymbolFileDWARFDwo.h | 9 +- .../SymbolFile/DWARF/UniqueDWARFASTType.cpp | 1 + .../SymbolFile/DWARF/UniqueDWARFASTType.h | 5 +- .../TypeSystem/Clang/TypeSystemClang.cpp | 1 + .../TypeSystem/Clang/TypeSystemClang.h| 2 +- 63 files changed, 364 insertions(+), 243 deletions(-) diff --git a/lldb/include/lldb/Expression/DWARFExpression.h b/lldb/include/lldb/Expression/DWARFExpression.h index 5e03f539a272cac..4ed3881eb513c99 100644 --- a/lldb/include/lldb/Expression/DWARFExpression.h +++ b/lldb/include/lldb/Expression/DWARFExpression.h @@ -18,7 +18,9 @@ #include "llvm/DebugInfo/DWARF/DWARFLocationExpression.h" #include +namespace lldb_plugin::dwarf { class DWARFU
[Lldb-commits] [lldb] [AMDGPU] Add another SIFoldOperands instance after shrink (PR #67878)
rampitec wrote: > I've just tested this on 1 graphics shaders and it seems to make no > difference at all. I tried gfx900 and gfx1100. Can anyone else from the > graphics team confirm this? It seems the most impact is on the pre-gfx9 targets, very similar to https://github.com/llvm/llvm-project/pull/68028 and for the same reason: there were no no-carry add/sub. The rest of the impact is when an add/sub is created late in the pipeline. https://github.com/llvm/llvm-project/pull/67878 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [LLDB][NFC] Create a namespace for the DWARF plugin (PR #68150)
https://github.com/walter-erquinigo updated https://github.com/llvm/llvm-project/pull/68150 >From 92dc652698d7de826e28ce1563fa804366bab5c0 Mon Sep 17 00:00:00 2001 From: walter erquinigo Date: Mon, 2 Oct 2023 16:56:16 -0400 Subject: [PATCH] [LLDB][NFC] Create a namespace for the DWARF plugin As a followup of https://github.com/llvm/llvm-project/pull/67851, I'm defining a new namespace `lldb_plugin::dwarf` for the classes in this Plugins/SymbolFile/DWARF folder. This change is very NFC and helped me with exporting the necessary symbols for my out-of-tree language plugin. The only two classes that I didn't change are DWARFDataExtractor, because that's being explicitly exported as part of lldb_private in `lldb-forward.h` , and the ClangDWARFASTParser, because that shouldn't be in the same namespace as the generic language-agnostic dwarf parser, but I'm okay with changing that. In any case, even if I didn't need this for my work, adding this namespace could be considered a good practice. --- .../include/lldb/Expression/DWARFExpression.h | 24 ++- .../lldb/Expression/DWARFExpressionList.h | 9 +- lldb/include/lldb/Symbol/TypeSystem.h | 8 +- lldb/source/Expression/DWARFExpression.cpp| 1 + .../SymbolFile/DWARF/AppleDWARFIndex.cpp | 1 + .../SymbolFile/DWARF/AppleDWARFIndex.h| 35 ++-- .../Plugins/SymbolFile/DWARF/DIERef.cpp | 1 + lldb/source/Plugins/SymbolFile/DWARF/DIERef.h | 7 +- .../SymbolFile/DWARF/DWARFASTParser.cpp | 1 + .../Plugins/SymbolFile/DWARF/DWARFASTParser.h | 5 +- .../SymbolFile/DWARF/DWARFASTParserClang.cpp | 2 + .../SymbolFile/DWARF/DWARFASTParserClang.h| 158 ++ .../SymbolFile/DWARF/DWARFAttribute.cpp | 1 + .../Plugins/SymbolFile/DWARF/DWARFAttribute.h | 3 + .../Plugins/SymbolFile/DWARF/DWARFBaseDIE.cpp | 5 +- .../Plugins/SymbolFile/DWARF/DWARFBaseDIE.h | 2 + .../SymbolFile/DWARF/DWARFCompileUnit.cpp | 1 + .../SymbolFile/DWARF/DWARFCompileUnit.h | 4 +- .../Plugins/SymbolFile/DWARF/DWARFContext.cpp | 1 + .../Plugins/SymbolFile/DWARF/DWARFContext.h | 48 +++--- .../Plugins/SymbolFile/DWARF/DWARFDIE.cpp | 1 + .../Plugins/SymbolFile/DWARF/DWARFDIE.h | 2 + .../SymbolFile/DWARF/DWARFDataExtractor.h | 2 +- .../SymbolFile/DWARF/DWARFDebugArangeSet.cpp | 1 + .../SymbolFile/DWARF/DWARFDebugArangeSet.h| 2 + .../SymbolFile/DWARF/DWARFDebugAranges.cpp| 1 + .../SymbolFile/DWARF/DWARFDebugAranges.h | 2 + .../SymbolFile/DWARF/DWARFDebugInfo.cpp | 4 +- .../Plugins/SymbolFile/DWARF/DWARFDebugInfo.h | 12 +- .../SymbolFile/DWARF/DWARFDebugInfoEntry.cpp | 1 + .../SymbolFile/DWARF/DWARFDebugInfoEntry.h| 2 + .../SymbolFile/DWARF/DWARFDebugMacro.cpp | 1 + .../SymbolFile/DWARF/DWARFDebugMacro.h| 6 +- .../SymbolFile/DWARF/DWARFDebugRanges.cpp | 1 + .../SymbolFile/DWARF/DWARFDebugRanges.h | 6 +- .../SymbolFile/DWARF/DWARFDeclContext.cpp | 1 + .../SymbolFile/DWARF/DWARFDeclContext.h | 2 + .../Plugins/SymbolFile/DWARF/DWARFDefines.cpp | 4 +- .../Plugins/SymbolFile/DWARF/DWARFDefines.h | 4 +- .../SymbolFile/DWARF/DWARFFormValue.cpp | 1 + .../Plugins/SymbolFile/DWARF/DWARFFormValue.h | 4 +- .../Plugins/SymbolFile/DWARF/DWARFIndex.cpp | 1 + .../Plugins/SymbolFile/DWARF/DWARFIndex.h | 43 ++--- .../SymbolFile/DWARF/DWARFTypeUnit.cpp| 1 + .../Plugins/SymbolFile/DWARF/DWARFTypeUnit.h | 4 +- .../Plugins/SymbolFile/DWARF/DWARFUnit.cpp| 28 ++-- .../Plugins/SymbolFile/DWARF/DWARFUnit.h | 17 +- .../SymbolFile/DWARF/DebugNamesDWARFIndex.cpp | 3 +- .../SymbolFile/DWARF/DebugNamesDWARFIndex.h | 39 ++--- .../SymbolFile/DWARF/ManualDWARFIndex.cpp | 1 + .../SymbolFile/DWARF/ManualDWARFIndex.h | 37 ++-- .../Plugins/SymbolFile/DWARF/NameToDIE.cpp| 1 + .../Plugins/SymbolFile/DWARF/NameToDIE.h | 5 +- .../SymbolFile/DWARF/SymbolFileDWARF.cpp | 10 +- .../SymbolFile/DWARF/SymbolFileDWARF.h| 20 ++- .../DWARF/SymbolFileDWARFDebugMap.cpp | 3 + .../DWARF/SymbolFileDWARFDebugMap.h | 13 +- .../SymbolFile/DWARF/SymbolFileDWARFDwo.cpp | 1 + .../SymbolFile/DWARF/SymbolFileDWARFDwo.h | 9 +- .../SymbolFile/DWARF/UniqueDWARFASTType.cpp | 1 + .../SymbolFile/DWARF/UniqueDWARFASTType.h | 5 +- .../TypeSystem/Clang/TypeSystemClang.cpp | 1 + .../TypeSystem/Clang/TypeSystemClang.h| 2 +- 63 files changed, 372 insertions(+), 250 deletions(-) diff --git a/lldb/include/lldb/Expression/DWARFExpression.h b/lldb/include/lldb/Expression/DWARFExpression.h index 5e03f539a272cac..4ed3881eb513c99 100644 --- a/lldb/include/lldb/Expression/DWARFExpression.h +++ b/lldb/include/lldb/Expression/DWARFExpression.h @@ -18,7 +18,9 @@ #include "llvm/DebugInfo/DWARF/DWARFLocationExpression.h" #include +namespace lldb_plugin::dwarf { class DWAR
[Lldb-commits] [lldb] [lldb] add stop-at-user-entry option to process launch (PR #67019)
@@ -335,6 +335,48 @@ BreakpointSP Target::GetBreakpointByID(break_id_t break_id) { return bp_sp; } +lldb::BreakpointSP lldb_private::Target::CreateBreakpointAtUserEntry() { + TargetSP target_sp = shared_from_this(); kastiglione wrote: Why is this necessary? https://github.com/llvm/llvm-project/pull/67019 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] add stop-at-user-entry option to process launch (PR #67019)
@@ -335,6 +335,48 @@ BreakpointSP Target::GetBreakpointByID(break_id_t break_id) { return bp_sp; } +lldb::BreakpointSP lldb_private::Target::CreateBreakpointAtUserEntry() { + TargetSP target_sp = shared_from_this(); + Status error; + ModuleSP main_module_sp = target_sp->GetExecutableModule(); + FileSpecList shared_lib_filter; + shared_lib_filter.Append(main_module_sp->GetFileSpec()); + llvm::SetVector, + std::unordered_set> + entryPointNamesSet; + for (LanguageType lang_type : Language::GetSupportedLanguages()) { +Language *lang = Language::FindPlugin(lang_type); +if (!lang) { + error.SetErrorString("Language not found\n"); kastiglione wrote: that's correct. https://github.com/llvm/llvm-project/pull/67019 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [AMDGPU] Add another SIFoldOperands instance after shrink (PR #67878)
rampitec wrote: I have measured compile time performance impact with timing check-llvm-codegen-amdgpu on the release build: ``` before the patch: 11.06s add folding:11.09s +0.2% remove folding from shrink: 11.02s -0.4% ``` In general the impact smaller than run to run variance, the numbers are median time of 5 runs. https://github.com/llvm/llvm-project/pull/67878 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] add stop-at-user-entry option to process launch (PR #67019)
@@ -335,6 +335,48 @@ BreakpointSP Target::GetBreakpointByID(break_id_t break_id) { return bp_sp; } +lldb::BreakpointSP lldb_private::Target::CreateBreakpointAtUserEntry() { + TargetSP target_sp = shared_from_this(); junior-jl wrote: I removed that line and the use of `target_sp`, hence, these lines also changed: ```cpp ModuleSP main_module_sp = GetExecutableModule(); BreakpointSP bp_sp = CreateBreakpoint(...) ``` It still works normally and pass the test. Thank you. https://github.com/llvm/llvm-project/pull/67019 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [mlir][sparse] Print new syntax (PR #68130)
@@ -533,7 +533,7 @@ func.func @sparse_compression(%tensor: tensor<8x8xf64, #CSR>, // CHECK: %[[A13:.*]]:4 = scf.for %[[A14:.*]] = %[[A11]] to %[[A7]] step %[[A12]] iter_args(%[[A15:.*]] = %[[A0]], %[[A16:.*]] = %[[A1]], %[[A17:.*]] = %[[A2]], %[[A18:.*]] = %[[A3]]) -> (memref, memref, memref, !sparse_tensor.storage_specifier // CHECK: %[[A19:.*]] = memref.load %[[A6]]{{\[}}%[[A14]]] : memref // CHECK: %[[A20:.*]] = memref.load %[[A4]]{{\[}}%[[A19]]] : memref -// CHECK: %[[A21:.*]]:4 = func.call @_insert_dense_compressed_no_8_8_f64_0_0(%[[A15]], %[[A16]], %[[A17]], %[[A18]], %[[A8]], %[[A19]], %[[A20]]) : (memref, memref, memref, !sparse_tensor.storage_specifier +// CHECK: %[[A21:.*]]:4 = func.call @"_insert_dense_compressed(nonordered)_8_8_f64_0_0"(%[[A15]], %[[A16]], %[[A17]], %[[A18]], %[[A8]], %[[A19]], %[[A20]]) : (memref, memref, memref, !sparse_tensor.storage_specifier aartbik wrote: here and elsewhere, let's use compressed(nonordered) in the printing of type, but not in the generation for methods names (replace ( ) with _ perhaps, so we keep valid C identifiiers) https://github.com/llvm/llvm-project/pull/68130 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] add stop-at-user-entry option to process launch (PR #67019)
https://github.com/junior-jl updated https://github.com/llvm/llvm-project/pull/67019 From 6de148adcdd1eedea7e23b4e267c6f42bb68bc45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20L=2E=20Junior?= Date: Tue, 3 Oct 2023 15:28:45 -0300 Subject: [PATCH 1/2] [lldb] add stop-at-user-entry option to process launch --- lldb/include/lldb/Target/Language.h | 4 ++ lldb/include/lldb/Target/Target.h | 2 + .../Commands/CommandOptionsProcessLaunch.cpp | 13 +- lldb/source/Commands/Options.td | 4 ++ .../Language/CPlusPlus/CPlusPlusLanguage.h| 2 + .../Plugins/Language/ObjC/ObjCLanguage.h | 2 + .../ObjCPlusPlus/ObjCPlusPlusLanguage.h | 2 + lldb/source/Target/Target.cpp | 42 +++ .../command-process-launch-user-entry.test| 8 9 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 lldb/test/Shell/Commands/command-process-launch-user-entry.test diff --git a/lldb/include/lldb/Target/Language.h b/lldb/include/lldb/Target/Language.h index a6b9ccaf31b3c42..d53089ba4a59974 100644 --- a/lldb/include/lldb/Target/Language.h +++ b/lldb/include/lldb/Target/Language.h @@ -160,6 +160,10 @@ class Language : public PluginInterface { virtual lldb::LanguageType GetLanguageType() const = 0; + // Implement this function to return the user-defined entry point name + // for the language + virtual llvm::StringRef GetUserEntryPointName() const { return {}; } + virtual bool IsTopLevelFunction(Function &function); virtual bool IsSourceFile(llvm::StringRef file_path) const = 0; diff --git a/lldb/include/lldb/Target/Target.h b/lldb/include/lldb/Target/Target.h index e9e531d0e12640a..82a343ee03fb516 100644 --- a/lldb/include/lldb/Target/Target.h +++ b/lldb/include/lldb/Target/Target.h @@ -654,6 +654,8 @@ class Target : public std::enable_shared_from_this, lldb::BreakpointSP GetBreakpointByID(lldb::break_id_t break_id); + lldb::BreakpointSP CreateBreakpointAtUserEntry(); + // Use this to create a file and line breakpoint to a given module or all // module it is nullptr lldb::BreakpointSP CreateBreakpoint(const FileSpecList *containingModules, diff --git a/lldb/source/Commands/CommandOptionsProcessLaunch.cpp b/lldb/source/Commands/CommandOptionsProcessLaunch.cpp index 85ad8ff5e07132c..3055e4ca45bd230 100644 --- a/lldb/source/Commands/CommandOptionsProcessLaunch.cpp +++ b/lldb/source/Commands/CommandOptionsProcessLaunch.cpp @@ -8,6 +8,7 @@ #include "CommandOptionsProcessLaunch.h" +#include "lldb/Core/Module.h" #include "lldb/Host/FileSystem.h" #include "lldb/Host/HostInfo.h" #include "lldb/Host/OptionParser.h" @@ -15,11 +16,13 @@ #include "lldb/Interpreter/CommandObject.h" #include "lldb/Interpreter/CommandOptionArgumentTable.h" #include "lldb/Interpreter/OptionArgParser.h" +#include "lldb/Symbol/ObjectFile.h" #include "lldb/Target/ExecutionContext.h" +#include "lldb/Target/Language.h" #include "lldb/Target/Platform.h" #include "lldb/Target/Target.h" - #include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/SetVector.h" using namespace llvm; using namespace lldb; @@ -38,7 +41,13 @@ Status CommandOptionsProcessLaunch::SetOptionValue( case 's': // Stop at program entry point launch_info.GetFlags().Set(eLaunchFlagStopAtEntry); break; - + case 'm': // Stop at user entry point + { +TargetSP target_sp = +execution_context ? execution_context->GetTargetSP() : TargetSP(); +target_sp->CreateBreakpointAtUserEntry(); +break; + } case 'i': // STDIN for read only { FileAction action; diff --git a/lldb/source/Commands/Options.td b/lldb/source/Commands/Options.td index 04830b8b990efae..dd4cf5c4dc043e7 100644 --- a/lldb/source/Commands/Options.td +++ b/lldb/source/Commands/Options.td @@ -675,6 +675,10 @@ let Command = "platform shell" in { let Command = "process launch" in { def process_launch_stop_at_entry : Option<"stop-at-entry", "s">, Desc<"Stop at the entry point of the program when launching a process.">; + def process_launch_stop_at_user_entry : Option<"stop-at-user-entry", "m">, +Desc<"Stop at the user entry point when launching a process. For C based " +"languages this will be the 'main' function, but this might differ for " +"other languages.">; def process_launch_disable_aslr : Option<"disable-aslr", "A">, Arg<"Boolean">, Desc<"Set whether to disable address space layout randomization when launching a process.">; def process_launch_plugin : Option<"plugin", "P">, Arg<"Plugin">, diff --git a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h index 7712a60b7795951..623d481bf117f48 100644 --- a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h +++ b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h @@ -103,6 +103,8 @@ class CPlusPlusLanguage : public Language { return lldb::eLanguageTypeC_plus_plus; }
[Lldb-commits] [lldb] [lldb] add stop-at-user-entry option to process launch (PR #67019)
@@ -335,6 +335,48 @@ BreakpointSP Target::GetBreakpointByID(break_id_t break_id) { return bp_sp; } +lldb::BreakpointSP lldb_private::Target::CreateBreakpointAtUserEntry() { + TargetSP target_sp = shared_from_this(); + Status error; + ModuleSP main_module_sp = target_sp->GetExecutableModule(); + FileSpecList shared_lib_filter; + shared_lib_filter.Append(main_module_sp->GetFileSpec()); + llvm::SetVector, + std::unordered_set> + entryPointNamesSet; + for (LanguageType lang_type : Language::GetSupportedLanguages()) { +Language *lang = Language::FindPlugin(lang_type); +if (!lang) { + error.SetErrorString("Language not found\n"); junior-jl wrote: Done ✅ https://github.com/llvm/llvm-project/pull/67019 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] add stop-at-user-entry option to process launch (PR #67019)
https://github.com/junior-jl edited https://github.com/llvm/llvm-project/pull/67019 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [mlir][OpenMP] Added translation for `omp.teams` to LLVM IR (PR #68042)
https://github.com/shraiysh closed https://github.com/llvm/llvm-project/pull/68042 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] Fix std::variant test failure on certain buildbot (PR #68139)
https://github.com/medismailben closed https://github.com/llvm/llvm-project/pull/68139 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] 40c1f5b - Fix std::variant test failure on certain buildbot (#68139)
Author: jeffreytan81 Date: 2023-10-03T15:37:41-07:00 New Revision: 40c1f5b2fb88b17c6ed6911466002824d1880871 URL: https://github.com/llvm/llvm-project/commit/40c1f5b2fb88b17c6ed6911466002824d1880871 DIFF: https://github.com/llvm/llvm-project/commit/40c1f5b2fb88b17c6ed6911466002824d1880871.diff LOG: Fix std::variant test failure on certain buildbot (#68139) https://github.com/llvm/llvm-project/pull/68012 works on my CentOS Linux and Macbook but seems to fail for certain build bots. The error log complains "No Value" check failure for `std::variant` but not very actionable without a reproduce. To unblock the build bots, I am commenting out the "No Value" checks. Co-authored-by: jeffreytan81 Added: Modified: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py Removed: diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py index 7a433fea5feca23..96a9c8d30c45b00 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/variant/TestDataFormatterLibStdcxxVariant.py @@ -60,6 +60,9 @@ def test_with_run_command(self): "frame variable v3", substrs=["v3 = Active Type = char {", "Value = 'A'", "}"], ) +""" +TODO: temporarily disable No Value tests as they seem to fail on ubuntu/debian +bots. Pending reproduce and investigation. self.expect("frame variable v_no_value", substrs=["v_no_value = No Value"]) @@ -67,3 +70,4 @@ def test_with_run_command(self): "frame variable v_many_types_no_value", substrs=["v_many_types_no_value = No Value"], ) +""" ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] add stop-at-user-entry option to process launch (PR #67019)
https://github.com/junior-jl edited https://github.com/llvm/llvm-project/pull/67019 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [OpenMPIRBuilder] Remove wrapper function in `createTask`, `createTeams` (PR #67723)
shraiysh wrote: Ping for review! https://github.com/llvm/llvm-project/pull/67723 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [mlir][sparse] Print new syntax (PR #68130)
https://github.com/yinying-lisa-li updated https://github.com/llvm/llvm-project/pull/68130 >From 47b34bb327e1078678d3ba0c96ebce3fc89cf2ae Mon Sep 17 00:00:00 2001 From: Yinying Li Date: Tue, 3 Oct 2023 16:43:50 + Subject: [PATCH 1/3] [mlir][sparse] Print new syntax Printing changes from #sparse_tensor.encoding<{ lvlTypes = [ "compressed" ] }> to map = (d0) -> (d0 : compressed). Level properties, ELL and slice are also supported. --- .../mlir/Dialect/SparseTensor/IR/Enums.h | 20 +-- .../SparseTensor/IR/SparseTensorDialect.cpp | 64 --- mlir/test/Dialect/SparseTensor/codegen.mlir | 8 +- .../SparseTensor/roundtrip_encoding.mlir | 32 ++-- .../Dialect/SparseTensor/sparse_reshape.mlir | 8 +- .../SparseTensor/sparse_tensor_reshape.mlir | 2 +- .../python/dialects/sparse_tensor/dialect.py | 160 +- 7 files changed, 159 insertions(+), 135 deletions(-) diff --git a/mlir/include/mlir/Dialect/SparseTensor/IR/Enums.h b/mlir/include/mlir/Dialect/SparseTensor/IR/Enums.h index bc351ec52c0946b..2920ef79f461c6a 100644 --- a/mlir/include/mlir/Dialect/SparseTensor/IR/Enums.h +++ b/mlir/include/mlir/Dialect/SparseTensor/IR/Enums.h @@ -215,29 +215,29 @@ constexpr const char *toMLIRString(DimLevelType dlt) { case DimLevelType::Compressed: return "compressed"; case DimLevelType::CompressedNu: -return "compressed_nu"; +return "compressed(nonunique)"; case DimLevelType::CompressedNo: -return "compressed_no"; +return "compressed(nonordered)"; case DimLevelType::CompressedNuNo: -return "compressed_nu_no"; +return "compressed(nonunique, nonordered)"; case DimLevelType::Singleton: return "singleton"; case DimLevelType::SingletonNu: -return "singleton_nu"; +return "singleton(nonunique)"; case DimLevelType::SingletonNo: -return "singleton_no"; +return "singleton(nonordered)"; case DimLevelType::SingletonNuNo: -return "singleton_nu_no"; +return "singleton(nonunique, nonordered)"; case DimLevelType::LooseCompressed: return "loose_compressed"; case DimLevelType::LooseCompressedNu: -return "loose_compressed_nu"; +return "loose_compressed(nonunique)"; case DimLevelType::LooseCompressedNo: -return "loose_compressed_no"; +return "loose_compressed(nonordered)"; case DimLevelType::LooseCompressedNuNo: -return "loose_compressed_nu_no"; +return "loose_compressed(nonunique, nonordered)"; case DimLevelType::TwoOutOfFour: -return "compressed24"; +return "block2_4"; } return ""; } diff --git a/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp b/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp index 3897e1b9ea3597c..4c8dccdda6c0c7c 100644 --- a/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp +++ b/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp @@ -586,30 +586,56 @@ Attribute SparseTensorEncodingAttr::parse(AsmParser &parser, Type type) { } void SparseTensorEncodingAttr::print(AsmPrinter &printer) const { - // Print the struct-like storage in dictionary fashion. - printer << "<{ lvlTypes = [ "; - llvm::interleaveComma(getLvlTypes(), printer, [&](DimLevelType dlt) { -printer << "\"" << toMLIRString(dlt) << "\""; - }); - printer << " ]"; + auto map = static_cast(getDimToLvl()); + auto lvlTypes = getLvlTypes(); + // Empty affine map indicates identity map + if (!map) { +map = AffineMap::getMultiDimIdentityMap(getLvlTypes().size(), getContext()); + } + // Modified version of AsmPrinter::Impl::printAffineMap. + printer << "<{ map = "; + // Symbolic identifiers. + if (map.getNumSymbols() != 0) { +printer << '['; +for (unsigned i = 0; i < map.getNumSymbols() - 1; ++i) + printer << 's' << i << ", "; +if (map.getNumSymbols() >= 1) + printer << 's' << map.getNumSymbols() - 1; +printer << ']'; + } + // Dimension identifiers. + printer << '('; + auto dimSlices = getDimSlices(); + if (!dimSlices.empty()) { +for (unsigned i = 0; i < map.getNumDims() - 1; ++i) + printer << 'd' << i << " : " << dimSlices[i] << ", "; +if (map.getNumDims() >= 1) + printer << 'd' << map.getNumDims() - 1 << " : " + << dimSlices[map.getNumDims() - 1]; + } else { +for (unsigned i = 0; i < map.getNumDims() - 1; ++i) + printer << 'd' << i << ", "; +if (map.getNumDims() >= 1) + printer << 'd' << map.getNumDims() - 1; + } + printer << ')'; + // Level format and properties. + printer << " -> ("; + for (unsigned i = 0; i < map.getNumResults() - 1; ++i) { +map.getResult(i).print(printer.getStream()); +printer << " : " << toMLIRString(lvlTypes[i]) << ", "; + } + if (map.getNumResults() >= 1) { +auto lastIndex = map.getNumResults() - 1; +map.getResult(lastIndex).print(printer.getStream()); +printer << " : " << toMLIRString(lvlTypes[lastIndex]); + } + printer << ')'; // Print remaining members only for non-default values. - if
[Lldb-commits] [lldb] [mlir][sparse] Print new syntax (PR #68130)
@@ -533,7 +533,7 @@ func.func @sparse_compression(%tensor: tensor<8x8xf64, #CSR>, // CHECK: %[[A13:.*]]:4 = scf.for %[[A14:.*]] = %[[A11]] to %[[A7]] step %[[A12]] iter_args(%[[A15:.*]] = %[[A0]], %[[A16:.*]] = %[[A1]], %[[A17:.*]] = %[[A2]], %[[A18:.*]] = %[[A3]]) -> (memref, memref, memref, !sparse_tensor.storage_specifier // CHECK: %[[A19:.*]] = memref.load %[[A6]]{{\[}}%[[A14]]] : memref // CHECK: %[[A20:.*]] = memref.load %[[A4]]{{\[}}%[[A19]]] : memref -// CHECK: %[[A21:.*]]:4 = func.call @_insert_dense_compressed_no_8_8_f64_0_0(%[[A15]], %[[A16]], %[[A17]], %[[A18]], %[[A8]], %[[A19]], %[[A20]]) : (memref, memref, memref, !sparse_tensor.storage_specifier +// CHECK: %[[A21:.*]]:4 = func.call @"_insert_dense_compressed(nonordered)_8_8_f64_0_0"(%[[A15]], %[[A16]], %[[A17]], %[[A18]], %[[A8]], %[[A19]], %[[A20]]) : (memref, memref, memref, !sparse_tensor.storage_specifier yinying-lisa-li wrote: Done! https://github.com/llvm/llvm-project/pull/68130 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [mlir][sparse] Print new syntax (PR #68130)
https://github.com/yinying-lisa-li updated https://github.com/llvm/llvm-project/pull/68130 >From 47b34bb327e1078678d3ba0c96ebce3fc89cf2ae Mon Sep 17 00:00:00 2001 From: Yinying Li Date: Tue, 3 Oct 2023 16:43:50 + Subject: [PATCH 1/4] [mlir][sparse] Print new syntax Printing changes from #sparse_tensor.encoding<{ lvlTypes = [ "compressed" ] }> to map = (d0) -> (d0 : compressed). Level properties, ELL and slice are also supported. --- .../mlir/Dialect/SparseTensor/IR/Enums.h | 20 +-- .../SparseTensor/IR/SparseTensorDialect.cpp | 64 --- mlir/test/Dialect/SparseTensor/codegen.mlir | 8 +- .../SparseTensor/roundtrip_encoding.mlir | 32 ++-- .../Dialect/SparseTensor/sparse_reshape.mlir | 8 +- .../SparseTensor/sparse_tensor_reshape.mlir | 2 +- .../python/dialects/sparse_tensor/dialect.py | 160 +- 7 files changed, 159 insertions(+), 135 deletions(-) diff --git a/mlir/include/mlir/Dialect/SparseTensor/IR/Enums.h b/mlir/include/mlir/Dialect/SparseTensor/IR/Enums.h index bc351ec52c0946b..2920ef79f461c6a 100644 --- a/mlir/include/mlir/Dialect/SparseTensor/IR/Enums.h +++ b/mlir/include/mlir/Dialect/SparseTensor/IR/Enums.h @@ -215,29 +215,29 @@ constexpr const char *toMLIRString(DimLevelType dlt) { case DimLevelType::Compressed: return "compressed"; case DimLevelType::CompressedNu: -return "compressed_nu"; +return "compressed(nonunique)"; case DimLevelType::CompressedNo: -return "compressed_no"; +return "compressed(nonordered)"; case DimLevelType::CompressedNuNo: -return "compressed_nu_no"; +return "compressed(nonunique, nonordered)"; case DimLevelType::Singleton: return "singleton"; case DimLevelType::SingletonNu: -return "singleton_nu"; +return "singleton(nonunique)"; case DimLevelType::SingletonNo: -return "singleton_no"; +return "singleton(nonordered)"; case DimLevelType::SingletonNuNo: -return "singleton_nu_no"; +return "singleton(nonunique, nonordered)"; case DimLevelType::LooseCompressed: return "loose_compressed"; case DimLevelType::LooseCompressedNu: -return "loose_compressed_nu"; +return "loose_compressed(nonunique)"; case DimLevelType::LooseCompressedNo: -return "loose_compressed_no"; +return "loose_compressed(nonordered)"; case DimLevelType::LooseCompressedNuNo: -return "loose_compressed_nu_no"; +return "loose_compressed(nonunique, nonordered)"; case DimLevelType::TwoOutOfFour: -return "compressed24"; +return "block2_4"; } return ""; } diff --git a/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp b/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp index 3897e1b9ea3597c..4c8dccdda6c0c7c 100644 --- a/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp +++ b/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp @@ -586,30 +586,56 @@ Attribute SparseTensorEncodingAttr::parse(AsmParser &parser, Type type) { } void SparseTensorEncodingAttr::print(AsmPrinter &printer) const { - // Print the struct-like storage in dictionary fashion. - printer << "<{ lvlTypes = [ "; - llvm::interleaveComma(getLvlTypes(), printer, [&](DimLevelType dlt) { -printer << "\"" << toMLIRString(dlt) << "\""; - }); - printer << " ]"; + auto map = static_cast(getDimToLvl()); + auto lvlTypes = getLvlTypes(); + // Empty affine map indicates identity map + if (!map) { +map = AffineMap::getMultiDimIdentityMap(getLvlTypes().size(), getContext()); + } + // Modified version of AsmPrinter::Impl::printAffineMap. + printer << "<{ map = "; + // Symbolic identifiers. + if (map.getNumSymbols() != 0) { +printer << '['; +for (unsigned i = 0; i < map.getNumSymbols() - 1; ++i) + printer << 's' << i << ", "; +if (map.getNumSymbols() >= 1) + printer << 's' << map.getNumSymbols() - 1; +printer << ']'; + } + // Dimension identifiers. + printer << '('; + auto dimSlices = getDimSlices(); + if (!dimSlices.empty()) { +for (unsigned i = 0; i < map.getNumDims() - 1; ++i) + printer << 'd' << i << " : " << dimSlices[i] << ", "; +if (map.getNumDims() >= 1) + printer << 'd' << map.getNumDims() - 1 << " : " + << dimSlices[map.getNumDims() - 1]; + } else { +for (unsigned i = 0; i < map.getNumDims() - 1; ++i) + printer << 'd' << i << ", "; +if (map.getNumDims() >= 1) + printer << 'd' << map.getNumDims() - 1; + } + printer << ')'; + // Level format and properties. + printer << " -> ("; + for (unsigned i = 0; i < map.getNumResults() - 1; ++i) { +map.getResult(i).print(printer.getStream()); +printer << " : " << toMLIRString(lvlTypes[i]) << ", "; + } + if (map.getNumResults() >= 1) { +auto lastIndex = map.getNumResults() - 1; +map.getResult(lastIndex).print(printer.getStream()); +printer << " : " << toMLIRString(lvlTypes[lastIndex]); + } + printer << ')'; // Print remaining members only for non-default values. - if
[Lldb-commits] [lldb] 91223c9 - [lldb] Unbreak debian build after dd76375c8009
Author: Alex Langford Date: 2023-10-03T16:11:02-07:00 New Revision: 91223c92f7f7e1a6c074a28de6b5206c22eec116 URL: https://github.com/llvm/llvm-project/commit/91223c92f7f7e1a6c074a28de6b5206c22eec116 DIFF: https://github.com/llvm/llvm-project/commit/91223c92f7f7e1a6c074a28de6b5206c22eec116.diff LOG: [lldb] Unbreak debian build after dd76375c8009 >From the lldb-x86_64-debian buildbot: ``` /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp:984:16: error: call to deleted constructor of 'llvm::Error' return err; ^~~ /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/include/llvm/Support/Error.h:189:3: note: 'Error' has been explicitly marked deleted here Error(const Error &Other) = delete; ^ /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/include/llvm/Support/Error.h:496:18: note: passing argument to parameter 'Err' here Expected(Error Err) ^ 1 error generated. ``` Added: Modified: lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp Removed: diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp index b51cf04c7b724e5..a09c68087c47659 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp @@ -981,7 +981,7 @@ DWARFUnit::extract(SymbolFileDWARF &dwarf, user_id_t uid, entry = index.getFromOffset(expected_header->GetOffset()); if (entry) if (llvm::Error err = expected_header->ApplyIndexEntry(entry)) -return err; +return std::move(err); } const llvm::DWARFDebugAbbrev *abbr = dwarf.DebugAbbrev(); ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] 40653b6 - [lldb] Fix --persistent-result description (#68128)
Author: Dave Lee Date: 2023-10-03T16:21:52-07:00 New Revision: 40653b6d6682777f2874eddfb62876cfe5091a6d URL: https://github.com/llvm/llvm-project/commit/40653b6d6682777f2874eddfb62876cfe5091a6d DIFF: https://github.com/llvm/llvm-project/commit/40653b6d6682777f2874eddfb62876cfe5091a6d.diff LOG: [lldb] Fix --persistent-result description (#68128) The default is not static, it depends on context. For `expression`, the default is true, but for `dwim-print`, the default is false. rdar://116320377 Added: Modified: lldb/source/Commands/Options.td Removed: diff --git a/lldb/source/Commands/Options.td b/lldb/source/Commands/Options.td index 04830b8b990efae..cfdeaabfa007743 100644 --- a/lldb/source/Commands/Options.td +++ b/lldb/source/Commands/Options.td @@ -390,7 +390,7 @@ let Command = "expression" in { Arg<"Boolean">, Desc<"Persist expression result in a variable for subsequent use. " "Expression results will be labeled with $-prefixed variables, e.g. $0, " -"$1, etc. Defaults to true.">; +"$1, etc.">; } let Command = "frame diag" in { ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb] Fix --persistent-result description (PR #68128)
https://github.com/kastiglione closed https://github.com/llvm/llvm-project/pull/68128 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [mlir][sparse] Print new syntax (PR #68130)
@@ -586,30 +586,56 @@ Attribute SparseTensorEncodingAttr::parse(AsmParser &parser, Type type) { } void SparseTensorEncodingAttr::print(AsmPrinter &printer) const { - // Print the struct-like storage in dictionary fashion. - printer << "<{ lvlTypes = [ "; - llvm::interleaveComma(getLvlTypes(), printer, [&](DimLevelType dlt) { -printer << "\"" << toMLIRString(dlt) << "\""; - }); - printer << " ]"; + auto map = static_cast(getDimToLvl()); + auto lvlTypes = getLvlTypes(); + // Empty affine map indicates identity map + if (!map) { +map = AffineMap::getMultiDimIdentityMap(getLvlTypes().size(), getContext()); + } + // Modified version of AsmPrinter::Impl::printAffineMap. aartbik wrote: I would remove this. This is diverged sufficiently to no longer refer to printAffineMap https://github.com/llvm/llvm-project/pull/68130 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [mlir][sparse] Print new syntax (PR #68130)
@@ -472,8 +472,11 @@ class SparseInsertGenerator llvm::raw_svector_ostream nameOstream(nameBuffer); nameOstream << kInsertFuncNamePrefix; const Level lvlRank = stt.getLvlRank(); -for (Level l = 0; l < lvlRank; l++) - nameOstream << toMLIRString(stt.getLvlType(l)) << "_"; +for (Level l = 0; l < lvlRank; l++) { + std::string lvlType = toMLIRString(stt.getLvlType(l)); + replaceWithUnderscore(lvlType); aartbik wrote: std::string::replace ? https://github.com/llvm/llvm-project/pull/68130 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [mlir][sparse] Print new syntax (PR #68130)
@@ -586,30 +586,56 @@ Attribute SparseTensorEncodingAttr::parse(AsmParser &parser, Type type) { } void SparseTensorEncodingAttr::print(AsmPrinter &printer) const { - // Print the struct-like storage in dictionary fashion. - printer << "<{ lvlTypes = [ "; - llvm::interleaveComma(getLvlTypes(), printer, [&](DimLevelType dlt) { -printer << "\"" << toMLIRString(dlt) << "\""; - }); - printer << " ]"; + auto map = static_cast(getDimToLvl()); + auto lvlTypes = getLvlTypes(); + // Empty affine map indicates identity map + if (!map) { +map = AffineMap::getMultiDimIdentityMap(getLvlTypes().size(), getContext()); + } + // Modified version of AsmPrinter::Impl::printAffineMap. + printer << "<{ map = "; + // Symbolic identifiers. + if (map.getNumSymbols() != 0) { +printer << '['; +for (unsigned i = 0; i < map.getNumSymbols() - 1; ++i) + printer << 's' << i << ", "; +if (map.getNumSymbols() >= 1) + printer << 's' << map.getNumSymbols() - 1; +printer << ']'; + } + // Dimension identifiers. + printer << '('; + auto dimSlices = getDimSlices(); + if (!dimSlices.empty()) { +for (unsigned i = 0; i < map.getNumDims() - 1; ++i) + printer << 'd' << i << " : " << dimSlices[i] << ", "; +if (map.getNumDims() >= 1) + printer << 'd' << map.getNumDims() - 1 << " : " + << dimSlices[map.getNumDims() - 1]; + } else { +for (unsigned i = 0; i < map.getNumDims() - 1; ++i) + printer << 'd' << i << ", "; +if (map.getNumDims() >= 1) + printer << 'd' << map.getNumDims() - 1; + } + printer << ')'; + // Level format and properties. + printer << " -> ("; + for (unsigned i = 0; i < map.getNumResults() - 1; ++i) { +map.getResult(i).print(printer.getStream()); +printer << " : " << toMLIRString(lvlTypes[i]) << ", "; + } + if (map.getNumResults() >= 1) { +auto lastIndex = map.getNumResults() - 1; +map.getResult(lastIndex).print(printer.getStream()); +printer << " : " << toMLIRString(lvlTypes[lastIndex]); + } + printer << ')'; PeimingLiu wrote: I would suggest you break these into smaller functions. https://github.com/llvm/llvm-project/pull/68130 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [libc++] Implement ranges::contains (PR #65148)
@@ -0,0 +1,61 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===--===// + +#ifndef _LIBCPP___ALGORITHM_RANGES_CONTAINS_H +#define _LIBCPP___ALGORITHM_RANGES_CONTAINS_H + +#include <__algorithm/in_in_result.h> var-const wrote: Sorry, what I mean is that a good and easy way to see if we're testing every constraint is to simply remove or comment out a constraint, run the tests and see if any tests fail. If we're testing everything properly, at least one test will fail -- conversely, if everything passes, that means a lack of test coverage. So what I'm suggesting is to temporarily remove the `projected` constraint in your local copy, run the tests and see if there are any failures. If there are no failures, please see if it's possible to add a test that checks we are using the `projected` concept there as required by the Standard. Happy to help if this explanation isn't clear! https://github.com/llvm/llvm-project/pull/65148 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] 8641cdf - [lldb] Use std::enable_if_t (NFC)
Author: Kazu Hirata Date: 2023-10-03T21:25:29-07:00 New Revision: 8641cdf397d86f33ac45e4c691ca4f843c359370 URL: https://github.com/llvm/llvm-project/commit/8641cdf397d86f33ac45e4c691ca4f843c359370 DIFF: https://github.com/llvm/llvm-project/commit/8641cdf397d86f33ac45e4c691ca4f843c359370.diff LOG: [lldb] Use std::enable_if_t (NFC) Added: Modified: lldb/include/lldb/Utility/Instrumentation.h Removed: diff --git a/lldb/include/lldb/Utility/Instrumentation.h b/lldb/include/lldb/Utility/Instrumentation.h index 13ffc0bd39d0b61..4a9ac810eb05e99 100644 --- a/lldb/include/lldb/Utility/Instrumentation.h +++ b/lldb/include/lldb/Utility/Instrumentation.h @@ -21,14 +21,12 @@ namespace lldb_private { namespace instrumentation { -template ::value, int>::type = 0> +template ::value, int> = 0> inline void stringify_append(llvm::raw_string_ostream &ss, const T &t) { ss << t; } -template ::value, - int>::type = 0> +template ::value, int> = 0> inline void stringify_append(llvm::raw_string_ostream &ss, const T &t) { ss << &t; } ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits