public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 00/17] Move builtin functions to range-ops.
@ 2022-09-22 18:49 Andrew MacLeod
  2022-09-22 18:53 ` [PATCH 01/17] Replace another snippet with a call to, gimple_range_ssa_names Andrew MacLeod
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: Andrew MacLeod @ 2022-09-22 18:49 UTC (permalink / raw)
  To: gcc-patches; +Cc: hernandez, aldy

Builtin functions have been handled until now as special cases in 
gimple-range-fold.cc. This set of patches makes the changes required to 
create a range_operator for those functions.  This allows them to behave 
like a normal unary/binary operation through out the ranger ecosystem.  
In particular, it will enable us to make GORI aware of them as we can 
now provide op1_range and op2_range routines, as well as registering an 
relations as needed.  None of these enhanced functions are provided yet, 
this is strictly a conversion.  This enables us to do this for any 
operation with 1 or 2 operands.

There are 17 patches, some are bug fixes, some are infrastructure, a 
couple are just missing functionality, but most are them are conversions 
of the builtins.  I did each builtin as a separate patch so if a 
regression triggers, we can pinpoint it faster.

Of note:

Patch 2 : Modifies the range_op_handler class to store an integer 
handler and a float handler rather than the old tree-code and type.  By 
looking up the handler immediately and storing the pointer, this opens 
up the possibility of processing handlers which are not in a tree-code 
table.

Patch 3 : Range-ops is suppose to be IL independent, designed to work in 
RTL land as well.  A little bit of gimple had crept in, and I needed a 
layer that is gimple aware.  This patch introduces a 
gimple_range_op_handler which inherits from range_op_handler, and acts 
as the connector between the gimple IL and range-ops. Some of that code 
was in range-ops, and a lot more was located in the GORI file.  All 
those bits and pieces have been moved into the new class.

Patch 7 : This patch adjusts gimple_range_op_handler constructor to also 
check if a builtin function call might have a range_operator object 
available, and if so, return that.  This initial conversion also adds 
CFN_BUILT_IN_CONSTANT_P as the first builtin, removing it from the big 
switch in gimple-range-fold.cc.

Patch 8-16 :  Moves SIGNBIT, TOUPPER/LOWER, POPCOUNT, CLZ, CTZ, CLRSB, 
UBSAN*, STRLEN, and GOACC to range-ops.

patch 17: Finally, moves CFA_BUILT_IN_PARITY to range-ops, and removes 
the builtin-function code checks from range_of_call in gimple_range-fold.cc

These patches all bootstrap on x86_64-pc-linux-gnu with no regressions. 
   Performance wise, it all ends up as approximately a wash. (VRP a hair 
slower, threading a hair faster)

Pushed.

Andrew


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-09-22 19:10 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22 18:49 [PATCH 00/17] Move builtin functions to range-ops Andrew MacLeod
2022-09-22 18:53 ` [PATCH 01/17] Replace another snippet with a call to, gimple_range_ssa_names Andrew MacLeod
2022-09-22 18:55 ` [PATCH 02/17] Adjust range_op_handler to store the handler directly Andrew MacLeod
2022-09-22 18:56 ` [PATCH 03/17] Create gimple_range_op_handler in a new source file Andrew MacLeod
2022-09-22 18:58 ` [PATCH 04/17] Fix calc_op1 for undefined op2_range Andrew MacLeod
2022-09-22 18:59 ` [PATCH 05/17] Add missing float fold_range prototype for floats Andrew MacLeod
2022-09-22 19:00 ` [PATCH 06/17] Always check the return value of fold_range Andrew MacLeod
2022-09-22 19:01 ` [PATCH 07/17] Add range-ops support for builtin functions Andrew MacLeod
2022-09-22 19:02 ` [PATCH 08/17] Convert CFN_BUILT_IN_SIGNBIT to range-ops Andrew MacLeod
2022-09-22 19:05 ` [PATCH 09/17] Convert CFN_BUILT_IN_TOUPPER and TOLOWER " Andrew MacLeod
2022-09-22 19:05 ` [PATCH 10/17] Convert CFN_BUILT_FFS and CFN_POPCOUNT " Andrew MacLeod
2022-09-22 19:05 ` [PATCH 11/17] Convert CFN_CLZ builtins " Andrew MacLeod
2022-09-22 19:05 ` [PATCH 12/17] Convert CFN_CTZ " Andrew MacLeod
2022-09-22 19:06 ` [PATCH 13/17] Convert CFN_BUILT_IN_CLRSB " Andrew MacLeod
2022-09-22 19:06 ` [PATCH 14/17] Convert CFN_BUILT_IN_UBSAN_CHECK_* " Andrew MacLeod
2022-09-22 19:08 ` [PATCH 15/17] Convert CFN_BUILT_IN_STRLEN " Andrew MacLeod
2022-09-22 19:10 ` [PATCH 16/17] Convert CFN_BUILT_IN_GOACC_DIM_* " Andrew MacLeod
2022-09-22 19:10 ` [PATCH 17/17] Convert CFN_BUILT_IN_PARITY " Andrew MacLeod

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).