Skip to content

Commit 67a0fda

Browse files
committed
Make llvm_intrinsics a submodule of intrinsics
1 parent 95b08a7 commit 67a0fda

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

src/abi/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ pub fn codegen_terminator_call<'tcx>(
419419
ty::Instance::resolve(fx.tcx, ty::ParamEnv::reveal_all(), def_id, substs).unwrap();
420420

421421
if fx.tcx.symbol_name(instance).name.as_str().starts_with("llvm.") {
422-
crate::llvm_intrinsics::codegen_llvm_intrinsic_call(
422+
crate::intrinsics::llvm::codegen_llvm_intrinsic_call(
423423
fx,
424424
&fx.tcx.symbol_name(instance).name.as_str(),
425425
substs,
File renamed without changes.

src/intrinsics.rs renamed to src/intrinsics/mod.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
pub mod llvm;
2+
13
use crate::prelude::*;
24

35
macro intrinsic_pat {
@@ -35,7 +37,7 @@ macro intrinsic_substs {
3537
}
3638
}
3739

38-
pub macro intrinsic_match {
40+
macro intrinsic_match {
3941
($fx:expr, $intrinsic:expr, $substs:expr, $args:expr,
4042
_ => $unknown:block;
4143
$(
@@ -128,7 +130,7 @@ macro_rules! atomic_minmax {
128130
};
129131
}
130132

131-
pub fn lane_type_and_count<'tcx>(
133+
fn lane_type_and_count<'tcx>(
132134
fx: &FunctionCx<'_, 'tcx, impl Backend>,
133135
layout: TyLayout<'tcx>,
134136
intrinsic: &str,
@@ -145,7 +147,7 @@ pub fn lane_type_and_count<'tcx>(
145147
(lane_layout, lane_count)
146148
}
147149

148-
pub fn simd_for_each_lane<'tcx, B: Backend>(
150+
fn simd_for_each_lane<'tcx, B: Backend>(
149151
fx: &mut FunctionCx<'_, 'tcx, B>,
150152
intrinsic: &str,
151153
x: CValue<'tcx>,
@@ -177,7 +179,7 @@ pub fn simd_for_each_lane<'tcx, B: Backend>(
177179
}
178180
}
179181

180-
pub fn bool_to_zero_or_max_uint<'tcx>(
182+
fn bool_to_zero_or_max_uint<'tcx>(
181183
fx: &mut FunctionCx<'_, 'tcx, impl Backend>,
182184
layout: TyLayout<'tcx>,
183185
val: Value,

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ mod discriminant;
4545
mod driver;
4646
mod intrinsics;
4747
mod linkage;
48-
mod llvm_intrinsics;
4948
mod main_shim;
5049
mod metadata;
5150
mod num;

0 commit comments

Comments
 (0)