pub mod x86_calling_conv_deep;
pub mod x86_calling_convention;
pub mod x86_cfi_codegen;
pub mod x86_codegen_prepare;
pub mod x86_coroutine_lowering;
pub mod x86_debug_codegen;
pub mod x86_eh_lowering;
pub mod x86_frame_lowering;
pub mod x86_gc_lowering;
pub mod x86_instr_info;
pub mod x86_isel_table;
pub mod x86_jump_table;
pub mod x86_reg_usage;
pub mod x86_register_info;
pub mod x86_rematerialization;
pub mod x86_retire_control;
pub mod x86_subtarget;
pub mod x86_subtarget_features;
pub mod x86_target_machine;
pub mod x86_addr_mode_legalizer;
pub mod x86_addressing_full;
pub mod x86_alias_analysis;
pub mod x86_amx;
pub mod x86_asm_printer;
pub mod x86_avx10;
pub mod x86_binary_format;
pub mod x86_branch_relaxation;
pub mod x86_call_lowering_ext;
pub mod x86_code_metrics;
pub mod x86_compact_unwind;
pub mod x86_constant_opt;
pub mod x86_constant_pool;
pub mod x86_dag_combine_deep;
pub mod x86_debug_adapter;
pub mod x86_deep_codegen;
pub mod x86_disassembler_full;
pub mod x86_dwarf_debug;
pub mod x86_eh_full;
pub mod x86_evex_encoding;
pub mod x86_expand_reduction;
pub mod x86_fast_isel;
pub mod x86_full_instr_info;
pub mod x86_full_mc_encoder_full;
pub mod x86_fusion_catalog;
pub mod x86_gc_eh_full;
pub mod x86_gc_full;
pub mod x86_global_isel_deep;
pub mod x86_global_isel_full;
pub mod x86_golden_pipeline;
pub mod x86_inst_simplify;
pub mod x86_instr_bundling;
pub mod x86_instr_fixup;
pub mod x86_intrinsics_catalog;
pub mod x86_intrinsics_full;
pub mod x86_isel;
pub mod x86_isel_final;
pub mod x86_isel_golden;
pub mod x86_latency_tables;
pub mod x86_linker_script;
pub mod x86_lld_features;
pub mod x86_lld_full;
pub mod x86_load_store_vectorizer;
pub mod x86_loop_optimizer;
pub mod x86_machine_combine;
pub mod x86_machine_verifier;
pub mod x86_mc_assembler_full;
pub mod x86_mc_decoder;
pub mod x86_mc_disassembler_full;
pub mod x86_mc_encoder;
pub mod x86_mc_instr_info_full;
pub mod x86_mc_target_streamer;
pub mod x86_microarch_full;
pub mod x86_mov_optimizer;
pub mod x86_mtsan_full;
pub mod x86_nop_sled;
pub mod x86_operation_legalizer;
pub mod x86_optimize;
pub mod x86_optimizer_full;
pub mod x86_pass_manager;
pub mod x86_patchable_instr;
pub mod x86_profiling_tools;
pub mod x86_sanitizer_codegen;
pub use x86_sanitizer_codegen::{
X86ASanInstrumentedAccess, X86ASanShadowOp, X86ASanStackFrame, X86ASanStackVar,
X86CFITypeCheck, X86LSanAllocRecord, X86LSanLeakReport, X86MSanOrigin, X86MSanOriginKind,
X86MSanShadowPropagator, X86MSanShadowValue, X86SafeStackConfig, X86SanCodeGen,
X86SanCodeGenConfig, X86ShadowCallStack, X86TSanEvent, X86TSanEventType, X86TSanMutexState,
X86TSanShadowCell, X86TSanVectorClock, X86UBSanCheck, X86UBSanErrorKind,
};
pub mod x86_basic_block_utils;
pub mod x86_benchmarks;
pub mod x86_branch_folding_adv;
pub mod x86_frame_lowering_ext;
pub mod x86_hardware_loops;
pub mod x86_interleaved_access;
pub mod x86_sanitizer_runtime;
pub mod x86_schedule_model;
pub mod x86_scheduler_full;
pub mod x86_shuffle_patterns;
pub mod x86_slp_vectorizer_deep;
pub mod x86_spill_optimizer;
pub mod x86_stack_probing;
pub mod x86_tablegen_full;
pub mod x86_tail_call;
pub mod x86_tti_deep;
pub mod x86_type_legalizer;
pub mod x86_vector_narrow;
pub mod x86_vector_widen;
pub mod x86_vectorizer_codegen;
pub mod x86_vex_encoding;
pub mod x86_win64_eh;
pub mod x86_xop_3dnow_encoding;
pub use x86_calling_convention::{X86ArgClass, X86ArgInfo, X86CallFrame, X86CallingConvention};
pub use x86_frame_lowering::{CallConv, X86FrameInfo, X86FrameLowering};
pub use x86_instr_info::{
OperandType, X86InstrDesc, X86InstrInfo, X86MemOperand, X86Opcode, X86Operand, X86SchedInfo,
};
pub use x86_reg_usage::{
analyze_register_usage, get_abi_clobber_list, make_reg_usage_full,
make_reg_usage_liveness_only, make_x86_32_reg_usage, make_x86_64_reg_usage,
run_liveness_analysis, CallClobberInfo, CalleeSavedUsage, ClobberList, ClobberListEntry,
ClobberSource, CrossCallRegUsage, FunctionLiveness, ImplicitRegUsage, RegAllocHint,
RegAllocHints, RegDef, RegDefUseChain, RegLiveness, RegMask, RegPreservation, RegPressureMax,
RegPressureSnapshot, RegUsageConfig, RegUsageStats, RegUse, X86RegUsage,
};
pub use x86_register_info::{X86RegisterInfo, X86_32_REG_COUNT, X86_64_REG_COUNT};
pub use x86_subtarget::X86Subtarget;
pub use x86_target_machine::X86TargetMachine;
pub use x86_asm_printer::{AsmSyntax, X86AsmPrinter};
pub use x86_basic_block_utils::{
compute_block_layout, make_x86_bb_utils, make_x86_bb_utils_analyzed,
make_x86_bb_utils_dominators_only, AddressTakenAnalysis, AddressTakenBlock, BlockAlignment,
BlockAlignmentInfo, BlockFrequencyEstimator, BlockLayoutConfig, BlockLayoutResult,
BranchWeight, BranchWeightManager, BranchWeightMeta, ControlDependenceGraph, DomTreeNode,
DominanceFrontiers, DominatorTree, EHAnalysis, EHBlockInfo, EHBlockKind, LayoutChain, LoopInfo,
NaturalLoop, PostDomTreeNode, PostDominatorTree, ReachabilityInfo, X86BBUtils,
};
pub use x86_branch_folding_adv::{
analyze_cond_to_uncond, build_fallthrough_chains, eliminate_unreachable_blocks,
find_critical_edges, find_reachable_blocks, find_tail_merge_groups, find_threadable_paths,
longest_common_suffix, make_x86_branch_folding_adv, make_x86_branch_folding_adv_aggressive,
make_x86_branch_folding_adv_perf_opt, make_x86_branch_folding_adv_size_opt,
make_x86_branch_folding_adv_thresholds, propagate_frequencies, BlockChain, BlockFrequency,
BlockMergeConfig, BlockMergeResult, BranchFoldingStats, BranchLayoutConfig,
BranchPredictionHint, BranchProbability, BranchRedirectConfig, BranchSimplify,
CondToUncondResult, ConditionInfo, CriticalEdge, CriticalEdgeBlock, CriticalEdgeConfig,
CriticalEdgeResult, FallthroughChain, InstrHash, JumpTable, JumpTableEntry, LayoutStrategy,
MergeablePair, StaticBranchHeuristic, SwitchAnalysis, TailDupCandidate, TailDupConfig,
TailDupCostModel, TailDupResult, TailMergeCandidate, TailMergeConfig, TailMergeGroup,
TailMergeResult, TailMergedBlock, ThreadablePath, UnreachableElimConfig, UnreachableElimResult,
X86BranchFoldingAdv,
};
pub use x86_calling_conv_deep::{
all_calling_convention_names, check_abi_compatibility, make_x86_32_calling_conv_deep,
make_x86_64_calling_conv_deep, AbiCompatibilityResult, AbiFieldInfo, AbiParamMismatch,
AbiRegAssignments, ArgClassifyResult, ArgLocation, ByValConfig, CallingConvention,
EightByteClass, HFADetector, HfaBaseType, InAllocaConfig, RegClass, RetLocation,
ReturnClassifyResult, StackFrame, StructPassingRule, VaListType, VarArgsConfig,
X86CallingConvDeep, X86Reg,
};
pub use x86_cfi_codegen::{
X86CFIBitmaskCheck, X86CFIBitsetTest, X86CFICheckKind, X86CFICheckLowering, X86CFICodeGen,
X86CFICrossDSOCheck, X86CFIFunctionInstrumentation, X86CFIICallCheck, X86CFIShadow,
X86CFIShadowStack, X86CFITypeCheckedLoad, X86CFITypeEntry, X86CFITypeTable, X86CFITypeTest,
X86CFIVCallCheck, X86CFIViolationReport, X86KCFIRegistry, X86KCFITargetEntry,
};
pub use x86_codegen_prepare::{
make_test_cgp_function, make_x86_32_codegen_prepare, make_x86_64_codegen_prepare,
run_codegen_prepare, AddrSinkAnalysis, AddressingMode, BitTest, CGPBinOp, CGPBlock, CGPConfig,
CGPFunction, CGPInst, CGPStats, CGPType, CGPValue, CriticalEdgeSplitter, DbgLocation,
DebugIntrinsicLowering, DevirtAnalyzer, GEPDecomposer, IcmpPredicate, LargeIntExpander,
LoadStoreCombiner, LookupTable, MemIntrinsicPattern, MemcpyInfo, MemsetInfo, PhiEliminator,
SwitchInfo, TypePromotion, VectorExpander, X86CodeGenPrepare,
};
pub use x86_dag_combine_deep::{
make_x86_dag_combine_deep, make_x86_dag_combine_deep_aggressive,
make_x86_dag_combine_deep_avx512, make_x86_dag_combine_deep_no_fma, CombineAction, CombineDAG,
CombineResult, DAGNodeRef, DAGOpcode, NodeFlags, X86CombineStats, X86DAGCombineDeep,
};
pub use x86_debug_codegen::{
X86DbgValue, X86DebugAttrValue, X86DebugAttribute, X86DebugCodeGen, X86DebugCompileUnit,
X86DebugDIE, X86DebugFileEntry, X86DebugInlinedSubroutine, X86DebugLexicalBlock,
X86DebugLineEntry, X86DebugLineTable, X86DebugLocRange, X86DebugLocationExpr,
X86DebugSubprogram, X86DebugVarLocTracker, X86DebugVariable,
};
pub use x86_dwarf_debug::{
X86DwarfARange, X86DwarfAbbrev, X86DwarfAddrTable, X86DwarfCompileUnit, X86DwarfExpression,
X86DwarfFrame, X86DwarfGenerator, X86DwarfLineTable, X86DwarfLocation, X86DwarfRangeList,
X86DwarfStringTable, X86DwarfSubprogram, X86DwarfTypeUnit,
};
pub use x86_expand_reduction::{
make_x86_expand_reduction_avx, make_x86_expand_reduction_avx2,
make_x86_expand_reduction_avx512, make_x86_expand_reduction_conservative,
make_x86_expand_reduction_sse3, ExpandReductionStats, FastMathFlags, ReductionKind,
ReductionPlan, ReductionStep, X86ExpandReduction,
};
pub use x86_frame_lowering_ext::{
alignment_mask, build_stack_map_entry, build_varargs_frame, classify_safe_stack_object,
demote_sret, generate_realign_epilogue, generate_realign_prologue, generate_segmented_prologue,
generate_stack_probes, layout_safe_stack, make_frame_lowering_ext_with_config,
make_x86_32_frame_lowering_ext_cdecl, make_x86_64_frame_lowering_ext_sysv,
make_x86_64_frame_lowering_ext_win64, needs_stack_clash_protection, AlignInstr,
CalleeSavedAssignment, CalleeSavedReg, EmergencySpillSlot, EmergencySpillSlotManager,
FrameAccessConfig, FrameAccessDecision, FrameAccessMode, FrameCallConv, PatchPointConfig,
ProbeInstr, ProbeKind, RealignEpilogue, RealignPrologue, SafeStackConfig, SafeStackFrame,
SafeStackObject, SaveRestoreRegion, SegmentedStackConfig, SegmentedStackPrologue,
ShrinkWrapConfig, ShrinkWrapResult, SlotAllocation, SlotInterferenceGraph, SlotLiveRange,
SlotMergeConfig, SlotMergeResult, SretDemotionConfig, SretFrameSlot, StackCheckInstr,
StackClashProtectionConfig, StackMapEntry, StackMapLocKind, StackMapLocation,
StackRealignConfig, SysVVarArgsFrame, VarArgsFrameResult, Win64VarArgsFrame,
X86FrameLoweringExt,
};
pub use x86_full_instr_info::{EncodingForm, InstrEncodingInfo, X86FullInstrInfo, X86FullOpcode};
pub use x86_fusion_catalog::{
FusionConstraints, FusionEntry, FusionFirstOp, FusionMicroArch, FusionQuery, FusionSecondOp,
FusionType, MacroFusionConstraint, MacroFusionPair, MicroFusionConstraint, MicroFusionPattern,
X86FusionCatalog,
};
pub use x86_global_isel_deep::{
DeepGOpcode, DeepLegalizeAction, DeepRegBank, DeepRegBankCostMatrix, DeepX86Opcode,
X86DeepFeatures, X86DeepGISelPipeline, X86DeepGlobalISel, X86DeepIRTranslator,
X86DeepInstructionSelector, X86DeepLegalizer, X86DeepMIRCombiner, X86DeepRegBankSelector,
};
pub use x86_hardware_loops::{
make_x86_hardware_loops_generic, make_x86_hardware_loops_haswell_tsx,
make_x86_hardware_loops_skylake, make_x86_hardware_loops_zen4, CETLoopPattern, HWLoopIntrinsic,
HWLoopLegality, HWLoopLowering, HWLoopMicroArch, HWLoopOptimizationResult, HWLoopStats,
LoopCounterPattern, LoopCounterPredicate, TSXHLELoop, X86HardwareLoops, ZeroOverheadAction,
ZeroOverheadAnalysis, ZeroOverheadConfig,
};
pub use x86_inst_simplify::{FoldResult, SimplifyStats, X86InstSimplify};
pub use x86_interleaved_access::{
make_x86_interleaved_access_avx2, make_x86_interleaved_access_avx512,
make_x86_interleaved_access_sse2, InterleaveConfig, InterleaveCost, InterleaveElementType,
InterleaveIsa, InterleaveStats, InterleavedAccessGroup, LoweringSequence, ShuffleStep,
X86InterleavedAccess,
};
pub use x86_isel::X86InstructionSelector;
pub use x86_linker_script::{
evaluate_expression, tokenize, BinaryOpKind, EvalContext, EvalResult, Expression, LinkerScript,
MemoryRegion, ProgramHeaderDef, SectionAttrKind, SectionDef, SectionType, SortStrategy,
SymbolAssignment, X86LinkerScript,
};
pub use x86_load_store_vectorizer::{
make_x86_lsv_avx, make_x86_lsv_avx512, make_x86_lsv_conservative, make_x86_lsv_sse,
AccessChain, AlignmentInfo, MemAccessKind, ScalarMemAccess, VectorizeCandidate,
X86LSVCostModel, X86LSVStats, X86LoadStoreVectorizer, X86VecWidth,
};
pub use x86_machine_combine::{CombinerStats, X86MachineCombine};
pub use x86_mc_decoder::X86MCDecoder;
pub use x86_mc_encoder::X86MCEncoder;
pub use x86_operation_legalizer::{
analyze_switch_for_lowering, analyze_vector_type, build_dynamic_stack_alloc_lowering,
build_jump_table_entries, build_rdtsc_lowering, build_switch_binary_tree,
build_va_copy_lowering, build_va_end_lowering, build_va_start_lowering, expand_i128_operation,
expand_rotate, get_custom_lowering_table, get_float_libcall_name, lower_bitreverse,
lower_ctlz_fallback, lower_ctpop_fallback, lower_cttz_fallback, lower_frame_address,
lower_overflow_op, lower_prefetch, lower_return_address, make_operation_legalizer_with_config,
make_win64_operation_legalizer, make_x86_32_operation_legalizer,
make_x86_64_operation_legalizer, CustomLoweringDescriptor, DynamicStackAllocLowering,
I128Expansion, LegalizeAction, LegalizeOp, LegalizeResult, LegalizeType,
OverflowLoweringResult, PrefetchHint, RdtscLowering, SwitchBinaryTree, SwitchLoweringConfig,
SwitchLoweringDecision, SwitchLoweringKind, VAArgABIConfig, VAStartLowering,
VectorLegalizationInfo, X86LegalizerConfig, X86LegalizerStats, X86OperationLegalizer,
X86TargetMode,
};
pub use x86_optimize::{X86OptStats, X86PeepholeOptimizer};
pub use x86_schedule_model::{
alder_lake_pcore_model, granite_rapids_model, ice_lake_model, instruction_latency,
instruction_resources, instruction_uops, lookup_itinerary, skylake_client_model, zen3_model,
zen4_model, zen5_model, InstrItinerary, ProcResource, ReadAdvance, SchedMachineModel,
SchedModel, WriteLatency, WriteRes, X86SchedModelKind,
};
pub use x86_shuffle_patterns::{
IsaLevel, ShuffleClass, ShuffleElementType, ShuffleImmType, ShuffleLegalizer, ShuffleMask,
ShuffleMaskEncoder, UpperBitsBehavior, VectorWidth, X86ShufflePattern, X86ShufflePatterns,
};
pub use x86_slp_vectorizer_deep::{
make_x86_slp_deep_avx, make_x86_slp_deep_avx512, make_x86_slp_deep_conservative,
make_x86_slp_deep_sse, SLPBuildContext, SLPCostModel, SLPMultiNodePattern, SLPOpcode,
SLPReductionKind, SLPTreeNode, ScheduledSLPOp, X86SLPVectorizerDeep,
};
pub use x86_stack_probing::{
ABISpecific, AllocaConfig, AllocaRecord, AllocaResult, AllocaTracker, CalleeSavedManager,
CallingConv, ClashSeverity, DynamicStackAllocContext, DynamicStackAllocResult,
EntryProbeSequence, FrameBuilder, FrameInfo, FrameObject, FrameObjectKind, OutgoingArgManager,
ProbeEmissionResult, ProbePoint, ProbeStats, ProbeStrategy, ProbingLoop, RealignAlignment,
RealignmentResult, RedZoneManager, ShadowSpaceManager, StackClashConfig, StackClashResult,
StackDirection, StackFrameLayout, X86StackProbing, DEFAULT_PROBE_INTERVAL,
DRAP_REGISTER_ALT_X64, DRAP_REGISTER_X32, DRAP_REGISTER_X64, MAX_FRAME_SIZE_WITHOUT_PROBE,
MAX_PROBE_INTERVAL, MIN_PROBE_INTERVAL, RED_ZONE_SIZE_SYSV, SHADOW_SPACE_WIN64,
STACK_ALIGNMENT_SYSV, STACK_ALIGNMENT_WIN64,
};
pub use x86_tablegen_full::{
X86CallingConvRule, X86ComplexPattern, X86ComplexPatternHandler, X86CustomInserter,
X86EncodingPrefix, X86EvexTuple, X86ISelDAGPatterns, X86InstrFormat, X86InstrPattern,
X86InstrTableGenDef, X86OpcodeMap, X86PatFragDef, X86RegisterClassDef, X86RegisterDef,
X86RegisterDefs, X86SchedWriteRecord, X86TableGenFull, X86TypeInferenceEntry,
};
pub use x86_tti_deep::{X86CostModel, X86TTIDeep};
pub use x86_type_legalizer::{
compute_type_split, elements_for_register, get_reg_class_for_type, is_type_legal_in_regclass,
make_type_legalizer_with_avx512, make_type_legalizer_with_soft_float,
make_x86_32_type_legalizer, make_x86_64_type_legalizer, preferred_vector_width, SplitTypeInfo,
TypeAction, TypeContext, TypeLegalizeResult, X86RegClass, X86Type, X86TypeLegalizer,
X86TypeLegalizerConfig, X86TypeLegalizerStats,
};
pub use x86_vector_narrow::{
make_x86_vector_narrow, make_x86_vector_narrow_avx512, make_x86_vector_narrow_sse2,
MachineNarrowInstr, NarrowEmittedInstr, NarrowEmitter, NarrowKind, NarrowOperand, NarrowResult,
NarrowStats, NarrowStep, NarrowStrategy, X86VectorNarrow,
};
pub use x86_vector_widen::{
make_x86_vector_widen, make_x86_vector_widen_avx, make_x86_vector_widen_no_arith,
AVX512Rounding, AVX512WidenContext, MachineWidenInstr, WidenEmittedInstr, WidenEmitter,
WidenKind, WidenOperand, WidenOperands, WidenResult, WidenStats, WidenStep, WidenStrategy,
X86VectorWiden,
};
pub use x86_vectorizer_codegen::{
make_x86_vectorizer_codegen, make_x86_vectorizer_codegen_avx2,
make_x86_vectorizer_codegen_avx512, make_x86_vectorizer_codegen_sse2, GatherDescriptor,
InterleaveGroup, MaskedMemOpKind, MaskedMemoryOp, ReductionOp, ScatterDescriptor, TailStrategy,
VPRecipe, VPlan, VecCodeGenConfig, VecCodeGenResult, VecCodeGenStats, VecElementType,
VecFuncABI, VecFuncVariant, VecIsaLevel, VectorPredication, VectorTypeRepr,
VectorizationFactor, X86VectorizerCodeGen,
};
pub use crate::codegen::{
MachineBasicBlock as X86MachineBasicBlock, MachineFunction as X86MachineFunction,
MachineInstr as X86MachineInstr, MachineOperand as X86MachineOperand,
};
pub use crate::codegen_regalloc::RegAllocResult as X86RegAllocResult;
pub use x86_instr_info::{X86InstrFlags, X86InstrKind};
pub use x86_isel_table::{
AddressPattern, ISelTable, ISelTableEntry, PatCondition, PatNode, PatResult,
};
pub use x86_mc_encoder::{mod_field, prefixes, X86Mode};
pub use x86_microarch_full::X86MicroArchKind;
pub use x86_optimizer_full::X86Optimizer;
pub use x86_register_info::{FLAGS, GPR16, GPR32, GPR64, GPR8, IP, KMASK, MMX, X87, XMM, YMM, ZMM};
pub type X86CondCode = X86ConditionCode;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[allow(non_camel_case_types)]
pub enum X86ConditionCode {
O,
NO,
B,
AE,
E,
NE,
BE,
A,
S,
NS,
P,
NP,
L,
GE,
LE,
G,
}
pub use x86_subtarget_features::X86IsaFeature;
pub const X86_ENDIANNESS: &str = "little";
pub const X86_STACK_ALIGNMENT_64: u32 = 16;
pub const X86_STACK_ALIGNMENT_32: u32 = 16; pub const X86_RED_ZONE_SIZE_64: u32 = 128;
pub const X86_MAX_ALIGNMENT: u32 = 64;
pub const X86_PAGE_SIZE: u32 = 4096;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_x86_constants() {
assert_eq!(X86_ENDIANNESS, "little");
assert_eq!(X86_STACK_ALIGNMENT_64, 16);
assert_eq!(X86_STACK_ALIGNMENT_32, 16);
assert_eq!(X86_RED_ZONE_SIZE_64, 128);
assert_eq!(X86_MAX_ALIGNMENT, 64);
assert_eq!(X86_PAGE_SIZE, 4096);
}
}