Updates LLVM usage to match
[bf6380c0966b](https://github.com/llvm/llvm-project/commit/bf6380c0966b)

PiperOrigin-RevId: 359728311
Change-Id: I154af13cedad41b7ce411964dcedce519d102632
This commit is contained in:
A. Unique TensorFlower 2021-02-26 04:03:59 -08:00 committed by TensorFlower Gardener
parent 362f9fc585
commit 7e1c942100
2 changed files with 10 additions and 8 deletions

View File

@ -299,6 +299,7 @@ bool IrEmitter::MaybeEmitDirectAtomicOperation(
(f64_atomic_add_supported && element_type == F64);
if (atomic_add_supported) {
AtomicRMW(llvm::AtomicRMWInst::FAdd, output_address, source,
llvm::MaybeAlign(),
llvm::AtomicOrdering::SequentiallyConsistent);
return true;
}
@ -307,6 +308,7 @@ bool IrEmitter::MaybeEmitDirectAtomicOperation(
if (is_atomic_integral) {
// integral + integral
AtomicRMW(llvm::AtomicRMWInst::Add, output_address, source,
llvm::MaybeAlign(),
llvm::AtomicOrdering::SequentiallyConsistent);
return true;
}
@ -318,7 +320,7 @@ bool IrEmitter::MaybeEmitDirectAtomicOperation(
auto opcode = primitive_util::IsSignedIntegralType(element_type)
? llvm::AtomicRMWInst::Max
: llvm::AtomicRMWInst::UMax;
AtomicRMW(opcode, output_address, source,
AtomicRMW(opcode, output_address, source, llvm::MaybeAlign(),
llvm::AtomicOrdering::SequentiallyConsistent);
return true;
}
@ -328,7 +330,7 @@ bool IrEmitter::MaybeEmitDirectAtomicOperation(
auto opcode = primitive_util::IsSignedIntegralType(element_type)
? llvm::AtomicRMWInst::Min
: llvm::AtomicRMWInst::UMin;
AtomicRMW(opcode, output_address, source,
AtomicRMW(opcode, output_address, source, llvm::MaybeAlign(),
llvm::AtomicOrdering::SequentiallyConsistent);
return true;
}
@ -476,10 +478,10 @@ Status IrEmitter::EmitAtomicOperationUsingCAS(const HloComputation& computation,
// Emit code to perform the atomicCAS operation
// (cas_old_output, success) = atomicCAS(memory_address, cas_old_output,
// cas_new_output);
llvm::Value* ret_value =
AtomicCmpXchg(atomic_memory_address, cas_old_output, cas_new_output,
llvm::AtomicOrdering::SequentiallyConsistent,
llvm::AtomicOrdering::SequentiallyConsistent);
llvm::Value* ret_value = AtomicCmpXchg(
atomic_memory_address, cas_old_output, cas_new_output, llvm::MaybeAlign(),
llvm::AtomicOrdering::SequentiallyConsistent,
llvm::AtomicOrdering::SequentiallyConsistent);
// Extract the memory value returned from atomicCAS and store it as
// cas_old_output.

View File

@ -4,8 +4,8 @@ load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "5d64dd8e3c22e12e4f7b3d08ffe88fc41e727117"
LLVM_SHA256 = "19131ecf82681acec18780a6b9dbe2412e35132ccab104074951b6d50407d08d"
LLVM_COMMIT = "bf6380c0966b26a2aec7f2072efd0a1a9b6328f2"
LLVM_SHA256 = "b225983215a6ba47cbc344df25c158c60baf8cf2cfe5e990e13e028f7ff6dcdc"
tf_http_archive(
name = name,