forked from OSchip/llvm-project
75dfaa1dbe
Before this change we created an additional reload in the copy of the incoming block of a PHI node to reload the incoming value, even though the necessary value has already been made available by the normally generated scalar loads. In this change, we drop the code that generates this redundant reload and instead just reuse the scalar value already available. Besides making the generated code slightly cleaner, this change also makes sure that scalar loads go through the normal logic, which means they can be remapped (e.g. to array slots) and corresponding code is generated to load from the remapped location. Without this change, the original scalar load at the beginning of the non-affine region would have been remapped, but the redundant scalar load would continue to load from the old PHI slot location. It might be possible to further simplify the code in addOperandToPHI, but this would not only mean to pull out getNewValue, but to also change the insertion point update logic. As this did not work when trying it the first time, this change is likely not trivial. To not introduce bugs last minute, we postpone further simplications to a subsequent commit. We also document the current behavior a little bit better. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D28892 llvm-svn: 292486 |
||
---|---|---|
.. | ||
CodeGen | ||
Config | ||
Support | ||
Canonicalization.h | ||
DeLICM.h | ||
DependenceInfo.h | ||
FlattenAlgo.h | ||
FlattenSchedule.h | ||
LinkAllPasses.h | ||
Options.h | ||
PolyhedralInfo.h | ||
RegisterPasses.h | ||
ScheduleOptimizer.h | ||
ScopBuilder.h | ||
ScopDetection.h | ||
ScopDetectionDiagnostic.h | ||
ScopInfo.h | ||
ScopPass.h |