[PATCH] D142240: [LSR] Generalize one aspect of terminator folding (recently introduced in D132443)
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 20 11:53:23 PST 2023
reames added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:6714
}
- // TODO: Right now we limit the phi node to help the folding be of a start
- // value of getelementptr. We can extend to any kinds of IV as long as it is
- // an affine AddRec. Add a switch to cover more types of instructions here
- // and down in the actual transformation.
- return {isa<GetElementPtrInst>(PN.getIncomingValueForBlock(LoopPreheader)),
- TermValueS};
+ return {true, TermValueS};
};
----------------
nikic wrote:
> The bool return value can be dropped -- check nullptr return instead.
I plan to do this in a followup NFC. There's a bunch of other simplification that follows, and some of the naming could stand cleaned up too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142240/new/
https://reviews.llvm.org/D142240
More information about the llvm-commits
mailing list