SSA: Improve toString.

This commit is contained in:
Anders Schack-Mulligen
2025-10-27 11:23:17 +01:00
parent 79b2f21b07
commit 289d3374ef

View File

@@ -1617,6 +1617,9 @@ module Make<
/** A static single assignment (SSA) definition. */
class SsaDefinition extends FinalDefinition {
/** Gets a textual representation of this SSA definition. */
string toString() { result = super.toString() }
/**
* Gets the control flow node of this SSA definition.
*
@@ -1708,6 +1711,8 @@ module Make<
class SsaParameterInit extends SsaExplicitWrite {
SsaParameterInit() { parameterInit(this, _) }
override string toString() { result = "SSA param(" + this.getSourceVariable() + ")" }
/**
* Gets the parameter that this definition represents. This is equivalent
* to `getDefinition().isParameterInit(result)`
@@ -1725,6 +1730,8 @@ module Make<
*/
class SsaImplicitWrite extends SsaWriteDefinition {
SsaImplicitWrite() { not explicitWrite(this, _) }
override string toString() { result = "SSA implicit def(" + this.getSourceVariable() + ")" }
}
/**
@@ -1734,6 +1741,8 @@ module Make<
*/
class SsaImplicitEntryDefinition extends SsaImplicitWrite {
SsaImplicitEntryDefinition() { this.definesAt(_, any(EntryBasicBlock bb), -1) }
override string toString() { result = "SSA entry def(" + this.getSourceVariable() + ")" }
}
/** An SSA definition that represents an uncertain variable update. */