https://github.com/BeMg approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/116257
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BeMg closed https://github.com/llvm/llvm-project/pull/115981
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
BeMg wrote:
Seem we don't support this attribute.
https://github.com/llvm/llvm-project/pull/115981
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2938,36 +2914,17 @@ void CodeGenFunction::EmitRISCVMultiVersionResolver(
bool HasDefault = false;
unsigned DefaultIndex = 0;
- SmallVector CurrOptions(
- Options);
-
- llvm::stable_sort(
- CurrOptions, [](const CodeGenFunction::MultiVersionResolverOption &L
https://github.com/BeMg closed https://github.com/llvm/llvm-project/pull/117128
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BeMg created https://github.com/llvm/llvm-project/pull/117128
Remain InheritableAttr to avoid the warning `TypePrinter.cpp:1953:10: warning:
enumeration value ‘TargetVersion’ not handled in switch`
origin messenge
[TargetVersion] Only enable on RISC-V and AArch64 (#115991) A
https://github.com/BeMg closed https://github.com/llvm/llvm-project/pull/117110
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BeMg created https://github.com/llvm/llvm-project/pull/117110
Reverts llvm/llvm-project#115991
Due to build fail https://lab.llvm.org/buildbot/#/builders/66/builds/6511
>From e7efa82cb1362e8a2eae63fa66954327de50b88a Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Thu, 21 Nov
https://github.com/BeMg closed https://github.com/llvm/llvm-project/pull/115991
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/115991
>From 28f7a2adc055ec6f30790e1e9535c71241a08e29 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Tue, 12 Nov 2024 20:56:47 -0800
Subject: [PATCH 1/7] [TargetVersion] Only enable on RISC-V and AArch64
---
clang/inclu
BeMg wrote:
Fix the merge conflict
https://github.com/llvm/llvm-project/pull/115991
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4216,22 +4216,11 @@ static void
ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old,
llvm::Function *NewFn);
static unsigned
-TargetMVPriority(const TargetInfo &TI,
- const CodeGenFunction:
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/115991
>From 28f7a2adc055ec6f30790e1e9535c71241a08e29 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Tue, 12 Nov 2024 20:56:47 -0800
Subject: [PATCH 1/7] [TargetVersion] Only enable on RISC-V and AArch64
---
clang/inclu
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/115991
>From 28f7a2adc055ec6f30790e1e9535c71241a08e29 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Tue, 12 Nov 2024 20:56:47 -0800
Subject: [PATCH 1/6] [TargetVersion] Only enable on RISC-V and AArch64
---
clang/inclu
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/115991
>From 28f7a2adc055ec6f30790e1e9535c71241a08e29 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Tue, 12 Nov 2024 20:56:47 -0800
Subject: [PATCH 1/5] [TargetVersion] Only enable on RISC-V and AArch64
---
clang/inclu
@@ -3040,6 +3040,7 @@ bool Sema::checkTargetVersionAttr(SourceLocation
LiteralLoc, Decl *D,
enum FirstParam { Unsupported };
enum SecondParam { None };
enum ThirdParam { Target, TargetClones, TargetVersion };
+
BeMg wrote:
Nice catch. Dropped.
https://
@@ -4216,22 +4216,11 @@ static void
ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old,
llvm::Function *NewFn);
static unsigned
-TargetMVPriority(const TargetInfo &TI,
- const CodeGenFunction:
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/115991
>From 28f7a2adc055ec6f30790e1e9535c71241a08e29 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Tue, 12 Nov 2024 20:56:47 -0800
Subject: [PATCH 1/4] [TargetVersion] Only enable on RISC-V and AArch64
---
clang/inclu
@@ -3040,6 +3040,11 @@ bool Sema::checkTargetVersionAttr(SourceLocation
LiteralLoc, Decl *D,
enum FirstParam { Unsupported };
enum SecondParam { None };
enum ThirdParam { Target, TargetClones, TargetVersion };
+
+ if (!Context.getTargetInfo().getTriple().isRISCV() &&
+
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/115991
>From 28f7a2adc055ec6f30790e1e9535c71241a08e29 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Tue, 12 Nov 2024 20:56:47 -0800
Subject: [PATCH 1/3] [TargetVersion] Only enable on RISC-V and AArch64
---
clang/inclu
BeMg wrote:
Update:
1. Add the testcase
2. in this target -> on this target
https://github.com/llvm/llvm-project/pull/115991
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BeMg created https://github.com/llvm/llvm-project/pull/115991
Address https://github.com/llvm/llvm-project/issues/115000.
This patch constrains the target_version feature to work only on RISC-V and
AArch64 to prevent crashes in Clang.
>From 28f7a2adc055ec6f30790e1e9535c7124
https://github.com/BeMg created https://github.com/llvm/llvm-project/pull/115981
Base on https://github.com/riscv-non-isa/riscv-c-api-doc/pull/94.
This patch support the `norelax` attribute for RISC-V target in clang.
>From 9dc14ca1e5d026c05390c728c9512994e05d8be7 Mon Sep 17 00:00:00 2001
From:
https://github.com/BeMg closed https://github.com/llvm/llvm-project/pull/112161
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BeMg approved this pull request.
LGTM. Thanks for fix this issue!
https://github.com/llvm/llvm-project/pull/112827
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/112161
>From d7a00a878b472e1ba7abad1b915cb57c4b0a5ca3 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Sun, 6 Oct 2024 22:19:07 -0700
Subject: [PATCH 1/5] [RISCV][FMV] Remove support for negative priority
---
clang/lib/Co
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/112161
>From d7a00a878b472e1ba7abad1b915cb57c4b0a5ca3 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Sun, 6 Oct 2024 22:19:07 -0700
Subject: [PATCH 1/4] [RISCV][FMV] Remove support for negative priority
---
clang/lib/Co
@@ -2909,18 +2909,16 @@ static int getPriorityFromAttrString(StringRef AttrStr)
{
AttrStr.split(Attrs, ';');
BeMg wrote:
Sure.
https://github.com/llvm/llvm-project/pull/112161
___
cfe-commits mailing list
cfe-commi
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/112161
>From d7a00a878b472e1ba7abad1b915cb57c4b0a5ca3 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Sun, 6 Oct 2024 22:19:07 -0700
Subject: [PATCH 1/2] [RISCV][FMV] Remove support for negative priority
---
clang/lib/Co
https://github.com/BeMg edited https://github.com/llvm/llvm-project/pull/112161
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -111,3 +111,9 @@ __attribute__((target_version("default"))) int
invalidVerson4(void) { return 2;
__attribute__((target_version("priority=1"))) int prioriyWithoutArch(void) {
return 2; }
// expected-error@+1 {{redefinition of 'prioriyWithoutArch'}}
__attribute__((target_ver
https://github.com/BeMg created https://github.com/llvm/llvm-project/pull/112161
Ensure that target_version and target_clones do not accept negative numbers for
the priority feature.
Base on discussion on https://github.com/riscv-non-isa/riscv-c-api-doc/pull/85.
>From d7a00a878b472e1ba7abad1b
https://github.com/BeMg closed https://github.com/llvm/llvm-project/pull/111333
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BeMg created https://github.com/llvm/llvm-project/pull/111333
Fix the buildbot failure caused by heap use-after-free error.
Origin message:
This patch enable `target_version` attribute for RISC-V target.
The proposal of `target_version` syntax can be found at the
https://github.com/BeMg closed https://github.com/llvm/llvm-project/pull/111096
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BeMg created https://github.com/llvm/llvm-project/pull/111096
Reverts llvm/llvm-project#99040 to fix
https://lab.llvm.org/buildbot/#/builders/190/builds/7052
>From 32174720649068de7c4ef97a484d777dba72e65c Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Fri, 4 Oct 2024 11:55:
https://github.com/BeMg closed https://github.com/llvm/llvm-project/pull/99040
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
BeMg wrote:
There is misunderstand here. Close it now and reopen when it ready.
https://github.com/llvm/llvm-project/pull/110098
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BeMg closed https://github.com/llvm/llvm-project/pull/110098
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/110098
>From 838c6669d2f4464b9b528b0d633ad363b92e3b57 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Thu, 26 Sep 2024 02:16:56 -0700
Subject: [PATCH 1/2] [FMV][RISCV] Check FeatureBits.length before test all
version
---
https://github.com/BeMg created https://github.com/llvm/llvm-project/pull/110098
This patch add a condition that check the `__riscv_feature_bits.length` before
access `__riscv_feature_bits.features`.
It updates the resolver function as the following structure.
```
if (__riscv_feature_bits.fe
@@ -3056,6 +3056,47 @@ bool Sema::checkTargetVersionAttr(SourceLocation
LiteralLoc, Decl *D,
enum SecondParam { None };
enum ThirdParam { Target, TargetClones, TargetVersion };
llvm::SmallVector Features;
+ if (Context.getTargetInfo().getTriple().isRISCV()) {
+
@@ -3056,6 +3056,45 @@ bool Sema::checkTargetVersionAttr(SourceLocation
LiteralLoc, Decl *D,
enum SecondParam { None };
enum ThirdParam { Target, TargetClones, TargetVersion };
llvm::SmallVector Features;
+ if (Context.getTargetInfo().getTriple().isRISCV()) {
+
+llv
https://github.com/BeMg edited https://github.com/llvm/llvm-project/pull/99040
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3056,6 +3056,45 @@ bool Sema::checkTargetVersionAttr(SourceLocation
LiteralLoc, Decl *D,
enum SecondParam { None };
enum ThirdParam { Target, TargetClones, TargetVersion };
llvm::SmallVector Features;
+ if (Context.getTargetInfo().getTriple().isRISCV()) {
+
+llv
@@ -3056,6 +3056,45 @@ bool Sema::checkTargetVersionAttr(SourceLocation
LiteralLoc, Decl *D,
enum SecondParam { None };
enum ThirdParam { Target, TargetClones, TargetVersion };
llvm::SmallVector Features;
+ if (Context.getTargetInfo().getTriple().isRISCV()) {
+
+llv
@@ -15501,8 +15511,10 @@ Decl *Sema::ActOnStartOfFunctionDef(Scope
*FnBodyScope, Decl *D,
FD->setInvalidDecl();
}
if (const auto *Attr = FD->getAttr()) {
-if (!Context.getTargetInfo().hasFeature("fmv") &&
-!Attr->isDefaultVersion()) {
+if (Context.getTa
@@ -4268,8 +4268,12 @@ void CodeGenModule::emitMultiVersionFunctions() {
} else if (const auto *TVA = CurFD->getAttr()) {
if (TVA->isDefaultVersion() && IsDefined)
ShouldEmitResolver = true;
-TVA->getFeatures(Feats);
@@ -14270,9 +14270,16 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
Target->initFeatureMap(FeatureMap, getDiagnostics(), TargetCPU,
Features);
}
} else if (const auto *TV = FD->getAttr()) {
-llvm::SmallVector Feats;
-TV->getFeature
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/99040
>From 54b5d6833a52271dfd1ca3912d5d9e886b1970c2 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Tue, 19 Mar 2024 02:02:35 -0700
Subject: [PATCH 1/9] [RISCV][FMV] Support target_version
---
clang/lib/AST/ASTContext.c
@@ -11027,13 +11029,27 @@ static bool CheckMultiVersionValue(Sema &S, const
FunctionDecl *FD) {
}
if (TVA) {
-llvm::SmallVector Feats;
-TVA->getFeatures(Feats);
-for (const auto &Feat : Feats) {
- if (!TargetInfo.validateCpuSupports(Feat)) {
-S.Di
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/99040
>From 54b5d6833a52271dfd1ca3912d5d9e886b1970c2 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Tue, 19 Mar 2024 02:02:35 -0700
Subject: [PATCH 1/5] [RISCV][FMV] Support target_version
---
clang/lib/AST/ASTContext.c
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/99040
>From 54b5d6833a52271dfd1ca3912d5d9e886b1970c2 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Tue, 19 Mar 2024 02:02:35 -0700
Subject: [PATCH 1/4] [RISCV][FMV] Support target_version
---
clang/lib/AST/ASTContext.c
@@ -10319,8 +10319,10 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D,
DeclContext *DC,
// Handle attributes.
ProcessDeclAttributes(S, NewFD, D);
const auto *NewTVA = NewFD->getAttr();
- if (NewTVA && !NewTVA->isDefaultVersion() &&
- !Context.getTargetInfo
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/99040
>From 54b5d6833a52271dfd1ca3912d5d9e886b1970c2 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Tue, 19 Mar 2024 02:02:35 -0700
Subject: [PATCH 1/3] [RISCV][FMV] Support target_version
---
clang/lib/AST/ASTContext.c
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/99040
>From 54b5d6833a52271dfd1ca3912d5d9e886b1970c2 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Tue, 19 Mar 2024 02:02:35 -0700
Subject: [PATCH 1/2] [RISCV][FMV] Support target_version
---
clang/lib/AST/ASTContext.c
BeMg wrote:
Rebase to main
https://github.com/llvm/llvm-project/pull/99040
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/99040
>From 54b5d6833a52271dfd1ca3912d5d9e886b1970c2 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Tue, 19 Mar 2024 02:02:35 -0700
Subject: [PATCH] [RISCV][FMV] Support target_version
---
clang/lib/AST/ASTContext.cpp
https://github.com/BeMg closed https://github.com/llvm/llvm-project/pull/85786
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/85786
>From 395ce72afbf9e4b12fcbfaf9cdbda8921c9ff72a Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Tue, 23 Jul 2024 19:59:06 -0700
Subject: [PATCH 01/18] [RISCV][FMV] Support target_clones
---
.../clang/Basic/Diagnosti
https://github.com/BeMg closed https://github.com/llvm/llvm-project/pull/106495
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
BeMg wrote:
Rename and update the description of err_os_unsupport_riscv_target_clones
because not only target clones trigger FMV.
https://github.com/llvm/llvm-project/pull/85786
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.ll
BeMg wrote:
> A test case will crash, missing `+` before `zbc`:
>
> ```
> __attribute__((target_clones("default", "arch=+zbb,zbc;priority=-1",
> "priority=-2;arch=+zba", "priority=3;arch=+zbb,+zba"))) int foo1(void) {
> return 2; }
>
>
> int bar() { return foo1(); }
> ```
>
> ```
> $ clang
@@ -4,3 +4,12 @@
int __attribute__((target("arch=rv64g"))) foo(void) { return 0; }
//expected-error@+1 {{redefinition of 'foo'}}
int __attribute__((target("arch=rv64gc"))) foo(void) { return 0; }
+
+//expected-warning@+1 {{unsupported 'notafeature' in the 'target' attribute
st
@@ -4,3 +4,12 @@
int __attribute__((target("arch=rv64g"))) foo(void) { return 0; }
//expected-error@+1 {{redefinition of 'foo'}}
int __attribute__((target("arch=rv64gc"))) foo(void) { return 0; }
+
+//expected-warning@+1 {{unsupported 'notafeature' in the 'target' attribute
st
@@ -2993,10 +2993,17 @@ bool Sema::checkTargetAttr(SourceLocation LiteralLoc,
StringRef AttrStr) {
return Diag(LiteralLoc, diag::warn_unsupported_target_attribute)
<< Unknown << Tune << ParsedAttrs.Tune << Target;
- if (Context.getTargetInfo().getTriple().isRI
@@ -4,3 +4,12 @@
int __attribute__((target("arch=rv64g"))) foo(void) { return 0; }
//expected-error@+1 {{redefinition of 'foo'}}
int __attribute__((target("arch=rv64gc"))) foo(void) { return 0; }
+
+//expected-warning@+1 {{unsupported 'notafeature' in the 'target' attribute
st
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/106495
>From e8f472674e0d1e70adcd1d29b8c902f4cd80f188 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Wed, 28 Aug 2024 21:15:57 -0700
Subject: [PATCH 1/7] [Clang][RISCV] Recognize unsupport feature by supporting
isValidFe
BeMg wrote:
ping
https://github.com/llvm/llvm-project/pull/106495
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/85786
>From 395ce72afbf9e4b12fcbfaf9cdbda8921c9ff72a Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Tue, 23 Jul 2024 19:59:06 -0700
Subject: [PATCH 01/16] [RISCV][FMV] Support target_clones
---
.../clang/Basic/Diagnosti
https://github.com/BeMg edited https://github.com/llvm/llvm-project/pull/85786
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
BeMg wrote:
stack on https://github.com/llvm/llvm-project/pull/85786
https://github.com/llvm/llvm-project/pull/99040
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
BeMg wrote:
Support `priority` syntax for target_version
https://github.com/llvm/llvm-project/pull/99040
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
BeMg wrote:
Rebase with https://github.com/llvm/llvm-project/pull/106680 and drop the
`__RISCV_TargetAttrNeedOverride` relate code section.
https://github.com/llvm/llvm-project/pull/106495
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:
https://github.com/BeMg edited https://github.com/llvm/llvm-project/pull/106495
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BeMg edited https://github.com/llvm/llvm-project/pull/106495
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/106495
>From e8f472674e0d1e70adcd1d29b8c902f4cd80f188 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Wed, 28 Aug 2024 21:15:57 -0700
Subject: [PATCH 1/4] [Clang][RISCV] Recognize unsupport feature by supporting
isValidFe
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/106495
>From e8f472674e0d1e70adcd1d29b8c902f4cd80f188 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Wed, 28 Aug 2024 21:15:57 -0700
Subject: [PATCH 1/3] [Clang][RISCV] Recognize unsupport feature by supporting
isValidFe
https://github.com/BeMg closed https://github.com/llvm/llvm-project/pull/106680
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2993,10 +2993,17 @@ bool Sema::checkTargetAttr(SourceLocation LiteralLoc,
StringRef AttrStr) {
return Diag(LiteralLoc, diag::warn_unsupported_target_attribute)
<< Unknown << Tune << ParsedAttrs.Tune << Target;
- if (Context.getTargetInfo().getTriple().isRI
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/106495
>From 64557cf6950c17a92b6d85980530abe1e193e111 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Wed, 28 Aug 2024 21:15:57 -0700
Subject: [PATCH 1/3] [Clang][RISCV] Recognize unsupport feature by supporting
isValidFe
@@ -257,7 +257,7 @@ bool RISCVTargetInfo::initFeatureMap(
// If a target attribute specified a full arch string, override all the ISA
// extension target features.
- const auto I = llvm::find(FeaturesVec, "__RISCV_TargetAttrNeedOverride");
+ const auto I = llvm::find(Fea
https://github.com/BeMg created https://github.com/llvm/llvm-project/pull/106680
This patch aims to replace the target attribute override mechanism based on
`__RISCV_TargetAttrNeedOverride` with the insertion of several negative target
features
When the target attribute uses the full architect
@@ -391,7 +391,14 @@ void RISCVTargetInfo::fillValidTuneCPUList(
static void handleFullArchString(StringRef FullArchStr,
std::vector &Features) {
- Features.push_back("__RISCV_TargetAttrNeedOverride");
+
+ // Should be full arch string.
+ if
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/106495
>From 64557cf6950c17a92b6d85980530abe1e193e111 Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Wed, 28 Aug 2024 21:15:57 -0700
Subject: [PATCH 1/2] [Clang][RISCV] Recognize unsupport feature by supporting
isValidFe
@@ -391,7 +391,14 @@ void RISCVTargetInfo::fillValidTuneCPUList(
static void handleFullArchString(StringRef FullArchStr,
std::vector &Features) {
- Features.push_back("__RISCV_TargetAttrNeedOverride");
+
+ // Should be full arch string.
+ if
https://github.com/BeMg created https://github.com/llvm/llvm-project/pull/106495
…isValidFeatureName
This patch makes unsupported target attributes emit a warning and ignore the
target attribute during semantic checks. The changes include:
1. Adding the RISCVTargetInfo::isValidFeatureName func
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/85786
>From 395ce72afbf9e4b12fcbfaf9cdbda8921c9ff72a Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Tue, 23 Jul 2024 19:59:06 -0700
Subject: [PATCH 01/15] [RISCV][FMV] Support target_clones
---
.../clang/Basic/Diagnosti
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/85786
>From 395ce72afbf9e4b12fcbfaf9cdbda8921c9ff72a Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Tue, 23 Jul 2024 19:59:06 -0700
Subject: [PATCH 01/14] [RISCV][FMV] Support target_clones
---
.../clang/Basic/Diagnosti
BeMg wrote:
ping
https://github.com/llvm/llvm-project/pull/85786
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/85786
>From 395ce72afbf9e4b12fcbfaf9cdbda8921c9ff72a Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Tue, 23 Jul 2024 19:59:06 -0700
Subject: [PATCH 01/13] [RISCV][FMV] Support target_clones
---
.../clang/Basic/Diagnosti
@@ -2877,10 +2877,144 @@ void CodeGenFunction::EmitMultiVersionResolver(
case llvm::Triple::aarch64:
EmitAArch64MultiVersionResolver(Resolver, Options);
return;
+ case llvm::Triple::riscv32:
+ case llvm::Triple::riscv64:
+EmitRISCVMultiVersionResolver(Resolver,
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/85786
>From 395ce72afbf9e4b12fcbfaf9cdbda8921c9ff72a Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Tue, 23 Jul 2024 19:59:06 -0700
Subject: [PATCH 01/12] [RISCV][FMV] Support target_clones
---
.../clang/Basic/Diagnosti
@@ -63,9 +63,55 @@ class RISCVABIInfo : public DefaultABIInfo {
CharUnits Field2Off) const;
ABIArgInfo coerceVLSVector(QualType Ty) const;
+
+ using ABIInfo::appendAttributeMangling;
+ void appendAttributeMangling(TargetClones
@@ -2877,10 +2877,144 @@ void CodeGenFunction::EmitMultiVersionResolver(
case llvm::Triple::aarch64:
EmitAArch64MultiVersionResolver(Resolver, Options);
return;
+ case llvm::Triple::riscv32:
+ case llvm::Triple::riscv64:
+EmitRISCVMultiVersionResolver(Resolver,
@@ -2877,10 +2877,144 @@ void CodeGenFunction::EmitMultiVersionResolver(
case llvm::Triple::aarch64:
EmitAArch64MultiVersionResolver(Resolver, Options);
return;
+ case llvm::Triple::riscv32:
+ case llvm::Triple::riscv64:
+EmitRISCVMultiVersionResolver(Resolver,
@@ -2877,10 +2877,144 @@ void CodeGenFunction::EmitMultiVersionResolver(
case llvm::Triple::aarch64:
EmitAArch64MultiVersionResolver(Resolver, Options);
return;
+ case llvm::Triple::riscv32:
+ case llvm::Triple::riscv64:
+EmitRISCVMultiVersionResolver(Resolver,
@@ -63,9 +63,55 @@ class RISCVABIInfo : public DefaultABIInfo {
CharUnits Field2Off) const;
ABIArgInfo coerceVLSVector(QualType Ty) const;
+
+ using ABIInfo::appendAttributeMangling;
+ void appendAttributeMangling(TargetClones
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/85786
>From 395ce72afbf9e4b12fcbfaf9cdbda8921c9ff72a Mon Sep 17 00:00:00 2001
From: Piyou Chen
Date: Tue, 23 Jul 2024 19:59:06 -0700
Subject: [PATCH 01/11] [RISCV][FMV] Support target_clones
---
.../clang/Basic/Diagnosti
@@ -2877,10 +2877,144 @@ void CodeGenFunction::EmitMultiVersionResolver(
case llvm::Triple::aarch64:
EmitAArch64MultiVersionResolver(Resolver, Options);
return;
+ case llvm::Triple::riscv32:
+ case llvm::Triple::riscv64:
+EmitRISCVMultiVersionResolver(Resolver,
1 - 100 of 216 matches
Mail list logo