[llvm-branch-commits] [clang] [Serialization] Code cleanups and polish 83233 (PR #83237)

2024-10-23 Thread Vassil Vassilev via llvm-branch-commits
vgvassilev wrote: > @alexfh thank you very much! > > @vgvassilev but we have to provide similar mechanism, so it is allowed to get > all the specializations for a templated decl. I think this is the code snippet we are bitten by: https://github.com/llvm/llvm-project/blob/d1fae5996e66c2a9f0b1c

[llvm-branch-commits] [clang] [Serialization] Code cleanups and polish 83233 (PR #83237)

2024-10-23 Thread Chuanqi Xu via llvm-branch-commits
ChuanqiXu9 wrote: @alexfh thank you very much! @vgvassilev but we have to provide similar mechanism, so it is allowed to get all the specializations for a templated decl. https://github.com/llvm/llvm-project/pull/83237 ___ llvm-branch-commits mailing

[llvm-branch-commits] [flang] [Flang][OMP] Replace SUM intrinsic call with SUM operations (PR #113082)

2024-10-23 Thread Tom Eccles via llvm-branch-commits
tblah wrote: > They won't be able to that regardless. The OpenMP library will have to match > what Flang is using; otherwise, two OpenMP implementations will co-exist in > the same process and that's usually a recipe for problems. I probably wasn't clear. I meant something like `-fopenmp=libom

[llvm-branch-commits] [lldb] 565b370 - Revert "[lldb] Fix crash missing MSInheritanceAttr with DWARF on Windows (#11…"

2024-10-23 Thread via llvm-branch-commits
Author: Shubham Sandeep Rastogi Date: 2024-10-23T14:30:35-07:00 New Revision: 565b370162888c91e82bd5c9a8787bbc4942219c URL: https://github.com/llvm/llvm-project/commit/565b370162888c91e82bd5c9a8787bbc4942219c DIFF: https://github.com/llvm/llvm-project/commit/565b370162888c91e82bd5c9a8787bbc4942

[llvm-branch-commits] [llvm] AMDGPU/GlobalISel: RegBankLegalize (PR #112864)

2024-10-23 Thread Petar Avramovic via llvm-branch-commits
@@ -69,6 +81,241 @@ FunctionPass *llvm::createAMDGPURBLegalizePass() { using namespace AMDGPU; +const RegBankLegalizeRules &getRules(const GCNSubtarget &ST, + MachineRegisterInfo &MRI) { + static std::mutex GlobalMutex; + static SmallDens

[llvm-branch-commits] [llvm] MachineUniformityAnalysis: Improve isConstantOrUndefValuePhi (PR #112866)

2024-10-23 Thread Petar Avramovic via llvm-branch-commits
@@ -54,9 +54,28 @@ const MachineBasicBlock *MachineSSAContext::getDefBlock(Register value) const { return F->getRegInfo().getVRegDef(value)->getParent(); } +static bool isUndef(const MachineInstr &MI) { + return MI.getOpcode() == TargetOpcode::G_IMPLICIT_DEF || + M

[llvm-branch-commits] [llvm] AMDGPU/GlobalISel: RegBankLegalize rules for load (PR #112882)

2024-10-23 Thread Petar Avramovic via llvm-branch-commits
https://github.com/petar-avramovic edited https://github.com/llvm/llvm-project/pull/112882 ___ 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] [llvm] AMDGPU/GlobalISel: RegBankLegalize rules for load (PR #112882)

2024-10-23 Thread Petar Avramovic via llvm-branch-commits
https://github.com/petar-avramovic edited https://github.com/llvm/llvm-project/pull/112882 ___ 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] [llvm] AMDGPU/GlobalISel: RegBankLegalize (PR #112864)

2024-10-23 Thread Petar Avramovic via llvm-branch-commits
@@ -0,0 +1,334 @@ +//===-- AMDGPURBLegalizeRules.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] AMDGPU/GlobalISel: RegBankLegalize (PR #112864)

2024-10-23 Thread Petar Avramovic via llvm-branch-commits
@@ -69,6 +81,241 @@ FunctionPass *llvm::createAMDGPURBLegalizePass() { using namespace AMDGPU; +const RegBankLegalizeRules &getRules(const GCNSubtarget &ST, + MachineRegisterInfo &MRI) { + static std::mutex GlobalMutex; + static SmallDens

[llvm-branch-commits] [llvm] AMDGPU/GlobalISel: RegBankLegalize (PR #112864)

2024-10-23 Thread Petar Avramovic via llvm-branch-commits
@@ -69,6 +81,241 @@ FunctionPass *llvm::createAMDGPURBLegalizePass() { using namespace AMDGPU; +const RegBankLegalizeRules &getRules(const GCNSubtarget &ST, + MachineRegisterInfo &MRI) { + static std::mutex GlobalMutex; + static SmallDens

[llvm-branch-commits] [llvm] AMDGPU/GlobalISel: RegBankLegalize (PR #112864)

2024-10-23 Thread Petar Avramovic via llvm-branch-commits
@@ -107,3 +107,183 @@ void IntrinsicLaneMaskAnalyzer::findLCSSAPhi(Register Reg) { S32S64LaneMask.insert(LCSSAPhi.getOperand(0).getReg()); } } + +MachineInstrBuilder AMDGPU::buildReadAnyLaneB32(MachineIRBuilder &B, +const

[llvm-branch-commits] [llvm] AMDGPU/GlobalISel: RegBankLegalize (PR #112864)

2024-10-23 Thread Petar Avramovic via llvm-branch-commits
@@ -0,0 +1,334 @@ +//===-- AMDGPURBLegalizeRules.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] AMDGPU/GlobalISel: RegBankLegalize (PR #112864)

2024-10-23 Thread Petar Avramovic via llvm-branch-commits
@@ -69,6 +81,241 @@ FunctionPass *llvm::createAMDGPURBLegalizePass() { using namespace AMDGPU; +const RegBankLegalizeRules &getRules(const GCNSubtarget &ST, + MachineRegisterInfo &MRI) { + static std::mutex GlobalMutex; + static SmallDens

[llvm-branch-commits] [flang] [Flang][OMP] Replace SUM intrinsic call with SUM operations (PR #113082)

2024-10-23 Thread Ivan R. Ivanov via llvm-branch-commits
@@ -227,11 +227,11 @@ void createHLFIRToFIRPassPipeline(mlir::PassManager &pm, bool enableOpenMP, hlfir::createOptimizedBufferization); } pm.addPass(hlfir::createLowerHLFIROrderedAssignments()); + if (enableOpenMP) +pm.addPass(

[llvm-branch-commits] [llvm] AMDGPU/GlobalISel: RegBankLegalize (PR #112864)

2024-10-23 Thread Petar Avramovic via llvm-branch-commits
https://github.com/petar-avramovic edited https://github.com/llvm/llvm-project/pull/112864 ___ 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] [llvm] AMDGPU/GlobalISel: RBLegalize (PR #112864)

2024-10-23 Thread Petar Avramovic via llvm-branch-commits
https://github.com/petar-avramovic edited https://github.com/llvm/llvm-project/pull/112864 ___ 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] [llvm] AMDGPU/GlobalISel: StandaloneRegBankSelect (PR #112863)

2024-10-23 Thread Petar Avramovic via llvm-branch-commits
https://github.com/petar-avramovic edited https://github.com/llvm/llvm-project/pull/112863 ___ 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] [llvm] AMDGPU/GlobalISel: StandaloneRegBankSelect (PR #112863)

2024-10-23 Thread Petar Avramovic via llvm-branch-commits
@@ -63,4 +70,189 @@ char &llvm::AMDGPURBSelectID = AMDGPURBSelect::ID; FunctionPass *llvm::createAMDGPURBSelectPass() { return new AMDGPURBSelect(); } -bool AMDGPURBSelect::runOnMachineFunction(MachineFunction &MF) { return true; } +bool shouldRBSelect(MachineInstr &MI) { +

[llvm-branch-commits] [llvm] AMDGPU/GlobalISel: StandaloneRegBankSelect (PR #112863)

2024-10-23 Thread Petar Avramovic via llvm-branch-commits
@@ -63,4 +70,189 @@ char &llvm::AMDGPURBSelectID = AMDGPURBSelect::ID; FunctionPass *llvm::createAMDGPURBSelectPass() { return new AMDGPURBSelect(); } -bool AMDGPURBSelect::runOnMachineFunction(MachineFunction &MF) { return true; } +bool shouldRBSelect(MachineInstr &MI) { +

[llvm-branch-commits] [llvm] AMDGPU/GlobalISel: RBSelect (PR #112863)

2024-10-23 Thread Petar Avramovic via llvm-branch-commits
https://github.com/petar-avramovic edited https://github.com/llvm/llvm-project/pull/112863 ___ 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] [Flang][OMP] Replace SUM intrinsic call with SUM operations (PR #113082)

2024-10-23 Thread Ivan R. Ivanov via llvm-branch-commits
https://github.com/ivanradanov edited https://github.com/llvm/llvm-project/pull/113082 ___ 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] [Flang][OMP] Replace SUM intrinsic call with SUM operations (PR #113082)

2024-10-23 Thread Michael Klemm via llvm-branch-commits
mjklemm wrote: > * The above requirement basically breaks allowing users to pick their own > openmp library when compiling their application. I'm not sure how widely used > this is. They won't be able to that regardless. The OpenMP library will have to match what Flang is using; otherwise, t

[llvm-branch-commits] [flang] [Flang][OMP] Replace SUM intrinsic call with SUM operations (PR #113082)

2024-10-23 Thread Tom Eccles via llvm-branch-commits
tblah wrote: > How do we usually have convergence on the definition of these runtime > functions when we introduce a library? Is it usually through a RFC? Because > if we think of vendors swapping implementations, does there need to be a > consensus prior to the implementation? To be clear, I

[llvm-branch-commits] [clang] [Serialization] Code cleanups and polish 83233 (PR #83237)

2024-10-23 Thread Vassil Vassilev via llvm-branch-commits
vgvassilev wrote: I think we almost never should call findAll. Most of the time we have a concrete template argument list… https://github.com/llvm/llvm-project/pull/83237 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://

[llvm-branch-commits] [llvm] 84d44ef - Revert "[PowerPC] Expand global named register support (#112603)"

2024-10-23 Thread via llvm-branch-commits
Author: Lei Huang Date: 2024-10-23T09:35:02-04:00 New Revision: 84d44efd214f0f7be39e7e063b2d94344c3ff979 URL: https://github.com/llvm/llvm-project/commit/84d44efd214f0f7be39e7e063b2d94344c3ff979 DIFF: https://github.com/llvm/llvm-project/commit/84d44efd214f0f7be39e7e063b2d94344c3ff979.diff LOG

[llvm-branch-commits] [compiler-rt] [TySan] Improved compatability for tests (PR #96507)

2024-10-23 Thread Chris Apple via llvm-branch-commits
@@ -4,6 +4,7 @@ // https://github.com/llvm/llvm-project/issues/47137 #include #include +#include cjappl wrote: Cool, thanks for the confirmation, resolving this comment https://github.com/llvm/llvm-project/pull/96507 ___

[llvm-branch-commits] [clang] [Serialization] Code cleanups and polish 83233 (PR #83237)

2024-10-23 Thread Alexander Kornienko via llvm-branch-commits
alexfh wrote: BTW, if you wonder about the callers of `LoadExternalSpecializations`: ``` - 90.30% 0.00% clang clang [.] clang::Sema::CheckVarTemplateId(clang::VarTemplateDecl*, clang::SourceLocation, clang::SourceLocation, clang::TemplateArgumentListInfo const&)

[llvm-branch-commits] [clang] [Serialization] Code cleanups and polish 83233 (PR #83237)

2024-10-23 Thread Alexander Kornienko via llvm-branch-commits
alexfh wrote: Compiling Clang with more debug information and without FDO+ThinLTO indeed shows `clang::serialization::MultiOnDiskHashTable::findAll()` as the main time sink: ``` + 96.99% 0.00% clangclang [.] clang::Sema::runWithSufficientStackSpace(clang::SourceLocati

[llvm-branch-commits] [flang] [Flang][OMP] Replace SUM intrinsic call with SUM operations (PR #113082)

2024-10-23 Thread via llvm-branch-commits
NimishMishra wrote: Thanks for the inputs @tblah. >> Having it in a runtime library would make it easier for vendors to swap out >> their own implementations e.g. maybe somebody already has a great MATMUL for >> AMD GPUs and wants flang to use that, but the implementation is useless on a >>

[llvm-branch-commits] [flang] [Flang][OMP] Replace SUM intrinsic call with SUM operations (PR #113082)

2024-10-23 Thread Tom Eccles via llvm-branch-commits
tblah wrote: > * I imagine that using a C `omp for` inside of a fortran `omp parallel` > should work **so long as they use the same openmp library**. Of course care > will need to be taken about privatisation etc but that can probably be > handled in the interface of the runtime function.

[llvm-branch-commits] [flang] [Flang][OMP] Replace SUM intrinsic call with SUM operations (PR #113082)

2024-10-23 Thread Tom Eccles via llvm-branch-commits
@@ -335,49 +336,129 @@ static void parallelizeRegion(Region &sourceRegion, Region &targetRegion, for (auto [i, opOrSingle] : llvm::enumerate(regions)) { bool isLast = i + 1 == regions.size(); if (std::holds_alternative(opOrSingle)) { -OpBuilder singleBu

[llvm-branch-commits] [flang] [Flang][OMP] Replace SUM intrinsic call with SUM operations (PR #113082)

2024-10-23 Thread Tom Eccles via llvm-branch-commits
@@ -335,49 +336,129 @@ static void parallelizeRegion(Region &sourceRegion, Region &targetRegion, for (auto [i, opOrSingle] : llvm::enumerate(regions)) { bool isLast = i + 1 == regions.size(); if (std::holds_alternative(opOrSingle)) { -OpBuilder singleBu

[llvm-branch-commits] [flang] [Flang][OMP] Replace SUM intrinsic call with SUM operations (PR #113082)

2024-10-23 Thread Tom Eccles via llvm-branch-commits
@@ -335,49 +336,129 @@ static void parallelizeRegion(Region &sourceRegion, Region &targetRegion, for (auto [i, opOrSingle] : llvm::enumerate(regions)) { bool isLast = i + 1 == regions.size(); if (std::holds_alternative(opOrSingle)) { -OpBuilder singleBu

[llvm-branch-commits] [flang] [Flang][OMP] Replace SUM intrinsic call with SUM operations (PR #113082)

2024-10-23 Thread Tom Eccles via llvm-branch-commits
@@ -227,11 +227,11 @@ void createHLFIRToFIRPassPipeline(mlir::PassManager &pm, bool enableOpenMP, hlfir::createOptimizedBufferization); } pm.addPass(hlfir::createLowerHLFIROrderedAssignments()); + if (enableOpenMP) +pm.addPass(

[llvm-branch-commits] [flang] [Flang][OMP] Replace SUM intrinsic call with SUM operations (PR #113082)

2024-10-23 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/113082 ___ 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] [Flang][OMP] Replace SUM intrinsic call with SUM operations (PR #113082)

2024-10-23 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah commented: I don't have a strong opinion about whether this should be done in flang codegen or in a runtime library. Some drive-by thoughts: - I imagine that using a C `omp for` inside of a fortran `omp parallel` should work **so long as they use the same openmp librar

[llvm-branch-commits] [flang] [Flang][OMP] Replace SUM intrinsic call with SUM operations (PR #113082)

2024-10-23 Thread Thirumalai Shaktivel via llvm-branch-commits
https://github.com/Thirumalai-Shaktivel ready_for_review https://github.com/llvm/llvm-project/pull/113082 ___ 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] [TySan] Improved compatability for tests (PR #96507)

2024-10-23 Thread via llvm-branch-commits
@@ -4,6 +4,7 @@ // https://github.com/llvm/llvm-project/issues/47137 #include #include +#include gbMattN wrote: The test uses uint64_t, which is in stdint.h. When I was running these tests, not having that file included gave me a compile error. https://gi

[llvm-branch-commits] [llvm] [AArch64][PAC] Move emission of LR checks in tail calls to AsmPrinter (PR #110705)

2024-10-23 Thread Daniil Kovalev via llvm-branch-commits
https://github.com/kovdan01 approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/110705 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-c

[llvm-branch-commits] [llvm] [AArch64][PAC] Move emission of LR checks in tail calls to AsmPrinter (PR #110705)

2024-10-23 Thread Daniil Kovalev via llvm-branch-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/110705 ___ 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] [llvm] [AArch64][PAC] Move emission of LR checks in tail calls to AsmPrinter (PR #110705)

2024-10-23 Thread Daniil Kovalev via llvm-branch-commits
@@ -1757,38 +1762,70 @@ void AArch64AsmPrinter::emitPtrauthCheckAuthenticatedValue( //Lsuccess: // ... // - // This sequence is expensive, but we need more information to be able to - // do better. - // - // We can't TBZ the poison bit because EnhancedPAC2 X