aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-stdarg.cc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2023-06-15 08:49:27 +0200
committerJakub Jelinek <jakub@redhat.com>2023-06-15 08:49:27 +0200
commit4e31e63ea7edffd1212fc17ce8d50672035bb64b (patch)
tree6d8b849025561968fa1b7aa91dbdd92bf196b349 /gcc/tree-stdarg.cc
parentea616f687dccbe42012f786c0ebade5b05850206 (diff)
downloadgcc-4e31e63ea7edffd1212fc17ce8d50672035bb64b.zip
gcc-4e31e63ea7edffd1212fc17ce8d50672035bb64b.tar.gz
gcc-4e31e63ea7edffd1212fc17ce8d50672035bb64b.tar.bz2
middle-end: Move constant args folding of .UBSAN_CHECK_* and .*_OVERFLOW into fold-const-call.cc
Here is an incremental patch to handle constant folding of these in fold-const-call.cc rather than gimple-fold.cc. Not really sure if that is the way to go because it is replacing 28 lines of former code with 65 of new code, for the overall benefit that say int foo (long long *p) { int one = 1; long long max = __LONG_LONG_MAX__; return __builtin_add_overflow (one, max, p); } can be now fully folded already in ccp1 pass while before it was only cleaned up in forwprop1 pass right after it. On Wed, Jun 14, 2023 at 12:25:46PM +0000, Richard Biener wrote: > I think that's still very much desirable so this followup looks OK. > Maybe you can re-base it as prerequesite though? Rebased then (of course with the UADDC/USUBC handling removed from this first patch, will be added in the second one). 2023-06-15 Jakub Jelinek <jakub@redhat.com> * gimple-fold.cc (gimple_fold_call): Move handling of arg0 as well as arg1 INTEGER_CSTs for .UBSAN_CHECK_{ADD,SUB,MUL} and .{ADD,SUB,MUL}_OVERFLOW calls from here... * fold-const-call.cc (fold_const_call): ... here.
Diffstat (limited to 'gcc/tree-stdarg.cc')
0 files changed, 0 insertions, 0 deletions