* [PATCH 2/3] Fix params.exp by parsing output of --help=params -Q.
2019-11-13 8:09 [PATCH 0/3] Param conversion fallout Martin Liska
2019-11-13 8:09 ` [PATCH 3/3] Update comment in opts.c Martin Liska
@ 2019-11-13 8:09 ` Martin Liska
2019-11-13 8:11 ` [PATCH 1/3] Remove leftover call to finalize_options_struct Martin Liska
2 siblings, 0 replies; 4+ messages in thread
From: Martin Liska @ 2019-11-13 8:09 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 281 bytes --]
gcc/testsuite/ChangeLog:
2019-11-12 Martin Liska <mliska@suse.cz>
* gcc.dg/params/params.exp: Restore test by parsing output
of --help=params -Q.
---
gcc/testsuite/gcc.dg/params/params.exp | 42 ++++++++++++--------------
1 file changed, 19 insertions(+), 23 deletions(-)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-Fix-params.exp-by-parsing-output-of-help-params-Q.patch --]
[-- Type: text/x-patch; name="0002-Fix-params.exp-by-parsing-output-of-help-params-Q.patch", Size: 1883 bytes --]
diff --git a/gcc/testsuite/gcc.dg/params/params.exp b/gcc/testsuite/gcc.dg/params/params.exp
index 801a1e4bc52..191965b82ca 100644
--- a/gcc/testsuite/gcc.dg/params/params.exp
+++ b/gcc/testsuite/gcc.dg/params/params.exp
@@ -31,37 +31,33 @@ proc param_run_test { param_name param_value } {
dg-runtest $srcdir/$subdir/blocksort-part.c "-O3 --param $param_name=$param_value" ""
}
-set options_file "$objdir/../../params.options"
-if { [info exists TESTING_IN_BUILD_TREE] == 0 } {
- return
-}
-
-set fd [open $options_file r]
-set text [read $fd]
+set srcfname params-[pid].c
+set fd [open $srcfname w]
+puts $fd ""
close $fd
+remote_download host $srcfname
+
+set gcc_options "\{additional_flags=--help=params\}"
+set text [gcc_target_compile $srcfname $srcfname.x executable $gcc_options]
+remote_file build delete $srcfname $srcfname.x
# Main loop.
foreach params [split $text "\n"] {
- set parts [split $params "="]
- set name [string trim [lindex $parts 0] '"']
- set values [split [lindex $parts 1] ","]
- if { [llength $values] == 3 } {
- set default [lindex $values 0]
- set min [lindex $values 1]
- set max [lindex $values 2]
- set int_max "INT_MAX"
+ set parts [split $params " =<>,"]
+ if { [llength $parts] >= 8 } {
+ set param [lindex $parts 2]
+ set name [lindex $parts 3]
+ set min [lindex $parts 5]
+ set max [lindex $parts 6]
+ if { [ string equal $param "--param" ] && [string is integer -strict $min] && [string is integer -strict $max] } {
if { $min != -1 } {
- param_run_test $name $min
+ param_run_test $name $min
}
- if { $max != $min && $max > 0 && $max != $int_max } {
- param_run_test $name $max
- }
- }
- if { [llength $values] == 5 } {
- foreach v $values {
- param_run_test $name $v
+ if { $max != $min && $max > 0 } {
+ param_run_test $name $max
}
+ }
}
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 3/3] Update comment in opts.c.
2019-11-13 8:09 [PATCH 0/3] Param conversion fallout Martin Liska
@ 2019-11-13 8:09 ` Martin Liska
2019-11-13 8:09 ` [PATCH 2/3] Fix params.exp by parsing output of --help=params -Q Martin Liska
2019-11-13 8:11 ` [PATCH 1/3] Remove leftover call to finalize_options_struct Martin Liska
2 siblings, 0 replies; 4+ messages in thread
From: Martin Liska @ 2019-11-13 8:09 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 194 bytes --]
gcc/ChangeLog:
2019-11-13 Martin Liska <mliska@suse.cz>
* opts.c: Update comment about OPT_LEVELS_2_PLUS_SPEED_ONLY.
---
gcc/opts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0003-Update-comment-in-opts.c.patch --]
[-- Type: text/x-patch; name="0003-Update-comment-in-opts.c.patch", Size: 636 bytes --]
diff --git a/gcc/opts.c b/gcc/opts.c
index faf2eef082e..74f05f1b58d 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -508,7 +508,7 @@ static const struct default_options default_options_table[] =
{ OPT_LEVELS_2_PLUS, OPT_fvect_cost_model_, NULL, VECT_COST_MODEL_CHEAP },
{ OPT_LEVELS_2_PLUS, OPT_finline_functions, NULL, 1 },
- /* -O2 and -Os optimizations. */
+ /* -O2 and above optimizations, but not -Os or -Og. */
{ OPT_LEVELS_2_PLUS_SPEED_ONLY, OPT_falign_functions, NULL, 1 },
{ OPT_LEVELS_2_PLUS_SPEED_ONLY, OPT_falign_jumps, NULL, 1 },
{ OPT_LEVELS_2_PLUS_SPEED_ONLY, OPT_falign_labels, NULL, 1 },
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 0/3] Param conversion fallout
@ 2019-11-13 8:09 Martin Liska
2019-11-13 8:09 ` [PATCH 3/3] Update comment in opts.c Martin Liska
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Martin Liska @ 2019-11-13 8:09 UTC (permalink / raw)
To: gcc-patches
Hi.
The patch is about fixing some leftover from the conversion
of parameters to option machinery.
First patch removes a dead call in a OFFLOADING compiler
conditional build. Second fixes params.exp tests and last
is a small update of a comment in opts.c.
Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
I'm going to install the whole series if there are no objections.
Thanks,
Martin
Martin Liska (3):
Remove leftover call to finalize_options_struct.
Fix params.exp by parsing output of --help=params -Q.
Update comment in opts.c.
gcc/opts.c | 2 +-
gcc/testsuite/gcc.dg/params/params.exp | 42 ++++++++++++--------------
gcc/tree-streamer-in.c | 1 -
3 files changed, 20 insertions(+), 25 deletions(-)
--
2.24.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] Remove leftover call to finalize_options_struct.
2019-11-13 8:09 [PATCH 0/3] Param conversion fallout Martin Liska
2019-11-13 8:09 ` [PATCH 3/3] Update comment in opts.c Martin Liska
2019-11-13 8:09 ` [PATCH 2/3] Fix params.exp by parsing output of --help=params -Q Martin Liska
@ 2019-11-13 8:11 ` Martin Liska
2 siblings, 0 replies; 4+ messages in thread
From: Martin Liska @ 2019-11-13 8:11 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 234 bytes --]
gcc/ChangeLog:
2019-11-12 Martin Liska <mliska@suse.cz>
* tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
Remove call to finalize_options_struct.
---
gcc/tree-streamer-in.c | 1 -
1 file changed, 1 deletion(-)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Remove-leftover-call-to-finalize_options_struct.patch --]
[-- Type: text/x-patch; name="0001-Remove-leftover-call-to-finalize_options_struct.patch", Size: 512 bytes --]
diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c
index d971a74f2b0..b15acb06650 100644
--- a/gcc/tree-streamer-in.c
+++ b/gcc/tree-streamer-in.c
@@ -798,7 +798,6 @@ lto_input_ts_function_decl_tree_pointers (class lto_input_block *ib,
cl_optimization_restore (&tmp, TREE_OPTIMIZATION (opts));
finish_options (&tmp, &global_options_set, UNKNOWN_LOCATION);
opts = build_optimization_node (&tmp);
- finalize_options_struct (&tmp);
DECL_FUNCTION_SPECIFIC_OPTIMIZATION (expr) = opts;
}
}
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-11-13 8:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-13 8:09 [PATCH 0/3] Param conversion fallout Martin Liska
2019-11-13 8:09 ` [PATCH 3/3] Update comment in opts.c Martin Liska
2019-11-13 8:09 ` [PATCH 2/3] Fix params.exp by parsing output of --help=params -Q Martin Liska
2019-11-13 8:11 ` [PATCH 1/3] Remove leftover call to finalize_options_struct Martin Liska
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).