[PATCH] D141666: [RISCV] Proper support of extensions Zicsr and Zifencei

2023-04-20 Thread Elena Lepilkina via Phabricator via cfe-commits
eklepilkina abandoned this revision.
eklepilkina added a comment.
Herald added a subscriber: jobnoorman.

Another implementation was merged to upsteam


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141666/new/

https://reviews.llvm.org/D141666

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D139704: [clang][RISCV] Added target attributes to runtime functions

2023-02-28 Thread Elena Lepilkina via Phabricator via cfe-commits
eklepilkina added a comment.

Gently ping


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139704/new/

https://reviews.llvm.org/D139704

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D141666: [RISCV] Proper support of extensions Zicsr and Zifencei

2023-02-28 Thread Elena Lepilkina via Phabricator via cfe-commits
eklepilkina added a comment.

Gently ping


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141666/new/

https://reviews.llvm.org/D141666

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D141666: [RISCV] Proper support of extensions Zicsr and Zifencei

2023-02-15 Thread Elena Lepilkina via Phabricator via cfe-commits
eklepilkina updated this revision to Diff 497620.
eklepilkina added a comment.

- [RISCV] Prepare work to be ready for adding separate Zicsr and Zifencei 
extensions
- [RISCV] Proper support of extensions Zicsr and Zifencei
- Updated I extension verson
- Fixing after updating


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141666/new/

https://reviews.llvm.org/D141666

Files:
  clang/lib/Driver/ToolChains/Arch/RISCV.cpp
  clang/lib/Driver/ToolChains/BareMetal.cpp
  clang/lib/Driver/ToolChains/Gnu.cpp
  clang/test/Driver/baremetal.cpp
  clang/test/Driver/riscv-default-features.c
  clang/test/Driver/riscv-gnutools.c
  llvm/docs/RISCVUsage.rst
  llvm/lib/Support/RISCVISAInfo.cpp
  llvm/lib/Target/RISCV/RISCVFeatures.td
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/lib/Target/RISCV/RISCVInstrInfo.td
  llvm/test/CodeGen/RISCV/attributes.ll
  llvm/test/CodeGen/RISCV/get-register-noreserve.ll
  llvm/test/CodeGen/RISCV/readcyclecounter.ll
  llvm/test/CodeGen/RISCV/rvv/rvv-stack-align.mir
  llvm/test/CodeGen/RISCV/rvv/scalar-stack-align.ll
  llvm/test/CodeGen/RISCV/rvv/vscale-power-of-two.ll
  llvm/test/CodeGen/RISCV/rvv/zvlsseg-zero-vl.ll
  llvm/test/CodeGen/RISCV/vlenb.ll
  llvm/test/MC/RISCV/Ztso.s
  llvm/test/MC/RISCV/csr-aliases.s
  llvm/test/MC/RISCV/deprecated-csr-names.s
  llvm/test/MC/RISCV/hypervisor-csr-names.s
  llvm/test/MC/RISCV/machine-csr-names.s
  llvm/test/MC/RISCV/rv32-hypervisor-csr-names.s
  llvm/test/MC/RISCV/rv32-machine-csr-names.s
  llvm/test/MC/RISCV/rv32-supervisor-csr-names.s
  llvm/test/MC/RISCV/rv32-user-csr-names.s
  llvm/test/MC/RISCV/rv32e-valid.s
  llvm/test/MC/RISCV/rv32i-aliases-valid.s
  llvm/test/MC/RISCV/rv32i-invalid.s
  llvm/test/MC/RISCV/rv32i-valid.s
  llvm/test/MC/RISCV/rv64-machine-csr-names.s
  llvm/test/MC/RISCV/rv64-user-csr-names.s
  llvm/test/MC/RISCV/rvf-user-csr-names.s
  llvm/test/MC/RISCV/rvi-aliases-valid.s
  llvm/test/MC/RISCV/rvk-user-csr-name.s
  llvm/test/MC/RISCV/supervisor-csr-names.s
  llvm/test/MC/RISCV/user-csr-names.s

Index: llvm/test/MC/RISCV/user-csr-names.s
===
--- llvm/test/MC/RISCV/user-csr-names.s
+++ llvm/test/MC/RISCV/user-csr-names.s
@@ -1,13 +1,13 @@
-# RUN: llvm-mc %s -triple=riscv32 -riscv-no-aliases -show-encoding \
+# RUN: llvm-mc %s -triple=riscv32 -mattr=+zicsr -riscv-no-aliases -show-encoding \
 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
-# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
-# RUN: | llvm-objdump -d - \
+# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+zicsr < %s \
+# RUN: | llvm-objdump -d --mattr=+zicsr - \
 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
 #
-# RUN: llvm-mc %s -triple=riscv64 -riscv-no-aliases -show-encoding \
+# RUN: llvm-mc %s -triple=riscv64 -mattr=+zicsr -riscv-no-aliases -show-encoding \
 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
-# RUN: llvm-mc -filetype=obj -triple riscv64 < %s \
-# RUN: | llvm-objdump -d - \
+# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+zicsr < %s \
+# RUN: | llvm-objdump -d --mattr=+zicsr - \
 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
 
 ##
Index: llvm/test/MC/RISCV/supervisor-csr-names.s
===
--- llvm/test/MC/RISCV/supervisor-csr-names.s
+++ llvm/test/MC/RISCV/supervisor-csr-names.s
@@ -1,13 +1,13 @@
-# RUN: llvm-mc %s -triple=riscv32 -riscv-no-aliases -show-encoding \
+# RUN: llvm-mc %s -triple=riscv32 -mattr=+zicsr -riscv-no-aliases -show-encoding \
 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
-# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
-# RUN: | llvm-objdump -d - \
+# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+zicsr < %s \
+# RUN: | llvm-objdump -d --mattr=+zicsr - \
 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
 #
-# RUN: llvm-mc %s -triple=riscv64 -riscv-no-aliases -show-encoding \
+# RUN: llvm-mc %s -triple=riscv64 -mattr=+zicsr -riscv-no-aliases -show-encoding \
 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
-# RUN: llvm-mc -filetype=obj -triple riscv64 < %s \
-# RUN: | llvm-objdump -d - \
+# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+zicsr < %s \
+# RUN: | llvm-objdump -d --mattr=+zicsr - \
 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
 
 ##
Index: llvm/test/MC/RISCV/rvk-user-csr-name.s
===
--- llvm/test/MC/RISCV/rvk-user-csr-name.s
+++ llvm/test/MC/RISCV/rvk-user-csr-name.s
@@ -1,13 +1,13 @@
-# RUN: llvm-mc %s -triple=riscv32 -riscv-no-aliases -mattr=+f -show-encoding \
+# RUN: llvm-mc %s -triple=riscv32 -riscv-no-aliases -mattr=+zicsr,+f -show-encoding \
 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
-# RUN: llvm-mc -filetype=obj -triple riscv32 

[PATCH] D141666: [RISCV] Proper support of extensions Zicsr and Zifencei

2023-02-14 Thread Elena Lepilkina via Phabricator via cfe-commits
eklepilkina added a comment.

@reames Thank you for fixing documentation, missed this


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141666/new/

https://reviews.llvm.org/D141666

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D139704: [clang][RISCV] Added target attributes to runtime functions

2023-02-02 Thread Elena Lepilkina via Phabricator via cfe-commits
eklepilkina added a comment.

Gently ping


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139704/new/

https://reviews.llvm.org/D139704

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D141666: [RISCV] Proper support of extensions Zicsr and Zifencei

2023-02-02 Thread Elena Lepilkina via Phabricator via cfe-commits
eklepilkina added a comment.

Gently ping


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141666/new/

https://reviews.llvm.org/D141666

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D141666: [RISCV] Proper support of extensions Zicsr and Zifencei

2023-01-20 Thread Elena Lepilkina via Phabricator via cfe-commits
eklepilkina added a comment.

> Maybe multi-lib handling should split into another patch?

I can do this. But if I separate I still can't choose one that should be merged 
firstly, they will be needed to merge both at once, because tests will fail. If 
separate them right way (fixes for multilibs in baremetal.cpp and gnu.cpp). 
Separate?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141666/new/

https://reviews.llvm.org/D141666

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D139704: [clang][RISCV] Added target attributes to runtime functions

2023-01-20 Thread Elena Lepilkina via Phabricator via cfe-commits
eklepilkina added a comment.

I've created one more patch connected with lto https://reviews.llvm.org/D142191 
and it also uses attributes of functions as the way to get right TargetMachine 
in linker.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139704/new/

https://reviews.llvm.org/D139704

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D139704: [clang][RISCV] Added target attributes to runtime functions

2023-01-20 Thread Elena Lepilkina via Phabricator via cfe-commits
eklepilkina added a comment.

> How does this affect LTO?

More detailed answer. We work with bitcode files only when use `lto`. If we 
don't use `lto` clang produces `.o` file that are already contains target 
information. We don't work with function attributes to get subtarget without 
lto.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139704/new/

https://reviews.llvm.org/D139704

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D139704: [clang][RISCV] Added target attributes to runtime functions

2023-01-19 Thread Elena Lepilkina via Phabricator via cfe-commits
eklepilkina added a comment.

> How does this affect LTO?

This problem appeared only under lto as far as it's processed as one module.

> Is this not just one of many symptoms of RISC-V not having the right 
> module-level subtarget under LTO, which is a real problem that needs fixing?

Not exactly, to build right subtarget we need attributes. As far as mentioned 
in comments in code the main approach to provide subtarget information is 
adding information in functions attributes. Why not to provide this information 
for runtime functions? If we don't have right attributes what shall we use to 
find out proper target features?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139704/new/

https://reviews.llvm.org/D139704

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D139704: [clang][RISCV] Added target attributes to runtime functions

2023-01-18 Thread Elena Lepilkina via Phabricator via cfe-commits
eklepilkina added a comment.
Herald added a subscriber: luke.

Gently ping


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139704/new/

https://reviews.llvm.org/D139704

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D141666: [RISCV] Proper support of extensions Zicsr and Zifencei

2023-01-18 Thread Elena Lepilkina via Phabricator via cfe-commits
eklepilkina updated this revision to Diff 490056.
eklepilkina added a comment.

- Updated I extension verson


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141666/new/

https://reviews.llvm.org/D141666

Files:
  clang/lib/Driver/ToolChains/Arch/RISCV.cpp
  clang/lib/Driver/ToolChains/BareMetal.cpp
  clang/lib/Driver/ToolChains/Gnu.cpp
  clang/test/Driver/baremetal.cpp
  clang/test/Driver/riscv-default-features.c
  clang/test/Driver/riscv-gnutools.c
  llvm/lib/Support/RISCVISAInfo.cpp
  llvm/lib/Target/RISCV/RISCV.td
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/lib/Target/RISCV/RISCVInstrInfo.td
  llvm/test/CodeGen/RISCV/attributes.ll
  llvm/test/CodeGen/RISCV/get-register-noreserve.ll
  llvm/test/CodeGen/RISCV/readcyclecounter.ll
  llvm/test/CodeGen/RISCV/rvv/rvv-stack-align.mir
  llvm/test/CodeGen/RISCV/rvv/scalar-stack-align.ll
  llvm/test/CodeGen/RISCV/rvv/vscale-power-of-two.ll
  llvm/test/CodeGen/RISCV/rvv/zvlsseg-zero-vl.ll
  llvm/test/CodeGen/RISCV/vlenb.ll
  llvm/test/MC/RISCV/Ztso.s
  llvm/test/MC/RISCV/csr-aliases.s
  llvm/test/MC/RISCV/deprecated-csr-names.s
  llvm/test/MC/RISCV/hypervisor-csr-names.s
  llvm/test/MC/RISCV/machine-csr-names.s
  llvm/test/MC/RISCV/rv32-hypervisor-csr-names.s
  llvm/test/MC/RISCV/rv32-machine-csr-names.s
  llvm/test/MC/RISCV/rv32-supervisor-csr-names.s
  llvm/test/MC/RISCV/rv32-user-csr-names.s
  llvm/test/MC/RISCV/rv32e-valid.s
  llvm/test/MC/RISCV/rv32i-aliases-valid.s
  llvm/test/MC/RISCV/rv32i-invalid.s
  llvm/test/MC/RISCV/rv32i-valid.s
  llvm/test/MC/RISCV/rv64-machine-csr-names.s
  llvm/test/MC/RISCV/rv64-user-csr-names.s
  llvm/test/MC/RISCV/rvf-user-csr-names.s
  llvm/test/MC/RISCV/rvi-aliases-valid.s
  llvm/test/MC/RISCV/rvk-user-csr-name.s
  llvm/test/MC/RISCV/supervisor-csr-names.s
  llvm/test/MC/RISCV/user-csr-names.s

Index: llvm/test/MC/RISCV/user-csr-names.s
===
--- llvm/test/MC/RISCV/user-csr-names.s
+++ llvm/test/MC/RISCV/user-csr-names.s
@@ -1,13 +1,13 @@
-# RUN: llvm-mc %s -triple=riscv32 -riscv-no-aliases -show-encoding \
+# RUN: llvm-mc %s -triple=riscv32 -mattr=+zicsr -riscv-no-aliases -show-encoding \
 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
-# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
-# RUN: | llvm-objdump -d - \
+# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+zicsr < %s \
+# RUN: | llvm-objdump -d --mattr=+zicsr - \
 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
 #
-# RUN: llvm-mc %s -triple=riscv64 -riscv-no-aliases -show-encoding \
+# RUN: llvm-mc %s -triple=riscv64 -mattr=+zicsr -riscv-no-aliases -show-encoding \
 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
-# RUN: llvm-mc -filetype=obj -triple riscv64 < %s \
-# RUN: | llvm-objdump -d - \
+# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+zicsr < %s \
+# RUN: | llvm-objdump -d --mattr=+zicsr - \
 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
 
 ##
Index: llvm/test/MC/RISCV/supervisor-csr-names.s
===
--- llvm/test/MC/RISCV/supervisor-csr-names.s
+++ llvm/test/MC/RISCV/supervisor-csr-names.s
@@ -1,13 +1,13 @@
-# RUN: llvm-mc %s -triple=riscv32 -riscv-no-aliases -show-encoding \
+# RUN: llvm-mc %s -triple=riscv32 -mattr=+zicsr -riscv-no-aliases -show-encoding \
 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
-# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
-# RUN: | llvm-objdump -d - \
+# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+zicsr < %s \
+# RUN: | llvm-objdump -d --mattr=+zicsr - \
 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
 #
-# RUN: llvm-mc %s -triple=riscv64 -riscv-no-aliases -show-encoding \
+# RUN: llvm-mc %s -triple=riscv64 -mattr=+zicsr -riscv-no-aliases -show-encoding \
 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
-# RUN: llvm-mc -filetype=obj -triple riscv64 < %s \
-# RUN: | llvm-objdump -d - \
+# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+zicsr < %s \
+# RUN: | llvm-objdump -d --mattr=+zicsr - \
 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
 
 ##
Index: llvm/test/MC/RISCV/rvk-user-csr-name.s
===
--- llvm/test/MC/RISCV/rvk-user-csr-name.s
+++ llvm/test/MC/RISCV/rvk-user-csr-name.s
@@ -1,13 +1,13 @@
-# RUN: llvm-mc %s -triple=riscv32 -riscv-no-aliases -mattr=+f -show-encoding \
+# RUN: llvm-mc %s -triple=riscv32 -riscv-no-aliases -mattr=+zicsr,+f -show-encoding \
 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
-# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+zkr < %s \
-# RUN: | llvm-objdump -d --mattr=+zkr - \
+# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+zkr,+zicsr < %s \
+# RUN: | llvm-objdump -d --mattr=+zkr,+zicsr - \
 # RUN: | 

[PATCH] D141666: [RISCV] Proper support of extensions Zicsr and Zifencei

2023-01-17 Thread Elena Lepilkina via Phabricator via cfe-commits
eklepilkina added a comment.

Thank you for comments!

> The key aspect this patch misses right now is the versioning issue - I is 
> still marked as 2.0.

I can update `I` extension version or separate diffrent isa versions as you 
mentioned. I can fix comments and make proposed by community changes. We are 
interested in supporting compatibility with GCC.

> It might also be interesting to explore options that temporarly sidestep the 
> versioning discussion and improve compatibility with GCC -march strings. e.g. 
> an initial patch that adds zicsr and zifencei but enables it by default (or 
> otherwise handles zicsr and zifencei as a no-op)

We internally made something similar, just added extensions in the list and 
ignore warnings in some places. But still these extensions are already ratified 
so proper support is needed to be done some time


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141666/new/

https://reviews.llvm.org/D141666

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D141666: [RISCV] Proper support of extensions Zicsr and Zifencei

2023-01-13 Thread Elena Lepilkina via Phabricator via cfe-commits
eklepilkina added a comment.

We are interested in proper support for `Zicsr` and `Zifencei`. Could someone 
look at patch or explain why these extensions were included by default?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141666/new/

