Beginning of moving all backend-agnostic code to rustc_codegen_ssa
This commit is contained in:
parent
b02e5cce16
commit
c9f26c2155
24 changed files with 233 additions and 174 deletions
|
@ -10,8 +10,8 @@
|
|||
|
||||
use llvm::{AtomicRmwBinOp, AtomicOrdering, SynchronizationScope, AsmDialect};
|
||||
use llvm::{self, False, BasicBlock};
|
||||
use rustc_codegen_utils::common::{IntPredicate, TypeKind, RealPredicate};
|
||||
use rustc_codegen_utils;
|
||||
use rustc_codegen_ssa::common::{IntPredicate, TypeKind, RealPredicate};
|
||||
use rustc_codegen_ssa;
|
||||
use common::Funclet;
|
||||
use context::CodegenCx;
|
||||
use type_::Type;
|
||||
|
@ -527,7 +527,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
|||
fn atomic_load(
|
||||
&self,
|
||||
ptr: &'ll Value,
|
||||
order: rustc_codegen_utils::common::AtomicOrdering,
|
||||
order: rustc_codegen_ssa::common::AtomicOrdering,
|
||||
size: Size,
|
||||
) -> &'ll Value {
|
||||
self.count_insn("load.atomic");
|
||||
|
@ -681,7 +681,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
|||
}
|
||||
|
||||
fn atomic_store(&self, val: &'ll Value, ptr: &'ll Value,
|
||||
order: rustc_codegen_utils::common::AtomicOrdering, size: Size) {
|
||||
order: rustc_codegen_ssa::common::AtomicOrdering, size: Size) {
|
||||
debug!("Store {:?} -> {:?}", val, ptr);
|
||||
self.count_insn("store.atomic");
|
||||
let ptr = self.check_store(val, ptr);
|
||||
|
@ -1204,8 +1204,8 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
|||
dst: &'ll Value,
|
||||
cmp: &'ll Value,
|
||||
src: &'ll Value,
|
||||
order: rustc_codegen_utils::common::AtomicOrdering,
|
||||
failure_order: rustc_codegen_utils::common::AtomicOrdering,
|
||||
order: rustc_codegen_ssa::common::AtomicOrdering,
|
||||
failure_order: rustc_codegen_ssa::common::AtomicOrdering,
|
||||
weak: bool,
|
||||
) -> &'ll Value {
|
||||
let weak = if weak { llvm::True } else { llvm::False };
|
||||
|
@ -1223,10 +1223,10 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
|||
}
|
||||
fn atomic_rmw(
|
||||
&self,
|
||||
op: rustc_codegen_utils::common::AtomicRmwBinOp,
|
||||
op: rustc_codegen_ssa::common::AtomicRmwBinOp,
|
||||
dst: &'ll Value,
|
||||
src: &'ll Value,
|
||||
order: rustc_codegen_utils::common::AtomicOrdering,
|
||||
order: rustc_codegen_ssa::common::AtomicOrdering,
|
||||
) -> &'ll Value {
|
||||
unsafe {
|
||||
llvm::LLVMBuildAtomicRMW(
|
||||
|
@ -1241,8 +1241,8 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
|||
|
||||
fn atomic_fence(
|
||||
&self,
|
||||
order: rustc_codegen_utils::common::AtomicOrdering,
|
||||
scope: rustc_codegen_utils::common::SynchronizationScope
|
||||
order: rustc_codegen_ssa::common::AtomicOrdering,
|
||||
scope: rustc_codegen_ssa::common::SynchronizationScope
|
||||
) {
|
||||
unsafe {
|
||||
llvm::LLVMRustBuildAtomicFence(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue