llvm-native-core 0.1.5

LLVM-native core semantic engine — IR, CodeGen, X86 MC, Clang frontend pipeline
// llvm-native-core: Core LLVM semantic engine.
//
// This crate provides the LLVM IR data structures, bitcode reader/writer,
// assembler/disassembler, analysis passes, code generation, MC layer,
// target backends, and all core LLVM behavior.
//
// Clean-room design: all behavior is reconstructed from black-box
// oracle interrogation, the LLVM Language Reference, LLVM documentation,
// and published specifications. No LLVM C++ source code is consulted.
//
// Current Phase: Phase 0 — Foundation — Project Scaffolding

#![allow(warnings)]

// === Core IR ===
pub mod attributes;
pub mod attributes_v2;
pub mod basic_block;
pub mod basic_block_ext;
pub mod constants;
pub mod constants_v2;
pub mod context;
pub mod context_adv;
pub mod debug_info;
pub mod debug_info_v2;
pub mod function;
pub mod function_ext;
pub mod instruction;
pub mod instruction_v2;
pub mod ir_builder;
pub mod metadata;
pub mod metadata_v2;
pub mod module;
pub mod module_v2;
pub mod opcode;
pub mod types;
pub mod user;
pub mod value;
pub mod verifier;
pub mod verifier_v2;

// === IR Serialization ===
pub mod asm_parser;
pub mod asm_parser_v2;
pub mod asm_writer;
pub mod asm_writer_v2;
pub mod bitcode_reader;
pub mod bitcode_v2;
pub mod bitcode_writer;
pub mod bitstream;

// === Target Infrastructure ===
pub mod data_layout;
pub mod target_info;
pub mod target_machine;
pub mod target_v2;
pub mod triple;

// === MC Layer ===
pub mod llvm_mca;
pub mod mc_assembler;
pub mod mc_disassembler;
pub mod mc_inst;
pub mod mc_streamer;
pub mod mc_target;
pub mod objdump;
pub mod object_writer;

// === ELF ===
pub mod elf;

// === Object File Handling ===
pub mod object_emitter;
pub mod object_file;

// === Analysis ===
pub mod aggressive_instcombine;
pub mod alias_analysis;
pub mod analysis;
pub mod assumption_cache;
pub mod called_value_propagation;
pub mod cfl_aa;
pub mod constant_hoisting;
pub mod dead_store_elim;
pub mod demanded_bits;
pub mod dep_analysis;
pub mod div_rem_pairs;
pub mod early_cse;
pub mod float2int;
pub mod gvn;
pub mod indvar_simplify;
pub mod inline;
pub mod ipo;
pub mod ir_interpreter;
pub mod jit_engine;
pub mod jump_threading;
pub mod lazy_value_info;
pub mod licm;
pub mod loop_access_analysis;
pub mod loop_idiom;
pub mod loop_rotate;
pub mod loop_simplify;
pub mod loop_unroll;
pub mod lower_invoke;
pub mod lower_switch;
pub mod memory_ssa;
pub mod merged_load_store_motion;
pub mod must_execute;
pub mod orc_concurrent;
pub mod orc_jit;
pub mod pass_manager;
pub mod passes;
pub mod reassociate;
pub mod scalar_evolution;
pub mod sccp;
pub mod slp_vectorize;
pub mod speculative_execution;
pub mod stack_protector;
pub mod tail_call;
pub mod tail_recursion_elim;
pub mod vectorize;
pub mod vplan;

// === X86 Backend ===
pub mod ir_builder_deep_x86;
pub mod ir_passes_deep_x86;
pub mod x86;

// === Code Generation ===
pub mod branch_folding;
pub mod codegen;
pub mod codegen_gc;
pub mod codegen_gc2;
// replaced by codegen_lowering_x86
pub mod codegen_lowering_x86;
pub mod codegen_opt;
pub mod codegen_tli_x86;
pub mod codegen_transform_x86;
// replaced by codegen_opt2_x86
pub mod codegen_deep_ra;
pub mod codegen_deep_sched;
pub mod codegen_opt2_x86;

pub mod codegen_postra;
pub mod codegen_prolog_epilog;
pub mod codegen_ra_fast;

pub mod codegen_ra_greedy;
pub mod codegen_regalloc;
pub mod codegen_ws;
// replaced by codegen_tli_x86
pub mod codegen_stackmaps_x86;
pub mod if_conversion;
pub mod machine_block_placement;
pub mod machine_cse;
pub mod machine_licm;
pub mod machine_pipeliner;
pub mod machine_scheduler;
pub mod machine_verifier;
pub mod register_coalescing;
pub mod selection_dag;
pub mod tail_duplication;

// === Support ===
pub mod command_line;
pub mod coroutine;
pub mod diagnostics;
pub mod dwarf;
pub mod exception_handling;
pub mod pdb;
pub mod pgo;
pub mod profile_data;
pub mod remarks;
pub mod support;

// === Linker ===
pub mod linker;
pub mod lld;

// === TableGen DSL ===
pub mod tablegen;

// === Developer Tools ===
pub mod llvm_diff;
pub mod llvm_extract;
pub mod llvm_intrinsics;
pub mod llvm_intrinsics2;
pub mod llvm_objcopy;
pub mod llvm_reduce;
pub mod tools;

// === OpenMP ===
pub mod openmp;
pub mod openmp_x86;

// === Clang Tools ===
// replaced by clang_tools_full_x86
// pub use clang::clang_tools_full_x86;  // module disabled

// === Benchmarks ===
pub mod benchmarks;

// === Extended DAG Combiner ===
pub mod dag_combiner_ext;

// === LLVM Developer Tools (additional) ===
pub mod llvm_cxxfilt;
pub mod llvm_split;
pub mod llvm_stress;

// === Sanitizers ===
pub mod hwasan;
pub mod sanitize;

// === IR Utilities ===
pub mod ir_mover;
pub mod value_mapper;

// === Security Hardening ===
pub mod security;
pub mod self_compile;

// === Loop Optimizations ===
pub mod guard_widening;
pub mod irce;
pub mod loop_access_info;
pub mod loop_distribution;
pub mod loop_fusion;
pub mod loop_interchange;
pub mod loop_load_elim;
pub mod loop_predication;
pub mod loop_reroll;
pub mod loop_versioning;
pub mod simple_loop_unswitch;

// === GlobalISel ===
pub mod global_isel;

// === Clang Frontend ===
pub mod clang;
pub mod clang_scan_deps;
pub use clang::clang_self_host_validation;
pub use clang::clang_x86_e2e_pipeline_full;

// === Clang Static Analyzer ===
pub use clang::static_analyzer_x86;
// replaced by static_analyzer_x86

// === Sanitizer Coverage ===
pub mod sanitizer_coverage;

pub use basic_block::new_basic_block;
pub use constants::{
    const_add, const_bitcast, const_bool, const_double, const_f32, const_f64, const_float,
    const_gep, const_i32, const_i64, const_i8, const_int, const_null_ptr, const_zero, new_global,
    poison_value, undef_value, ConstantData, DIBuilder, DebugLoc, MDNode, MetadataValue,
};
pub use context::LLVMContext;
pub use function::{new_function, Function};
pub use instruction::{
    add, alloca, br, br_cond, call, icmp, load, mul, phi, ret_val, ret_void, store, sub, ICmpPred,
    Opcode,
};
pub use ir_builder::IRBuilder;
pub use module::Module;
pub use types::{Type, TypeKind};
pub use value::{valref, SubclassKind, Value, ValueRef};
pub use verifier::{verify_function, verify_instruction, verify_module, VerifierResult};