I personally don't see a point in reimplementing existing LLVM functions.
There is also LLVMConstNull for zeros and LLVMConstAllOnes for integer
ones, though I think those are mainly good for vectors and people are most
used to seeing LLVMConstInt and LLVMConstReal for scalars.
Marek
On Wed, Dec
I would expect these helpers to be much more efficient than the
functions you suggested. They are also (in my opinion) more readable
than the suggested functions.
I don't think it matters much though, so I'm fine either way.
On Tue, 18 Dec 2018 at 02:48, Marek Olšák wrote:
>
> On Fri, Dec 7, 201
On Fri, Dec 7, 2018 at 12:22 PM Rhys Perry wrote:
> Signed-off-by: Rhys Perry
> ---
> src/amd/common/ac_llvm_build.c | 123 ++--
> src/amd/common/ac_llvm_build.h | 22 +-
> src/amd/common/ac_nir_to_llvm.c | 30
> 3 files changed, 154 insertions(+), 2
Signed-off-by: Rhys Perry
---
src/amd/common/ac_llvm_build.c | 123 ++--
src/amd/common/ac_llvm_build.h | 22 +-
src/amd/common/ac_nir_to_llvm.c | 30
3 files changed, 154 insertions(+), 21 deletions(-)
diff --git a/src/amd/common/ac_llvm_build.c b/sr