[PATCH] D68076: [AArch64] Enable unwind tables by default for Gnu targets

2020-08-07 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added a comment.

cc: @t.p.northover does this fix look reasonable for PR37240?


Repository:
  rC Clang

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

https://reviews.llvm.org/D68076

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


[PATCH] D68076: [AArch64] Enable unwind tables by default for Gnu targets

2020-07-03 Thread David Tellenbach via Phabricator via cfe-commits
tellenbach added a comment.

In D68076#2131108 , @hiraditya wrote:

> do we have a plan to follow up on this patch?


Hi! I'm currently not working on this (and LLVM in general) anymore. However, 
the issue seems to be still present and this patch would fix it. I have in mind 
that I've checked GCC recently and they seem to do something similar. I can 
check again but will probably take some time.

Thanks for bringing this up again!


Repository:
  rC Clang

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

https://reviews.llvm.org/D68076



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


[PATCH] D68076: [AArch64] Enable unwind tables by default for Gnu targets

2020-07-03 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added a comment.
Herald added a subscriber: danielkiss.

do we have a plan to follow up on this patch?


Repository:
  rC Clang

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

https://reviews.llvm.org/D68076



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


[PATCH] D68076: [AArch64] Enable unwind tables by default for Gnu targets

2019-10-10 Thread David Tellenbach via Phabricator via cfe-commits
tellenbach added a comment.

This patch would fix  PR37240 but is probably not the most optimal solution. 
For other ideas see 
http://lists.llvm.org/pipermail/llvm-dev/2019-September/135433.html 
. I'll 
leave this patch open until other possibilities have been accepted or abandoned 
and will abandon or fix this patch then.


Repository:
  rC Clang

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

https://reviews.llvm.org/D68076



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


[PATCH] D68076: [AArch64] Enable unwind tables by default for Gnu targets

2019-09-29 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added a comment.

Can we add a test to verify cfi instructions are present without debug flag.


Repository:
  rC Clang

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

https://reviews.llvm.org/D68076



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


[PATCH] D68076: [AArch64] Enable unwind tables by default for Gnu targets

2019-09-26 Thread David Tellenbach via Phabricator via cfe-commits
tellenbach added a comment.

This would fix PR37240 


Repository:
  rC Clang

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

https://reviews.llvm.org/D68076



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


[PATCH] D68076: [AArch64] Enable unwind tables by default for Gnu targets

2019-09-26 Thread David Tellenbach via Phabricator via cfe-commits
tellenbach added a comment.

Please also see the ongoing discussion on the mailing list: 
http://lists.llvm.org/pipermail/llvm-dev/2019-September/135433.html 



Repository:
  rC Clang

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

https://reviews.llvm.org/D68076



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


[PATCH] D68076: [AArch64] Enable unwind tables by default for Gnu targets

2019-09-26 Thread David Tellenbach via Phabricator via cfe-commits
tellenbach created this revision.
Herald added subscribers: cfe-commits, kristof.beyls, aprantl.
Herald added a project: clang.

Currently the following situation can occur: During AArch64 frame lowering cfi 
instructions get emitted if debug information is generated but not if not. 
Since cfi instructions act as scheduling boundaries during instruction 
scheduling this leads to different scheduling regions and therefore different 
assembly depending on whether debug information is generated or not.

This patch fixes this problem by enabling unwind tables by default on AArch64 
when compiling for a Gnu targets.


Repository:
  rC Clang

https://reviews.llvm.org/D68076

Files:
  clang/lib/Driver/ToolChains/Gnu.cpp
  clang/test/Driver/clang-translation.c


Index: clang/test/Driver/clang-translation.c
===
--- clang/test/Driver/clang-translation.c
+++ clang/test/Driver/clang-translation.c
@@ -150,6 +150,10 @@
 // ARMv8_THREAD_POINTER_EL3-NOT: "-target-feature" "+tpidr-el2"
 // ARMv8_THREAD_POINTER_EL3: "-target-feature" "+tpidr-el3"
 
+// RUN: %clang -target aarch64-linux -### -S %s 2>&1 | \
+// RUN: FileCheck -check-prefix=AARCH64_LINUX_DEFAULT_UNWIND_TABLES %s
+// AARCH64_LINUX_DEFAULT_UNWIND_TABLES: "-munwind-tables"
+
 // RUN: %clang -target powerpc64-unknown-linux-gnu \
 // RUN: -### -S %s -mcpu=G5 2>&1 | FileCheck -check-prefix=PPCG5 %s
 // PPCG5: clang
Index: clang/lib/Driver/ToolChains/Gnu.cpp
===
--- clang/lib/Driver/ToolChains/Gnu.cpp
+++ clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2540,7 +2540,8 @@
 }
 
 bool Generic_GCC::IsUnwindTablesDefault(const ArgList &Args) const {
-  return getArch() == llvm::Triple::x86_64;
+  return getArch() == llvm::Triple::x86_64 ||
+ getArch() == llvm::Triple::aarch64;
 }
 
 bool Generic_GCC::isPICDefault() const {


Index: clang/test/Driver/clang-translation.c
===
--- clang/test/Driver/clang-translation.c
+++ clang/test/Driver/clang-translation.c
@@ -150,6 +150,10 @@
 // ARMv8_THREAD_POINTER_EL3-NOT: "-target-feature" "+tpidr-el2"
 // ARMv8_THREAD_POINTER_EL3: "-target-feature" "+tpidr-el3"
 
+// RUN: %clang -target aarch64-linux -### -S %s 2>&1 | \
+// RUN: FileCheck -check-prefix=AARCH64_LINUX_DEFAULT_UNWIND_TABLES %s
+// AARCH64_LINUX_DEFAULT_UNWIND_TABLES: "-munwind-tables"
+
 // RUN: %clang -target powerpc64-unknown-linux-gnu \
 // RUN: -### -S %s -mcpu=G5 2>&1 | FileCheck -check-prefix=PPCG5 %s
 // PPCG5: clang
Index: clang/lib/Driver/ToolChains/Gnu.cpp
===
--- clang/lib/Driver/ToolChains/Gnu.cpp
+++ clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2540,7 +2540,8 @@
 }
 
 bool Generic_GCC::IsUnwindTablesDefault(const ArgList &Args) const {
-  return getArch() == llvm::Triple::x86_64;
+  return getArch() == llvm::Triple::x86_64 ||
+ getArch() == llvm::Triple::aarch64;
 }
 
 bool Generic_GCC::isPICDefault() const {
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits