Daniel Berlin
2015-Jun-11 00:11 UTC
[LLVMdev] BasicAA unable to analyze recursive PHI nodes
On Wed, Jun 10, 2015 at 4:09 PM, Tobias Edler von Koch <tobias at codeaurora.org> wrote:> It probably will, but it isn't on by default (right?)True, but so what?> and has quite a > lot more overhead.I didn't see numbers one way or the other. It probably has some overhead, if it's the right solution, i'm sure it can be ade faster.> I think this is a common enough case for it to be > handled by BasicAA. >Can you provide some evidence? IE hard numbers of how often it occurs on some set of benchmarks or something, and what the compile time cost is? It's really hard to say whether this is the right tradeoff without any data.> On Wed, 10 Jun 2015 15:52:07 -0700 Sanjoy Das > <sanjoy at playingwithpointers.com> wrote: > >> Sorry for missing this the first time around, but I think -scev-aa >> does what you want. I've commented on the phabricator review. >> >> On Wed, Jun 10, 2015 at 3:32 PM, Tobias Edler von Koch >> <tobias at codeaurora.org> wrote: >> > On Tue, 2 Jun 2015 11:32:13 -0500 Tobias Edler von Koch >> > <tobias at codeaurora.org> wrote: >> > >> >> Hi all, >> >> >> >> I came across the following limitation in our BasicAliasAnalysis. This >> >> happens with the following IR pattern: >> >> >> >> %x = phi [ %incptr, ... ] [ %var, ... ] >> >> %incptr = getelementptr %x, 1 >> >> >> >> We will basically always return MayAlias for %x and any other value >> >> because aliasPHI recurses on the first value and gives up. >> > >> > Patch now posted as http://reviews.llvm.org/D10368 >> > >> > Tobias >> > >> > -- >> > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a >> > Linux Foundation Collaborative Project. >> > _______________________________________________ >> > LLVM Developers mailing list >> > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > > -- > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a > Linux Foundation Collaborative Project. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Tobias Edler von Koch
2015-Jun-11 15:02 UTC
[LLVMdev] BasicAA unable to analyze recursive PHI nodes
Hi Daniel, On Wed, 10 Jun 2015 17:11:02 -0700 Daniel Berlin <dberlin at dberlin.org> wrote:> > I didn't see numbers one way or the other. It probably has some > overhead, if it's the right solution, i'm sure it can be ade faster.As far as I remember, scev-aa is off because of limitations in the current pass manager that would mean it would have to be recalculated far too often.> > > I think this is a common enough case for it to be > > handled by BasicAA. > > > > Can you provide some evidence? > > IE hard numbers of how often it occurs on some set of benchmarks or > something, and what the compile time cost is? > > It's really hard to say whether this is the right tradeoff without any data.I agree. We're seeing about 3% improvement on a number of internal benchmarks, but I'll give this a try on SPEC etc. and share the results here (including compile time). Thanks for your comments! Tobias -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
----- Original Message -----> From: "Tobias Edler von Koch" <tobias at codeaurora.org> > To: "Daniel Berlin" <dberlin at dberlin.org> > Cc: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> > Sent: Thursday, June 11, 2015 10:02:37 AM > Subject: Re: [LLVMdev] BasicAA unable to analyze recursive PHI nodes > > Hi Daniel, > > On Wed, 10 Jun 2015 17:11:02 -0700 Daniel Berlin > <dberlin at dberlin.org> > wrote: > > > > > I didn't see numbers one way or the other. It probably has some > > overhead, if it's the right solution, i'm sure it can be ade > > faster. > > As far as I remember, scev-aa is off because of limitations in the > current pass manager that would mean it would have to be recalculated > far too often.That's correct. It also may need some caching, or other performance-related work, to be sufficiently efficient to be on by default.> > > > > > I think this is a common enough case for it to be > > > handled by BasicAA. > > > > > > > Can you provide some evidence? > > > > IE hard numbers of how often it occurs on some set of benchmarks or > > something, and what the compile time cost is? > > > > It's really hard to say whether this is the right tradeoff without > > any data. > > I agree. We're seeing about 3% improvement on a number of internal > benchmarks, but I'll give this a try on SPEC etc. and share the > results > here (including compile time).Sounds good; please do. -Hal> > Thanks for your comments! > > Tobias > > -- > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a > Linux Foundation Collaborative Project. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-- Hal Finkel Assistant Computational Scientist Leadership Computing Facility Argonne National Laboratory