[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-27 Thread Djordje Todorovic via cfe-commits
https://github.com/djtodoro closed https://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-27 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-27 Thread Djordje Todorovic via cfe-commits
@@ -1228,6 +1228,21 @@ def HasVendorXCVbi : Predicate<"Subtarget->hasVendorXCVbi()">, AssemblerPredicate<(all_of FeatureVendorXCVbi), "'XCVbi' (CORE-V Immediate Branching)">; +// MIPS Extensions + +def FeatureVendorXMIPSCMove +: RISCVExten

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-27 Thread Craig Topper via cfe-commits
@@ -1228,6 +1228,21 @@ def HasVendorXCVbi : Predicate<"Subtarget->hasVendorXCVbi()">, AssemblerPredicate<(all_of FeatureVendorXCVbi), "'XCVbi' (CORE-V Immediate Branching)">; +// MIPS Extensions + +def FeatureVendorXMIPSCMove +: RISCVExten

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-27 Thread Djordje Todorovic via cfe-commits
@@ -1228,6 +1228,21 @@ def HasVendorXCVbi : Predicate<"Subtarget->hasVendorXCVbi()">, AssemblerPredicate<(all_of FeatureVendorXCVbi), "'XCVbi' (CORE-V Immediate Branching)">; +// MIPS Extensions + +def FeatureVendorXMIPSCMove +: RISCVExten

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-27 Thread Djordje Todorovic via cfe-commits
@@ -1228,6 +1228,21 @@ def HasVendorXCVbi : Predicate<"Subtarget->hasVendorXCVbi()">, AssemblerPredicate<(all_of FeatureVendorXCVbi), "'XCVbi' (CORE-V Immediate Branching)">; +// MIPS Extensions + +def FeatureVendorXMIPSCMove +: RISCVExten

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-27 Thread Craig Topper via cfe-commits
@@ -1228,6 +1228,21 @@ def HasVendorXCVbi : Predicate<"Subtarget->hasVendorXCVbi()">, AssemblerPredicate<(all_of FeatureVendorXCVbi), "'XCVbi' (CORE-V Immediate Branching)">; +// MIPS Extensions + +def FeatureVendorXMIPSCMove +: RISCVExten

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-27 Thread Djordje Todorovic via cfe-commits
djtodoro wrote: @topperc Is it ok now? :) https://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-27 Thread Djordje Todorovic via cfe-commits
djolertrk wrote: @topperc looks ok now? https://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-27 Thread Djordje Todorovic via cfe-commits
https://github.com/djolertrk deleted https://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-27 Thread Djordje Todorovic via cfe-commits
@@ -514,6 +514,80 @@ class RVInstJhttps://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-27 Thread Djordje Todorovic via cfe-commits
@@ -514,6 +514,80 @@ class RVInstJhttps://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-24 Thread Craig Topper via cfe-commits
@@ -514,6 +514,80 @@ class RVInstJhttps://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-24 Thread Craig Topper via cfe-commits
@@ -0,0 +1,95 @@ +//===-- RISCVInstrInfoXMips.td -*- tablegen -*-===// +// +// 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: Apa

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-24 Thread Djordje Todorovic via cfe-commits
djtodoro wrote: @lenary thanks! >You still have a whitespace change to this file? No, the whitespaces are there on `main` branch. I applied `clang-format` initially, and that is why it was included in one of my previous patches. https://github.com/llvm/llvm-project/pull/121394 ___

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-23 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. Two tiny issues, but I think I'm happy for this to land. https://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-23 Thread Sam Elliott via cfe-commits
lenary wrote: You still have a whitespace change to this file? https://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-23 Thread Sam Elliott via cfe-commits
@@ -238,3 +247,11 @@ void RISCVSubtarget::overridePostRASchedPolicy(MachineSchedPolicy &Policy, Policy.OnlyBottomUp = false; } } + +bool RISCVSubtarget::useLoadStorePairs() const { + return UseMIPSLoadStorePairsOpt && HasVendorXMIPSLSP; +} lenary wrote:

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-23 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-20 Thread Djordje Todorovic via cfe-commits
@@ -62,6 +62,15 @@ static cl::opt RISCVMinimumJumpTableEntries( "riscv-min-jump-table-entries", cl::Hidden, cl::desc("Set minimum number of entries to use a jump table on RISCV")); +static cl::opt +UseLoadStorePairsOpt("riscv-load-store-pairs", djt

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-20 Thread Djordje Todorovic via cfe-commits
@@ -0,0 +1,82 @@ +//===-- RISCVInstrInfoXMips.td -*- tablegen -*-===// +// +// 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: Apa

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-20 Thread Craig Topper via cfe-commits
@@ -514,6 +514,78 @@ class RVInstJ +: RVInst { + bits<7> imm7; + bits<5> rs1; + bits<5> rd1; + bits<5> rd2; + + let Inst{31-27} = rd2; + let Inst{26-23} = imm7{6-3}; + let Inst{22-20} = 0b000; + let Inst{19-15} = rs1; + let Inst{14-12} = 0b100; + let Inst{11-7} = rd1

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-20 Thread Djordje Todorovic via cfe-commits
@@ -514,6 +514,78 @@ class RVInstJ +: RVInst { + bits<7> imm7; + bits<5> rs1; + bits<5> rd1; + bits<5> rd2; + + let Inst{31-27} = rd2; + let Inst{26-23} = imm7{6-3}; + let Inst{22-20} = 0b000; + let Inst{19-15} = rs1; + let Inst{14-12} = 0b100; + let Inst{11-7} = rd1

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-17 Thread Djordje Todorovic via cfe-commits
@@ -0,0 +1,82 @@ +//===-- RISCVInstrInfoXMips.td -*- tablegen -*-===// +// +// 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: Apa

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-17 Thread Djordje Todorovic via cfe-commits
@@ -1448,3 +1448,18 @@ def FeatureTaggedGlobals : SubtargetFeature<"tagged-globals", "AllowTaggedGlobals", "true", "Use an instruction sequence for taking the address of a global " "that allows a memory tag in the upper address bits">; + +def FeatureVendorMIPSCMove

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Craig Topper via cfe-commits
https://github.com/topperc edited https://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Craig Topper via cfe-commits
@@ -0,0 +1,82 @@ +//===-- RISCVInstrInfoXMips.td -*- tablegen -*-===// +// +// 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: Apa

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Craig Topper via cfe-commits
@@ -0,0 +1,82 @@ +//===-- RISCVInstrInfoXMips.td -*- tablegen -*-===// +// +// 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: Apa

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Craig Topper via cfe-commits
@@ -0,0 +1,82 @@ +//===-- RISCVInstrInfoXMips.td -*- tablegen -*-===// +// +// 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: Apa

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Craig Topper via cfe-commits
@@ -109,6 +109,21 @@ def uimm7_lsb00 : RISCVOp, }]; } +// A 7-bit unsigned immediate where the least significant three bits are zero. topperc wrote: This should be defned in Mips specific file if that's the only place it is used. https://github.com/llvm/ll

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Craig Topper via cfe-commits
@@ -0,0 +1,82 @@ +//===-- RISCVInstrInfoXMips.td -*- tablegen -*-===// +// +// 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: Apa

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Craig Topper via cfe-commits
@@ -1448,3 +1448,18 @@ def FeatureTaggedGlobals : SubtargetFeature<"tagged-globals", "AllowTaggedGlobals", "true", "Use an instruction sequence for taking the address of a global " "that allows a memory tag in the upper address bits">; + +def FeatureVendorMIPSCMove

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Craig Topper via cfe-commits
@@ -1448,3 +1448,18 @@ def FeatureTaggedGlobals : SubtargetFeature<"tagged-globals", "AllowTaggedGlobals", "true", "Use an instruction sequence for taking the address of a global " "that allows a memory tag in the upper address bits">; + +def FeatureVendorMIPSCMove

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Craig Topper via cfe-commits
@@ -0,0 +1,82 @@ +//===-- RISCVInstrInfoXMips.td -*- tablegen -*-===// +// +// 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: Apa

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Craig Topper via cfe-commits
@@ -514,6 +514,78 @@ class RVInstJ +: RVInst { + bits<7> imm7; + bits<5> rs1; + bits<5> rd1; + bits<5> rd2; + + let Inst{31-27} = rd2; + let Inst{26-23} = imm7{6-3}; + let Inst{22-20} = 0b000; + let Inst{19-15} = rs1; + let Inst{14-12} = 0b100; + let Inst{11-7} = rd1

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Craig Topper via cfe-commits
@@ -0,0 +1,82 @@ +//===-- RISCVInstrInfoXMips.td -*- tablegen -*-===// +// +// 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: Apa

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Craig Topper via cfe-commits
@@ -0,0 +1,82 @@ +//===-- RISCVInstrInfoXMips.td -*- tablegen -*-===// +// +// 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: Apa

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Craig Topper via cfe-commits
@@ -0,0 +1,82 @@ +//===-- RISCVInstrInfoXMips.td -*- tablegen -*-===// +// +// 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: Apa

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Craig Topper via cfe-commits
@@ -0,0 +1,82 @@ +//===-- RISCVInstrInfoXMips.td -*- tablegen -*-===// +// +// 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: Apa

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Craig Topper via cfe-commits
@@ -514,6 +514,78 @@ class RVInstJ +: RVInst { + bits<7> imm7; + bits<5> rs1; + bits<5> rd1; + bits<5> rd2; + + let Inst{31-27} = rd2; + let Inst{26-23} = imm7{6-3}; + let Inst{22-20} = 0b000; + let Inst{19-15} = rs1; + let Inst{14-12} = 0b100; + let Inst{11-7} = rd1

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Craig Topper via cfe-commits
@@ -0,0 +1,82 @@ +//===-- RISCVInstrInfoXMips.td -*- tablegen -*-===// +// +// 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: Apa

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Jessica Clarke via cfe-commits
@@ -62,6 +62,15 @@ static cl::opt RISCVMinimumJumpTableEntries( "riscv-min-jump-table-entries", cl::Hidden, cl::desc("Set minimum number of entries to use a jump table on RISCV")); +static cl::opt +UseLoadStorePairsOpt("riscv-load-store-pairs", jrt

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Sam Elliott via cfe-commits
lenary wrote: Please can you undo these whitespace changes, given you're not really making changes to this file https://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Sam Elliott via cfe-commits
@@ -1448,3 +1448,18 @@ def FeatureTaggedGlobals : SubtargetFeature<"tagged-globals", "AllowTaggedGlobals", "true", "Use an instruction sequence for taking the address of a global " "that allows a memory tag in the upper address bits">; + +def FeatureVendorMIPSCMove

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Sam Elliott via cfe-commits
https://github.com/lenary commented: Some small notes, the one about using RISCVExtension will probably have the most knock-on work (run both the llvm and the clang test suites after that change, to see where that info gets to) https://github.com/llvm/llvm-project/pull/121394 _

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-15 Thread Djordje Todorovic via cfe-commits
@@ -62,6 +62,15 @@ static cl::opt RISCVMinimumJumpTableEntries( "riscv-min-jump-table-entries", cl::Hidden, cl::desc("Set minimum number of entries to use a jump table on RISCV")); +static cl::opt +UseLoadStorePairsOpt("riscv-load-store-pairs", djt

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-15 Thread Djordje Todorovic via cfe-commits
djtodoro wrote: @topperc Thanks for the comments! > This still isn't broken down enough. We usually like to see assembler support > in separate patches from code generation. I have removed `RISCVLoadStoreOptimizer` Pass, and will add it in a separate PR/commit. > Missing tests in test/MC/RIS

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-15 Thread Djordje Todorovic via cfe-commits
@@ -0,0 +1,82 @@ +//===-- RISCVInstrInfoXMips.td -*- tablegen -*-===// +// +// 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: Apa

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-15 Thread Djordje Todorovic via cfe-commits
@@ -0,0 +1,370 @@ +//===- RISCVLoadStoreOptimizer.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

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-15 Thread Djordje Todorovic via cfe-commits
@@ -389,6 +390,13 @@ class RISCVPassConfig : public TargetPassConfig { DAG->addMutation(createStoreClusterDAGMutation( DAG->TII, DAG->TRI, /*ReorderWhileClustering=*/true)); } + +const RISCVSubtarget &ST = C->MF->getSubtarget(); +if (!ST.getMacroFusi

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-15 Thread Djordje Todorovic via cfe-commits
@@ -257,6 +257,146 @@ def simm12 : RISCVSImmLeafOp<12> { }]; } +// A 7-bit unsigned immediate where the least significant two bits are zero. djtodoro wrote: No need any more, thanks https://github.com/llvm/llvm-project/pull/121394 _

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-03 Thread Djordje Todorovic via cfe-commits
@@ -4963,6 +4963,10 @@ def msave_restore : Flag<["-"], "msave-restore">, Group, def mno_save_restore : Flag<["-"], "mno-save-restore">, Group, HelpText<"Disable using library calls for save and restore">; } // let Flags = [TargetSpecific] +def mload_store_pairs : Flag<["-"]

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-01 Thread Sam Elliott via cfe-commits
@@ -4963,6 +4963,10 @@ def msave_restore : Flag<["-"], "msave-restore">, Group, def mno_save_restore : Flag<["-"], "mno-save-restore">, Group, HelpText<"Disable using library calls for save and restore">; } // let Flags = [TargetSpecific] +def mload_store_pairs : Flag<["-"]

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2024-12-31 Thread Jessica Clarke via cfe-commits
@@ -0,0 +1,82 @@ +//===-- RISCVInstrInfoXMips.td -*- tablegen -*-===// +// +// 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: Apa

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2024-12-31 Thread Craig Topper via cfe-commits
topperc wrote: Missing tests in test/MC/RISCV for the assembler and disassembler https://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2024-12-31 Thread Craig Topper via cfe-commits
@@ -1395,6 +1395,19 @@ def NoConditionalMoveFusion : Predicate<"!Subtarget->hasConditionalMoveFusion() def TuneMIPSP8700 : SubtargetFeature<"mips-p8700", "RISCVProcFamily", "MIPSP8700", "MIPS p8700 processor">; +def FeatureVendorMIPSCMove : Subtarge

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2024-12-31 Thread Craig Topper via cfe-commits
@@ -0,0 +1,370 @@ +//===- RISCVLoadStoreOptimizer.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

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2024-12-31 Thread Craig Topper via cfe-commits
@@ -389,6 +390,13 @@ class RISCVPassConfig : public TargetPassConfig { DAG->addMutation(createStoreClusterDAGMutation( DAG->TII, DAG->TRI, /*ReorderWhileClustering=*/true)); } + +const RISCVSubtarget &ST = C->MF->getSubtarget(); +if (!ST.getMacroFusi

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2024-12-31 Thread Craig Topper via cfe-commits
@@ -62,6 +62,15 @@ static cl::opt RISCVMinimumJumpTableEntries( "riscv-min-jump-table-entries", cl::Hidden, cl::desc("Set minimum number of entries to use a jump table on RISCV")); +static cl::opt +UseLoadStorePairsOpt("riscv-load-store-pairs", top

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2024-12-31 Thread Craig Topper via cfe-commits
@@ -257,6 +257,146 @@ def simm12 : RISCVSImmLeafOp<12> { }]; } +// A 7-bit unsigned immediate where the least significant two bits are zero. topperc wrote: Why do these need to move? RISCVInstrInfoXMips.td is included after RISCVInstrInfoC.td https://gith

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2024-12-31 Thread Craig Topper via cfe-commits
@@ -514,6 +514,78 @@ class RVInstJ +: RVInst { + bits<7> imm7; + bits<5> rs1; + bits<5> rd1; + bits<5> rd2; + + let Inst{31-27} = rd2; + let Inst{26-23} = imm7{6-3}; + let Inst{22-20} = 0b000; + let Inst{19-15} = rs1; + let Inst{14-12} = 0b100; + let Inst{11-7} = rd1

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2024-12-31 Thread Craig Topper via cfe-commits
@@ -0,0 +1,82 @@ +//===-- RISCVInstrInfoXMips.td -*- tablegen -*-===// +// +// 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: Apa

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2024-12-31 Thread Craig Topper via cfe-commits
topperc wrote: This still isn't broken down enough. We usually like to see assembler support in separate patches from code generation. https://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2024-12-31 Thread Djordje Todorovic via cfe-commits
https://github.com/djtodoro updated https://github.com/llvm/llvm-project/pull/121394 >From 29d22560f2987e81ea66e4c7dea42f594bda709f Mon Sep 17 00:00:00 2001 From: Djordje Todorovic Date: Thu, 26 Dec 2024 09:09:24 +0100 Subject: [PATCH] [RISCV] Add MIPS extensions Adding two extensions for MIPS

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2024-12-31 Thread Djordje Todorovic via cfe-commits
https://github.com/djtodoro updated https://github.com/llvm/llvm-project/pull/121394 >From f833498eb48595cc6b2bd5dd0c1b05d941313877 Mon Sep 17 00:00:00 2001 From: Djordje Todorovic Date: Thu, 26 Dec 2024 09:09:24 +0100 Subject: [PATCH] [RISCV] Add MIPS extensions Adding two extensions for MIPS

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2024-12-31 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 1d5154663509b6200038a2f0b0ac958ea556fa9e a2e1fd5ffab4fe64a160571a9dffaacc3f22c32d --e

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2024-12-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Djordje Todorovic (djtodoro) Changes Adding two extensions for MIPS p8700 CPU: 1. cmove (conditional move) 2. lsp (load/store pair) The official product page here: https://mips.com/products/hardware/p8700 --- Patch is 75.96 K

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2024-12-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Djordje Todorovic (djtodoro) Changes Adding two extensions for MIPS p8700 CPU: 1. cmove (conditional move) 2. lsp (load/store pair) The official product page here: https://mips.com/products/hardware/p8700 --- Patch is 75.96

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2024-12-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Djordje Todorovic (djtodoro) Changes Adding two extensions for MIPS p8700 CPU: 1. cmove (conditional move) 2. lsp (load/store pair) The official product page here: https://mips.com/products/hardware/p8700 --- Patch is 75.96 KiB, tru

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2024-12-31 Thread Djordje Todorovic via cfe-commits
https://github.com/djtodoro created https://github.com/llvm/llvm-project/pull/121394 Adding two extensions for MIPS p8700 CPU: 1. cmove (conditional move) 2. lsp (load/store pair) The official product page here: https://mips.com/products/hardware/p8700 >From a2e1fd5ffab4fe64a160571a9dffaa