Commit Graph

4 Commits

Author SHA1 Message Date
Tobias Grosser 356faa8f09 Dead code elimination: Schedule another approximative step before actual DCE
In 'obsequi' we have a scop in which the current dead code elimination works,
but the generated code is way too complex. To avoid this trouble (and to not
disable the DCE entirely) we add an additional approximative step before
the actual dead code elimination. This should fix one of the two current
nightly-test issues.

Polly could be improved to handle 'obsequi' by teaching it to introduce only a
single parameter for (%1 and zext %1) which halves the number of parameters and
allows polly to derive a simpler representation for the set of live iterations.
However, this needs some time to investigate.

I will commit a test case as soon as we have a reduced one.

llvm-svn: 202010
2014-02-24 08:52:20 +00:00
Tobias Grosser 38c36ea18e Do not fail in case we do not have valid dependences
In case we do not have valid dependences, we do not run dead code elimination or
the schedule optimizer. This fixes an infinite loop in the dead code
elimination (PR12110).

llvm-svn: 201982
2014-02-23 15:15:44 +00:00
Tobias Grosser 817d51dd1b DCE: Switch to hybrid precise-unprecise analysis
Instead of giving a choice between a precise (but possibly very complex)
analysis and an approximative analysis we now use a hybrid approach which uses N
precise steps followed by one approximating step. The precision of the analysis
can be changed by increasing N. With a default of 'N' = 2, we get fully precise
results for our current test cases and should not run into performance problems
for more complex test cases. We can adjust this value when we got more
experience with this dead code elimination.

llvm-svn: 201888
2014-02-21 20:51:46 +00:00
Tobias Grosser 37eb422f69 Add polyhedral dead code elimination.
This pass eliminates loop iterations that compute results that are not used
later on. This can help e.g. in D, where the default zero-initialization is
often unnecessary if right after new values are assigned to an array.

Contributed-by: Peter Conn <conn.peter@gmail.com>
llvm-svn: 201817
2014-02-20 21:43:54 +00:00