[llvm-branch-commits] [llvm] [CodeGen][NewPM] Port RegAllocGreedy to NPM (PR #119540)

2024-12-22 Thread Matt Arsenault via llvm-branch-commits
@@ -146,11 +149,139 @@ static cl::opt SplitThresholdForRegWithHint( static RegisterRegAlloc greedyRegAlloc("greedy", "greedy register allocator", createGreedyRegisterAllocator); -char RAGreedy::ID = 0; -char &llvm::RAGreedyID = RAGreedy::

[llvm-branch-commits] [llvm] [CodeGen][NewPM] Port RegAllocGreedy to NPM (PR #119540)

2024-12-22 Thread Matt Arsenault via llvm-branch-commits
@@ -187,6 +187,15 @@ MACHINE_FUNCTION_PASS_WITH_PARAMS( return parseRegAllocFastPassOptions(*PB, Params); }, "filter=reg-filter;no-clear-vregs") + +MACHINE_FUNCTION_PASS_WITH_PARAMS( +"regallocgreedy", "RAGreedyPass", arsenm wrote: The curren

[llvm-branch-commits] [llvm] [CodeGen][NewPM] Port RegAllocGreedy to NPM (PR #119540)

2024-12-22 Thread Matt Arsenault via llvm-branch-commits
@@ -901,6 +901,7 @@ class LLVM_ABI MachineFunction { /// Run the current MachineFunction through the machine code verifier, useful /// for debugger use. + /// TODO: Add the param LiveStks arsenm wrote: Spell out full analysis name https://github.com/ll

[llvm-branch-commits] [llvm] [Coverage] Move SingleByteCoverage out of CountedRegion (PR #110966)

2024-12-22 Thread NAKAMURA Takumi via llvm-branch-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/110966 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [compiler-rt] [llvm] [Coverage][Single] Round Counters to boolean after evaluation (PR #110972)

2024-12-22 Thread NAKAMURA Takumi via llvm-branch-commits
@@ -873,8 +874,10 @@ Error CoverageMapping::loadFunctionRecord( consumeError(std::move(E)); return Error::success(); } -Function.pushRegion(Region, *ExecutionCount, *AltExecutionCount, -ProfileReader.hasSingleByteCoverage()); +Fun

[llvm-branch-commits] [llvm] [Coverage] Move SingleByteCoverage out of CountedRegion (PR #110966)

2024-12-22 Thread NAKAMURA Takumi via llvm-branch-commits
chapuni wrote: @ellishg I rewrote this based on #120841. `SingleByteCoverage` is passed to `llvm-cov` via `CoverageData`. https://github.com/llvm/llvm-project/pull/110966 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://l

[llvm-branch-commits] [clang] [llvm] [Coverage][Single] Enable Branch coverage for loop statements (PR #113109)

2024-12-22 Thread Jessica Paquette via llvm-branch-commits
@@ -1400,14 +1375,12 @@ CodeGenFunction::EmitCXXForRangeStmt(const CXXForRangeStmt &S, if (ExitBlock != LoopExit.getBlock()) { EmitBlock(ExitBlock); +incrementProfileCounter(true, &S); ornata wrote: comment on boolean parameter for readability? e.

[llvm-branch-commits] [clang] [llvm] [Coverage][Single] Enable Branch coverage for IfStmt (PR #113111)

2024-12-22 Thread Jessica Paquette via llvm-branch-commits
ornata wrote: Other than a couple nits on comments this looks fine to me. https://github.com/llvm/llvm-project/pull/113111 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bran

[llvm-branch-commits] [clang] [llvm] [Coverage][Single] Enable Branch coverage for IfStmt (PR #113111)

2024-12-22 Thread Jessica Paquette via llvm-branch-commits
@@ -915,10 +914,7 @@ void CodeGenFunction::EmitIfStmt(const IfStmt &S) { // Emit the 'then' code. EmitBlock(ThenBlock); - if (llvm::EnableSingleByteCoverage) -incrementProfileCounter(S.getThen()); - else -incrementProfileCounter(&S); + incrementProfileCounter(fa

[llvm-branch-commits] [clang] [llvm] [Coverage][Single] Enable Branch coverage for IfStmt (PR #113111)

2024-12-22 Thread Jessica Paquette via llvm-branch-commits
@@ -864,8 +864,7 @@ void CodeGenFunction::EmitIfStmt(const IfStmt &S) { // If the skipped block has no labels in it, just emit the executed block. // This avoids emitting dead code and simplifies the CFG substantially. if (S.isConstexpr() || !ContainsLabel(Skipped))

[llvm-branch-commits] [clang] [llvm] Coverage] Make additional counters available for BranchRegion. NFC. (PR #120930)

2024-12-22 Thread Jessica Paquette via llvm-branch-commits
@@ -940,15 +939,35 @@ struct CounterCoverageMappingBuilder std::pair getBranchCounterPair(const Stmt *S, Counter ParentCnt) { -Counter ExecCnt = getRegionCounter(S); -return {ExecCnt, Builder.subtract(ParentCnt, Exec

[llvm-branch-commits] [clang] [llvm] Coverage] Make additional counters available for BranchRegion. NFC. (PR #120930)

2024-12-22 Thread Jessica Paquette via llvm-branch-commits
@@ -1632,11 +1632,17 @@ class CodeGenFunction : public CodeGenTypeCache { /// Increment the profiler's counter for the given statement by \p StepV. /// If \p StepV is null, the default increment is 1. void incrementProfileCounter(const Stmt *S, llvm::Value *StepV = nullpt

[llvm-branch-commits] [clang] [llvm] Coverage] Make additional counters available for BranchRegion. NFC. (PR #120930)

2024-12-22 Thread NAKAMURA Takumi via llvm-branch-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/120930 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [llvm] [Coverage] Make additional counters available for BranchRegion. NFC. (PR #112730)

2024-12-22 Thread NAKAMURA Takumi via llvm-branch-commits
chapuni wrote: I've accidentally closed this with pushing the wrong base. Please move to the re-created #120930 . https://github.com/llvm/llvm-project/pull/112730 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.ll

[llvm-branch-commits] [clang] [llvm] Coverage] Make additional counters available for BranchRegion. NFC. (PR #120930)

2024-12-22 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: NAKAMURA Takumi (chapuni) Changes `getBranchCounterPair()` allocates an additional Counter to SkipPath in `SingleByteCoverage`. `IsCounterEqual()` calculates the comparison with rewinding counter replacements. `NumRegionCounters` is upd

[llvm-branch-commits] [clang] [llvm] Coverage] Make additional counters available for BranchRegion. NFC. (PR #120930)

2024-12-22 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-pgo Author: NAKAMURA Takumi (chapuni) Changes `getBranchCounterPair()` allocates an additional Counter to SkipPath in `SingleByteCoverage`. `IsCounterEqual()` calculates the comparison with rewinding counter replacements. `NumRegionCounters` is updat

[llvm-branch-commits] [clang] [llvm] Coverage] Make additional counters available for BranchRegion. NFC. (PR #120930)

2024-12-22 Thread NAKAMURA Takumi via llvm-branch-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/120930 `getBranchCounterPair()` allocates an additional Counter to SkipPath in `SingleByteCoverage`. `IsCounterEqual()` calculates the comparison with rewinding counter replacements. `NumRegionCounters` is updated t

[llvm-branch-commits] [clang] [llvm] [Coverage] Make additional counters available for BranchRegion. NFC. (PR #112730)

2024-12-22 Thread NAKAMURA Takumi via llvm-branch-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/112730 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [llvm] [Coverage][Single] Enable Branch coverage for loop statements (PR #113109)

2024-12-22 Thread NAKAMURA Takumi via llvm-branch-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/113109 >From 5d19c77551c6fc585d1b15c4c2a71c3c3f99ef8a Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Fri, 18 Oct 2024 09:33:51 +0900 Subject: [PATCH 1/4] [Coverage][Single] Enable Branch coverage for loop statem

[llvm-branch-commits] [clang] [llvm] [Coverage][Single] Enable Branch coverage for IfStmt (PR #113111)

2024-12-22 Thread NAKAMURA Takumi via llvm-branch-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/113111 >From 3ea6383e2142889550f37389dfaaee81e5ae7d9c Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sun, 20 Oct 2024 15:15:03 +0900 Subject: [PATCH 1/3] [Coverage][Single] Enable Branch coverage for IfStmt ---

[llvm-branch-commits] [clang] [llvm] [Coverage] Make additional counters available for BranchRegion. NFC. (PR #112730)

2024-12-22 Thread NAKAMURA Takumi via llvm-branch-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/112730 >From 5e460594c8a2550c38c759b2e6f1c5dc4152f820 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Thu, 17 Oct 2024 22:15:12 +0900 Subject: [PATCH 1/6] [Coverage] Make additional counters available for BranchR

[llvm-branch-commits] [llvm] [Coverage] Move SingleByteCoverage out of CountedRegion (PR #110966)

2024-12-22 Thread Jessica Paquette via llvm-branch-commits
https://github.com/ornata approved this pull request. I think at this point this looks fine? @ellishg ? https://github.com/llvm/llvm-project/pull/110966 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-

[llvm-branch-commits] [flang] [mlir] [mlir][Transforms] Support 1:N mappings in `ConversionValueMapping` (PR #116524)

2024-12-22 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer edited https://github.com/llvm/llvm-project/pull/116524 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [mlir] [mlir][Transforms] Support 1:N mappings in `ConversionValueMapping` (PR #116524)

2024-12-22 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer edited https://github.com/llvm/llvm-project/pull/116524 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [mlir] [mlir][Transforms] Support 1:N mappings in `ConversionValueMapping` (PR #116524)

2024-12-22 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer edited https://github.com/llvm/llvm-project/pull/116524 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [mlir] [mlir][Transforms] Support 1:N mappings in `ConversionValueMapping` (PR #116524)

2024-12-22 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer edited https://github.com/llvm/llvm-project/pull/116524 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [mlir] [mlir][Transforms] Support 1:N mappings in `ConversionValueMapping` (PR #116524)

2024-12-22 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer edited https://github.com/llvm/llvm-project/pull/116524 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [mlir] [mlir][Transforms] Support 1:N mappings in `ConversionValueMapping` (PR #116524)

2024-12-22 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer edited https://github.com/llvm/llvm-project/pull/116524 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [mlir] [mlir][Transforms] Support 1:N mappings in `ConversionValueMapping` (PR #116524)

2024-12-22 Thread Matthias Springer via llvm-branch-commits
@@ -63,80 +113,140 @@ static OpBuilder::InsertPoint computeInsertPoint(Value value) { return OpBuilder::InsertPoint(insertBlock, insertPt); } +/// Helper function that computes an insertion point where the given values are +/// defined and can be used without a dominance vi