https://reviews.llvm.org/D141666

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D141666: [RISCV] Proper support of extensions Zicsr and Zifencei

2023-01-13 Thread Elena Lepilkina via Phabricator via cfe-commits
eklepilkina created this revision.
Herald added subscribers: sunshaoce, VincentWu, vkmr, frasercrmck, jdoerfert, 
evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, 
jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, 
zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, 
rbar, asb, hiraditya, arichardson.
Herald added a project: All.
eklepilkina requested review of this revision.
Herald added subscribers: llvm-commits, cfe-commits, pcwang-thead, eopXD, 
MaskRay.
Herald added projects: clang, LLVM.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141666

Files:
  clang/lib/Driver/ToolChains/Arch/RISCV.cpp
  clang/lib/Driver/ToolChains/BareMetal.cpp
  clang/lib/Driver/ToolChains/Gnu.cpp
  clang/test/Driver/baremetal.cpp
  clang/test/Driver/riscv-default-features.c
  clang/test/Driver/riscv-gnutools.c
  llvm/lib/Support/RISCVISAInfo.cpp
  llvm/lib/Target/RISCV/RISCV.td
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/lib/Target/RISCV/RISCVInstrInfo.td
  llvm/test/CodeGen/RISCV/attributes.ll
  llvm/test/CodeGen/RISCV/get-register-noreserve.ll
  llvm/test/CodeGen/RISCV/readcyclecounter.ll
  llvm/test/CodeGen/RISCV/rvv/rvv-stack-align.mir
  llvm/test/CodeGen/RISCV/rvv/scalar-stack-align.ll
  llvm/test/CodeGen/RISCV/rvv/vscale-power-of-two.ll
  llvm/test/CodeGen/RISCV/rvv/zvlsseg-zero-vl.ll
  llvm/test/CodeGen/RISCV/vlenb.ll
  llvm/test/MC/RISCV/Ztso.s
  llvm/test/MC/RISCV/csr-aliases.s
  llvm/test/MC/RISCV/deprecated-csr-names.s
  llvm/test/MC/RISCV/hypervisor-csr-names.s
  llvm/test/MC/RISCV/machine-csr-names.s
  llvm/test/MC/RISCV/rv32-hypervisor-csr-names.s
  llvm/test/MC/RISCV/rv32-machine-csr-names.s
  llvm/test/MC/RISCV/rv32-supervisor-csr-names.s
  llvm/test/MC/RISCV/rv32-user-csr-names.s
  llvm/test/MC/RISCV/rv32e-valid.s
  llvm/test/MC/RISCV/rv32i-aliases-valid.s
  llvm/test/MC/RISCV/rv32i-invalid.s
  llvm/test/MC/RISCV/rv32i-valid.s
  llvm/test/MC/RISCV/rv64-machine-csr-names.s
  llvm/test/MC/RISCV/rv64-user-csr-names.s
  llvm/test/MC/RISCV/rvf-user-csr-names.s
  llvm/test/MC/RISCV/rvi-aliases-valid.s
  llvm/test/MC/RISCV/rvk-user-csr-name.s
  llvm/test/MC/RISCV/supervisor-csr-names.s
  llvm/test/MC/RISCV/user-csr-names.s

Index: llvm/test/MC/RISCV/user-csr-names.s
===
--- llvm/test/MC/RISCV/user-csr-names.s
+++ llvm/test/MC/RISCV/user-csr-names.s
@@ -1,13 +1,13 @@
-# RUN: llvm-mc %s -triple=riscv32 -riscv-no-aliases -show-encoding \
+# RUN: llvm-mc %s -triple=riscv32 -mattr=+zicsr -riscv-no-aliases -show-encoding \
 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
-# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
-# RUN: | llvm-objdump -d - \
+# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+zicsr < %s \
+# RUN: | llvm-objdump -d --mattr=+zicsr - \
 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
 #
-# RUN: llvm-mc %s -triple=riscv64 -riscv-no-aliases -show-encoding \
+# RUN: llvm-mc %s -triple=riscv64 -mattr=+zicsr -riscv-no-aliases -show-encoding \
 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
-# RUN: llvm-mc -filetype=obj -triple riscv64 < %s \
-# RUN: | llvm-objdump -d - \
+# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+zicsr < %s \
+# RUN: | llvm-objdump -d --mattr=+zicsr - \
 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
 
 ##
