mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-30 21:07:57 +00:00
RISCV relaxations (#408)
This PR enables RISC-V relaxations and changes to internal linkage for internal function and global symbols. See also: https://github.com/llvm/llvm-project/issues/167381#issuecomment-3513830043 Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
@@ -35,7 +35,7 @@ impl<'ctx> Global<'ctx> {
|
||||
.add_global(r#type, Some(address_space.into()), name);
|
||||
let global = Self { r#type, value };
|
||||
|
||||
global.value.set_linkage(inkwell::module::Linkage::External);
|
||||
global.value.set_linkage(inkwell::module::Linkage::Internal);
|
||||
global
|
||||
.value
|
||||
.set_visibility(inkwell::GlobalVisibility::Default);
|
||||
|
||||
@@ -134,7 +134,7 @@ impl<'ctx> Context<'ctx> {
|
||||
module
|
||||
.get_function(import)
|
||||
.unwrap_or_else(|| panic!("{import} import should be declared"))
|
||||
.set_linkage(inkwell::module::Linkage::External);
|
||||
.set_linkage(inkwell::module::Linkage::Internal);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ impl TargetMachine {
|
||||
|
||||
/// LLVM target features.
|
||||
pub const VM_FEATURES: &'static str =
|
||||
"+e,+m,+a,+c,+zbb,+auipc-addi-fusion,+ld-add-fusion,+lui-addi-fusion,+xtheadcondmov";
|
||||
"+e,+m,+a,+c,+zbb,+auipc-addi-fusion,+ld-add-fusion,+lui-addi-fusion,+xtheadcondmov,+relax";
|
||||
|
||||
/// A shortcut constructor.
|
||||
/// A separate instance for every optimization level is created.
|
||||
|
||||
Reference in New Issue
Block a user