[PATCH v3 2/3] Add predict_doloop_p target hook

2019-05-16 Thread linkw
From: Kewen Lin Hi, Previous version link: https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00654.html Comparing with the previous version, I moved the generic parts of rs6000 target hook to IVOPTs. But I still kept the target hook as previous which checks some target specific criteria like

[PATCH v2 2/3] Add predict_doloop_p target hook

2019-05-13 Thread linkw
From: Kewen Lin Previous version link for background: https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00912.html This hook is to predict whether one loop in gimple will be transformed to low-overhead loop later in RTL, and designed to be called in ivopts. "Since the low-overhead loop optimize

[PATCH v2 3/3] Consider doloop cmp use in ivopts

2019-05-13 Thread linkw
From: Kewen Lin Previous version link for background: https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00912.html Firstly, it's to call predict_doloop_p hook to check this loop will be transformed to doloop or not, if yes, find the expected comp iv use and its dependent original iv, set the iv

[PATCH v2 1/3] Move prepare_decl_rtl to expr.[ch] as extern

2019-05-13 Thread linkw
From: Kewen Lin Previous version link: https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00912.html This is a NFC (no functional change) patch. Ivopts has some codes to expand gimple to RTL seq, but before call expanding, we should call a preparation funciton prepare_decl_rtl. This patch is to