Craig Topper via llvm-dev
2017-Apr-07 20:25 UTC
[llvm-dev] Should ValueTracking::GetUnderlyingObject stop on Alloca instructions rather than calling SimplifyInstruction?
I notice that GetUnderlyingObject has a few checks, but alloca isn't one of them. Then it fall backs to SimplifyInstruction which doesn't know about alloca so falls back to just trying to constant fold it. This seems a little silly since I assume alloca can't be constant folded. Should we just detect this early in GetUnderlyingObject and stop? ~Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170407/64d9bb28/attachment.html>
Craig Topper via llvm-dev
2017-Apr-12 21:23 UTC
[llvm-dev] Should ValueTracking::GetUnderlyingObject stop on Alloca instructions rather than calling SimplifyInstruction?
Ping ~Craig On Fri, Apr 7, 2017 at 1:25 PM, Craig Topper <craig.topper at gmail.com> wrote:> I notice that GetUnderlyingObject has a few checks, but alloca isn't one > of them. Then it fall backs to SimplifyInstruction which doesn't know about > alloca so falls back to just trying to constant fold it. This seems a > little silly since I assume alloca can't be constant folded. Should we just > detect this early in GetUnderlyingObject and stop? > > ~Craig >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170412/2108dc77/attachment.html>
Hal Finkel via llvm-dev
2017-Apr-12 21:46 UTC
[llvm-dev] Should ValueTracking::GetUnderlyingObject stop on Alloca instructions rather than calling SimplifyInstruction?
Yep. Makes sense to me. There's nothing to simplify or constant-fold about an alloca. -Hal On 04/12/2017 04:23 PM, Craig Topper wrote:> Ping > > ~Craig > > On Fri, Apr 7, 2017 at 1:25 PM, Craig Topper <craig.topper at gmail.com > <mailto:craig.topper at gmail.com>> wrote: > > I notice that GetUnderlyingObject has a few checks, but alloca > isn't one of them. Then it fall backs to SimplifyInstruction which > doesn't know about alloca so falls back to just trying to constant > fold it. This seems a little silly since I assume alloca can't be > constant folded. Should we just detect this early in > GetUnderlyingObject and stop? > > ~Craig > >-- Hal Finkel Lead, Compiler Technology and Programming Languages Leadership Computing Facility Argonne National Laboratory -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170412/5437a8c3/attachment.html>
Reasonably Related Threads
- Should ValueTracking::GetUnderlyingObject stop on Alloca instructions rather than calling SimplifyInstruction?
- [LLVMdev] ValueTracking's GetUnderlyingObject vs. ScheduleDAGInstrs' getUnderlyingObject
- [LLVMdev] ValueTracking's GetUnderlyingObject vs. ScheduleDAGInstrs' getUnderlyingObject
- [LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter
- [LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter