[Lldb-commits] [lldb] c899b24 - [lldb] [cmake] Fix another typo in third-party/unittest path

2022-11-12 Thread Michał Górny via lldb-commits

Author: Michał Górny
Date: 2022-11-12T10:35:19+01:00
New Revision: c899b243f681fa75cb68144a4d599fdada764d78

URL: 
https://github.com/llvm/llvm-project/commit/c899b243f681fa75cb68144a4d599fdada764d78
DIFF: 
https://github.com/llvm/llvm-project/commit/c899b243f681fa75cb68144a4d599fdada764d78.diff

LOG: [lldb] [cmake] Fix another typo in third-party/unittest path

Added: 


Modified: 
lldb/cmake/modules/LLDBStandalone.cmake

Removed: 




diff  --git a/lldb/cmake/modules/LLDBStandalone.cmake 
b/lldb/cmake/modules/LLDBStandalone.cmake
index 22a284adc222b..81304723f0f40 100644
--- a/lldb/cmake/modules/LLDBStandalone.cmake
+++ b/lldb/cmake/modules/LLDBStandalone.cmake
@@ -101,7 +101,7 @@ if(LLDB_INCLUDE_TESTS)
   # Build the gtest library needed for unittests, if we have LLVM sources
   # handy.
   if (EXISTS ${LLVM_THIRD_PARTY_DIR}/unittest AND NOT TARGET llvm_gtest)
-add_subdirectory(${LLVM_THIRD_PARTY_DIR}/utils/unittest 
third-party/unittest)
+add_subdirectory(${LLVM_THIRD_PARTY_DIR}/unittest third-party/unittest)
   endif()
   # LLVMTestingSupport library is needed for Process/gdb-remote.
   if (EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Testing/Support



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D133036: [InstCombine] Treat passing undef to noundef params as UB

2022-11-12 Thread Tim Neumann via Phabricator via lldb-commits
TimNN added a comment.

I'm still trying to properly minimize this, but this definitely interacts badly 
with other optimizations (which triggers the Rust CI failure I mentioned above):

- We start with two functions, `outer` and `inner`. `outer` calls `inner`. 
`outer` has a `noundef` argument that it forwards to `inner` (where the 
argument is also `noundef`).
- `PostOrderFunctionAttrsPass` decides, for both functions, that the argument 
is `readnone`. The `readnone` attribute is //only// added to the function 
definitions. The `readnone` attribute is //not// added at the `call` to `inner` 
from `outer`.
- The `DeadArgumentEliminationPass` decides that when `outer` calls `inner` the 
argument should be `poison`.
- This patch sees the `poison` being passed to a `noundef` argument and kills 
the call.

I don't know which component should be considered "at fault" here (or if the 
`readnone` bit is even relevant).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133036/new/

https://reviews.llvm.org/D133036

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D133036: [InstCombine] Treat passing undef to noundef params as UB

2022-11-12 Thread Nikita Popov via Phabricator via lldb-commits
nikic added a comment.

@TimNN Do you have an IR sample for this? DAE is supposed to strip UB-implying 
attributes when converting arguments to poison here: 
https://github.com/llvm/llvm-project/blob/cbe5b2dd914b7ee47bb4d0f67af154a40be4d208/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp#LL291C17-L291C37


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133036/new/

https://reviews.llvm.org/D133036

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D133036: [InstCombine] Treat passing undef to noundef params as UB

2022-11-12 Thread Tim Neumann via Phabricator via lldb-commits
TimNN added a comment.

I've included excerpts from the IR below. It will take me a bit to provide 
something compilable. Though you are right, the `noundef` did indeed get 
removed from the `call`.

  *** IR Dump Before DeadArgumentEliminationPass on [module] ***
  ; Function Attrs: nonlazybind uwtable
  define void 
@_RNvXs2_NtNtCs840rfDNPFol_10proc_macro6bridge3rpcbINtB5_6EncodeuE6encodeB9_(i1 
noundef zeroext %0, ptr noalias noundef align 8 dereferenceable(40) %1, ptr 
noalias nocapture noundef nonnull readnone align 1 %2) unnamed_addr #0 !dbg 
!18135 {
%4 = zext i1 %0 to i8, !dbg !18137
call void 
@_RNvXs0_NtNtCs840rfDNPFol_10proc_macro6bridge3rpchINtB5_6EncodeuE6encodeB9_(i8 
%4, ptr noalias noundef nonnull align 8 dereferenceable(40) %1, ptr noalias 
noundef nonnull align 1 %2), !dbg !18137
ret void, !dbg !18138
  }
  *** IR Dump After DeadArgumentEliminationPass on [module] ***
  ; Function Attrs: nonlazybind uwtable
  define void 
