-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Move scalar_to_backend
to ssa
#142960
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
base: master
Are you sure you want to change the base?
Move scalar_to_backend
to ssa
#142960
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 | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -35,7 +35,9 @@ fn set_global_alignment<'gcc, 'tcx>( | |||||||
} | ||||||||
|
||||||||
impl<'gcc, 'tcx> StaticCodegenMethods for CodegenCx<'gcc, 'tcx> { | ||||||||
fn static_addr_of(&self, cv: RValue<'gcc>, align: Align, kind: Option<&str>) -> RValue<'gcc> { | ||||||||
fn static_addr_of(&self, alloc: ConstAllocation<'_>, kind: Option<&str>) -> RValue<'gcc> { | ||||||||
let align = alloc.inner().align; | ||||||||
let cv = self.const_data_from_alloc(alloc); | ||||||||
if let Some(variable) = self.const_globals.borrow().get(&cv) { | ||||||||
if let Some(global_variable) = self.global_lvalues.borrow().get(variable) { | ||||||||
let alignment = align.bits() as i32; | ||||||||
|
@@ -150,6 +152,17 @@ impl<'gcc, 'tcx> StaticCodegenMethods for CodegenCx<'gcc, 'tcx> { | |||||||
self.add_used_global(global.to_rvalue()); | ||||||||
} | ||||||||
} | ||||||||
|
||||||||
fn get_value_name(&self, _val: Self::Value) -> &[u8] { | ||||||||
// TODO(antoyo) | ||||||||
&[] | ||||||||
Comment on lines
+157
to
+158
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. Finally added the missing feature in rust-lang/gcc#77 and rust-lang/gccjit.rs#54. So can be done in this PR or I can send a follow-up once merged to add:
Suggested change
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. That would require updating the GCC submodule, so perhaps it is better in a follow-up PR. |
||||||||
} | ||||||||
fn set_value_name(&self, _val: Self::Value, _name: &[u8]) { | ||||||||
// TODO(antoyo) | ||||||||
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. Now I need to do this one. ^^' |
||||||||
} | ||||||||
fn get_static(&self, def_id: DefId) -> Self::Value { | ||||||||
self.get_static(def_id).get_address(None) | ||||||||
} | ||||||||
} | ||||||||
|
||||||||
impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> { | ||||||||
|
Uh oh!
There was an error while loading. Please reload this page.