forked from OSchip/llvm-project
Use has_value/value instead of hasValue/getValue (NFC)
This commit is contained in:
parent
77b72fbc71
commit
1a5d007659
|
@ -2286,8 +2286,8 @@ void SelectionDAGISel::Select_PATCHPOINT(SDNode *N) {
|
|||
// Finally, the regmask, chain and (if present) glue are moved to the end.
|
||||
Ops.push_back(RegMask);
|
||||
Ops.push_back(Chain);
|
||||
if (Glue.hasValue())
|
||||
Ops.push_back(Glue.getValue());
|
||||
if (Glue.has_value())
|
||||
Ops.push_back(Glue.value());
|
||||
|
||||
SDVTList NodeTys = N->getVTList();
|
||||
CurDAG->SelectNodeTo(N, TargetOpcode::PATCHPOINT, NodeTys, Ops);
|
||||
|
|
|
@ -83,7 +83,7 @@ def Bufferization_AllocTensorOp : Bufferization_Op<"alloc_tensor",
|
|||
bool bufferizesToAllocation(OpResult opResult) { return true; }
|
||||
|
||||
FailureOr<unsigned> getMemorySpace(OpResult opResult) {
|
||||
if (getMemorySpace().hasValue())
|
||||
if (getMemorySpace().has_value())
|
||||
return static_cast<unsigned>(*getMemorySpace());
|
||||
return failure();
|
||||
}
|
||||
|
|
|
@ -347,7 +347,7 @@ def LLVM_FNegOp : LLVM_UnaryFloatArithmeticOp<
|
|||
// of LLVM ops that accept such an attribute.
|
||||
class MemoryOpWithAlignmentBase {
|
||||
code setAlignmentCode = [{
|
||||
if ($alignment.hasValue()) {
|
||||
if ($alignment.has_value()) {
|
||||
auto align = $alignment.value();
|
||||
if (align != 0)
|
||||
inst->setAlignment(llvm::Align(align));
|
||||
|
|
|
@ -443,7 +443,7 @@ transform::PromoteOp::applyToOne(linalg::LinalgOp target,
|
|||
if (!getUseFullTileBuffers().empty())
|
||||
promotionOptions = promotionOptions.setUseFullTileBuffers(
|
||||
llvm::to_vector(getUseFullTileBuffers().getAsValueRange<BoolAttr>()));
|
||||
if (getAlignment().hasValue())
|
||||
if (getAlignment().has_value())
|
||||
promotionOptions = promotionOptions.setAlignment(*getAlignment());
|
||||
|
||||
if (failed(promoteSubviewsPrecondition(target, promotionOptions)))
|
||||
|
|
Loading…
Reference in New Issue