Re: [PATCH v2] gcc: do not apply store motion on loop with no exits.

2025-04-27 Thread Sam James
ywgrit writes: > I encountered one problem with loop-im pass. > I compiled the program dhry2reg which belongs to > unixbench(https://github.com/kdlucas/byte-unixbench). > > The gcc used > gcc (GCC) 12.3.0 > > The commands executed as following > make > ./Run -c -i 1 dhry2reg > > The results are

Re: [PATCH v2] gcc: do not apply store motion on loop with no exits.

2025-04-26 Thread ywgrit
I encountered one problem with loop-im pass. I compiled the program dhry2reg which belongs to unixbench( https://github.com/kdlucas/byte-unixbench). The gcc used gcc (GCC) 12.3.0 The commands executed as following make ./Run -c -i 1 dhry2reg The results are shown below. Dhrystone 2 using registe

[PATCH v2] gcc: do not apply store motion on loop with no exits.

2025-04-26 Thread Xin Wang
The temporary variable will not be wrote back to memory as there is no exit of inifinite loop, so we prohibit applying store motion on loops with no exits. Signed-off-by: Xin Wang --- gcc/tree-ssa-loop-im.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/tree-ssa-loop-im.cc b/gcc/tr