@_RNvXs2_NtNtCs840rfDNPFol_10proc_macro6bridge3rpcbINtB5_6EncodeuE6encodeB9_(i1 
noundef zeroext %0, ptr noalias noundef align 8 dereferenceable(40) %1, ptr 
noalias nocapture noundef nonnull readnone align 1 %2) unnamed_addr #0 !dbg 
!18136 {
%4 = zext i1 %0 to i8, !dbg !18138
call void 
@_RNvXs0_NtNtCs840rfDNPFol_10proc_macro6bridge3rpchINtB5_6EncodeuE6encodeB9_(i8 
%4, ptr noalias noundef nonnull align 8 dereferenceable(40) %1, ptr noalias 
nonnull align 1 poison), !dbg !18138
ret void, !dbg !18139
  }
  *** IR Dump Before InstCombinePass on 
_RNvXs2_NtNtCs840rfDNPFol_10proc_macro6bridge3rpcbINtB5_6EncodeuE6encodeB9_ ***
  ; Function Attrs: nonlazybind uwtable
  define available_externally void 
@_RNvXs2_NtNtCs840rfDNPFol_10proc_macro6bridge3rpcbINtB5_6EncodeuE6encodeB9_(i1 
noundef zeroext %0, ptr noalias noundef align 8 dereferenceable(40) %1, ptr 
noalias nocapture noundef nonnull readnone align 1 %2) unnamed_addr #2 !dbg 
!20759 {
%4 = zext i1 %0 to i8, !dbg !20762
call void 
@_RNvXs0_NtNtCs840rfDNPFol_10proc_macro6bridge3rpchINtB5_6EncodeuE6encodeB9_(i8 
%4, ptr noalias noundef nonnull align 8 dereferenceable(40) %1, ptr noalias 
nonnull align 1 poison), !dbg !20762
ret void, !dbg !20763
  }
  *** IR Dump After InstCombinePass on 
_RNvXs2_NtNtCs840rfDNPFol_10proc_macro6bridge3rpcbINtB5_6EncodeuE6encodeB9_ ***
  ; Function Attrs: nonlazybind uwtable
  define available_externally void 
@_RNvXs2_NtNtCs840rfDNPFol_10proc_macro6bridge3rpcbINtB5_6EncodeuE6encodeB9_(i1 
noundef zeroext %0, ptr noalias noundef align 8 dereferenceable(40) %1, ptr 
noalias nocapture noundef nonnull readnone align 1 %2) unnamed_addr #2 !dbg 
!20759 {
store i1 true, ptr poison, align 1
ret void, !dbg !20762
  }


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133036/new/

https://reviews.llvm.org/D133036

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D133366: [lldb] Fix SBFileSpec.fullpath for Windows

2022-11-12 Thread Stella Stamenova via Phabricator via lldb-commits
stella.stamenova added a comment.

This broke the Windows lldb bot: 
https://lab.llvm.org/buildbot/#/builders/83/builds/25854


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133366/new/

https://reviews.llvm.org/D133366

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D133366: [lldb] Fix SBFileSpec.fullpath for Windows

2022-11-12 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment.

@stella.stamenova fix about to be committed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133366/new/

https://reviews.llvm.org/D133366

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 1ee299a - [lldb] Fix test after 5223366416fb

2022-11-12 Thread Dave Lee via lldb-commits

Author: Dave Lee
Date: 2022-11-12T14:09:49-08:00
New Revision: 1ee299a57d0b5f49b6c37d81474ea030e3b122de

URL: 
https://github.com/llvm/llvm-project/commit/1ee299a57d0b5f49b6c37d81474ea030e3b122de
DIFF: 
https://github.com/llvm/llvm-project/commit/1ee299a57d0b5f49b6c37d81474ea030e3b122de.diff

LOG: [lldb] Fix test after 5223366416fb

Added: 


Modified: 
lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py

Removed: 