Index: llvm/test/MC/RISCV/supervisor-csr-names.s
===
--- llvm/test/MC/RISCV/supervisor-csr-names.s
+++ llvm/test/MC/RISCV/supervisor-csr-names.s
@@ -1,13 +1,13 @@
-# RUN: llvm-mc %s -triple=riscv32 -riscv-no-aliases -show-encoding \
+# RUN: llvm-mc %s -triple=riscv32 -mattr=+zicsr -riscv-no-aliases -show-encoding \
 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
-# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
-# RUN: | llvm-objdump -d - \
+# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+zicsr < %s \
+# RUN: | llvm-objdump -d --mattr=+zicsr - \
 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
 #
-# RUN: llvm-mc %s -triple=riscv64 -riscv-no-aliases -show-encoding \
+# RUN: llvm-mc %s -triple=riscv64 -mattr=+zicsr -riscv-no-aliases -show-encoding \
 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
-# RUN: llvm-mc -filetype=obj -triple riscv64 < %s \
-# RUN: | llvm-objdump -d - \
+# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+zicsr < %s \
+# RUN: | llvm-objdump -d --mattr=+zicsr - \
 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
 
 ##
Index: llvm/test/MC/RISCV/rvk-user-csr-name.s
===
--- llvm/test/MC/RISCV/rvk-user-csr-name.s
+++ llvm/test/MC/RISCV/rvk-user-csr-name.s
@@ -1,13 +1,13 @@
-# RUN: llvm-mc %s -triple=riscv32 -riscv-no-aliases -mattr=+f -show-encoding \
+# 

[PATCH] D139704: [clang][RISCV] Added target attributes to runtime functions

2022-12-16 Thread Elena Lepilkina via Phabricator via cfe-commits
eklepilkina added a comment.

Gently ping


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139704/new/

https://reviews.llvm.org/D139704

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D132843: [RISCV] Ensure target features get passed to the LTO linker for RISC-V

2022-12-14 Thread Elena Lepilkina via Phabricator via cfe-commits
eklepilkina added a comment.

@lewis-revill could you please provide the case where the LTO linker would not 
receive any information about target features? We met similar problems, it 
appears on runtime functions in our cases. I made a small fix for this problem 
https://reviews.llvm.org/D139704. Do you have any other problem cases?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132843/new/

https://reviews.llvm.org/D132843

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D139704: [clang][RISCV] Added target attributes to runtime functions

2022-12-09 Thread Elena Lepilkina via Phabricator via cfe-commits
eklepilkina created this revision.
Herald added subscribers: sunshaoce, VincentWu, vkmr, frasercrmck, evandro, 
luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, 
PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, 
shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, 
arichardson, nemanjai.
Herald added a project: All.
eklepilkina requested review of this revision.
Herald added subscribers: cfe-commits, pcwang-thead, eopXD, MaskRay.
Herald added a project: clang.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139704

Files:
  clang/lib/CodeGen/CGCall.cpp
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/test/CodeGen/PowerPC/ignore-exceptions.cpp
  clang/test/CodeGen/atomic_ops.c
  clang/test/CodeGen/attr-cpuspecific.c
  clang/test/CodeGen/attr-target-clones.c
  clang/test/CodeGen/attr-target-mv-va-args.c
  clang/test/CodeGen/attr-target-mv.c
  clang/test/CodeGenCXX/RISCV/riscv-target-features-attr.cpp
  clang/test/CodeGenCXX/attr-cpuspecific.cpp
  clang/test/CodeGenCXX/attr-target-clones.cpp
  clang/test/CodeGenCXX/attr-target-mv-diff-ns.cpp
  clang/test/CodeGenCXX/attr-target-mv-member-funcs.cpp
  clang/test/CodeGenCXX/attr-target-mv-out-of-line-defs.cpp
  clang/test/CodeGenCXX/attr-target-mv-overloads.cpp
  clang/test/CodeGenCXX/dynamic-cast.cpp
  clang/test/CodeGenCXX/runtimecc.cpp
  clang/test/CodeGenObjC/arc.m
  clang/test/CodeGenObjC/attr-objc-runtime-visible.m
  clang/test/CodeGenObjC/class-stubs.m
  clang/test/CodeGenObjC/nonlazy-msgSend.m
  clang/test/CodeGenObjC/objc-literal-debugger-test.m
  clang/test/PCH/objc_container.m

