commit
52d9a3d2f1
@ -50,7 +50,7 @@ fn set_dbg_loc(&mut self, dbg_loc: Self::DILocation) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Generate the `debug_context` in an MIR Body.
|
/// Generate the `debug_context` in an MIR Body.
|
||||||
/// # Souce of Origin
|
/// # Source of Origin
|
||||||
/// Copied from `create_scope_map.rs` of rustc_codegen_llvm
|
/// Copied from `create_scope_map.rs` of rustc_codegen_llvm
|
||||||
fn compute_mir_scopes<'gcc, 'tcx>(
|
fn compute_mir_scopes<'gcc, 'tcx>(
|
||||||
cx: &CodegenCx<'gcc, 'tcx>,
|
cx: &CodegenCx<'gcc, 'tcx>,
|
||||||
@ -85,7 +85,7 @@ fn compute_mir_scopes<'gcc, 'tcx>(
|
|||||||
/// Update the `debug_context`, adding new scope to it,
|
/// Update the `debug_context`, adding new scope to it,
|
||||||
/// if it's not added as is denoted in `instantiated`.
|
/// if it's not added as is denoted in `instantiated`.
|
||||||
///
|
///
|
||||||
/// # Souce of Origin
|
/// # Source of Origin
|
||||||
/// Copied from `create_scope_map.rs` of rustc_codegen_llvm
|
/// Copied from `create_scope_map.rs` of rustc_codegen_llvm
|
||||||
/// FIXME(tempdragon/?): Add Scope Support Here.
|
/// FIXME(tempdragon/?): Add Scope Support Here.
|
||||||
fn make_mir_scope<'gcc, 'tcx>(
|
fn make_mir_scope<'gcc, 'tcx>(
|
||||||
|
@ -360,7 +360,7 @@ fn deref(&self) -> &Self::Target {
|
|||||||
|
|
||||||
unsafe impl Send for SyncContext {}
|
unsafe impl Send for SyncContext {}
|
||||||
// FIXME(antoyo): that shouldn't be Sync. Parallel compilation is currently disabled with "-Zno-parallel-llvm".
|
// FIXME(antoyo): that shouldn't be Sync. Parallel compilation is currently disabled with "-Zno-parallel-llvm".
|
||||||
// TODO: disable it here by returing false in CodegenBackend::supports_parallel().
|
// TODO: disable it here by returning false in CodegenBackend::supports_parallel().
|
||||||
unsafe impl Sync for SyncContext {}
|
unsafe impl Sync for SyncContext {}
|
||||||
|
|
||||||
impl WriteBackendMethods for GccCodegenBackend {
|
impl WriteBackendMethods for GccCodegenBackend {
|
||||||
|
@ -45,7 +45,7 @@ def convert_to_string(content):
|
|||||||
return content
|
return content
|
||||||
|
|
||||||
|
|
||||||
def extract_instrinsics_from_llvm(llvm_path, intrinsics):
|
def extract_intrinsics_from_llvm(llvm_path, intrinsics):
|
||||||
command = ["llvm-tblgen", "llvm/IR/Intrinsics.td"]
|
command = ["llvm-tblgen", "llvm/IR/Intrinsics.td"]
|
||||||
cwd = os.path.join(llvm_path, "llvm/include")
|
cwd = os.path.join(llvm_path, "llvm/include")
|
||||||
print("=> Running command `{}` from `{}`".format(command, cwd))
|
print("=> Running command `{}` from `{}`".format(command, cwd))
|
||||||
@ -88,7 +88,7 @@ def append_translation(json_data, p, array):
|
|||||||
append_intrinsic(array, content[1], content[3])
|
append_intrinsic(array, content[1], content[3])
|
||||||
|
|
||||||
|
|
||||||
def extract_instrinsics_from_llvmint(llvmint, intrinsics):
|
def extract_intrinsics_from_llvmint(llvmint, intrinsics):
|
||||||
archs = [
|
archs = [
|
||||||
"AMDGPU",
|
"AMDGPU",
|
||||||
"aarch64",
|
"aarch64",
|
||||||
@ -152,9 +152,9 @@ def update_intrinsics(llvm_path, llvmint, llvmint2):
|
|||||||
intrinsics_llvmint = {}
|
intrinsics_llvmint = {}
|
||||||
all_intrinsics = {}
|
all_intrinsics = {}
|
||||||
|
|
||||||
extract_instrinsics_from_llvm(llvm_path, intrinsics_llvm)
|
extract_intrinsics_from_llvm(llvm_path, intrinsics_llvm)
|
||||||
extract_instrinsics_from_llvmint(llvmint, intrinsics_llvmint)
|
extract_intrinsics_from_llvmint(llvmint, intrinsics_llvmint)
|
||||||
extract_instrinsics_from_llvmint(llvmint2, intrinsics_llvmint)
|
extract_intrinsics_from_llvmint(llvmint2, intrinsics_llvmint)
|
||||||
|
|
||||||
intrinsics = {}
|
intrinsics = {}
|
||||||
# We give priority to translations from LLVM over the ones from llvmint.
|
# We give priority to translations from LLVM over the ones from llvmint.
|
||||||
|
Loading…
Reference in New Issue
Block a user