diff options
author | Jakub Jelinek <jakub@redhat.com> | 2022-02-11 19:47:14 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2022-02-11 19:47:14 +0100 |
commit | b56ad95854f0b007afda60c057f10b04666953c9 (patch) | |
tree | 7362cc377c99e42106d087d920c05d2a2ee5b2ff /compile | |
parent | 274a4d29421e73c9b40c1641986c6ed904e20184 (diff) | |
download | gcc-b56ad95854f0b007afda60c057f10b04666953c9.zip gcc-b56ad95854f0b007afda60c057f10b04666953c9.tar.gz gcc-b56ad95854f0b007afda60c057f10b04666953c9.tar.bz2 |
middle-end: Small __builtin_clear_padding improvements
When looking at __builtin_clear_padding today, I've noticed that
it is quite wasteful to extend the original user one argument to 3,
2 is enough. We need to encode the original type of the first argument
because pointer conversions are useless in GIMPLE, and we need to record
a boolean whether it is for -ftrivial-auto-var-init=* or not.
But for recording the type we don't need the value (we've always used
zero) and for recording the boolean we don't need the type (we've always
used integer_type_node).
So, this patch merges the two into one.
2022-02-11 Jakub Jelinek <jakub@redhat.com>
* tree.cc (build_common_builtin_nodes): Fix up formatting in
__builtin_clear_padding decl creation.
* gimplify.cc (gimple_add_padding_init_for_auto_var): Encode
for_auto_init in the value of 2nd BUILT_IN_CLEAR_PADDING
argument rather than in 3rd argument.
(gimplify_call_expr): Likewise. Fix up comment formatting.
* gimple-fold.cc (gimple_fold_builtin_clear_padding): Expect
2 arguments instead of 3, take for_auto_init from the value
of 2nd argument.
Diffstat (limited to 'compile')
0 files changed, 0 insertions, 0 deletions