search for: fill_n

Displaying 1 result from an estimated 1 matches for "fill_n".

2016 Nov 10
5
array fill idioms
I am asking for some collective wisdom/guidance. What sort of IR construct should one use to implement filling each element in an array (or vector) with the same value? In C++, this might arise in "std:fill" or "std:fill_n", when the element values in the vector are identical. In the D language, one can fill an array or a slice of an array by an assignment, e.g. "A[2..10] = 42;" 1. What I would prefer is an explicit intrinsic, call it "llvm.fill.*" that would work similar to the "l...