Index: clang/test/PCH/objc_container.m
===
--- clang/test/PCH/objc_container.m
+++ clang/test/PCH/objc_container.m
@@ -23,4 +23,4 @@
 // CHECK-IR: ret void
 
 // CHECK-IR: attributes #0 = { noinline nounwind {{.*}} }
-// CHECK-IR: attributes #1 = { nonlazybind }
+// CHECK-IR: attributes #1 = { nonlazybind {{.*}} }
Index: clang/test/CodeGenObjC/objc-literal-debugger-test.m
===
--- clang/test/CodeGenObjC/objc-literal-debugger-test.m
+++ clang/test/CodeGenObjC/objc-literal-debugger-test.m
@@ -52,4 +52,4 @@
 
 // CHECK: declare i8* @objc_msgSend(i8*, i8*, ...) [[NLB:#[0-9]+]]
 
-// CHECK: attributes [[NLB]] = { nonlazybind }
+// CHECK: attributes [[NLB]] = { nonlazybind "frame-pointer"="none" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
Index: clang/test/CodeGenObjC/nonlazy-msgSend.m
===
--- clang/test/CodeGenObjC/nonlazy-msgSend.m
+++ clang/test/CodeGenObjC/nonlazy-msgSend.m
@@ -5,4 +5,4 @@
   [x foo];
 }
 
-// CHECK: attributes [[NLB]] = { nonlazybind }
+// CHECK: attributes [[NLB]] = { nonlazybind {{.*}}}
Index: clang/test/CodeGenObjC/class-stubs.m
===
--- clang/test/CodeGenObjC/class-stubs.m
+++ clang/test/CodeGenObjC/class-stubs.m
@@ -81,4 +81,4 @@
 @end
 
 // -- calls to objc_loadClassRef() are readnone
-// CHECK: attributes [[ATTRLIST]] = { nounwind nonlazybind memory(none) }
+// CHECK: attributes [[ATTRLIST]] = { nounwind nonlazybind memory(none) {{.*}} }
Index: clang/test/CodeGenObjC/attr-objc-runtime-visible.m
===
--- clang/test/CodeGenObjC/attr-objc-runtime-visible.m
+++ clang/test/CodeGenObjC/attr-objc-runtime-visible.m
@@ -14,6 +14,6 @@
 // CHECK: [[CLASSNAME:@.*]] = private unnamed_addr constant [22 x i8] c"MyRuntimeVisibleClass
 // CHECK: define{{.*}} i8* @getClass() #0 {
 Class getClass(void) {
-  // CHECK: call i8* @objc_lookUpClass(i8* getelementptr inbounds ([22 x i8], [22 x i8]* [[CLASSNAME]], i32 0, i32 0)) #2
+  // CHECK: call i8* @objc_lookUpClass(i8* getelementptr inbounds ([22 x i8], [22 x i8]* [[CLASSNAME]], i32 0, i32 0)) #{{[0-9]+}}
   return [A class];
 }
Index: clang/test/CodeGenObjC/arc.m
===
--- clang/test/CodeGenObjC/arc.m
+++ clang/test/CodeGenObjC/arc.m
@@ -1586,6 +1586,6 @@
   __strong id t[] = (__strong id[]){a, b};
 }
 
-// ARC-ALIEN: attributes [[NLB]] = { nonlazybind }
-// ARC-NATIVE: attributes [[NLB]] = { nonlazybind }
-// CHECK: attributes [[NUW]] = { nounwind }
+// ARC-ALIEN: attributes [[NLB]] = { nonlazybind {{.*}}}
+// ARC-NATIVE: attributes [[NLB]] = { nonlazybind {{.*}}}
+// CHECK: attributes [[NUW]] = { nounwind {{.*}}}
Index: clang/test/CodeGenCXX/runtimecc.cpp
===
--- clang/test/CodeGenCXX/runtimecc.cpp
+++ clang/test/CodeGenCXX/runtimecc.cpp
@@ -26,7 +26,7 @@
 // CHECK-NEXT: ret void
 }
 
-// CHECK: declare i32 @__cxa_atexit(ptr, ptr, ptr) [[NOUNWIND]]
+// CHECK: declare i32 @__cxa_atexit(ptr, ptr, ptr) [[NOUNWIND1:#[0-9]+]]