Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anthropics/claudes-c-compiler
/ functions
Functions
6,057 in github.com/anthropics/claudes-c-compiler
⨍
Functions
6,057
◇
Types & classes
346
↓ 2,969 callers
Method
emit
(&mut self, s: &str)
src/backend/state.rs:266
↓ 2,739 callers
Method
push
(&mut self, val: i32)
src/backend/x86/codegen/peephole/passes/store_forwarding.rs:43
↓ 1,613 callers
Method
len
Return the size of the table in bytes.
src/backend/elf/string_table.rs:50
↓ 1,028 callers
Method
get
(&self, idx: usize)
src/backend/peephole_common.rs:178
↓ 1,003 callers
Method
emit_fmt
(&mut self, args: std::fmt::Arguments<'_>)
src/backend/state.rs:272
↓ 933 callers
Method
insert
(&mut self, idx: usize)
src/backend/liveness.rs:71
↓ 801 callers
Method
len
(&self, i: usize)
src/ir/analysis.rs:48
↓ 714 callers
Method
iter
(&self)
src/backend/x86/codegen/peephole/passes/store_forwarding.rs:80
↓ 696 callers
Method
contains
(&self, idx: usize)
src/backend/liveness.rs:78
↓ 542 callers
Method
to_le_bytes
Serialize this constant to little-endian bytes. Returns a Vec containing the value in little-endian byte order.
src/ir/constants.rs:617
↓ 509 callers
Method
iter
Iterate over all macro definitions. Used by -dM (dump defines) to enumerate all predefined and user-defined macros.
src/frontend/preprocessor/macro_defs.rs:167
↓ 367 callers
Method
emit
(&mut self, inst: Instruction)
src/ir/lowering/lower.rs:1087
↓ 351 callers
Method
advance
(&mut self)
src/frontend/parser/parse.rs:422
↓ 288 callers
Function
reg_num
Register encoding (3-bit register number in ModR/M and SIB).
src/backend/x86/assembler/encoder/registers.rs:4
↓ 263 callers
Method
as_str
(self)
src/backend/common.rs:1080
↓ 251 callers
Function
w64
(buf: &mut [u8], off: usize, val: u64)
src/backend/elf/io.rs:75
↓ 242 callers
Method
len
(&self)
src/backend/peephole_common.rs:191
↓ 226 callers
Method
fresh_value
(&mut self)
src/ir/lowering/lower.rs:1044
↓ 226 callers
Method
lower_expr
(&mut self, expr: &Expr)
src/ir/lowering/expr.rs:111
↓ 216 callers
Function
def
Helper to define a simple object-like macro.
src/frontend/preprocessor/builtin_macros.rs:10
↓ 210 callers
Method
get_slot
(&self, v: u32)
src/backend/state.rs:336
↓ 204 callers
Function
get_reg
(operands: &[Operand], idx: usize)
src/backend/arm/assembler/encoder/mod.rs:956
↓ 196 callers
Function
needs_vex_ext
Does this register need the VEX.B extension bit? Same as REX ext but for VEX-encoded instructions.
src/backend/x86/assembler/encoder/registers.rs:93
↓ 176 callers
Method
as_bytes
Return the raw table bytes (including the leading null byte).
src/backend/elf/string_table.rs:45
↓ 176 callers
Method
size
Size in bytes for non-struct/union types. For struct/union, returns 0. Use size_ctx() when you need accurate struct/union sizes.
src/common/types.rs:1387
↓ 170 callers
Function
from_f64
(v: f64)
src/common/long_double.rs:2501
↓ 164 callers
Method
borrow_struct_layouts
Borrow the struct layouts map immutably. Returns a `Ref` guard that derefs to `FxHashMap<String, RcLayout>`. The underlying `FxHashMap` implements `St
src/frontend/sema/type_context.rs:331
↓ 160 callers
Method
encode_sse_op
(&mut self, ops: &[Operand], opcode: &[u8])
src/backend/i686/assembler/encoder/sse.rs:38
↓ 157 callers
Method
encode_sse_op
Encode a standard SSE operation: op xmm/mem, xmm
src/backend/x86/assembler/encoder/sse.rs:53
↓ 145 callers
Function
w32
(buf: &mut [u8], off: usize, val: u32)
src/backend/elf/io.rs:67
↓ 143 callers
Method
emit_binop_val
Emit a binary operation and return the result Value.
src/ir/lowering/lower.rs:1105
↓ 131 callers
Function
get_neon_reg
Helper to extract register number from a RegArrangement operand
src/backend/arm/assembler/encoder/neon.rs:7
↓ 130 callers
Function
reg_num
Register helper functions for i686 instruction encoding. Register encoding (3-bit register number in ModR/M and SIB).
src/backend/i686/assembler/encoder/registers.rs:4
↓ 125 callers
Method
state
(&mut self)
src/backend/arm/codegen/emit.rs:1731
↓ 124 callers
Function
get_reg
(operands: &[Operand], idx: usize)
src/backend/riscv/assembler/encoder/mod.rs:347
↓ 123 callers
Method
define_simple_macro
Helper to define a simple object-like macro.
src/frontend/preprocessor/predefined_macros.rs:215
↓ 122 callers
Method
modrm
Encode ModR/M byte.
src/backend/x86/assembler/encoder/core.rs:17
↓ 122 callers
Method
to_i64
Extract as i64 (integer constants only; floats return None).
src/ir/constants.rs:322
↓ 121 callers
Function
align_up
(value: u32, align: u32)
src/backend/i686/linker/types.rs:238
↓ 117 callers
Method
invalidate_acc
(&mut self)
src/backend/state.rs:66
↓ 115 callers
Method
operand_to_eax
Load an operand into %eax.
src/backend/i686/codegen/emit.rs:227
↓ 112 callers
Method
invalidate_all
(&mut self)
src/backend/state.rs:73
↓ 107 callers
Method
encode_modrm_mem
Encode ModR/M + SIB + displacement for a memory operand. Returns the bytes to append. `reg_field` is the /r value (3 bits).
src/backend/x86/assembler/encoder/core.rs:83
↓ 106 callers
Method
peek_span
(&self)
src/frontend/parser/parse.rs:414
↓ 105 callers
Method
emit_instr_imm_reg
(&mut self, mnemonic: &str, imm: i64, reg: &str)
src/backend/common.rs:828
↓ 101 callers
Function
parse_reg_num
Parse a register name to its 5-bit encoding number (0-30, 31 for sp/zr).
src/backend/arm/assembler/encoder/mod.rs:131
↓ 100 callers
Method
eval_const_expr
Try to evaluate a constant expression at compile time. First checks sema's pre-computed ConstMap (O(1) lookup for expressions that sema could evaluat
src/ir/lowering/const_eval.rs:71
↓ 97 callers
Method
get_expr_ctype
Get the full CType of an expression by recursion. Returns None if the type cannot be determined from CType tracking. Resolution order: 1. Lowerer-spe
src/ir/lowering/expr_types.rs:1031
↓ 96 callers
Method
slot_ref
Format a stack slot reference as either `offset(%ebp)` or `offset(%esp)`. When frame pointer is omitted, converts EBP-relative offsets to ESP-relative
src/backend/i686/codegen/emit.rs:158
↓ 93 callers
Method
is_complex
Whether this is a complex type (_Complex float/double/long double).
src/common/types.rs:1411
↓ 92 callers
Method
is_float
Whether this is a floating-point type (F32, F64, or F128). F128 (long double) is included because at computation level it is treated as F64 (stored in
src/common/types.rs:1794
↓ 91 callers
Method
fresh_label
Generate a fresh label with the given prefix.
src/backend/state.rs:261
↓ 91 callers
Method
get_expr_type
expr_is_const_qualified is defined in expr.rs as pub(super) Get the IR type for an expression (best-effort, based on locals/globals info).
src/ir/lowering/expr_types.rs:676
↓ 87 callers
Method
func_mut
(&mut self)
src/ir/lowering/lower.rs:231
↓ 87 callers
Method
operand_to_value
Convert an Operand to a Value, copying constants to a temp if needed.
src/ir/lowering/expr.rs:364
↓ 87 callers
Function
read_u32
(data: &[u8], offset: usize)
src/backend/elf/io.rs:14
↓ 82 callers
Method
is_unsigned
Whether this is an unsigned integer type. Used by usual arithmetic conversions (C11 6.3.1.8).
src/common/types.rs:1471
↓ 80 callers
Method
is_alloca
(&self, v: u32)
src/backend/state.rs:325
↓ 77 callers
Method
modrm
Encode ModR/M byte.
src/backend/i686/assembler/encoder/core.rs:9
↓ 71 callers
Method
encode_modrm_mem
(&mut self, reg_field: u8, mem: &MemoryOperand)
src/backend/i686/assembler/encoder/core.rs:45
↓ 71 callers
Method
expect
(&mut self, expected: &TokenKind)
src/frontend/parser/parse.rs:432
↓ 71 callers
Method
get
Get a macro definition.
src/frontend/preprocessor/macro_defs.rs:172
↓ 70 callers
Method
peek
(&self)
src/frontend/parser/parse.rs:406
↓ 70 callers
Function
target_ptr_size
Get the target pointer size for the current thread.
src/common/types.rs:27
↓ 69 callers
Method
emit_load_from_s0
Emit: load from `offset(s0)` into `reg`, handling large offsets via t6.
src/backend/riscv/codegen/emit.rs:240
↓ 69 callers
Method
emit_rex_rm
Emit REX prefix for a memory operand where 'reg' is the reg field.
src/backend/x86/assembler/encoder/core.rs:60
↓ 69 callers
Method
emit_vex
Emit a 2-byte or 3-byte VEX prefix. pp: 0=none, 1=66, 2=F3, 3=F2 mm: 1=0F, 2=0F38, 3=0F3A w: 0 or 1 (VEX.W) vvvv: complement of source register number
src/backend/x86/assembler/encoder/avx.rs:13
↓ 69 callers
Method
type_spec_to_ctype
Convert a TypeSpecifier to CType (for struct layout computation). Delegates to the shared `TypeConvertContext::resolve_type_spec_to_ctype` default met
src/ir/lowering/types_ctype.rs:240
↓ 68 callers
Method
expr_ctype
Determine the CType of an expression, with complex-type-aware overrides. Delegates to `get_expr_ctype` for most expressions, but adds handling for co
src/ir/lowering/complex.rs:432
↓ 68 callers
Function
peephole_optimize
Run peephole optimization on x86-64 assembly text. Returns the optimized assembly string. Pass structure for speed: 1. Run cheap local passes iterati
src/backend/x86/codegen/peephole/passes/mod.rs:59
↓ 67 callers
Function
assert_mul_matches
(a: &[u8; 16], b: &[u8; 16], label: &str)
src/common/long_double.rs:2491
↓ 67 callers
Method
emit_instr_rbp_reg
(&mut self, mnemonic: &str, offset: i64, reg: &str)
src/backend/common.rs:852
↓ 66 callers
Function
target_is_32bit
Whether the current target is 32-bit (ILP32).
src/common/types.rs:32
↓ 64 callers
Method
emit_store_to_s0
Emit: store `reg` to `offset(s0)`, handling large offsets via t6.
src/backend/riscv/codegen/emit.rs:218
↓ 64 callers
Method
next
(&mut self)
src/backend/x86/codegen/peephole/passes/store_forwarding.rs:93
↓ 64 callers
Method
operand_to_t0
Load an operand into t0.
src/backend/riscv/codegen/emit.rs:311
↓ 64 callers
Method
resolve_ctype_size
Resolve the actual size of a CType, handling forward-declared/self-referential struct/union types whose cached_size may be stale (0 or wrong). For tag
src/ir/lowering/pointer_analysis.rs:264
↓ 62 callers
Function
fresh_value
Allocate a fresh Value ID.
src/passes/div_by_const.rs:394
↓ 61 callers
Method
emit_cast_val
Emit a type cast and return the result Value.
src/ir/lowering/lower.rs:1119
↓ 61 callers
Method
encode_avx_3op
Encode AVX 3-operand instruction with 66 prefix (or no prefix): op src, vvvv, dst Format: VEX.NDS.128/256.66.0F opcode /r
src/backend/x86/assembler/encoder/avx.rs:230
↓ 61 callers
Method
operand_to_x0
Load an operand into x0.
src/backend/arm/codegen/emit.rs:995
↓ 60 callers
Method
emit_load_from_sp
Emit load from [base, #offset], handling large offsets. For large frames with x19 as frame base register, tries x19-relative addressing.
src/backend/arm/codegen/emit.rs:719
↓ 60 callers
Function
target_int_ir_type
Return the IR type used for pointer-width integers (I64 on LP64, I32 on ILP32). This is the natural "word" type for the target: the size of `long`, `s
src/common/types.rs:52
↓ 59 callers
Function
encode_i
I-type: imm[31:20] | rs1[19:15] | funct3[14:12] | rd[11:7] | opcode[6:0]
src/backend/riscv/assembler/encoder/mod.rs:280
↓ 59 callers
Function
w16
(buf: &mut [u8], off: usize, val: u16)
src/backend/elf/io.rs:59
↓ 57 callers
Method
emit_fmt
(&mut self, args: std::fmt::Arguments<'_>)
src/backend/common.rs:814
↓ 57 callers
Method
operand_to_rax
Load an operand into %rax. Uses the register cache to skip the load if the value is already in %rax.
src/backend/x86/codegen/emit.rs:402
↓ 57 callers
Function
sf_bit
(is_64: bool)
src/backend/arm/assembler/encoder/mod.rs:991
↓ 56 callers
Method
consume_if
(&mut self, kind: &TokenKind)
src/frontend/parser/parse.rs:526
↓ 56 callers
Function
needs_rex_ext
Does this register need the REX.B/R/X extension bit?
src/backend/x86/assembler/encoder/registers.rs:78
↓ 55 callers
Method
store_rax_to
Store %rax to a value's location (register or stack slot). Register-only strategy: if the value has a register assignment (callee-saved or caller-save
src/backend/x86/codegen/emit.rs:487
↓ 55 callers
Method
trimmed
(&self, line: &'a str)
src/backend/x86/codegen/peephole/types.rs:175
↓ 53 callers
Method
undefine
Undefine a macro.
src/frontend/preprocessor/macro_defs.rs:147
↓ 51 callers
Method
is_vector
Whether this is a GCC vector extension type.
src/common/types.rs:1426
↓ 50 callers
Method
all
All known warning kinds.
src/common/error.rs:158
↓ 49 callers
Method
is_nop
(self)
src/backend/x86/codegen/peephole/types.rs:162
↓ 48 callers
Function
parse_integer_expr
Parse an integer expression (delegates to the shared expression evaluator).
src/backend/x86/assembler/parser.rs:1537
↓ 47 callers
Function
simplify_default
Shorthand: try_simplify with empty def maps (no chain optimization context).
src/passes/simplify.rs:1644
↓ 47 callers
Method
store_eax_to
Store %eax to a value's destination (callee-saved register or stack slot).
src/backend/i686/codegen/emit.rs:395
↓ 46 callers
Method
emit_cmp_val
Emit a comparison and return the result Value (I32: 0 or 1).
src/ir/lowering/lower.rs:1112
next →
1–100 of 6,057, ranked by callers