On 27/07/15 04:10, tbsaunde+...@tbsaunde.org wrote: > From: Trevor Saunders <tbsaunde+...@tbsaunde.org> > > Hi, > > $subject. > > patches individually bootstrapped + regtested on x86_64-linux-gnu, and run > through config-list.mk with more patches removing usage of the macro. Ok? > > Trev > > Trevor Saunders (9): > remove POINTER_SIZE_UNITS macro > add pointer_size target hook > target.h: change to use targetm.pointer_size instead of POINTER_SIZE > varasm.c: switch from POINTER_SIZE to targetm.pointer_size () > ubsan.c: switch from POINTER_SIZE to targetm.pointer_size () > tree-chkp.c: switch to targetm.pointer_size () > stor-layout.c: switch to targetm.pointer_size () > tree.c: switch to targetm.pointer_size () > emit-rtl.c: switch to targetm.pointer_size () > > gcc/c-family/c-cppbuiltin.c | 2 +- > gcc/defaults.h | 3 --- > gcc/doc/tm.texi | 7 +++++++ > gcc/doc/tm.texi.in | 2 ++ > gcc/dwarf2asm.c | 4 ++-- > gcc/emit-rtl.c | 5 +++-- > gcc/lto/lto-object.c | 3 ++- > gcc/stor-layout.c | 9 +++++---- > gcc/target.def | 8 ++++++++ > gcc/target.h | 8 ++++++++ > gcc/targhooks.c | 8 ++++++++ > gcc/targhooks.h | 1 + > gcc/tree-chkp.c | 14 ++++++++------ > gcc/tree.c | 3 ++- > gcc/ubsan.c | 3 ++- > gcc/varasm.c | 12 ++++++------ > 16 files changed, 65 insertions(+), 27 deletions(-) >
I'm getting a bit worried about the potential performance impact from all these indirect function call hooks. This is a good example of when it's probably somewhat unnecessary. I doubt that the compiler could function correctly if this ever changed in the middle of a function. It would be much better if targetm.pointer_size was a variable that could be modified by back-end code on those few occasions when that might be really necessary. R.