[PATCH] D120314: [NFC][SCEV] Give hints on why we forget loops
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 7 08:57:50 PST 2022
reames added a comment.
I'm having a hard time wrapping my head around what this patch does and is expected to do.
If I'm reading the prior review correct, clearing the LoopUsers can result in functional bugs. Given that, this "hint" isn't really a hint. You must get it right, or you may have a functional bug. But this patch seems to be adding more cases where we clear LoopUsers? Is this a functional fix?
If not, what is the compile time impact of leaving LoopUsers in place when we could clear it? Is it significant? If not, introducing complexity here does not seem worthwhile.
As an aside, I'd naively expect the loop association to be cleared when the AddRec is. Is there a reason we can't identify the loop dependent SCEVS, forgetValue them, and let forgetValue handle the actual map manipulation? Seems conceptually cleaner and less error prone. (Unless I'm missing something - which is very possible.)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120314/new/
https://reviews.llvm.org/D120314
More information about the llvm-commits
mailing list