aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/llvm_ir/ir_array.h
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/compiler/xla/service/llvm_ir/ir_array.h')
-rw-r--r--tensorflow/compiler/xla/service/llvm_ir/ir_array.h22
1 files changed, 9 insertions, 13 deletions
diff --git a/tensorflow/compiler/xla/service/llvm_ir/ir_array.h b/tensorflow/compiler/xla/service/llvm_ir/ir_array.h
index 0777c49923..28ca793e3e 100644
--- a/tensorflow/compiler/xla/service/llvm_ir/ir_array.h
+++ b/tensorflow/compiler/xla/service/llvm_ir/ir_array.h
@@ -87,20 +87,19 @@ class IrArray {
}
// Constructs an index from linear index "linear" and computes the
- // multi-dimensional index from "linear" and "shape". "ir_builder" is the IR
+ // multi-dimensional index from "linear" and "shape". "b" is the IR
// builder to emit the index of each dimension in the multi-dimensional
// index.
//
// Precondition: "shape" has a layout.
- Index(llvm::Value* linear, const Shape& shape,
- llvm::IRBuilder<>* ir_builder);
+ Index(llvm::Value* linear, const Shape& shape, llvm::IRBuilder<>* b);
// Constructs an index from the given multi-dimensional index and the shape
// that it indexes into.
//
// Precondition: "shape" has a layout.
Index(tensorflow::gtl::ArraySlice<llvm::Value*> multidim,
- const Shape& shape, llvm::IRBuilder<>* ir_builder);
+ const Shape& shape, llvm::IRBuilder<>* b);
// Constructs an index from both a multi-dimensional index and a linear
// index. "shape" has the same meaning as that in the constructor that takes
@@ -191,7 +190,7 @@ class IrArray {
}
void Delinearize(std::vector<llvm::Value*>* multidim, llvm::Value* linear,
- const Shape& shape, llvm::IRBuilder<>* ir_builder) const;
+ const Shape& shape, llvm::IRBuilder<>* b) const;
std::vector<llvm::Value*> multidim_;
@@ -240,8 +239,7 @@ class IrArray {
//
// The optional name is useful for debugging when looking at
// the emitted LLVM IR.
- llvm::Value* EmitArrayElementAddress(const Index& index,
- llvm::IRBuilder<>* ir_builder,
+ llvm::Value* EmitArrayElementAddress(const Index& index, llvm::IRBuilder<>* b,
tensorflow::StringPiece name = "") const;
// Attach metadata this IrArray instance knows about to "instruction".
@@ -255,18 +253,16 @@ class IrArray {
//
// The optional name is useful for debugging when looking at
// the emitted LLVM IR.
- llvm::Value* EmitReadArrayElement(const Index& index,
- llvm::IRBuilder<>* ir_builder,
+ llvm::Value* EmitReadArrayElement(const Index& index, llvm::IRBuilder<>* b,
tensorflow::StringPiece name = "") const;
// Emit IR to write the given value to the array element at the given index.
void EmitWriteArrayElement(const Index& index, llvm::Value* value,
- llvm::IRBuilder<>* ir_builder) const;
+ llvm::IRBuilder<>* b) const;
// Returns a new IrArray whose shape is "new_shape" and base pointer is a
// bitcast of the base pointer of "this" IrArray.
- IrArray CastToShape(const Shape& new_shape,
- llvm::IRBuilder<>* ir_builder) const;
+ IrArray CastToShape(const Shape& new_shape, llvm::IRBuilder<>* b) const;
void AddAliasScopeMetadata(llvm::MDNode* alias_scope) {
CHECK_NE(alias_scope, nullptr);
@@ -312,7 +308,7 @@ class IrArray {
// Bumps the "which_dimension" value within the provided index by the provided
// addend.
static Index BumpIndex(const Index& index, int64 which_dimension,
- int64 addend, llvm::IRBuilder<>* ir_builder);
+ int64 addend, llvm::IRBuilder<>* b);
private:
// Add the specified LLVM IR metadata to loads/stores associated with this