[PATCH][1/2] Move mult synthesis definitions into a separate file
Kyrill Tkachov
kyrylo.tkachov@foss.arm.com
Mon Jun 13 12:23:00 GMT 2016
Hi all,
There are other places besides expand where we might want to synthesize an integer
multiplication by a constant. Thankfully the algorithm selection code in expmed.c
is already quite well separated from the RTL implementation, so if we can just factor
out the prototype of choose_mult_variant and some enums and structs that it needs into
a separate header file we can reuse them from other parts of the compiler.
I need this for patch 2/2 which hooks up the vectorizer to synthesize vector
multiplications using sequences of shifts and other arithmetic ops when appropriate.
The new header is called mult-synthesis.h. Should I add it to some makefile?
grepping around for a bit I'm not sure what to do about it.
Bootstrapped and tested on arm, aarch64, x86_64.
Thanks,
Kyrill
2016-06-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* mult-synthesis.h: New file. Add choose_mult_variant prototype.
* expmed.h: Include mult-synthesis.h
(enum alg_code): Move to mult-synthesis.h
(struct mult_cost): Likewise.
(struct algorithm): Likewise.
* expmed.c (enum mult_variant): Move to mult-synthesis.h
(choose_mult_variant): Delete prototype. Remove static qualifier.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vect-1.patch
Type: text/x-patch
Size: 8276 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160613/985a4ff0/attachment.bin>
More information about the Gcc-patches
mailing list