From 5127d4b4ff94a98ad7504334e76a60b9fe7eb578 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Thu, 21 May 2020 23:04:41 -0400 Subject: [PATCH 1/3] [gn build] (manually) port 49a4f3f7d88 --- .../llvm/lib/Target/AArch64/BUILD.gn | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/llvm/utils/gn/secondary/llvm/lib/Target/AArch64/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/Target/AArch64/BUILD.gn index 376d18bd58b383..063d13773e40bc 100644 --- a/llvm/utils/gn/secondary/llvm/lib/Target/AArch64/BUILD.gn +++ b/llvm/utils/gn/secondary/llvm/lib/Target/AArch64/BUILD.gn @@ -24,18 +24,27 @@ tablegen("AArch64GenGlobalISel") { td_file = "AArch64.td" } -tablegen("AArch64GenGICombiner") { +tablegen("AArch64GenMCPseudoLowering") { + visibility = [ ":LLVMAArch64CodeGen" ] + args = [ "-gen-pseudo-lowering" ] + td_file = "AArch64.td" +} + +tablegen("AArch64GenPostLegalizeGICombiner") { visibility = [ ":LLVMAArch64CodeGen" ] args = [ "-gen-global-isel-combiner", - "-combiners=AArch64PreLegalizerCombinerHelper", + "-combiners=AArch64PostLegalizerCombinerHelper", ] td_file = "AArch64.td" } -tablegen("AArch64GenMCPseudoLowering") { +tablegen("AArch64GenPreLegalizeGICombiner") { visibility = [ ":LLVMAArch64CodeGen" ] - args = [ "-gen-pseudo-lowering" ] + args = [ + "-gen-global-isel-combiner", + "-combiners=AArch64PreLegalizerCombinerHelper", + ] td_file = "AArch64.td" } @@ -50,9 +59,10 @@ static_library("LLVMAArch64CodeGen") { ":AArch64GenCallingConv", ":AArch64GenDAGISel", ":AArch64GenFastISel", - ":AArch64GenGICombiner", ":AArch64GenGlobalISel", ":AArch64GenMCPseudoLowering", + ":AArch64GenPostLegalizeGICombiner", + ":AArch64GenPreLegalizeGICombiner", ":AArch64GenRegisterBank", # See https://reviews.llvm.org/D69130 @@ -104,6 +114,7 @@ static_library("LLVMAArch64CodeGen") { "AArch64MachineFunctionInfo.cpp", "AArch64MacroFusion.cpp", "AArch64PBQPRegAlloc.cpp", + "AArch64PostLegalizerCombiner.cpp", "AArch64PreLegalizerCombiner.cpp", "AArch64PromoteConstant.cpp", "AArch64RedundantCopyElimination.cpp", From e3a0283e5a3f7eccd82c7e090188926723e8d8c9 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 21 May 2020 20:34:39 -0700 Subject: [PATCH 2/3] [lldb/Test] Fix replay with TestSetWatchpoint.py The reproducers only track the creation of objects and not their destruction. Therefore it keeps all objects alive indefinitely. --- lldb/test/API/python_api/watchpoint/TestSetWatchpoint.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lldb/test/API/python_api/watchpoint/TestSetWatchpoint.py b/lldb/test/API/python_api/watchpoint/TestSetWatchpoint.py index a34806d1657957..49ecf7aee39c22 100644 --- a/lldb/test/API/python_api/watchpoint/TestSetWatchpoint.py +++ b/lldb/test/API/python_api/watchpoint/TestSetWatchpoint.py @@ -103,4 +103,9 @@ def test_watch_val(self): PROCESS_EXITED) self.dbg.DeleteTarget(target) - self.assertFalse(watchpoint.IsValid()) + + # The next check relies on the watchpoint being destructed, which does + # not happen during replay because objects are intentionally kept alive + # forever. + if not configuration.is_reproducer(): + self.assertFalse(watchpoint.IsValid()) From 329abed10b84ce502a86dfb077710db22f4ddd01 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 21 May 2020 20:36:39 -0700 Subject: [PATCH 3/3] [lldb/Reproducers] Skip test that changes the source file while debugging The VFS is a snapshot and cannot capture changes to the file system. --- lldb/test/API/source-manager/TestSourceManager.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lldb/test/API/source-manager/TestSourceManager.py b/lldb/test/API/source-manager/TestSourceManager.py index 2029bc5ed60d79..714b736da02e6c 100644 --- a/lldb/test/API/source-manager/TestSourceManager.py +++ b/lldb/test/API/source-manager/TestSourceManager.py @@ -172,6 +172,7 @@ def test_move_and_then_display_source(self): substrs=['Hello world']) @skipIf(oslist=["windows"], bugnumber="llvm.org/pr44431") + @skipIfReproducer # VFS is a snapshot. def test_modify_source_file_while_debugging(self): """Modify a source file while debugging the executable.""" self.build()