[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2018-11-28 Thread Eric Christopher via Phabricator via lldb-commits
echristo added a comment.

In D54747#1312161 , @ruiu wrote:

> Thank you for the patch.
>
> What you are doing in this patch is not too complicated and makes sense to 
> me. That said, if actual size saving is not significant as you said in 
> https://github.com/rust-lang/rust/issues/56068#issuecomment-440160568, it may 
> not be worth doing. It seems to me that if debug info is already 2.4GB, 
> shrinking it to 2GB doesn't make much difference. Do you have more convincing 
> examples?


400MB is 400MB... or, if you'd prefer 17% of overall size that was mentioned 
there. Additional testing might be nice in order to get a better idea of what 
we're looking at in practice (I guess a clang build would be another good 
choice), but the overall patch seems to be small and in a lot of ways 
simplifying for how we're linking.


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D54747



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


[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

2018-12-04 Thread Eric Christopher via Phabricator via lldb-commits
echristo added a comment.

In D54747#1315241 , @ruiu wrote:

> But 2GB is perhaps still too big and I guess a large part of it can be for 
> dead sections. If we fix this, I'd like to fix it in a proper way so that we 
> can completely eliminate debug info for dead sections.


There's a few options here, mostly using comdat groups for debug infomation 
associated with sections that the debug information comes from. That said, it 
still wouldn't encompass compile units that would have no code in them because 
we didn't choose a single function from a .o file and so this patch is still a 
strict improvement over that. In addition, it doesn't involve future work to 
change how we emit debug info and doesn't depend on everyone emitting debug 
info the same way.

Thoughts?


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D54747



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


[Lldb-commits] [PATCH] D66795: [Mips] Use appropriate private label prefix based on Mips ABI

2019-10-21 Thread Eric Christopher via Phabricator via lldb-commits
echristo added a comment.

I kinda want the option to be encoded in the triple for earlier testing of 
linking issues, but for now this is probably OK.


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

https://reviews.llvm.org/D66795



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


[Lldb-commits] [PATCH] D61737: [lldb] add -ex CLI option as alias to --one-line

2019-05-10 Thread Eric Christopher via Phabricator via lldb-commits
echristo added a comment.

In D61737#1497202 , @jingham wrote:

> I would rather not clutter up the lldb command driver's options with gdb 
> command flags.  That seems like it will make lldb harder to figure out and 
> reduce our freedom to choose reasonable short names for lldb driver options.
>
> It was reasonable to add lldb aliases for the gdb commands that you use tens 
> to hundreds of times in a give debugging session - those get wired into your 
> hands...  But I don't think the same consideration holds for command line 
> options...
>
> If we feel the need to add a driver gdb compatibility mode like this, I like 
> Rafael's suggestion of:
>
> lldb --gdb 


Peanut gallery comments :)

Since I've had to deal with some of this from the gnu binutils direction as 
well. I think if we really want to have a command-line compatibility mode with 
lldb we should just have a gdb wrapper/shell/parsed option on top of the lldb 
libraries/binary. Some of this would necessitate better library splitting of 
lldb to really have a gdb compatible shell on top but it could be done. This 
isn't quite how we've done it so far in llvm's binutils, but as an aspirational 
strategy I think we can and should make it work in general. It'll also help 
drive much cleaner APIs as well since we'll have to implement a few things from 
different perspectives.

Thoughts?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61737



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


[Lldb-commits] [PATCH] D82236: blacklist -> exclusions: heap.py

2020-06-19 Thread Eric Christopher via Phabricator via lldb-commits
echristo created this revision.
echristo added a reviewer: mehdi_amini.
Herald added subscribers: aaron.ballman, mcrosier.
Herald added a project: LLDB.
echristo edited the summary of this revision.

As part of using inclusive language with the llvm project migrate away from the 
use of blacklist and whitelist.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82236

Files:
  lldb/examples/darwin/heap_find/heap.py


Index: lldb/examples/darwin/heap_find/heap.py
===
--- lldb/examples/darwin/heap_find/heap.py
+++ lldb/examples/darwin/heap_find/heap.py
@@ -226,7 +226,7 @@
 def append_regex_callback(option, opt, value, parser):
 try:
 ivar_regex = re.compile(value)
