Commit 2a551e0
Add Induction Variable Elimination pass.
This pass, also referred as IndVarSimplify pass, is generic LLVM pass.
When added to OptimizeIR() function, it improves performance
for cases like in this pseudo code:
uint max = data[thread_invocation_id];
for(uint i = 0; i < max; ++i)
{
n += 321;
}
With this pass the code can be transformed to just:
n += 321 * data[thread_invocation_id];
Change-Id: Ie536a5d487bdc4b15f648454a653dfe030eb77641 parent c0a1b28 commit 2a551e0
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1439 | 1439 | | |
1440 | 1440 | | |
1441 | 1441 | | |
| 1442 | + | |
1442 | 1443 | | |
1443 | 1444 | | |
1444 | 1445 | | |
| |||
0 commit comments