[PATCH] IndVarSimplify : do not recompute an IV value used outside of the loop if it is trivially known not to be beneficial

Arnaud de Grandmaison arnaud.adegm at gmail.com
Thu Mar 14 15:08:53 PDT 2013


On Tuesday 05 March 2013 10:14:37 Andrew Trick wrote:
> On Mar 5, 2013, at 7:30 AM, "Arnaud A. de Grandmaison" 
<arnaud.adegm at gmail.com> wrote:
> >> I would at least gather optimization stats across llvm test-suite before
> >> supressing exit value replacement to make sure we're not preventing
> >> other optimization.> 
> > I have never done that before, but that's a good time to start :)
> 
> There should be a way to gather stats with lnt, but I don't know how.
> Unfortunately, I still use the TEST=nightly like this:
> 
> make build -j8 TEST=nightly \
> TARGET_FLAGS="-arch x86_64 -Wno-error=implicit-function-declaration" \
> OPTFLAGS=-O3 ARCH=x86_64 CC_UNDER_TEST_TARGET_IS_X86_64=1 \
> ENABLE_BUILT_CLANG=1 LLVMCC_OPTION=clang CC_UNDER_TEST_IS_CLANG=1
> 
> And the attached python script to compare runs.
> 
> -Andy

Hi Andy

Thanks for the pointers and apologize for the delay. It took me some time to 
be able to use the lnt, I believe this time is worth the investment.

The attached patch addresses the different points we have discussed. I have 
also added another testcase. I have not noticed any performance regression 
with lnt as this optimization is not triggered --- with lnt's stock testcases. 
On the other hand, the optimization triggers on real code on my targets.

Cheers,
--
Arnaud de Grandmaison
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-IndVarSimplify-do-not-recompute-an-IV-value-outside-.patch
Type: text/x-patch
Size: 5405 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130314/62f89084/attachment.bin>


More information about the llvm-commits mailing list