From be3e74b647375d1c72f075bebf77dc31e74477a2 Mon Sep 17 00:00:00 2001 From: Han-Chung Wang Date: Tue, 19 Dec 2023 13:28:37 -0800 Subject: [PATCH] Integrate llvm/llvm-project@282d50147628 (2023-12-19) (#2675) --- externals/llvm-project | 2 +- lib/Dialect/Torch/Transforms/ReduceOpVariants.cpp | 2 +- .../Torch/Transforms/ReifyAbstractInterpCalculationsUtils.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/externals/llvm-project b/externals/llvm-project index aa165edca..282d50147 160000 --- a/externals/llvm-project +++ b/externals/llvm-project @@ -1 +1 @@ -Subproject commit aa165edca8545b212de084d5b18c3d30347f774a +Subproject commit 282d501476284c46fd943dcbae87494cb08e2c5f diff --git a/lib/Dialect/Torch/Transforms/ReduceOpVariants.cpp b/lib/Dialect/Torch/Transforms/ReduceOpVariants.cpp index a4b02cf9e..8ba047962 100644 --- a/lib/Dialect/Torch/Transforms/ReduceOpVariants.cpp +++ b/lib/Dialect/Torch/Transforms/ReduceOpVariants.cpp @@ -274,7 +274,7 @@ public: SmallVector fragments; llvm::SplitString(op->getName().getStringRef(), fragments, "."); - assert(fragments.size() >= 3 && fragments[2].endswith("_") && + assert(fragments.size() >= 3 && fragments[2].ends_with("_") && "IsTrailingUnderscoreInplaceVariant incorrectly applied"); fragments[2] = fragments[2].drop_back(); std::string noUnderscoreName = llvm::join(fragments, "."); diff --git a/lib/Dialect/Torch/Transforms/ReifyAbstractInterpCalculationsUtils.cpp b/lib/Dialect/Torch/Transforms/ReifyAbstractInterpCalculationsUtils.cpp index 290beb1da..7c3ceab3a 100644 --- a/lib/Dialect/Torch/Transforms/ReifyAbstractInterpCalculationsUtils.cpp +++ b/lib/Dialect/Torch/Transforms/ReifyAbstractInterpCalculationsUtils.cpp @@ -78,7 +78,7 @@ LogicalResult Torch::wrapWithCalculateOpIfLibraryFunctionAvailable( // mechanically consistent with existing torch conventions of in-place vs. // out-of-place (value-semantic) variants), remove the prefix when // looking them up in the library. - if (name.startswith("valsem.")) + if (name.starts_with("valsem.")) name = name.drop_front(strlen("valsem.")); if (isa(op)) name = cast(op)->getAttr("name").cast().getValue();