-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[RISCV] Add searchable table for tune information #66193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,6 @@ | |
; RUN: | FileCheck %s -check-prefix=RV32I | ||
; RUN: llc -mtriple=riscv32 -mattr=+c -verify-machineinstrs < %s \ | ||
; RUN: | FileCheck %s -check-prefix=RV32C | ||
; RUN: llc -mtriple=riscv32 -mattr=+pref-func-align-32 -verify-machineinstrs < %s \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are there any processors that have non-default alignment? We could pass -mcpu and check for the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know one. Maybe you can provide more information about SiFive processors in upstream? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We haven't noticed any performance issues from instruction alignment on SiFive7 and are relying on linker to get this right. I'm not so sure what else we can do to have test coverage for this without an upstream processor that uses this TuneInfo 🤷 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've just learned that different alignment values have different results on different workloads for us. Therefore, I think we should have way to control this value at compile time. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are IR attributes that override the CPU defaults. falign-loops and falign-functions uses those attributes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I found some descriptions in https://starfivetech.com/uploads/u74mc_core_complex_manual_21G1.pdf:
It seems we'd better to align functions and hot loops to 4-byte to get best performance. But // Function alignments.
const Align FunctionAlignment(Subtarget.hasStdExtCOrZca() ? 2 : 4);
setMinFunctionAlignment(FunctionAlignment);
// Set preferred alignments.
setPrefFunctionAlignment(Subtarget.getPrefFunctionAlignment());
setPrefLoopAlignment(Subtarget.getPrefLoopAlignment()); I don't know much about S7 series, so I think you SiFive guys may do the change of alignments in upstream? |
||
; RUN: | FileCheck %s -check-prefix=ALIGN-32 | ||
; RUN: llc -filetype=obj -mtriple=riscv32 < %s -o %t | ||
; RUN: llvm-readelf -S %t | FileCheck %s --check-prefixes=SEC,SEC-I | ||
; RUN: llc -filetype=obj -mtriple=riscv32 -mattr=+c < %s -o %t | ||
|
@@ -18,8 +16,6 @@ define void @foo() { | |
;RV32I: foo: | ||
;RV32C: .p2align 1 | ||
;RV32C: foo: | ||
;ALIGN-32: .p2align 5 | ||
;ALIGN-32: foo: | ||
entry: | ||
ret void | ||
} |
Uh oh!
There was an error while loading. Please reload this page.