HomePhabricator

[SCEV] Try to reuse existing value during SCEV expansion

Description

[SCEV] Try to reuse existing value during SCEV expansion

Current SCEV expansion will expand SCEV as a sequence of operations
and doesn't utilize the value already existed. This will introduce
redundent computation which may not be cleaned up throughly by
following optimizations.

This patch introduces an ExprValueMap which is a map from SCEV to the
set of equal values with the same SCEV. When a SCEV is expanded, the
set of values is checked and reused whenever possible before generating
a sequence of operations.

Differential Revision: http://reviews.llvm.org/D12090

Details

Committed
wmiFeb 3 2016, 9:05 AM
Differential Revision
D12090: Try to reuse existing value during SCEV expansion
Parents
rL259661: Merging r259493:
Branches
Unknown
Tags
Unknown