diff  --git a/lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py 
b/lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py
index e36f1af89e9ca..03af350aa4b15 100644
--- a/lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py
+++ b/lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py
@@ -44,7 +44,7 @@ def test_modules_in_mini_dump(self):
 self.assertTrue(self.process, PROCESS_IS_VALID)
 expected_modules = [
 {
-'filename' : r"C:\Users\amccarth\Documents\Visual Studio 
2013\Projects\fizzbuzz\Debug/fizzbuzz.exe",
+'filename' : r"C:\Users\amccarth\Documents\Visual Studio 
2013\Projects\fizzbuzz\Debug\fizzbuzz.exe",
 'uuid' : '0F45B791-9A96-46F9-BF8F-2D6076EA421A-0011',
 },
 {



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D133366: [lldb] Fix SBFileSpec.fullpath for Windows

2022-11-12 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment.

@stella.stamenova fix is rG1ee299a57d0b5f49b6c37d81474ea030e3b122de 



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133366/new/

https://reviews.llvm.org/D133366

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 760c75f - [lldb] Complete fix of test after 5223366416fb

2022-11-12 Thread Dave Lee via lldb-commits

Author: Dave Lee
Date: 2022-11-12T14:12:13-08:00
New Revision: 760c75fe2d25e06644271cb1338f8b0f8d9abc70

URL: 
https://github.com/llvm/llvm-project/commit/760c75fe2d25e06644271cb1338f8b0f8d9abc70
DIFF: 
https://github.com/llvm/llvm-project/commit/760c75fe2d25e06644271cb1338f8b0f8d9abc70.diff

LOG: [lldb] Complete fix of test after 5223366416fb

Added: 


Modified: 
lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py

Removed: 




diff  --git a/lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py 
b/lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py
index 03af350aa4b1..777548c39253 100644
--- a/lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py
+++ b/lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py
@@ -48,23 +48,23 @@ def test_modules_in_mini_dump(self):
 'uuid' : '0F45B791-9A96-46F9-BF8F-2D6076EA421A-0011',
 },
 {
-'filename' : r"C:\Windows\SysWOW64/ntdll.dll",
+'filename' : r"C:\Windows\SysWOW64\ntdll.dll",
 'uuid' : 'BBB0846A-402C-4052-A16B-67650BBFE6B0-0002',
 },
 {
-'filename' : r"C:\Windows\SysWOW64/kernel32.dll",
+'filename' : r"C:\Windows\SysWOW64\kernel32.dll",
 'uuid' : 'E5CB7E1B-005E-4113-AB98-98D6913B52D8-0002',
 },
 {
-'filename' : r"C:\Windows\SysWOW64/KERNELBASE.dll",
+'filename' : r"C:\Windows\SysWOW64\KERNELBASE.dll",
 'uuid' : '0BF95241-CB0D-4BD4-AC5D-186A6452E522-0001',
 },
 {
-'filename' : r"C:\Windows\System32/MSVCP120D.dll",
+'filename' : r"C:\Windows\System32\MSVCP120D.dll",
 'uuid' : '3C05516E-57E7-40EB-8D3F-9722C5BD80DD-0001',
 },
 {
-'filename' : r"C:\Windows\System32/MSVCR120D.dll",
+'filename' : r"C:\Windows\System32\MSVCR120D.dll",
 'uuid' : '6382FB86-46C4-4046-AE42-8D97B3F91FF2-0001',
 },
 ]



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D133366: [lldb] Fix SBFileSpec.fullpath for Windows

2022-11-12 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment.

@stella.stamenova I realized that test has more paths that need fixing. The 
rest are fixed in rG760c75fe2d25e06644271cb1338f8b0f8d9abc70 
.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133366/new/

https://reviews.llvm.org/D133366

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D133366: [lldb] Fix SBFileSpec.fullpath for Windows

2022-11-12 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment.

Ugh, the test that is failing uses windows paths but runs on both windows and 
non-windows machines. I will revert this and the two fix commits.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133366/new/

https://reviews.llvm.org/D133366

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 01f924d - [lldb] Revert SBFileSpec.fullpath path separator fix

2022-11-12 Thread Dave Lee via lldb-commits

Author: Dave Lee
Date: 2022-11-12T14:17:28-08:00
New Revision: 01f924d0e37a5deae51df0d77e10a15b63aa0c0f

URL: 
https://github.com/llvm/llvm-project/commit/01f924d0e37a5deae51df0d77e10a15b63aa0c0f
DIFF: 
https://github.com/llvm/llvm-project/commit/01f924d0e37a5deae51df0d77e10a15b63aa0c0f.diff

LOG: [lldb] Revert SBFileSpec.fullpath path separator fix

Primarily reverts 5223366416fb.

Added: 


Modified: 
lldb/bindings/interface/SBFileSpec.i
lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py

Removed: 
lldb/test/API/python_api/file_spec/TestFileSpecAPI.py



diff  --git a/lldb/bindings/interface/SBFileSpec.i 
b/lldb/bindings/interface/SBFileSpec.i
index 104339472384f..b549321487ec2 100644
--- a/lldb/bindings/interface/SBFileSpec.i
+++ b/lldb/bindings/interface/SBFileSpec.i
@@ -88,7 +88,7 @@ public:
 spec_dir = self.GetDirectory()
 spec_file = self.GetFilename()
 if spec_dir and spec_file:
-return os.path.join(spec_dir, spec_file)
+return '%s/%s' % (spec_dir, spec_file)
 elif spec_dir:
 return spec_dir
 elif spec_file:

