Displaying 2 results from an estimated 2 matches for "vec_plus_vec".
2015 Jun 03
2
[LLVMdev] Replacing a repetitive sequence of code with a loop
...stride between consecutive junks is
constant over the whole program, thus the whole program could be
replaced with a single loop with it's loop body containing a generic
version of said code junk.Here's an example (a short one, the real world
program would be much longer):
define void @vec_plus_vec(float* noalias %arg0, float* noalias %arg1,
float* noalias %arg2) {
entrypoint:
%0 = bitcast float* %arg1 to <4 x float>*
%1 = bitcast float* %arg2 to <4 x float>*
%2 = load <4 x float>* %0, align 16
%3 = load <4 x float>* %1, align 16
%4 = fadd <4 x float...
2015 Jun 03
3
[LLVMdev] Replacing a repetitive sequence of code with a loop
On 3 June 2015 at 19:57, Benjamin Kramer <benny.kra at gmail.com> wrote:
> There's a loop reroll pass in LLVM trunk that should do exactly this transformation.
Though that's a loop pass (runOnLoop). What you could do is add a
previous pass that would recognize the pattern and create a loop of 1
iteration around the code and then run the reroll pass.
If your pattern recognition