BitcodeTransformRule

data class BitcodeTransformRule(val kind: BitcodeRewriteKind, val symbol: String, val originalCompileUnit: StigRepoFile? = null, val replacementSource: String? = null, val sourceFile: String? = null, val transfers: List<BitcodeTransferEdge> = emptyList(), val model: BitcodeFunctionModel? = null, val nativeCompileUnit: StigRepoFile? = null, val reason: String? = null, val scope: BitcodeTransformScope? = null, val owner: String? = null, val mangledSymbol: String? = null, val originalSource: BitcodeOriginalSource? = originalCompileUnit?.let { BitcodeOriginalSource(repoName = it.repoName, relativePath = it.relativePath) }, val reviewStatus: BitcodeTransformReviewStatus = BitcodeTransformReviewStatus.NEW, val zeroInitializeReturn: Boolean = false, val definitionMode: DefinitionMode? = when (kind) { BitcodeRewriteKind.ADD_FUNCTION_IMPLEMENTATION -> DefinitionMode.ADD BitcodeRewriteKind.SET_FUNCTION_INLINING, BitcodeRewriteKind.REWRITE_GLOBAL_TO_ZERO, BitcodeRewriteKind.REWRITE_GLOBAL_TO_UNKNOWN, BitcodeRewriteKind.REWRITE_WITH_ANALYSIS_COMPILE_UNIT -> null else -> DefinitionMode.REWRITE }, val inlining: Inlining = when (kind) { BitcodeRewriteKind.SET_FUNCTION_INLINING, BitcodeRewriteKind.REWRITE_GLOBAL_TO_ZERO, BitcodeRewriteKind.REWRITE_GLOBAL_TO_UNKNOWN, BitcodeRewriteKind.REWRITE_WITH_ANALYSIS_COMPILE_UNIT -> Inlining.DEFAULT else -> Inlining.NEVER })

One LLVM bitcode rewrite rule.

The rule describes the intended symbol-level change. The Gradle task decides whether the legal implementation point is before or after llvm-link.

Constructors

Link copied to clipboard
constructor(kind: BitcodeRewriteKind, symbol: String, originalCompileUnit: StigRepoFile? = null, replacementSource: String? = null, sourceFile: String? = null, transfers: List<BitcodeTransferEdge> = emptyList(), model: BitcodeFunctionModel? = null, nativeCompileUnit: StigRepoFile? = null, reason: String? = null, scope: BitcodeTransformScope? = null, owner: String? = null, mangledSymbol: String? = null, originalSource: BitcodeOriginalSource? = originalCompileUnit?.let { BitcodeOriginalSource(repoName = it.repoName, relativePath = it.relativePath) }, reviewStatus: BitcodeTransformReviewStatus = BitcodeTransformReviewStatus.NEW, zeroInitializeReturn: Boolean = false, definitionMode: DefinitionMode? = when (kind) { BitcodeRewriteKind.ADD_FUNCTION_IMPLEMENTATION -> DefinitionMode.ADD BitcodeRewriteKind.SET_FUNCTION_INLINING, BitcodeRewriteKind.REWRITE_GLOBAL_TO_ZERO, BitcodeRewriteKind.REWRITE_GLOBAL_TO_UNKNOWN, BitcodeRewriteKind.REWRITE_WITH_ANALYSIS_COMPILE_UNIT -> null else -> DefinitionMode.REWRITE }, inlining: Inlining = when (kind) { BitcodeRewriteKind.SET_FUNCTION_INLINING, BitcodeRewriteKind.REWRITE_GLOBAL_TO_ZERO, BitcodeRewriteKind.REWRITE_GLOBAL_TO_UNKNOWN, BitcodeRewriteKind.REWRITE_WITH_ANALYSIS_COMPILE_UNIT -> Inlining.DEFAULT else -> Inlining.NEVER })

Properties

Link copied to clipboard

Null for globals, synthetic compile-unit evidence and standalone inlining rules.

Link copied to clipboard

Generated transfer/NOP/no-return bodies use internal protection and cannot override this policy.

Link copied to clipboard
Link copied to clipboard

Exact LLVM symbol used when a generated rule must avoid demangled glob matching.

Link copied to clipboard
Link copied to clipboard

Existing native compiler input selected by logical compile-unit identity, with its own P2 recipe.

Link copied to clipboard

Original compilation unit owning the definition; alternate implementations replace its matching body.

Link copied to clipboard

Original function location for comparison and source links; never selects a compiler input.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Explicitly initialize returned scalar fields without an incoming transfer to zero.

Functions

Link copied to clipboard

Stable registry identity; transform kind and lifecycle metadata deliberately do not participate.

Link copied to clipboard

Native compile-unit provenance, including the operational source of an alternate implementation rewrite.

Link copied to clipboard

True when the applied transform semantics still require source/LLVM model review.

Link copied to clipboard

True when a transform is intentionally unsuitable for evidence-ready analysis.

Link copied to clipboard

Memory models that require exact compiler member layout and parameter-name metadata.

Link copied to clipboard

Named parameters and fields require exact compiler types instead of the legacy untyped endpoint lowering.

Generated with STIG