search for: node_x

Displaying 2 results from an estimated 2 matches for "node_x".

2015 May 09
4
[LLVMdev] [LSR] hoisting loop invariants in reverse order
...nonicalizing the order of LSR-hoisted loop invariants back to the "natural" order? IMO, the optimized code should in general resemble the original code unless intentionally changed otherwise. More specifically, I ran LSR on void foo(float *input, int a, int b, int c, int n) { for (int node_x = 0; node_x < n; ++node_x) { int pixel_idx = (a + node_x) * b; // {a*b, +, b} bar(pixel_idx * c); // {a*b*c, +, b*c} bar((pixel_idx + 1) * c); // {(a*b+1)*c, +, b*c} bar((pixel_idx + 2) * c); // {(a*b+2)*c, +, b*c} bar((pixel_idx + 3) * c); // {(a*b+3)*c, +, b*c} } } and L...
2015 May 18
2
[LLVMdev] [LSR] hoisting loop invariants in reverse order
...on point is set to the default after, so that it > ends up reversing the order, instead of before, so that it ends up in > the original order. > > > > > More specifically, I ran LSR on > > > > void foo(float *input, int a, int b, int c, int n) { > > for (int node_x = 0; node_x < n; ++node_x) { > > int pixel_idx = (a + node_x) * b; // {a*b, +, b} > > bar(pixel_idx * c); // {a*b*c, +, b*c} > > bar((pixel_idx + 1) * c); // {(a*b+1)*c, +, b*c} > > bar((pixel_idx + 2) * c); // {(a*b+2)*c, +, b*c} > > bar((pixel_...