MCPcopy Create free account

hub / github.com/anthropics/claudes-c-compiler / functions

Functions6,057 in github.com/anthropics/claudes-c-compiler

↓ 3 callersMethodexpand_function_macro
Expand a function-like macro with given arguments. Per C11 §6.10.3.1: Arguments are fully macro-expanded before substitution into the body. Occurrenc
src/frontend/preprocessor/macro_defs.rs:727
↓ 3 callersFunctionexpand_sdiv32
Expand `dest = x /s C` for 32-bit signed x.
src/passes/div_by_const.rs:631
↓ 3 callersFunctionexpand_sdiv32_in_i64
Expand `dest = x /s C` where both x and C are in I64 but C fits in i32. x was sign-extended from I32 to I64 by the C lowering.
src/passes/div_by_const.rs:1447
↓ 3 callersFunctionexpand_udiv64
Expand `dest = x /u C` for native 64-bit unsigned x using 128-bit multiply. `ty` is the IR type of the original operation (I64 or U64 - on 64-bit targ
src/passes/div_by_const.rs:899
↓ 3 callersFunctionexpr_contains_string_literal
Check if an expression contains a string literal anywhere, including through binary operations and casts (e.g., `"str" + N`).
src/ir/lowering/global_init_helpers.rs:59
↓ 3 callersMethodexpr_is_array_name
Check if an expression is an array name (identifier declared as an array). Used for normalizing reverse subscript: 3[arr] -> arr[3].
src/ir/lowering/lvalue.rs:688
↓ 3 callersMethodextract_bitfield_from_addr
Extract a bitfield from memory, handling the case where it spans two storage units.
src/ir/lowering/expr_assign.rs:373
↓ 3 callersMethodextract_string_literal
Extract a string literal from an expression, possibly through casts.
src/ir/lowering/global_init.rs:1125
↓ 3 callersFunctionf128_bytes_to_i128
Convert f128 bytes to i128 (for constant folding).
src/common/long_double.rs:1116
↓ 3 callersFunctionf128_cmp
Compare two f128 values. Returns -1, 0, 1, or i32::MIN for unordered (NaN).
src/common/long_double.rs:2243
↓ 3 callersMethodf128_get_source
(&self, val_id: u32)
src/backend/arm/codegen/f128.rs:33
↓ 3 callersMethodf128_load_operand_and_extend
(&mut self, op: &Operand)
src/backend/arm/codegen/f128.rs:78
↓ 3 callersMethodf128_load_ptr_to_addr_reg
(&mut self, slot: StackSlot, val_id: u32)
src/backend/arm/codegen/f128.rs:57
↓ 3 callersFunctionf128_round_and_encode
Helper: round a 128-bit mantissa with guard/round/sticky bits and normalize to f128. `mantissa` is the 113+ bit result, `binary_exp` is the unbiased e
src/common/long_double.rs:1929
↓ 3 callersMethodf128_save_addr_reg
(&mut self)
src/backend/arm/codegen/f128.rs:151
↓ 3 callersMethodf128_store_result_and_truncate
(&mut self, dest: &Value)
src/backend/arm/codegen/f128.rs:244
↓ 3 callersMethodf128_truncate_result_to_acc
(&mut self)
src/backend/arm/codegen/f128.rs:113
↓ 3 callersFunctionfast_parse_i32
(s: &str)
src/backend/x86/codegen/peephole/types.rs:591
↓ 3 callersMethodfill_array_of_composites
Fill an array of struct/union elements from a braced sub-item list.
src/ir/lowering/global_init_bytes.rs:846
↓ 3 callersMethodfill_array_of_scalars
Fill an array of scalar elements from a braced sub-item list (with designator support).
src/ir/lowering/global_init_bytes.rs:877
↓ 3 callersMethodfill_flat_array_field_with_ptrs
Consume consecutive expression items from `items` to flat-initialize an array field. This implements brace elision (C11 6.7.9p17-21) for the bytes+ptr
src/ir/lowering/global_init_compound_ptrs.rs:697
↓ 3 callersMethodfill_struct_fields_from_items
Fill struct fields from an initializer item list into the byte buffer and ptr_ranges. Used both for braced init lists `{ field1, field2, ... }` and fo
src/ir/lowering/global_init_compound_ptrs.rs:165
↓ 3 callersFunctionfind_symbol_index_shared
Find a symbol's index in the ELF symbol table. Checks section names first (returns section symbol index), then searches by string table offset for na
src/backend/elf/object_writer.rs:534
↓ 3 callersMethodflat_scalar_count
Compute the number of scalar initializer items needed to flat-initialize a CType. For scalar types: 1. For arrays: element_count * scalars_per_element
src/ir/lowering/const_eval_init_size.rs:102
↓ 3 callersMethodflatten_global_array_init_bool
( &self, items: &[InitializerItem], array_dim_strides: &[usize], base_ty: IrTy
src/ir/lowering/global_init.rs:1527
↓ 3 callersFunctionfold_float_unaryop
Evaluate a unary operation on a constant float.
src/passes/constant_fold.rs:489
↓ 3 callersFunctionfold_memory_operands
Fold stack loads into subsequent ALU instructions as memory operands. Safety: We only fold when the loaded register (the one being eliminated) is a s
src/backend/x86/codegen/peephole/passes/memory_fold.rs:81
↓ 3 callersMethodfor_each_ref
Visit every symbol name referenced by this initializer. Calls `f` with each global/label name found in GlobalAddr, GlobalAddrOffset, and GlobalLabelDi
src/ir/module.rs:105
↓ 3 callersFunctionformat_path_for_line_directive
Format a path for use in `#line` directives. GCC emits relative paths in `#line` directives when the file is under the current working directory, and
src/frontend/preprocessor/includes.rs:249
↓ 3 callersMethodfp_abs_bits
Compute the absolute value (sign-stripped) of float bits: bits & abs_mask.
src/ir/lowering/expr_builtins_fpclass.rs:119
↓ 3 callersFunctionfreg_num
Parse a floating-point register name to its 5-bit encoding (0-31).
src/backend/riscv/assembler/encoder/mod.rs:195
↓ 3 callersMethodfunc_ptr_return_type
Extract the return type from a function pointer CType. Handles these CType shapes: 1. Pointer(Function(ft)) -> ft.return_type 2. Pointer(Po
src/common/types.rs:1684
↓ 3 callersFunctionfuse_movq_ext_truncation
(store: &mut LineStore, infos: &mut [LineInfo])
src/backend/x86/codegen/peephole/passes/local_patterns.rs:410
↓ 3 callersMethodget_array_root_name_from_base
Get the root array name from the base of a subscript expression. For Identifier("a"): returns Some("a") For ArraySubscript(Identifier("a"), _): return
src/ir/lowering/lvalue.rs:641
↓ 3 callersMethodget_composite_layout
Get the StructLayout for a composite (struct or union) CType. Like `get_struct_layout_for_ctype` but returns a fallback empty layout instead of None.
src/ir/lowering/global_init_bytes.rs:1185
↓ 3 callersFunctionget_dest_reg
Get the destination register of an instruction (the register it writes to).
src/backend/x86/codegen/peephole/passes/helpers.rs:160
↓ 3 callersMethodget_expr_ctype_lowerer
Lowerer-specific CType inference using lowering state (locals, globals, func_meta). This is the original get_expr_ctype logic, now separated so the pu
src/ir/lowering/expr_types.rs:1102
↓ 3 callersMethodget_expr_ctype_with_scope
Resolve an expression's CType using a supplementary scope for identifiers. This handles the common typeof patterns (identifier, deref, address-of, cas
src/ir/lowering/expr_types.rs:1451
↓ 3 callersMethodget_file_body
Get the current __FILE__ macro body. Returns None if __FILE__ is not defined.
src/frontend/preprocessor/macro_defs.rs:203
↓ 3 callersMethodget_named_va_args
Get ALL arguments for a named variadic parameter (e.g., `extra...`).
src/frontend/preprocessor/macro_defs.rs:1131
↓ 3 callersMethodget_phys_reg_for_value
(&self, val_id: u32)
src/backend/arm/codegen/emit.rs:1734
↓ 3 callersMethodget_pointed_struct_layout
Try to determine the struct layout that an expression (a pointer) points to.
src/ir/lowering/structs.rs:671
↓ 3 callersFunctiongot_sym_key
Build a unique GOT key for a symbol referenced via GOT_HI20 or TLS_GOT_HI20. Local and section symbols aren't in `global_syms`, so they need syntheti
src/backend/riscv/linker/relocations.rs:226
↓ 3 callersMethodhas_errors
Returns true if any errors have been emitted (including promoted warnings).
src/common/error.rs:592
↓ 3 callersFunctionif_convert_function
Run if-conversion on a single function.
src/passes/if_convert.rs:50
↓ 3 callersMethodinject_fallback_declarations_for_header
Inject fallback type definitions and extern declarations for standard headers. Only called when no real header file was found, to provide minimal defi
src/frontend/preprocessor/includes.rs:797
↓ 3 callersMethodinline_string_to_values
Inline a string literal into a values array for a sub-array element.
src/ir/lowering/global_init.rs:1509
↓ 3 callersMethodinsert_arch_paths_after_bundled
Insert architecture-specific include paths, keeping the bundled include directory first so our simplified SSE/intrinsic headers take priority over the
src/frontend/preprocessor/predefined_macros.rs:644
↓ 3 callersMethodinsert_struct_layout_from_ref
Insert a struct layout from a &self context (interior mutability via RefCell).
src/frontend/sema/type_context.rs:350
↓ 3 callersFunctioninvalidate_all_mappings
(slot_entries: &mut Vec<SlotEntry>, reg_offsets: &mut [SmallVec; 16])
src/backend/x86/codegen/peephole/passes/store_forwarding.rs:122
↓ 3 callersFunctioninvalidate_slots_at
Invalidate slot mappings at a given offset.
src/backend/x86/codegen/peephole/passes/store_forwarding.rs:138
↓ 3 callersFunctionis_32bit_reg
Check if a register name is a 32-bit (W) register.
src/backend/arm/assembler/encoder/mod.rs:157
↓ 3 callersMethodis_always_inline
(&self)
src/frontend/parser/ast.rs:82
↓ 3 callersFunctionis_arm_fp_reg
Check if a register name is an AArch64 floating-point/SIMD register (s0-s31, d0-d31, v0-v31, q0-q31). This avoids false positives for "sp" (stack poin
src/backend/arm/codegen/emit.rs:75
↓ 3 callersFunctionis_builtin
Check if a name is a known builtin function. This includes both explicitly registered builtins (in BUILTIN_MAP) and atomic/sync builtins that are han
src/frontend/sema/builtins.rs:657
↓ 3 callersFunctionis_caller_saved
Check if a register is caller-saved (clobbered by calls).
src/backend/i686/codegen/peephole.rs:155
↓ 3 callersMethodis_enum_type_spec
Check if a TypeSpecifier refers to an enum type (directly or via typedef).
src/ir/lowering/lower.rs:1245
↓ 3 callersMethodis_explicit_assembly
Check if an input file should be treated as assembly source based on the -x language override. This is used for stdin ("-") and for files like /dev/nu
src/driver/file_types.rs:86
↓ 3 callersMethodis_floating
Whether this is a floating-point type (float, double, long double).
src/common/types.rs:1416
↓ 3 callersMethodis_function_pointer_deref
Check if dereferencing the given expression is a no-op because the expression is a function pointer (or function designator). In C: - *f where f is a
src/ir/lowering/expr_access.rs:722
↓ 3 callersMethodis_global_or_function
Check whether a name refers to a global variable, known function, or enum constant (i.e., something that is a valid assembly-level symbol or compile-t
src/ir/lowering/stmt_asm.rs:515
↓ 3 callersMethodis_gnu_inline_no_extern_def
Returns true if the function has `extern inline` semantics that do NOT emit an external definition. This covers two cases: 1. `extern inline` + `__at
src/ir/lowering/lower.rs:261
↓ 3 callersFunctionis_ident_cont
Check if a character can continue a C identifier. GCC extension: '$' is allowed in identifiers (-fdollars-in-identifiers, on by default).
src/frontend/preprocessor/utils.rs:16
↓ 3 callersFunctionis_numeric_label
Check if a label name is a GNU numeric label (e.g., "1", "42").
src/backend/riscv/assembler/elf_writer.rs:85
↓ 3 callersFunctionis_reg8
Is this an 8-bit GP register?
src/backend/x86/assembler/encoder/registers.rs:116
↓ 3 callersFunctionis_side_effect_free
Check if a block contains only simple, side-effect-free instructions that are safe to speculatively execute. IMPORTANT: Load is NOT included here bec
src/passes/if_convert.rs:155
↓ 3 callersMethodis_weak
(&self)
src/backend/linker_common/types.rs:46
↓ 3 callersFunctionis_zero
Check if an operand is zero (including both +0.0 and -0.0 for floats).
src/passes/simplify.rs:1094
↓ 3 callersFunctionload_and_parse_objects
(all_objects: &[String], defsym_defs: &[(String, String)])
src/backend/i686/linker/input.rs:264
↓ 3 callersFunctionload_archive_elf64
Load a regular archive (.a), parsing members and pulling in those that resolve undefined symbols. When `whole_archive` is true, all members are uncon
src/backend/linker_common/archive.rs:72
↓ 3 callersMethodload_lvalue_typed
Load the value from an lvalue with a specific type.
src/ir/lowering/lvalue.rs:177
↓ 3 callersFunctionload_thin_archive_elf64
Load a GNU thin archive. Members are external files referenced by name relative to the archive's directory. When `whole_archive` is true, all members
src/backend/linker_common/archive.rs:109
↓ 3 callersMethodload_va_list_ptr_to_rcx
Helper to load va_list pointer into %rcx for va_arg operations.
src/backend/x86/codegen/emit.rs:1111
↓ 3 callersFunctionlook_through_casts
Look through Cast and Copy instructions to find the root value. Used to match `Cast(Add(Cast(phi_dest), step))` patterns.
src/passes/iv_strength_reduce.rs:605
↓ 3 callersMethodlookup_sema_expr_type
Look up the CType of an expression from sema's pre-computed annotation map. Returns None if sema did not annotate this expression (e.g., because the t
src/ir/lowering/expr_types.rs:1017
↓ 3 callersMethodlower_address_of
(&mut self, inner: &Expr)
src/ir/lowering/expr_access.rs:676
↓ 3 callersMethodlower_local_struct_init
Initialize a local struct from an initializer list. `base` is the base address of the struct in memory.
src/ir/lowering/stmt.rs:623
↓ 3 callersMethodlower_overflow_builtin
Lower __builtin_{add,sub,mul}_overflow(a, b, result_ptr) and type-specific variants. These builtins perform an arithmetic operation, store the result
src/ir/lowering/expr_builtins_overflow.rs:29
↓ 3 callersMethodlower_overflow_p_builtin
Lower __builtin_{add,sub,mul}_overflow_p(a, b, (T)0) predicate-only variants. These return 1 if the operation would overflow type T, 0 otherwise. The
src/ir/lowering/expr_builtins_overflow.rs:221
↓ 3 callersMethodlower_string_literal
(&mut self, s: &str, wide: bool)
src/ir/lowering/expr.rs:207
↓ 3 callersMethodlower_unary_intrinsic
Lower a simple unary intrinsic (CLZ, CTZ, Popcount) that takes one integer arg.
src/ir/lowering/expr_builtins_intrin.rs:35
↓ 3 callersMethodlower_vector_init_list
Vector init list: `v4hi a = {1, 2, 3, 4};` Stores each element at elem_size * index offset from the alloca.
src/ir/lowering/stmt_init.rs:1074
↓ 3 callersFunctionmake_f128_raw
Construct raw f128 bytes from sign, biased exponent, and stored mantissa (no implicit bit).
src/common/long_double.rs:865
↓ 3 callersMethodmark_escaped
Mark an alloca (or GEP-derived value) as escaped and record the use.
src/backend/stack_layout/alloca_coalescing.rs:80
↓ 3 callersFunctionmerge_sections_elf64_gc
Merge input sections into output sections, optionally skipping dead sections. When `dead_sections` is non-empty (from --gc-sections), sections in the
src/backend/linker_common/merge.rs:36
↓ 3 callersFunctionnamed_params_stack_bytes
Compute the total stack space (in bytes) consumed by named parameters that are passed on the stack. This is needed for variadic functions: va_start mu
src/backend/call_abi.rs:809
↓ 3 callersMethodneeds_got
Returns true if the given symbol needs GOT indirection in PIC mode. A symbol needs GOT if PIC is enabled AND it's not a local (static) symbol. Local l
src/backend/state.rs:384
↓ 3 callersMethodneeds_plt
Returns true if a function call needs PLT indirection in PIC mode.
src/backend/state.rs:410
↓ 3 callersFunctionnext_non_nop_or_directive
Skip NOP and Directive lines (CFI directives appear between prologue instructions).
src/backend/x86/codegen/peephole/passes/frame_compact.rs:21
↓ 3 callersFunctionnormalize_aarch64_register
Normalize AArch64 register name aliases. GCC treats `r0`-`r30` as aliases for `x0`-`x30` on AArch64. The Linux kernel uses this convention extensivel
src/backend/arm/codegen/asm_emitter.rs:421
↓ 3 callersFunctionone
()
src/common/long_double.rs:2994
↓ 3 callersMethodoperand_to_callee_reg
Load an operand into a specific callee-saved register.
src/backend/arm/codegen/emit.rs:233
↓ 3 callersMethodparse_additive
(&mut self)
src/frontend/preprocessor/conditionals.rs:661
↓ 3 callersMethodparse_alignas_argument
Parse the parenthesized argument of `_Alignas(...)`. _Alignas can take either a type-name or a constant expression. Returns Some(alignment) on success
src/frontend/parser/parse.rs:1138
↓ 3 callersFunctionparse_alu_dest
Parse the destination register from an ALU-style instruction. RISC-V ALU instructions have the form: `mnemonic rd, rs1, rs2/imm` The destination is th
src/backend/riscv/codegen/peephole.rs:331
↓ 3 callersFunctionparse_aq_rl
(suffixes: &[&str])
src/backend/riscv/assembler/encoder/atomics.rs:94
↓ 3 callersFunctionparse_archive_members
Parse a GNU-format static archive (.a file), returning member entries as `(name, data_offset, data_size)` tuples. The offsets are into the original `d
src/backend/elf/archive.rs:97
↓ 3 callersMethodparse_compound_stmt
(&mut self)
src/frontend/parser/statements.rs:12
↓ 3 callersFunctionparse_data_value
Parse a data value (integer literal, possibly negative).
src/backend/arm/assembler/parser.rs:2638
↓ 3 callersFunctionparse_data_value_int
Parse a data value as a plain integer (used by .byte, .zero fill, etc).
src/backend/riscv/assembler/parser.rs:741
← previousnext →1,101–1,200 of 6,057, ranked by callers