[PATCH PR94442] [AArch64] Redundant ldp/stp instructions emitted at -O3
xiezhiheng
xiezhiheng@huawei.com
Thu Jul 30 02:43:42 GMT 2020
> -----Original Message-----
> From: Richard Sandiford [mailto:richard.sandiford@arm.com]
> Sent: Friday, July 17, 2020 5:04 PM
> To: xiezhiheng <xiezhiheng@huawei.com>
> Cc: Richard Biener <richard.guenther@gmail.com>; gcc-patches@gcc.gnu.org
> Subject: Re: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions
> emitted at -O3
>
Cut...
>
> Thanks, pushed to master.
>
> Richard
And I have finished the second part.
In function aarch64_general_add_builtin, I add an argument ATTRS to
pass attributes for each built-in function.
And some new functions are added:
aarch64_call_properties: return flags for each built-in function based
on command-line options. When the built-in function handles
floating-points, add FLAG_FP flag.
aarch64_modifies_global_state_p: True if the function would modify
global states.
aarch64_reads_global_state_p: True if the function would read
global states.
aarch64_could_trap_p: True if the function would raise a signal.
aarch64_add_attribute: Add attributes in ATTRS.
aarch64_get_attributes: return attributes for each built-in functons
based on flags and command-line options.
In function aarch64_init_simd_builtins, attributes are get by flags
and pass them to function aarch64_general_add_builtin.
Bootstrap is tested OK on aarch64 Linux platform, but regression
FAIL one test case ---- pr93423.f90.
However, I found that this test case would fail randomly in trunk.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93423
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96041
Some PRs have tracked it. After my patch, this test case would
always fail. I guess the syntax errors in fortran crash some structures
result in illegal memory access but I can't find what exactly it is.
But I think my patch should have no influence on it.
Have some further suggestions?
Thanks,
Xiezhiheng
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 871b97c8543..8882ec1d59a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,15 @@
+2020-07-30 Zhiheng Xie <xiezhiheng@huawei.com>
+
+ * config/aarch64/aarch64-builtins.c (aarch64_general_add_builtin):
+ Add new argument ATTRS.
+ (aarch64_call_properties): New function.
+ (aarch64_modifies_global_state_p): Likewise.
+ (aarch64_reads_global_state_p): Likewise.
+ (aarch64_could_trap_p): Likewise.
+ (aarch64_add_attribute): Likewise.
+ (aarch64_get_attributes): Likewise.
+ (aarch64_init_simd_builtins): Add attributes for each built-in function.
+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr94442-v1.patch
Type: application/octet-stream
Size: 5075 bytes
Desc: pr94442-v1.patch
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200730/7948628a/attachment.obj>
More information about the Gcc-patches
mailing list