-parser.values.ivar_regex_blacklist.append(ivar_regex)
+parser.values.ivar_regex_exclusions.append(ivar_regex)
 except:
 print('error: an exception was thrown when compiling the ivar regular 
expression for "%s"' % value)
 
@@ -287,7 +287,7 @@
 type='string',
 action='callback',
 callback=append_regex_callback,
-dest='ivar_regex_blacklist',
+dest='ivar_regex_exclusions',
 default=[],
 help='specify one or more regular expressions used to backlist any 
matches that are in ivars')
 parser.add_option(
@@ -773,8 +773,8 @@
 member_path += '.'
 member_path += member_name
 if member_path:
-if options.ivar_regex_blacklist:
-for ivar_regex in 
options.ivar_regex_blacklist:
+if options.ivar_regex_exclusions:
+for ivar_regex in 
options.ivar_regex_exclusions:
 if ivar_regex.match(
 member_path):
 print_entry = False


Index: lldb/examples/darwin/heap_find/heap.py
===
--- lldb/examples/darwin/heap_find/heap.py
+++ lldb/examples/darwin/heap_find/heap.py
@@ -226,7 +226,7 @@
 def append_regex_callback(option, opt, value, parser):
 try:
 ivar_regex = re.compile(value)
-parser.values.ivar_regex_blacklist.append(ivar_regex)
+parser.values.ivar_regex_exclusions.append(ivar_regex)
 except:
 print('error: an exception was thrown when compiling the ivar regular expression for "%s"' % value)
 
@@ -287,7 +287,7 @@
 type='string',
 action='callback',
 callback=append_regex_callback,
-dest='ivar_regex_blacklist',
+dest='ivar_regex_exclusions',
 default=[],
 help='specify one or more regular expressions used to backlist any matches that are in ivars')
 parser.add_option(
@@ -773,8 +773,8 @@
 member_path += '.'
 member_path += member_name
 if member_path:
-if options.ivar_regex_blacklist:
-for ivar_regex in options.ivar_regex_blacklist:
+if options.ivar_regex_exclusions:
+for ivar_regex in options.ivar_regex_exclusions:
 if ivar_regex.match(
 member_path):
 print_entry = False
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D82238: lldb whitelist -> allowed

2020-06-19 Thread Eric Christopher via Phabricator via lldb-commits
echristo created this revision.
echristo added a reviewer: mehdi_amini.
Herald added subscribers: aaron.ballman, atanasyan, jrtc27, kbarton, nemanjai, 
sdardis, mcrosier.
Herald added a project: LLDB.
echristo edited the summary of this revision.
Herald added a subscriber: wuzish.

As part of using inclusive language with the llvm project migrate away from the 
use of blacklist and whitelist.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82238

Files:
  lldb/include/lldb/Target/LanguageRuntime.h
  lldb/source/Core/ValueObject.cpp
  lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.h
  lldb/source/Plugins/ABI/AArch64/ABISysV_arm64.h
  lldb/source/Plugins/ABI/Mips/ABISysV_mips64.h
  lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.h
  lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.h
  lldb/source/Plugins/ABI/X86/ABIMacOSX_i386.h
  lldb/source/Plugins/ABI/X86/ABISysV_i386.h
  lldb/source/Plugins/ABI/X86/ABISysV_x86_64.h
  lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
  lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
  lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
  lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
  lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
  lldb/source/Utility/Args.cpp

Index: lldb/source/Utility/Args.cpp
===
--- lldb/source/Utility/Args.cpp
+++ lldb/source/Utility/Args.cpp
@@ -44,7 +44,7 @@
   break;
 }
 
-// If the character after the backslash is not a whitelisted escapable
+// If the character after the backslash is not an allowed escapable
 // character, we leave the character sequence untouched.
 if (strchr(k_escapable_characters, quoted.front()) == nullptr)
   result += '\\';
@@ -111,7 +111,7 @@
 break;
   }
 
-  // If the character after the backslash is not a whitelisted escapable
+  // If the character after the backslash is not an allowed escapable
   // character, we leave the character sequence untouched.
   if (strchr(" \t\\'\"`", command.front()) == nullptr)
 arg += '\\';
Index: lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
===
--- lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
+++ lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
@@ -300,7 +300,7 @@
 
   /// Check whether the name is "self" or "_cmd" and should show up in
   /// "frame variable".
-  bool IsWhitelistedRuntimeValue(ConstString name) override;
+  bool IsAllowedRuntimeValue(ConstString name) override;
 
 protected:
   // Classes that inherit from ObjCLanguageRuntime can see and modify these
Index: lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
===
--- lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
+++ lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
@@ -41,7 +41,7 @@
   m_isa_to_descriptor_stop_id(UINT32_MAX), m_complete_class_cache(),
   m_negative_complete_class_cache() {}
 
-bool ObjCLanguageRuntime::IsWhitelistedRuntimeValue(ConstString name) {
+bool ObjCLanguageRuntime::IsAllowedRuntimeValue(ConstString name) {
   static ConstString g_self = ConstString("self");
   static ConstString g_cmd = ConstString("_cmd");
   return name == g_self || name == g_cmd;
Index: lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
===
--- lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
+++ lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
@@ -79,7 +79,7 @@
   lldb::ThreadPlanSP GetStepThroughTrampolinePlan(Thread &thread,
   bool stop_others) override;
 
-  bool IsWhitelistedRuntimeValue(ConstString name) override;
+  bool IsAllowedRuntimeValue(ConstString name) override;
 protected:
   // Classes that inherit from CPPLanguageRuntime can see and modify these
   CPPLanguageRuntime(Process *process);
Index: lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
===
--- lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
+++ lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
@@ -43,7 +43,7 @@
 CPPLanguageRuntime::CPPLanguageRuntime(Process *process)
 : LanguageRuntime(process) {}
 
-bool CPPLanguageRuntime::IsWhitelistedRuntimeValue(ConstString name) {
+bool CPPLanguageRuntime::IsAllowedRuntimeValue(ConstString name) {
   return name == g_this;
 }
 
Index: lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
===
--- lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
+++ lldb/source/Plugins/ExpressionParser

[Lldb-commits] [PATCH] D82491: [Apple Silicon] Initial support for Rosetta

2020-06-24 Thread Eric Christopher via Phabricator via lldb-commits
echristo added inline comments.



Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:20
 #include 
+#include 
 #include 

echristo wrote:
> This is problematic in that sys/sysctl is deprecated on linux (causing 
> warnings/Werror failures).
I'm going to #ifdef this only in for apple at the moment matching the use below.



Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:3444
+size_t bufsize = sizeof(processInfo);
+if (sysctl(mib, (unsigned)(sizeof(mib)/sizeof(int)), &processInfo,
+   &bufsize, NULL, 0) == 0 && bufsize > 0) {

JDevlieghere wrote:
> The `sysctl` call seems like something that would fit into host, we already 
> have a bunch of those in `Host.mm`. Should we create a function there that 
> returns whether a given pid runs under Rosetta?
Agreed. That seems much cleaner.


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

https://reviews.llvm.org/D82491



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


[Lldb-commits] [PATCH] D82491: [Apple Silicon] Initial support for Rosetta

2020-06-24 Thread Eric Christopher via Phabricator via lldb-commits
echristo added inline comments.



Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:20
 #include 
+#include 
 #include 

This is problematic in that sys/sysctl is deprecated on linux (causing 
warnings/Werror failures).


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

https://reviews.llvm.org/D82491



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


[Lldb-commits] [PATCH] D82491: [Apple Silicon] Initial support for Rosetta

2020-06-24 Thread Eric Christopher via Phabricator via lldb-commits
echristo added inline comments.



Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:20
 #include 
+#include 
 #include 

echristo wrote:
> echristo wrote:
> > This is problematic in that sys/sysctl is deprecated on linux (causing 
> > warnings/Werror failures).
> I'm going to #ifdef this only in for apple at the moment matching the use 
> below.
I see you've done that already :)


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

https://reviews.llvm.org/D82491



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


[Lldb-commits] [PATCH] D65410: [PassManager] First Pass implementation at -O1 pass pipeline

2019-11-26 Thread Eric Christopher via Phabricator via lldb-commits
This revision was not accepted when it landed; it landed in state "Needs 
Revision".
This revision was automatically updated to reflect the committed changes.
Closed by commit rGfd39b1bb20ce: Revert "Revert "As a follow-up to my 
initial mail to llvm-dev here's a first… (authored by echristo).
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Changed prior to commit:
  https://reviews.llvm.org/D65410?vs=230987&id=231172#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65410

Files:
  clang/test/CodeGen/2008-07-30-implicit-initialization.c
  clang/test/CodeGen/arm-fp16-arguments.c
  clang/test/CodeGen/arm-vfp16-arguments2.cpp
  clang/test/CodeGen/atomic-ops-libcall.c
  clang/test/CodeGenCXX/atomicinit.cpp
  clang/test/CodeGenCXX/auto-var-init.cpp
  clang/test/CodeGenCXX/discard-name-values.cpp
  clang/test/CodeGenCXX/microsoft-abi-dynamic-cast.cpp
  clang/test/CodeGenCXX/microsoft-abi-typeid.cpp
  clang/test/CodeGenCXX/nrvo.cpp
  clang/test/CodeGenCXX/stack-reuse.cpp
  clang/test/CodeGenCXX/wasm-args-returns.cpp
  clang/test/CodeGenObjCXX/arc-blocks.mm
  clang/test/CodeGenObjCXX/nrvo.mm
  clang/test/Lexer/minimize_source_to_dependency_directives_invalid_error.c
  clang/test/PCH/no-escaping-block-tail-calls.cpp
  
lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/Makefile
  llvm/include/llvm/Passes/PassBuilder.h
  llvm/lib/Passes/PassBuilder.cpp
  llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
  llvm/test/CodeGen/AMDGPU/simplify-libcalls.ll
  llvm/test/Feature/optnone-opt.ll
  llvm/test/Other/new-pm-defaults.ll
  llvm/test/Other/new-pm-thinlto-defaults.ll
  llvm/test/Transforms/MemCpyOpt/lifetime.ll
  llvm/test/Transforms/PhaseOrdering/simplifycfg-options.ll
  llvm/test/Transforms/PhaseOrdering/two-shifts-by-sext.ll

Index: llvm/test/Transforms/PhaseOrdering/two-shifts-by-sext.ll
===
--- llvm/test/Transforms/PhaseOrdering/two-shifts-by-sext.ll
+++ llvm/test/Transforms/PhaseOrdering/two-shifts-by-sext.ll
@@ -74,7 +74,7 @@
 define i32 @two_shifts_by_sext_with_extra_use(i32 %val, i8 signext %len) {
 ; CHECK-LABEL: @two_shifts_by_sext_with_extra_use(
 ; CHECK-NEXT:[[CONV:%.*]] = sext i8 [[LEN:%.*]] to i32
-; CHECK-NEXT:tail call void @use_int32(i32 [[CONV]])
+; CHECK-NEXT:call void @use_int32(i32 [[CONV]])
 ; CHECK-NEXT:[[SHL:%.*]] = shl i32 [[VAL:%.*]], [[CONV]]
 ; CHECK-NEXT:[[SHR:%.*]] = ashr i32 [[SHL]], [[CONV]]
 ; CHECK-NEXT:ret i32 [[SHR]]
@@ -101,7 +101,7 @@
 define i32 @two_shifts_by_same_sext_with_extra_use(i32 %val, i8 signext %len) {
 ; CHECK-LABEL: @two_shifts_by_same_sext_with_extra_use(
 ; CHECK-NEXT:[[CONV:%.*]] = sext i8 [[LEN:%.*]] to i32
-; CHECK-NEXT:tail call void @use_int32(i32 [[CONV]])
+; CHECK-NEXT:call void @use_int32(i32 [[CONV]])
 ; CHECK-NEXT:[[SHL:%.*]] = shl i32 [[VAL:%.*]], [[CONV]]
 ; CHECK-NEXT:[[SHR:%.*]] = ashr i32 [[SHL]], [[CONV]]
 ; CHECK-NEXT:ret i32 [[SHR]]
Index: llvm/test/Transforms/PhaseOrdering/simplifycfg-options.ll
===
--- llvm/test/Transforms/PhaseOrdering/simplifycfg-options.ll
+++ llvm/test/Transforms/PhaseOrdering/simplifycfg-options.ll
@@ -7,7 +7,7 @@
 
 define i1 @PR33605(i32 %a, i32 %b, i32* %c) {
 ; ALL-LABEL: @PR33605(
-; ALL-NEXT:  for.body:
+; ALL-NEXT:  entry:
 ; ALL-NEXT:[[OR:%.*]] = or i32 [[B:%.*]], [[A:%.*]]
 ; ALL-NEXT:[[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[C:%.*]], i64 1
 ; ALL-NEXT:[[TMP0:%.*]] = load i32, i32* [[ARRAYIDX]], align 4
@@ -15,16 +15,16 @@
 ; ALL-NEXT:br i1 [[CMP]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
 ; ALL:   if.then:
 ; ALL-NEXT:store i32 [[OR]], i32* [[ARRAYIDX]], align 4
-; ALL-NEXT:tail call void @foo()
+; ALL-NEXT:call void @foo()
 ; ALL-NEXT:br label [[IF_END]]
 ; ALL:   if.end:
-; ALL-NEXT:[[CHANGED_1_OFF0:%.