diff  --git a/lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py 
b/lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py
index 777548c39253d..e36f1af89e9ca 100644
--- a/lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py
+++ b/lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py
@@ -44,27 +44,27 @@ def test_modules_in_mini_dump(self):
 self.assertTrue(self.process, PROCESS_IS_VALID)
 expected_modules = [
 {
-'filename' : r"C:\Users\amccarth\Documents\Visual Studio 
2013\Projects\fizzbuzz\Debug\fizzbuzz.exe",
+'filename' : r"C:\Users\amccarth\Documents\Visual Studio 
2013\Projects\fizzbuzz\Debug/fizzbuzz.exe",
 'uuid' : '0F45B791-9A96-46F9-BF8F-2D6076EA421A-0011',
 },
 {
-'filename' : r"C:\Windows\SysWOW64\ntdll.dll",
+'filename' : r"C:\Windows\SysWOW64/ntdll.dll",
 'uuid' : 'BBB0846A-402C-4052-A16B-67650BBFE6B0-0002',
 },
 {
-'filename' : r"C:\Windows\SysWOW64\kernel32.dll",
+'filename' : r"C:\Windows\SysWOW64/kernel32.dll",
 'uuid' : 'E5CB7E1B-005E-4113-AB98-98D6913B52D8-0002',
 },
 {
-'filename' : r"C:\Windows\SysWOW64\KERNELBASE.dll",
+'filename' : r"C:\Windows\SysWOW64/KERNELBASE.dll",
 'uuid' : '0BF95241-CB0D-4BD4-AC5D-186A6452E522-0001',
 },
 {
-'filename' : r"C:\Windows\System32\MSVCP120D.dll",
+'filename' : r"C:\Windows\System32/MSVCP120D.dll",
 'uuid' : '3C05516E-57E7-40EB-8D3F-9722C5BD80DD-0001',
 },
 {
-'filename' : r"C:\Windows\System32\MSVCR120D.dll",
+'filename' : r"C:\Windows\System32/MSVCR120D.dll",
 'uuid' : '6382FB86-46C4-4046-AE42-8D97B3F91FF2-0001',
 },
 ]

diff  --git a/lldb/test/API/python_api/file_spec/TestFileSpecAPI.py 
b/lldb/test/API/python_api/file_spec/TestFileSpecAPI.py
deleted file mode 100644
index 6c074df0c12fb..0
--- a/lldb/test/API/python_api/file_spec/TestFileSpecAPI.py
+++ /dev/null
@@ -1,15 +0,0 @@
-import lldb
-import os
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestCase(TestBase):
-NO_DEBUG_INFO_TESTCASE = True
-
-def test_full_path(self):
-file_spec = lldb.SBFileSpec()
-file_spec.SetDirectory("a")
-file_spec.SetFilename("b")
-self.assertEqual(file_spec.fullpath, os.path.join("a", "b"))



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D133366: [lldb] Fix SBFileSpec.fullpath for Windows

2022-11-12 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment.

Reverted in rG01f924d0e37a5deae51df0d77e10a15b63aa0c0f 



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133366/new/

https://reviews.llvm.org/D133366

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D133366: [lldb] Fix SBFileSpec.fullpath for Windows

2022-11-12 Thread Stella Stamenova via Phabricator via lldb-commits
stella.stamenova added a comment.

In D133366#3923291 , @kastiglione 
wrote:

> Ugh, the test that is failing uses windows paths but runs on both windows and 
> non-windows machines. I will revert this and the two fix commits.

You should be able to test for the operating system and set the paths 
accordingly in the test.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133366/new/

https://reviews.llvm.org/D133366

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D133366: [lldb] Fix SBFileSpec.fullpath for Windows

2022-11-12 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment.

I will do that and recommit, thanks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133366/new/

https://reviews.llvm.org/D133366

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D133036: [InstCombine] Treat passing undef to noundef params as UB

2022-11-12 Thread Tim Neumann via Phabricator via lldb-commits
TimNN added a comment.

I didn't manage to repro with `opt`, so still no compilable IR. I did some more 
debugging, though:

- Inside `removeDeadArgumentsFromCallers`, `CB->getCalledFunction()->dump()` 
(after the modification) is `define void 
@_RNvXs0_NtNtCs840rfDNPFol_10proc_macro6bridge3rpchINtB5_6EncodeuE6encodeB9_(i8 
%0, ptr noalias noundef align 8 dereferenceable(40) %1, ptr noalias nocapture 
nonnull readnone align 1 %2) unnamed_addr #0 personality ptr 
@rust_eh_personality !dbg !18034 { ... }`. **Definition, no `noundef`.**
- Inside `callPassesUndefToPassingUndefUBParam`, 
`Call.getCalledFunction()->dump()` is `declare void 
@_RNvXs0_NtNtCs840rfDNPFol_10proc_macro6bridge3rpchINtB5_6EncodeuE6encodeB9_(i8 
%0, ptr noalias noundef align 8 dereferenceable(40) %1, ptr noalias noundef 
nonnull align 1 %2) unnamed_addr #2`. **Declaration, `noundef` is back.**


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133036/new/

https://reviews.llvm.org/D133036

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits