llvm-project/polly/include/polly
Tobias Grosser 75dfaa1dbe BlockGenerator: Do not redundantly reload from PHI-allocas in non-affine stmts
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
2017-01-19 14:12:45 +00:00
..
CodeGen BlockGenerator: Do not redundantly reload from PHI-allocas in non-affine stmts 2017-01-19 14:12:45 +00:00
Config Remove autotools build system 2016-01-28 12:00:33 +00:00
Support Tidy up getFirstNonBoxedLoopFor [NFC] 2017-01-16 22:54:29 +00:00
Canonicalization.h Drop '@brief' from doxygen comments 2016-09-02 06:33:33 +00:00
DeLICM.h [DeLICM] Add pass boilerplate code. 2016-11-29 16:41:21 +00:00
DependenceInfo.h Fix typo. 2016-11-23 21:59:33 +00:00
FlattenAlgo.h Add -polly-flatten-schedule pass. 2016-09-08 15:02:36 +00:00
FlattenSchedule.h Add -polly-flatten-schedule pass. 2016-09-08 15:02:36 +00:00
LinkAllPasses.h [DeLICM] Add pass boilerplate code. 2016-11-29 16:41:21 +00:00
Options.h Move polly options into separate option category 2013-05-07 07:31:10 +00:00
PolyhedralInfo.h Drop '@brief' from doxygen comments 2016-09-02 06:33:33 +00:00
RegisterPasses.h clang-tidy: Add llvm namespace comments 2016-06-23 22:17:27 +00:00
ScheduleOptimizer.h The order of the loops defines the data reused in the BLIS implementation of 2016-12-15 11:47:38 +00:00
ScopBuilder.h Use typed enums to model MemoryKind and move MemoryKind out of ScopArrayInfo 2017-01-14 20:25:44 +00:00
ScopDetection.h Allow to disable unsigned operations (zext, icmp ugt, ...) 2016-12-02 17:55:41 +00:00
ScopDetectionDiagnostic.h [ScopDetectionDiagnostic] Collect statistics for each diagnostic type 2016-11-26 05:53:09 +00:00
ScopInfo.h ScopInfo: split out construction of a single alias group [NFC] 2017-01-16 15:49:07 +00:00
ScopPass.h Drop '@brief' from doxygen comments 2016-09-02 06:33:33 +00:00