Extract the meat of processLoopStoreOfLoopLoad into a helper function, so that it can be re-used. In https://reviews.llvm.org/D97667 the helper function will be called when we hoise a memcpy instruction from the loop body into loop preheader.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp | ||
|---|---|---|
| 1087–1092 | Nit: reuse LoadPtr below? | |
| llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp | ||
|---|---|---|
| 1087–1092 | Could you clarify? Where should I reuse LoadPtr? | |
| llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp | ||
|---|---|---|
| 1087–1092 | There is a use of LI->getPointerOperand() at line 1088 that can be replaced by LoadPtr. Sorry for the confusion. | |
| llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp | ||
|---|---|---|
| 1087–1092 | Ah got it. Will do. | |
Nit: reuse LoadPtr below?