[llvm-branch-commits] [llvm] [BOLT] Eliminate dead jump tables (PR #91666)

2024-05-22 Thread Amir Ayupov via llvm-branch-commits

aaupov wrote:

> Looks like this is dangerous and crashes binaries in our tests? Do you still 
> want to move forward with this stack? Or are you working on it? If this stack 
> is work in progress, maybe mark it as "changes planned" or the equivalent in 
> github.

Yes, we'll need to discuss how to move forward with it, as it's unsafe as is. 
Marking as draft for now.

https://github.com/llvm/llvm-project/pull/91666
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] [BOLT] Eliminate dead jump tables (PR #91666)

2024-05-22 Thread Amir Ayupov via llvm-branch-commits

https://github.com/aaupov converted_to_draft 
https://github.com/llvm/llvm-project/pull/91666
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] [BOLT] Eliminate dead jump tables (PR #91666)

2024-05-22 Thread Rafael Auler via llvm-branch-commits

https://github.com/rafaelauler requested changes to this pull request.

Looks like this is dangerous and crashes binaries in our tests? Do you still 
want to move forward with this stack? Or are you working on it? If this stack 
is work in progress, maybe mark it as "changes planned" or the equivalent in 
github.

https://github.com/llvm/llvm-project/pull/91666
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] [BOLT] Eliminate dead jump tables (PR #91666)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits

https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/91666
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] [BOLT] Eliminate dead jump tables (PR #91666)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits

https://github.com/aaupov updated 
https://github.com/llvm/llvm-project/pull/91666

>From 0166eb8ee85e2cdcb472502206ea4c13f49a6724 Mon Sep 17 00:00:00 2001
From: Amir Ayupov 
Date: Thu, 9 May 2024 16:31:17 -0700
Subject: [PATCH] deregisterJumpTable

Created using spr 1.3.4
---
 bolt/include/bolt/Core/BinaryContext.h | 5 +
 1 file changed, 5 insertions(+)

diff --git a/bolt/include/bolt/Core/BinaryContext.h 
b/bolt/include/bolt/Core/BinaryContext.h
index 4a59a581dfedb..f8bf29c674b54 100644
--- a/bolt/include/bolt/Core/BinaryContext.h
+++ b/bolt/include/bolt/Core/BinaryContext.h
@@ -430,6 +430,11 @@ class BinaryContext {
 return nullptr;
   }
 
+  /// Deregister JumpTable registered at a given \p Address.
+  bool deregisterJumpTable(uint64_t Address) {
+return JumpTables.erase(Address);
+  }
+
   unsigned getDWARFEncodingSize(unsigned Encoding) {
 if (Encoding == dwarf::DW_EH_PE_omit)
   return 0;

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


[llvm-branch-commits] [llvm] [BOLT] Eliminate dead jump tables (PR #91666)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits

https://github.com/aaupov updated 
https://github.com/llvm/llvm-project/pull/91666

>From 0166eb8ee85e2cdcb472502206ea4c13f49a6724 Mon Sep 17 00:00:00 2001
From: Amir Ayupov 
Date: Thu, 9 May 2024 16:31:17 -0700
Subject: [PATCH] deregisterJumpTable

Created using spr 1.3.4
---
 bolt/include/bolt/Core/BinaryContext.h | 5 +
 1 file changed, 5 insertions(+)

diff --git a/bolt/include/bolt/Core/BinaryContext.h 
b/bolt/include/bolt/Core/BinaryContext.h
index 4a59a581dfedb..f8bf29c674b54 100644
--- a/bolt/include/bolt/Core/BinaryContext.h
+++ b/bolt/include/bolt/Core/BinaryContext.h
@@ -430,6 +430,11 @@ class BinaryContext {
 return nullptr;
   }
 
+  /// Deregister JumpTable registered at a given \p Address.
+  bool deregisterJumpTable(uint64_t Address) {
+return JumpTables.erase(Address);
+  }
+
   unsigned getDWARFEncodingSize(unsigned Encoding) {
 if (Encoding == dwarf::DW_EH_PE_omit)
   return 0;

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


[llvm-branch-commits] [llvm] [BOLT] Eliminate dead jump tables (PR #91666)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits

https://github.com/aaupov updated 
https://github.com/llvm/llvm-project/pull/91666

>From 0166eb8ee85e2cdcb472502206ea4c13f49a6724 Mon Sep 17 00:00:00 2001
From: Amir Ayupov 
Date: Thu, 9 May 2024 16:31:17 -0700
Subject: [PATCH] deregisterJumpTable

Created using spr 1.3.4
---
 bolt/include/bolt/Core/BinaryContext.h | 5 +
 1 file changed, 5 insertions(+)

diff --git a/bolt/include/bolt/Core/BinaryContext.h 
b/bolt/include/bolt/Core/BinaryContext.h
index 4a59a581dfedb..f8bf29c674b54 100644
--- a/bolt/include/bolt/Core/BinaryContext.h
+++ b/bolt/include/bolt/Core/BinaryContext.h
@@ -430,6 +430,11 @@ class BinaryContext {
 return nullptr;
   }
 
+  /// Deregister JumpTable registered at a given \p Address.
+  bool deregisterJumpTable(uint64_t Address) {
+return JumpTables.erase(Address);
+  }
+
   unsigned getDWARFEncodingSize(unsigned Encoding) {
 if (Encoding == dwarf::DW_EH_PE_omit)
   return 0;

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


[llvm-branch-commits] [llvm] [BOLT] Eliminate dead jump tables (PR #91666)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits

https://github.com/aaupov updated 
https://github.com/llvm/llvm-project/pull/91666

>From 0166eb8ee85e2cdcb472502206ea4c13f49a6724 Mon Sep 17 00:00:00 2001
From: Amir Ayupov 
Date: Thu, 9 May 2024 16:31:17 -0700
Subject: [PATCH] deregisterJumpTable

Created using spr 1.3.4
---
 bolt/include/bolt/Core/BinaryContext.h | 5 +
 1 file changed, 5 insertions(+)

diff --git a/bolt/include/bolt/Core/BinaryContext.h 
b/bolt/include/bolt/Core/BinaryContext.h
index 4a59a581dfedb..f8bf29c674b54 100644
--- a/bolt/include/bolt/Core/BinaryContext.h
+++ b/bolt/include/bolt/Core/BinaryContext.h
@@ -430,6 +430,11 @@ class BinaryContext {
 return nullptr;
   }
 
+  /// Deregister JumpTable registered at a given \p Address.
+  bool deregisterJumpTable(uint64_t Address) {
+return JumpTables.erase(Address);
+  }
+
   unsigned getDWARFEncodingSize(unsigned Encoding) {
 if (Encoding == dwarf::DW_EH_PE_omit)
   return 0;

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


[llvm-branch-commits] [llvm] [BOLT] Eliminate dead jump tables (PR #91666)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits

https://github.com/aaupov updated 
https://github.com/llvm/llvm-project/pull/91666

>From 0166eb8ee85e2cdcb472502206ea4c13f49a6724 Mon Sep 17 00:00:00 2001
From: Amir Ayupov 
Date: Thu, 9 May 2024 16:31:17 -0700
Subject: [PATCH] deregisterJumpTable

Created using spr 1.3.4
---
 bolt/include/bolt/Core/BinaryContext.h | 5 +
 1 file changed, 5 insertions(+)

diff --git a/bolt/include/bolt/Core/BinaryContext.h 
b/bolt/include/bolt/Core/BinaryContext.h
index 4a59a581dfedb..f8bf29c674b54 100644
--- a/bolt/include/bolt/Core/BinaryContext.h
+++ b/bolt/include/bolt/Core/BinaryContext.h
@@ -430,6 +430,11 @@ class BinaryContext {
 return nullptr;
   }
 
+  /// Deregister JumpTable registered at a given \p Address.
+  bool deregisterJumpTable(uint64_t Address) {
+return JumpTables.erase(Address);
+  }
+
   unsigned getDWARFEncodingSize(unsigned Encoding) {
 if (Encoding == dwarf::DW_EH_PE_omit)
   return 0;

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