[llvm] [Extractor] Use function return for the one and only output (PR #191824)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 14 10:18:41 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- llvm/include/llvm/Transforms/Utils/CodeExtractor.h llvm/lib/Transforms/IPO/HotColdSplitting.cpp llvm/lib/Transforms/IPO/PartialInlining.cpp llvm/lib/Transforms/Utils/CodeExtractor.cpp llvm/unittests/Transforms/Utils/CodeExtractorTest.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/IPO/HotColdSplitting.cpp b/llvm/lib/Transforms/IPO/HotColdSplitting.cpp
index ca7148f0e..741a4d84a 100644
--- a/llvm/lib/Transforms/IPO/HotColdSplitting.cpp
+++ b/llvm/lib/Transforms/IPO/HotColdSplitting.cpp
@@ -721,7 +721,8 @@ bool HotColdSplitting::outlineColdRegions(Function &F, bool HasProfileSummary) {
SubRegion, &*DT, /* AggregateArgs */ false, /* BFI */ nullptr,
/* BPI */ nullptr, AC, /* AllowVarArgs */ false,
/* AllowAlloca */ false, /* AllocaBlock */ nullptr,
- /* Suffix */ "cold." + std::to_string(OutlinedFunctionID), false, false);
+ /* Suffix */ "cold." + std::to_string(OutlinedFunctionID), false,
+ false);
if (CE.isEligible() && isSplittingBeneficial(CE, SubRegion, TTI) &&
// If this outlining region intersects with another, drop the new
diff --git a/llvm/lib/Transforms/IPO/PartialInlining.cpp b/llvm/lib/Transforms/IPO/PartialInlining.cpp
index e41726fb5..ea2380b1c 100644
--- a/llvm/lib/Transforms/IPO/PartialInlining.cpp
+++ b/llvm/lib/Transforms/IPO/PartialInlining.cpp
@@ -1101,10 +1101,10 @@ bool PartialInlinerImpl::FunctionCloner::doMultiRegionFunctionOutlining() {
InstructionCost CurrentOutlinedRegionCost =
ComputeRegionCost(RegionInfo.Region);
- CodeExtractor CE(RegionInfo.Region, &DT, /*AggregateArgs*/ false,
- ClonedFuncBFI.get(), &BPI,
- LookupAC(*RegionInfo.EntryBlock->getParent()),
- /* AllowVarargs */ false, false, nullptr, "", false, false);
+ CodeExtractor CE(
+ RegionInfo.Region, &DT, /*AggregateArgs*/ false, ClonedFuncBFI.get(),
+ &BPI, LookupAC(*RegionInfo.EntryBlock->getParent()),
+ /* AllowVarargs */ false, false, nullptr, "", false, false);
CE.findInputsOutputs(Inputs, Outputs, Sinks);
``````````
</details>
https://github.com/llvm/llvm-project/pull/191824
More information about the llvm-commits
mailing list