From: Qing Zhao <QING.ZHAO@ORACLE.COM>
To: dmalcolm@redhat.com, jakub@redhat.com
Cc: gcc-patches@gcc.gnu.org
Subject: PING [PATCH][gcc][PR94230]provide an option to change the size limitation for -Wmisleading-indent
Date: Wed, 8 Apr 2020 14:39:22 -0500 [thread overview]
Message-ID: <47B8948D-C9BA-41EC-B55B-AF8117E79C50@ORACLE.COM> (raw)
In-Reply-To: <616B2BE0-0C66-4736-90E5-ECAD1FA4F8AD@ORACLE.COM>
[-- Attachment #1: Type: text/plain, Size: 337 bytes --]
Hi,
Please take a look at the attached patch and let me know your comments.
Thanks.
Qing
gcc/ChangeLog:
2020-04-03 qing zhao <qing.zhao@oracle.com>
* common.opt: Add -flocation-ranges.
* doc/invoke.texi: Document it.
* toplev.c (process_options): set line_table->default_range_bits
to 0 when flag_location_ranges is false.
[-- Attachment #2: PR94230.patch --]
[-- Type: application/octet-stream, Size: 2183 bytes --]
diff --git a/gcc/common.opt b/gcc/common.opt
index 4368910..041cfd7 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -1597,6 +1597,10 @@ fkeep-gc-roots-live
Common Undocumented Report Var(flag_keep_gc_roots_live) Optimization
; Always keep a pointer to a live memory block
+flocation-ranges
+Common Report Var(flag_location_ranges) Init(1)
+Enable range tracking when recording source locations.
+
floop-parallelize-all
Common Report Var(flag_loop_parallelize_all) Optimization
Mark all loops as parallel.
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 96a9516..2faac62 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -574,7 +574,7 @@ Objective-C and Objective-C++ Dialects}.
-fdebug-cpp -fdirectives-only -fdollars-in-identifiers @gol
-fexec-charset=@var{charset} -fextended-identifiers @gol
-finput-charset=@var{charset} -fmacro-prefix-map=@var{old}=@var{new} @gol
--fmax-include-depth=@var{depth} @gol
+-fmax-include-depth=@var{depth} -flocation-ranges @gol
-fno-canonical-system-headers -fpch-deps -fpch-preprocess @gol
-fpreprocessed -ftabstop=@var{width} -ftrack-macro-expansion @gol
-fwide-exec-charset=@var{charset} -fworking-directory @gol
@@ -14151,6 +14151,13 @@ This option may be useful in conjunction with the @option{-B} or
perform additional processing of the program source between
normal preprocessing and compilation.
+@item -flocation-ranges
+@opindex flocation-ranges
+Enable range tracking when recording source locations.
+By default, GCC enables range tracking when recording source locations.
+If disable range tracking by -fno-location-ranges, more location space
+will be saved for column tracking.
+
@end table
@node Assembler Options
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 4c8be50..5d035de 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1854,6 +1854,9 @@ process_options (void)
hash_table_sanitize_eq_limit
= param_hash_table_verification_limit;
+ if (!flag_location_ranges)
+ line_table->default_range_bits = 0;
+
/* Please don't change global_options after this point, those changes won't
be reflected in optimization_{default,current}_node. */
}
[-- Attachment #3: Type: text/plain, Size: 1374 bytes --]
> Begin forwarded message:
>
> From: Qing Zhao via Gcc-patches <gcc-patches@gcc.gnu.org>
> Subject: [PATCH][gcc][PR94230]provide an option to change the size limitation for -Wmisleading-indent
> Date: April 3, 2020 at 2:55:53 PM CDT
> To: dmalcolm@redhat.com, jakub@redhat.com
> Cc: gcc-patches@gcc.gnu.org
> Reply-To: Qing Zhao <QING.ZHAO@ORACLE.COM>
>
> Hi, David and Jakub,
>
> Per the discussion we had for PR94230: provide an option to change the size limitation for -Wmisleading-indent
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94230 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94230>
>
> I come up with the following simple patch per David’s suggestion:
>
> Provide a new first class option -flocation-ranges to control enabling/disablng range tracking when recording source locations.
> The default value for this option is enabling the range tracking.
>
> When specify -fno-location-ranges, disable the range tracking to save space for column tracking.
>
> I have tested this GCC to build our huge application by adding -fno-location-ranges, the whole build completed without any issue. and
> -Wmisleading-indent also emitted several helpful warning message during building.
>
> I am running bootstrap right now.
>
> Could you please take a look at the attached patch?
>
> thanks.
>
> Qing
>
>
>
>
next prev parent reply other threads:[~2020-04-08 19:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-03 19:55 Qing Zhao
2020-04-08 19:39 ` Qing Zhao [this message]
2020-04-15 20:30 ` Fwd: PING " Qing Zhao
2020-04-21 14:04 ` Richard Sandiford
2020-04-21 15:21 ` David Malcolm
2020-04-21 18:46 ` Richard Sandiford
2020-04-22 14:22 ` Qing Zhao
2020-04-23 14:41 ` [Version 2][PATCH][gcc][PR94230]provide " Qing Zhao
2020-04-23 18:27 ` Richard Sandiford
2020-04-23 19:52 ` Qing Zhao
2020-04-23 21:05 ` [Version 3][PATCH][gcc][PR94230]provide " Qing Zhao
2020-04-23 22:13 ` David Malcolm
2020-04-24 22:22 ` [Version 4][PATCH][gcc][PR94230]provide " Qing Zhao
2020-04-24 22:36 ` David Malcolm
2020-04-27 14:23 ` Qing Zhao
2020-05-06 18:40 ` Committed [Version 3][PATCH][gcc][PR94230]provide " Qing Zhao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47B8948D-C9BA-41EC-B55B-AF8117E79C50@ORACLE.COM \
--to=qing.zhao@oracle.com \
--cc=dmalcolm@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).