aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/tests/llvm_irgen_test_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/compiler/xla/tests/llvm_irgen_test_base.h')
-rw-r--r--tensorflow/compiler/xla/tests/llvm_irgen_test_base.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/tensorflow/compiler/xla/tests/llvm_irgen_test_base.h b/tensorflow/compiler/xla/tests/llvm_irgen_test_base.h
index 74cbb5f5df..018f9546af 100644
--- a/tensorflow/compiler/xla/tests/llvm_irgen_test_base.h
+++ b/tensorflow/compiler/xla/tests/llvm_irgen_test_base.h
@@ -24,7 +24,7 @@ limitations under the License.
namespace xla {
// Tests that verify IR emitted by the CPU/GPU backend is as expected.
-class LLVMIRGenTestBase : public CodegenTestBase {
+class LlvmIrGenTestBase : public CodegenTestBase {
protected:
// Compiles the given HLO module to LLVM IR and verifies the IR matches the
// given pattern. `pattern` is in the FileCheck pattern matching syntax
@@ -38,6 +38,12 @@ class LLVMIRGenTestBase : public CodegenTestBase {
void CompileAndVerifyIr(std::unique_ptr<HloModule> hlo_module,
const string& pattern, bool match_optimized_ir);
+ // A thin wrapper around CompileAndVerifyIr that parses `hlo_text` to create
+ // an HLO module.
+ void CompileAndVerifyIr(const string& hlo_text,
+ const string& expected_llvm_ir,
+ bool match_optimized_ir = false);
+
// Compiles the given HLO module to LLVM IR and verifies the IR matches the
// given pattern. `pattern` is in the FileCheck pattern matching syntax
// (http://llvm.org/docs/CommandGuide/FileCheck.html).