ac: rename LLVM <= 7 helpers for readability
authorMarek Olšák <marek.olsak@amd.com>
Fri, 24 May 2019 22:57:10 +0000 (18:57 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 4 Jun 2019 22:53:46 +0000 (18:53 -0400)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/common/ac_llvm_build.c

index b9866d26d2304cd63f23f5670cfe3b0f7b1003ab..0972406b5cba84b752c392ca83c3066ca96efbb9 100644 (file)
@@ -1107,16 +1107,16 @@ LLVMValueRef ac_build_load_to_sgpr_uint_wraparound(struct ac_llvm_context *ctx,
 }
 
 static void
-ac_build_buffer_store_common(struct ac_llvm_context *ctx,
-                            LLVMValueRef rsrc,
-                            LLVMValueRef data,
-                            LLVMValueRef vindex,
-                            LLVMValueRef voffset,
-                            unsigned num_channels,
-                            bool glc,
-                            bool slc,
-                            bool writeonly_memory,
-                            bool use_format)
+ac_build_llvm7_buffer_store_common(struct ac_llvm_context *ctx,
+                                  LLVMValueRef rsrc,
+                                  LLVMValueRef data,
+                                  LLVMValueRef vindex,
+                                  LLVMValueRef voffset,
+                                  unsigned num_channels,
+                                  bool glc,
+                                  bool slc,
+                                  bool writeonly_memory,
+                                  bool use_format)
 {
        LLVMValueRef args[] = {
                data,
@@ -1202,9 +1202,9 @@ ac_build_buffer_store_format(struct ac_llvm_context *ctx,
                                                   ctx->f32, glc, false,
                                                   writeonly_memory, true, true);
        } else {
-               ac_build_buffer_store_common(ctx, rsrc, data, vindex, voffset,
-                                            num_channels, glc, false,
-                                            writeonly_memory, true);
+               ac_build_llvm7_buffer_store_common(ctx, rsrc, data, vindex, voffset,
+                                                  num_channels, glc, false,
+                                                  writeonly_memory, true);
        }
 }
 
@@ -1271,11 +1271,11 @@ ac_build_buffer_store_dword(struct ac_llvm_context *ctx,
                        if (voffset)
                                offset = LLVMBuildAdd(ctx->builder, offset, voffset, "");
 
-                       ac_build_buffer_store_common(ctx, rsrc,
-                                                    ac_to_float(ctx, vdata),
-                                                    ctx->i32_0, offset,
-                                                    num_channels, glc, slc,
-                                                    writeonly_memory, false);
+                       ac_build_llvm7_buffer_store_common(ctx, rsrc,
+                                                          ac_to_float(ctx, vdata),
+                                                          ctx->i32_0, offset,
+                                                          num_channels, glc, slc,
+                                                          writeonly_memory, false);
                }
                return;
        }
@@ -1296,15 +1296,15 @@ ac_build_buffer_store_dword(struct ac_llvm_context *ctx,
 }
 
 static LLVMValueRef
-ac_build_buffer_load_common(struct ac_llvm_context *ctx,
-                           LLVMValueRef rsrc,
-                           LLVMValueRef vindex,
-                           LLVMValueRef voffset,
-                           unsigned num_channels,
-                           bool glc,
-                           bool slc,
-                           bool can_speculate,
-                           bool use_format)
+ac_build_llvm7_buffer_load_common(struct ac_llvm_context *ctx,
+                                 LLVMValueRef rsrc,
+                                 LLVMValueRef vindex,
+                                 LLVMValueRef voffset,
+                                 unsigned num_channels,
+                                 bool glc,
+                                 bool slc,
+                                 bool can_speculate,
+                                 bool use_format)
 {
        LLVMValueRef args[] = {
                LLVMBuildBitCast(ctx->builder, rsrc, ctx->v4i32, ""),
@@ -1434,9 +1434,9 @@ ac_build_buffer_load(struct ac_llvm_context *ctx,
                                                         false);
        }
 
-       return ac_build_buffer_load_common(ctx, rsrc, vindex, offset,
-                                          num_channels, glc, slc,
-                                          can_speculate, false);
+       return ac_build_llvm7_buffer_load_common(ctx, rsrc, vindex, offset,
+                                                num_channels, glc, slc,
+                                                can_speculate, false);
 }
 
 LLVMValueRef ac_build_buffer_load_format(struct ac_llvm_context *ctx,
@@ -1453,9 +1453,9 @@ LLVMValueRef ac_build_buffer_load_format(struct ac_llvm_context *ctx,
                                                         glc, false,
                                                         can_speculate, true, true);
        }
-       return ac_build_buffer_load_common(ctx, rsrc, vindex, voffset,
-                                          num_channels, glc, false,
-                                          can_speculate, true);
+       return ac_build_llvm7_buffer_load_common(ctx, rsrc, vindex, voffset,
+                                                num_channels, glc, false,
+                                                can_speculate, true);
 }
 
 LLVMValueRef ac_build_buffer_load_format_gfx9_safe(struct ac_llvm_context *ctx,
@@ -1484,9 +1484,9 @@ LLVMValueRef ac_build_buffer_load_format_gfx9_safe(struct ac_llvm_context *ctx,
        LLVMValueRef new_rsrc = LLVMBuildInsertElement(ctx->builder, rsrc, new_elem_count,
                                                       LLVMConstInt(ctx->i32, 2, 0), "");
 
-       return ac_build_buffer_load_common(ctx, new_rsrc, vindex, voffset,
-                                          num_channels, glc, false,
-                                          can_speculate, true);
+       return ac_build_llvm7_buffer_load_common(ctx, new_rsrc, vindex, voffset,
+                                                num_channels, glc, false,
+                                                can_speculate, true);
 }
 
 static LLVMValueRef
@@ -1811,7 +1811,7 @@ ac_build_opencoded_load_format(struct ac_llvm_context *ctx,
                                        can_speculate, false, true);
                } else {
                        tmp = LLVMBuildAdd(ctx->builder, voffset, tmp, "");
-                       loads[i] = ac_build_buffer_load_common(
+                       loads[i] = ac_build_llvm7_buffer_load_common(
                                        ctx, rsrc, vindex, tmp,
                                        1 << (load_log_size - 2), glc, slc, can_speculate, false);
                }