This is an archive of the discontinued LLVM Phabricator instance.

[Polly][ScopBuilder] Revise statement naming when there are multiple statements per BB.
ClosedPublic

Authored by Meinersbur on Jan 16 2018, 2:52 PM.

Details

Summary

The goal is to have -polly-stmt-granularity=bb and -polly-stmt-granularity=scalar-indep to have the same names if there is just one statement per basic block.

This fixes a fluke when Polybench's jacobi-2d is optimized differently depending on the -polly-stmt-granularity option, although both options create the same SCoP, just with different statement names.

The new naming scheme is:

With -polly-use-llvm-names=0:
Stmt<BBIdx as decimal><Idx within BB as letter>

With -polly-use-llvm-names=1:
Stmt_BBName_<Idx within BB as letter>

The <Idx within BB> suffix is omitted for the main statement of a BB. The main statement is either the one containing the first store or call (those cannot be removed by the simplifyer), or if there is no such instruction, the first. If after simplification there is just a single statement left, it should be the main statement and have the same names as with -polly-stmt-granularity=bb.

Diff Detail

Repository
rL LLVM

Event Timeline

Meinersbur created this revision.Jan 16 2018, 2:52 PM
Meinersbur edited the summary of this revision. (Show Details)Jan 16 2018, 2:53 PM
Meinersbur retitled this revision from [Polly][StmtBuilder] Revise statement naming when there are multiple statements per BB. to [Polly][ScopBuilder] Revise statement naming when there are multiple statements per BB..Jan 16 2018, 2:59 PM
This revision is now accepted and ready to land.Jan 16 2018, 11:10 PM
This revision was automatically updated to reflect the committed changes.