mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Merge pull request #6601 from dbartol/dbartol/side-effect-reorder/work
Fix order of IR call side effects
This commit is contained in:
@@ -111,6 +111,45 @@ private predicate hasDefaultSideEffect(Call call, ParameterIndex i, boolean buff
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* A `Call` or `NewOrNewArrayExpr`.
|
||||
*
|
||||
* Both kinds of expression invoke a function as part of their evaluation. This class provides a
|
||||
* way to treat both kinds of function similarly, and to get the invoked `Function`.
|
||||
*/
|
||||
class CallOrAllocationExpr extends Expr {
|
||||
CallOrAllocationExpr() {
|
||||
this instanceof Call
|
||||
or
|
||||
this instanceof NewOrNewArrayExpr
|
||||
}
|
||||
|
||||
/** Gets the `Function` invoked by this expression, if known. */
|
||||
final Function getTarget() {
|
||||
result = this.(Call).getTarget()
|
||||
or
|
||||
result = this.(NewOrNewArrayExpr).getAllocator()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the side effect opcode, if any, that represents any side effects not specifically modeled
|
||||
* by an argument side effect.
|
||||
*/
|
||||
Opcode getCallSideEffectOpcode(CallOrAllocationExpr expr) {
|
||||
not exists(expr.getTarget().(SideEffectFunction)) and result instanceof Opcode::CallSideEffect
|
||||
or
|
||||
exists(SideEffectFunction sideEffectFunction |
|
||||
sideEffectFunction = expr.getTarget() and
|
||||
if not sideEffectFunction.hasOnlySpecificWriteSideEffects()
|
||||
then result instanceof Opcode::CallSideEffect
|
||||
else (
|
||||
not sideEffectFunction.hasOnlySpecificReadSideEffects() and
|
||||
result instanceof Opcode::CallReadSideEffect
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a side effect opcode for parameter index `i` of the specified call.
|
||||
*
|
||||
|
||||
@@ -49,19 +49,6 @@ abstract class TranslatedCall extends TranslatedExpr {
|
||||
tag = CallTag() and
|
||||
opcode instanceof Opcode::Call and
|
||||
resultType = getTypeForPRValue(getCallResultType())
|
||||
or
|
||||
hasSideEffect() and
|
||||
tag = CallSideEffectTag() and
|
||||
(
|
||||
if hasWriteSideEffect()
|
||||
then (
|
||||
opcode instanceof Opcode::CallSideEffect and
|
||||
resultType = getUnknownType()
|
||||
) else (
|
||||
opcode instanceof Opcode::CallReadSideEffect and
|
||||
resultType = getVoidType()
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override Instruction getChildSuccessor(TranslatedElement child) {
|
||||
@@ -84,25 +71,8 @@ abstract class TranslatedCall extends TranslatedExpr {
|
||||
|
||||
override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) {
|
||||
kind instanceof GotoEdge and
|
||||
(
|
||||
(
|
||||
tag = CallTag() and
|
||||
if hasSideEffect()
|
||||
then result = getInstruction(CallSideEffectTag())
|
||||
else
|
||||
if hasPreciseSideEffect()
|
||||
then result = getSideEffects().getFirstInstruction()
|
||||
else result = getParent().getChildSuccessor(this)
|
||||
)
|
||||
or
|
||||
(
|
||||
hasSideEffect() and
|
||||
tag = CallSideEffectTag() and
|
||||
if hasPreciseSideEffect()
|
||||
then result = getSideEffects().getFirstInstruction()
|
||||
else result = getParent().getChildSuccessor(this)
|
||||
)
|
||||
)
|
||||
tag = CallTag() and
|
||||
result = getSideEffects().getFirstInstruction()
|
||||
}
|
||||
|
||||
override Instruction getInstructionRegisterOperand(InstructionTag tag, OperandTag operandTag) {
|
||||
@@ -121,15 +91,6 @@ abstract class TranslatedCall extends TranslatedExpr {
|
||||
)
|
||||
}
|
||||
|
||||
final override CppType getInstructionMemoryOperandType(
|
||||
InstructionTag tag, TypedOperandTag operandTag
|
||||
) {
|
||||
tag = CallSideEffectTag() and
|
||||
hasSideEffect() and
|
||||
operandTag instanceof SideEffectOperandTag and
|
||||
result = getUnknownType()
|
||||
}
|
||||
|
||||
final override Instruction getResult() { result = getInstruction(CallTag()) }
|
||||
|
||||
/**
|
||||
@@ -200,40 +161,31 @@ abstract class TranslatedCall extends TranslatedExpr {
|
||||
*/
|
||||
abstract predicate hasArguments();
|
||||
|
||||
predicate hasReadSideEffect() { any() }
|
||||
|
||||
predicate hasWriteSideEffect() { any() }
|
||||
|
||||
private predicate hasSideEffect() { hasReadSideEffect() or hasWriteSideEffect() }
|
||||
|
||||
override Instruction getPrimaryInstructionForSideEffect(InstructionTag tag) {
|
||||
hasSideEffect() and
|
||||
tag = CallSideEffectTag() and
|
||||
result = getResult()
|
||||
}
|
||||
|
||||
predicate hasPreciseSideEffect() { exists(getSideEffects()) }
|
||||
|
||||
final TranslatedSideEffects getSideEffects() { result.getExpr() = expr }
|
||||
}
|
||||
|
||||
/**
|
||||
* The IR translation of the side effects of the parent `TranslatedElement`.
|
||||
*
|
||||
* This object does not itself generate the side effect instructions. Instead, its children provide
|
||||
* the actual side effects, with this object acting as a placeholder so the parent only needs to
|
||||
* insert this one element at the point where all the side effects are supposed to occur.
|
||||
*/
|
||||
abstract class TranslatedSideEffects extends TranslatedElement {
|
||||
/** Gets the expression whose side effects are being modeled. */
|
||||
abstract Expr getExpr();
|
||||
|
||||
final override Locatable getAST() { result = getExpr() }
|
||||
|
||||
final override Function getFunction() { result = getExpr().getEnclosingFunction() }
|
||||
|
||||
override TranslatedElement getChild(int i) {
|
||||
final override TranslatedElement getChild(int i) {
|
||||
result =
|
||||
rank[i + 1](TranslatedSideEffect tse, int isWrite, int index |
|
||||
(
|
||||
tse.getCall() = getExpr() and
|
||||
tse.getArgumentIndex() = index and
|
||||
if tse.isWrite() then isWrite = 1 else isWrite = 0
|
||||
)
|
||||
rank[i + 1](TranslatedSideEffect tse, int group, int indexInGroup |
|
||||
tse.getPrimaryExpr() = getExpr() and
|
||||
tse.sortOrder(group, indexInGroup)
|
||||
|
|
||||
tse order by isWrite, index
|
||||
tse order by group, indexInGroup
|
||||
)
|
||||
}
|
||||
|
||||
@@ -246,12 +198,21 @@ abstract class TranslatedSideEffects extends TranslatedElement {
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `TranslatedFunction` containing this expression.
|
||||
*/
|
||||
final TranslatedFunction getEnclosingFunction() {
|
||||
result = getTranslatedFunction(getExpr().getEnclosingFunction())
|
||||
final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType type) {
|
||||
none()
|
||||
}
|
||||
|
||||
final override Instruction getFirstInstruction() {
|
||||
result = getChild(0).getFirstInstruction()
|
||||
or
|
||||
// Some functions, like `std::move()`, have no side effects whatsoever.
|
||||
not exists(getChild(0)) and result = getParent().getChildSuccessor(this)
|
||||
}
|
||||
|
||||
final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() }
|
||||
|
||||
/** Gets the primary instruction to be associated with each side effect instruction. */
|
||||
abstract Instruction getPrimaryInstruction();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -325,14 +286,6 @@ class TranslatedFunctionCall extends TranslatedCallExpr, TranslatedDirectCall {
|
||||
tag = CallTargetTag() and result = expr.getTarget()
|
||||
}
|
||||
|
||||
override predicate hasReadSideEffect() {
|
||||
not expr.getTarget().(SideEffectFunction).hasOnlySpecificReadSideEffects()
|
||||
}
|
||||
|
||||
override predicate hasWriteSideEffect() {
|
||||
not expr.getTarget().(SideEffectFunction).hasOnlySpecificWriteSideEffects()
|
||||
}
|
||||
|
||||
override Instruction getQualifierResult() {
|
||||
hasQualifier() and
|
||||
result = getQualifier().getResult()
|
||||
@@ -363,209 +316,116 @@ class TranslatedStructorCall extends TranslatedFunctionCall {
|
||||
override predicate hasQualifier() { any() }
|
||||
}
|
||||
|
||||
class TranslatedAllocationSideEffects extends TranslatedSideEffects,
|
||||
TTranslatedAllocationSideEffects {
|
||||
AllocationExpr expr;
|
||||
|
||||
TranslatedAllocationSideEffects() { this = TTranslatedAllocationSideEffects(expr) }
|
||||
|
||||
final override AllocationExpr getExpr() { result = expr }
|
||||
|
||||
override string toString() { result = "(allocation side effects for " + expr.toString() + ")" }
|
||||
|
||||
override Instruction getFirstInstruction() { result = getInstruction(OnlyInstructionTag()) }
|
||||
|
||||
override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType type) {
|
||||
opcode instanceof Opcode::InitializeDynamicAllocation and
|
||||
tag = OnlyInstructionTag() and
|
||||
type = getUnknownType()
|
||||
}
|
||||
|
||||
override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) {
|
||||
tag = OnlyInstructionTag() and
|
||||
kind = EdgeKind::gotoEdge() and
|
||||
if exists(getChild(0))
|
||||
then result = getChild(0).getFirstInstruction()
|
||||
else result = getParent().getChildSuccessor(this)
|
||||
}
|
||||
|
||||
override Instruction getInstructionRegisterOperand(InstructionTag tag, OperandTag operandTag) {
|
||||
tag = OnlyInstructionTag() and
|
||||
operandTag = addressOperand() and
|
||||
result = getPrimaryInstructionForSideEffect(OnlyInstructionTag())
|
||||
}
|
||||
|
||||
override Instruction getPrimaryInstructionForSideEffect(InstructionTag tag) {
|
||||
tag = OnlyInstructionTag() and
|
||||
if expr instanceof NewOrNewArrayExpr
|
||||
then result = getTranslatedAllocatorCall(expr).getInstruction(CallTag())
|
||||
else result = getTranslatedCallInstruction(expr)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The IR translation of the side effects of a function call, including the implicit allocator
|
||||
* call in a `new` or `new[]` expression.
|
||||
*/
|
||||
class TranslatedCallSideEffects extends TranslatedSideEffects, TTranslatedCallSideEffects {
|
||||
Call expr;
|
||||
Expr expr;
|
||||
|
||||
TranslatedCallSideEffects() { this = TTranslatedCallSideEffects(expr) }
|
||||
|
||||
override string toString() { result = "(side effects for " + expr.toString() + ")" }
|
||||
final override string toString() { result = "(side effects for " + expr.toString() + ")" }
|
||||
|
||||
override Call getExpr() { result = expr }
|
||||
final override Expr getExpr() { result = expr }
|
||||
|
||||
override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType type) { none() }
|
||||
|
||||
override Instruction getFirstInstruction() { result = getChild(0).getFirstInstruction() }
|
||||
|
||||
override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() }
|
||||
|
||||
override Instruction getPrimaryInstructionForSideEffect(InstructionTag tag) {
|
||||
tag = OnlyInstructionTag() and
|
||||
result = getTranslatedCallInstruction(expr)
|
||||
}
|
||||
}
|
||||
|
||||
class TranslatedStructorCallSideEffects extends TranslatedCallSideEffects {
|
||||
TranslatedStructorCallSideEffects() {
|
||||
getParent().(TranslatedStructorCall).hasQualifier() and
|
||||
getASideEffectOpcode(expr, -1) instanceof WriteSideEffectOpcode
|
||||
}
|
||||
|
||||
override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType t) {
|
||||
tag instanceof OnlyInstructionTag and
|
||||
t = getTypeForPRValue(expr.getTarget().getDeclaringType()) and
|
||||
opcode = getASideEffectOpcode(expr, -1).(WriteSideEffectOpcode)
|
||||
}
|
||||
|
||||
override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) {
|
||||
(
|
||||
if exists(getChild(0))
|
||||
then result = getChild(0).getFirstInstruction()
|
||||
else result = getParent().getChildSuccessor(this)
|
||||
) and
|
||||
tag = OnlyInstructionTag() and
|
||||
kind instanceof GotoEdge
|
||||
}
|
||||
|
||||
override Instruction getFirstInstruction() { result = getInstruction(OnlyInstructionTag()) }
|
||||
|
||||
override Instruction getInstructionRegisterOperand(InstructionTag tag, OperandTag operandTag) {
|
||||
tag instanceof OnlyInstructionTag and
|
||||
operandTag instanceof AddressOperandTag and
|
||||
result = getParent().(TranslatedStructorCall).getQualifierResult()
|
||||
}
|
||||
|
||||
final override int getInstructionIndex(InstructionTag tag) {
|
||||
tag = OnlyInstructionTag() and
|
||||
result = -1
|
||||
}
|
||||
}
|
||||
|
||||
class TranslatedSideEffect extends TranslatedElement, TTranslatedArgumentSideEffect {
|
||||
Call call;
|
||||
Expr arg;
|
||||
int index;
|
||||
SideEffectOpcode sideEffectOpcode;
|
||||
|
||||
TranslatedSideEffect() {
|
||||
this = TTranslatedArgumentSideEffect(call, arg, index, sideEffectOpcode)
|
||||
}
|
||||
|
||||
override Locatable getAST() { result = arg }
|
||||
|
||||
Expr getExpr() { result = arg }
|
||||
|
||||
Call getCall() { result = call }
|
||||
|
||||
int getArgumentIndex() { result = index }
|
||||
|
||||
predicate isWrite() { sideEffectOpcode instanceof WriteSideEffectOpcode }
|
||||
|
||||
override string toString() {
|
||||
isWrite() and
|
||||
result = "(write side effect for " + arg.toString() + ")"
|
||||
final override Instruction getPrimaryInstruction() {
|
||||
expr instanceof Call and result = getTranslatedCallInstruction(expr)
|
||||
or
|
||||
not isWrite() and
|
||||
result = "(read side effect for " + arg.toString() + ")"
|
||||
expr instanceof NewOrNewArrayExpr and
|
||||
result = getTranslatedAllocatorCall(expr).getInstruction(CallTag())
|
||||
}
|
||||
}
|
||||
|
||||
override TranslatedElement getChild(int n) { none() }
|
||||
/** Returns the sort group index for argument read side effects. */
|
||||
private int argumentReadGroup() { result = 1 }
|
||||
|
||||
override Instruction getChildSuccessor(TranslatedElement child) { none() }
|
||||
/** Returns the sort group index for conservative call side effects. */
|
||||
private int callSideEffectGroup() {
|
||||
result = 0 // Make this group first for now to preserve the existing ordering
|
||||
}
|
||||
|
||||
override Instruction getFirstInstruction() { result = getInstruction(OnlyInstructionTag()) }
|
||||
/** Returns the sort group index for argument write side effects. */
|
||||
private int argumentWriteGroup() { result = 2 }
|
||||
|
||||
override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType type) {
|
||||
/** Returns the sort group index for dynamic allocation side effects. */
|
||||
private int initializeAllocationGroup() { result = 3 }
|
||||
|
||||
/**
|
||||
* The IR translation of a single side effect of a call.
|
||||
*/
|
||||
abstract class TranslatedSideEffect extends TranslatedElement {
|
||||
final override TranslatedElement getChild(int n) { none() }
|
||||
|
||||
final override Instruction getChildSuccessor(TranslatedElement child) { none() }
|
||||
|
||||
final override Instruction getFirstInstruction() { result = getInstruction(OnlyInstructionTag()) }
|
||||
|
||||
final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType type) {
|
||||
tag = OnlyInstructionTag() and
|
||||
opcode = sideEffectOpcode and
|
||||
(
|
||||
isWrite() and
|
||||
(
|
||||
opcode instanceof BufferAccessOpcode and
|
||||
type = getUnknownType()
|
||||
or
|
||||
not opcode instanceof BufferAccessOpcode and
|
||||
exists(Type baseType | baseType = arg.getUnspecifiedType().(DerivedType).getBaseType() |
|
||||
if baseType instanceof VoidType
|
||||
then type = getUnknownType()
|
||||
else type = getTypeForPRValueOrUnknown(baseType)
|
||||
)
|
||||
or
|
||||
index = -1 and
|
||||
not arg.getUnspecifiedType() instanceof DerivedType and
|
||||
type = getTypeForPRValueOrUnknown(arg.getUnspecifiedType())
|
||||
)
|
||||
or
|
||||
not isWrite() and
|
||||
type = getVoidType()
|
||||
)
|
||||
sideEffectInstruction(opcode, type)
|
||||
}
|
||||
|
||||
override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) {
|
||||
final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) {
|
||||
result = getParent().getChildSuccessor(this) and
|
||||
tag = OnlyInstructionTag() and
|
||||
kind instanceof GotoEdge
|
||||
}
|
||||
|
||||
override Instruction getInstructionRegisterOperand(InstructionTag tag, OperandTag operandTag) {
|
||||
tag instanceof OnlyInstructionTag and
|
||||
operandTag instanceof AddressOperandTag and
|
||||
result = getTranslatedExpr(arg).getResult()
|
||||
or
|
||||
tag instanceof OnlyInstructionTag and
|
||||
operandTag instanceof BufferSizeOperandTag and
|
||||
result =
|
||||
getTranslatedExpr(call.getArgument(call.getTarget()
|
||||
.(SideEffectFunction)
|
||||
.getParameterSizeIndex(index)).getFullyConverted()).getResult()
|
||||
}
|
||||
final override Function getFunction() { result = getParent().getFunction() }
|
||||
|
||||
override CppType getInstructionMemoryOperandType(InstructionTag tag, TypedOperandTag operandTag) {
|
||||
not isWrite() and
|
||||
if sideEffectOpcode instanceof BufferAccessOpcode
|
||||
then
|
||||
result = getUnknownType() and
|
||||
tag instanceof OnlyInstructionTag and
|
||||
operandTag instanceof SideEffectOperandTag
|
||||
else
|
||||
exists(Type operandType |
|
||||
tag instanceof OnlyInstructionTag and
|
||||
operandType = arg.getType().getUnspecifiedType().(DerivedType).getBaseType() and
|
||||
operandTag instanceof SideEffectOperandTag
|
||||
or
|
||||
tag instanceof OnlyInstructionTag and
|
||||
operandType = arg.getType().getUnspecifiedType() and
|
||||
not operandType instanceof DerivedType and
|
||||
operandTag instanceof SideEffectOperandTag
|
||||
|
|
||||
// If the type we select is an incomplete type (e.g. a forward-declared `struct`), there will
|
||||
// not be a `CppType` that represents that type. In that case, fall back to `UnknownCppType`.
|
||||
result = getTypeForPRValueOrUnknown(operandType)
|
||||
)
|
||||
}
|
||||
|
||||
override Instruction getPrimaryInstructionForSideEffect(InstructionTag tag) {
|
||||
final override Instruction getPrimaryInstructionForSideEffect(InstructionTag tag) {
|
||||
tag = OnlyInstructionTag() and
|
||||
result = getTranslatedCallInstruction(call)
|
||||
result = getParent().(TranslatedSideEffects).getPrimaryInstruction()
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the expression that caused this side effect.
|
||||
*
|
||||
* All side effects with the same `getPrimaryExpr()` will appear in the same contiguous sequence
|
||||
* in the IR.
|
||||
*/
|
||||
abstract Expr getPrimaryExpr();
|
||||
|
||||
/**
|
||||
* Gets the order in which this side effect should be sorted with respect to other side effects
|
||||
* for the same expression.
|
||||
*
|
||||
* Side effects are sorted first by `group`, and then by `indexInGroup`.
|
||||
*/
|
||||
abstract predicate sortOrder(int group, int indexInGroup);
|
||||
|
||||
/**
|
||||
* Gets the opcode and result type for the side effect instruction.
|
||||
*/
|
||||
abstract predicate sideEffectInstruction(Opcode opcode, CppType type);
|
||||
}
|
||||
|
||||
/**
|
||||
* The IR translation of a single argument side effect for a call.
|
||||
*/
|
||||
abstract class TranslatedArgumentSideEffect extends TranslatedSideEffect {
|
||||
Call call;
|
||||
int index;
|
||||
SideEffectOpcode sideEffectOpcode;
|
||||
|
||||
// All subclass charpreds must bind the `index` field.
|
||||
bindingset[index]
|
||||
TranslatedArgumentSideEffect() { any() }
|
||||
|
||||
override string toString() {
|
||||
isWrite() and
|
||||
result = "(write side effect for " + getArgString() + ")"
|
||||
or
|
||||
not isWrite() and
|
||||
result = "(read side effect for " + getArgString() + ")"
|
||||
}
|
||||
|
||||
override Call getPrimaryExpr() { result = call }
|
||||
|
||||
override predicate sortOrder(int group, int indexInGroup) {
|
||||
indexInGroup = index and
|
||||
if isWrite() then group = argumentWriteGroup() else group = argumentReadGroup()
|
||||
}
|
||||
|
||||
final override int getInstructionIndex(InstructionTag tag) {
|
||||
@@ -577,11 +437,199 @@ class TranslatedSideEffect extends TranslatedElement, TTranslatedArgumentSideEff
|
||||
* Gets the `TranslatedFunction` containing this expression.
|
||||
*/
|
||||
final TranslatedFunction getEnclosingFunction() {
|
||||
result = getTranslatedFunction(arg.getEnclosingFunction())
|
||||
result = getTranslatedFunction(call.getEnclosingFunction())
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `Function` containing this expression.
|
||||
*/
|
||||
override Function getFunction() { result = arg.getEnclosingFunction() }
|
||||
final override predicate sideEffectInstruction(Opcode opcode, CppType type) {
|
||||
opcode = sideEffectOpcode and
|
||||
(
|
||||
isWrite() and
|
||||
(
|
||||
opcode instanceof BufferAccessOpcode and
|
||||
type = getUnknownType()
|
||||
or
|
||||
not opcode instanceof BufferAccessOpcode and
|
||||
exists(Type indirectionType | indirectionType = getIndirectionType() |
|
||||
if indirectionType instanceof VoidType
|
||||
then type = getUnknownType()
|
||||
else type = getTypeForPRValueOrUnknown(indirectionType)
|
||||
)
|
||||
)
|
||||
or
|
||||
not isWrite() and
|
||||
type = getVoidType()
|
||||
)
|
||||
}
|
||||
|
||||
final override CppType getInstructionMemoryOperandType(
|
||||
InstructionTag tag, TypedOperandTag operandTag
|
||||
) {
|
||||
not isWrite() and
|
||||
if sideEffectOpcode instanceof BufferAccessOpcode
|
||||
then
|
||||
result = getUnknownType() and
|
||||
tag instanceof OnlyInstructionTag and
|
||||
operandTag instanceof SideEffectOperandTag
|
||||
else
|
||||
exists(Type operandType |
|
||||
tag instanceof OnlyInstructionTag and
|
||||
operandType = getIndirectionType() and
|
||||
operandTag instanceof SideEffectOperandTag
|
||||
|
|
||||
// If the type we select is an incomplete type (e.g. a forward-declared `struct`), there will
|
||||
// not be a `CppType` that represents that type. In that case, fall back to `UnknownCppType`.
|
||||
result = getTypeForPRValueOrUnknown(operandType)
|
||||
)
|
||||
}
|
||||
|
||||
final override Instruction getInstructionRegisterOperand(InstructionTag tag, OperandTag operandTag) {
|
||||
tag instanceof OnlyInstructionTag and
|
||||
operandTag instanceof AddressOperandTag and
|
||||
result = getArgInstruction()
|
||||
or
|
||||
tag instanceof OnlyInstructionTag and
|
||||
operandTag instanceof BufferSizeOperandTag and
|
||||
result =
|
||||
getTranslatedExpr(call.getArgument(call.getTarget()
|
||||
.(SideEffectFunction)
|
||||
.getParameterSizeIndex(index)).getFullyConverted()).getResult()
|
||||
}
|
||||
|
||||
/** Holds if this side effect is a write side effect, rather than a read side effect. */
|
||||
final predicate isWrite() { sideEffectOpcode instanceof WriteSideEffectOpcode }
|
||||
|
||||
/** Gets a text representation of the argument. */
|
||||
abstract string getArgString();
|
||||
|
||||
/** Gets the `Instruction` whose result is the value of the argument. */
|
||||
abstract Instruction getArgInstruction();
|
||||
|
||||
/** Gets the type pointed to by the argument. */
|
||||
abstract Type getIndirectionType();
|
||||
}
|
||||
|
||||
/**
|
||||
* The IR translation of an argument side effect where the argument has an `Expr` object in the AST.
|
||||
*
|
||||
* This generally applies to all positional arguments, as well as qualifier (`this`) arguments for
|
||||
* calls other than constructor calls.
|
||||
*/
|
||||
class TranslatedArgumentExprSideEffect extends TranslatedArgumentSideEffect,
|
||||
TTranslatedArgumentExprSideEffect {
|
||||
Expr arg;
|
||||
|
||||
TranslatedArgumentExprSideEffect() {
|
||||
this = TTranslatedArgumentExprSideEffect(call, arg, index, sideEffectOpcode)
|
||||
}
|
||||
|
||||
final override Locatable getAST() { result = arg }
|
||||
|
||||
final override Type getIndirectionType() {
|
||||
result = arg.getUnspecifiedType().(DerivedType).getBaseType()
|
||||
or
|
||||
// Sometimes the qualifier type gets the type of the class itself, rather than a pointer to the
|
||||
// class.
|
||||
index = -1 and
|
||||
not arg.getUnspecifiedType() instanceof DerivedType and
|
||||
result = arg.getUnspecifiedType()
|
||||
}
|
||||
|
||||
final override string getArgString() { result = arg.toString() }
|
||||
|
||||
final override Instruction getArgInstruction() { result = getTranslatedExpr(arg).getResult() }
|
||||
}
|
||||
|
||||
/**
|
||||
* The IR translation of an argument side effect for `*this` on a call, where there is no `Expr`
|
||||
* object that represents the `this` argument.
|
||||
*
|
||||
* The applies only to constructor calls, as the AST has explioit qualifier `Expr`s for all other
|
||||
* calls to non-static member functions.
|
||||
*/
|
||||
class TranslatedStructorQualifierSideEffect extends TranslatedArgumentSideEffect,
|
||||
TTranslatedStructorQualifierSideEffect {
|
||||
TranslatedStructorQualifierSideEffect() {
|
||||
this = TTranslatedStructorQualifierSideEffect(call, sideEffectOpcode) and
|
||||
index = -1
|
||||
}
|
||||
|
||||
final override Locatable getAST() { result = call }
|
||||
|
||||
final override Type getIndirectionType() { result = call.getTarget().getDeclaringType() }
|
||||
|
||||
final override string getArgString() { result = "this" }
|
||||
|
||||
final override Instruction getArgInstruction() {
|
||||
exists(TranslatedStructorCall structorCall |
|
||||
structorCall.getExpr() = call and
|
||||
result = structorCall.getQualifierResult()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/** The IR translation of the non-argument-specific side effect of a call. */
|
||||
class TranslatedCallSideEffect extends TranslatedSideEffect, TTranslatedCallSideEffect {
|
||||
Expr expr;
|
||||
SideEffectOpcode sideEffectOpcode;
|
||||
|
||||
TranslatedCallSideEffect() { this = TTranslatedCallSideEffect(expr, sideEffectOpcode) }
|
||||
|
||||
override Locatable getAST() { result = expr }
|
||||
|
||||
override Expr getPrimaryExpr() { result = expr }
|
||||
|
||||
override predicate sortOrder(int group, int indexInGroup) {
|
||||
group = callSideEffectGroup() and indexInGroup = 0
|
||||
}
|
||||
|
||||
override string toString() { result = "(call side effect for '" + expr.toString() + "')" }
|
||||
|
||||
override predicate sideEffectInstruction(Opcode opcode, CppType type) {
|
||||
opcode = sideEffectOpcode and
|
||||
(
|
||||
opcode instanceof Opcode::CallSideEffect and
|
||||
type = getUnknownType()
|
||||
or
|
||||
opcode instanceof Opcode::CallReadSideEffect and
|
||||
type = getVoidType()
|
||||
)
|
||||
}
|
||||
|
||||
override CppType getInstructionMemoryOperandType(InstructionTag tag, TypedOperandTag operandTag) {
|
||||
tag instanceof OnlyInstructionTag and
|
||||
operandTag instanceof SideEffectOperandTag and
|
||||
result = getUnknownType()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The IR translation of the allocation side effect of a call to a memory allocation function.
|
||||
*
|
||||
* This side effect provides a definition for the newly-allocated memory.
|
||||
*/
|
||||
class TranslatedAllocationSideEffect extends TranslatedSideEffect, TTranslatedAllocationSideEffect {
|
||||
AllocationExpr expr;
|
||||
|
||||
TranslatedAllocationSideEffect() { this = TTranslatedAllocationSideEffect(expr) }
|
||||
|
||||
override Locatable getAST() { result = expr }
|
||||
|
||||
override Expr getPrimaryExpr() { result = expr }
|
||||
|
||||
override predicate sortOrder(int group, int indexInGroup) {
|
||||
group = initializeAllocationGroup() and indexInGroup = 0
|
||||
}
|
||||
|
||||
override string toString() { result = "(allocation side effect for '" + expr.toString() + "')" }
|
||||
|
||||
override Instruction getInstructionRegisterOperand(InstructionTag tag, OperandTag operandTag) {
|
||||
tag = OnlyInstructionTag() and
|
||||
operandTag = addressOperand() and
|
||||
result = getPrimaryInstructionForSideEffect(OnlyInstructionTag())
|
||||
}
|
||||
|
||||
override predicate sideEffectInstruction(Opcode opcode, CppType type) {
|
||||
opcode instanceof Opcode::InitializeDynamicAllocation and
|
||||
type = getUnknownType()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,6 +135,20 @@ private predicate ignoreExpr(Expr expr) {
|
||||
ignoreExprAndDescendants(expr)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if the side effects of `expr` should be ignoredf for the purposes of IR generation.
|
||||
*
|
||||
* In cases involving `constexpr`, a call can wind up as a constant expression. `ignoreExpr()` will
|
||||
* not hold for such a call, since we do need to translate the call (as a constant), but we need to
|
||||
* ignore all of the side effects of that call, since we will not actually be generating a `Call`
|
||||
* instruction.
|
||||
*/
|
||||
private predicate ignoreSideEffects(Expr expr) {
|
||||
ignoreExpr(expr)
|
||||
or
|
||||
isIRConstant(expr)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `func` contains an AST that cannot be translated into IR. This is mostly used to work
|
||||
* around extractor bugs. Once the relevant extractor bugs are fixed, this predicate can be removed.
|
||||
@@ -621,32 +635,34 @@ newtype TTranslatedElement =
|
||||
// The declaration/initialization part of a `ConditionDeclExpr`
|
||||
TTranslatedConditionDecl(ConditionDeclExpr expr) { not ignoreExpr(expr) } or
|
||||
// The side effects of a `Call`
|
||||
TTranslatedCallSideEffects(Call expr) {
|
||||
// Exclude allocations such as `malloc` (which happen to also be function calls).
|
||||
// Both `TranslatedCallSideEffects` and `TranslatedAllocationSideEffects` generate
|
||||
// the same side effects for its children as they both extend the `TranslatedSideEffects`
|
||||
// class.
|
||||
// Note: We can separate allocation side effects and call side effects into two
|
||||
// translated elements as no call can be both a `ConstructorCall` and an `AllocationExpr`.
|
||||
not expr instanceof AllocationExpr and
|
||||
(
|
||||
exists(TTranslatedArgumentSideEffect(expr, _, _, _)) or
|
||||
expr instanceof ConstructorCall
|
||||
)
|
||||
TTranslatedCallSideEffects(CallOrAllocationExpr expr) { not ignoreSideEffects(expr) } or
|
||||
// The non-argument-specific side effect of a `Call`
|
||||
TTranslatedCallSideEffect(Expr expr, SideEffectOpcode opcode) {
|
||||
not ignoreSideEffects(expr) and
|
||||
opcode = getCallSideEffectOpcode(expr)
|
||||
} or
|
||||
// The side effects of an allocation, i.e. `new`, `new[]` or `malloc`
|
||||
TTranslatedAllocationSideEffects(AllocationExpr expr) { not ignoreExpr(expr) } or
|
||||
// A precise side effect of an argument to a `Call`
|
||||
TTranslatedArgumentSideEffect(Call call, Expr expr, int n, SideEffectOpcode opcode) {
|
||||
TTranslatedArgumentExprSideEffect(Call call, Expr expr, int n, SideEffectOpcode opcode) {
|
||||
not ignoreExpr(expr) and
|
||||
not ignoreExpr(call) and
|
||||
not ignoreSideEffects(call) and
|
||||
(
|
||||
n >= 0 and expr = call.getArgument(n).getFullyConverted()
|
||||
or
|
||||
n = -1 and expr = call.getQualifier().getFullyConverted()
|
||||
) and
|
||||
opcode = getASideEffectOpcode(call, n)
|
||||
}
|
||||
} or
|
||||
// Constructor calls lack a qualifier (`this`) expression, so we need to handle the side effects
|
||||
// on `*this` without an `Expr`.
|
||||
TTranslatedStructorQualifierSideEffect(Call call, SideEffectOpcode opcode) {
|
||||
not ignoreSideEffects(call) and
|
||||
// Don't bother with destructor calls for now, since we won't see very many of them in the IR
|
||||
// until we start injecting implicit destructor calls.
|
||||
call instanceof ConstructorCall and
|
||||
opcode = getASideEffectOpcode(call, -1)
|
||||
} or
|
||||
// The side effect that initializes newly-allocated memory.
|
||||
TTranslatedAllocationSideEffect(AllocationExpr expr) { not ignoreSideEffects(expr) }
|
||||
|
||||
/**
|
||||
* Gets the index of the first explicitly initialized element in `initList`
|
||||
|
||||
@@ -2665,7 +2665,7 @@
|
||||
| ir.cpp:617:15:617:21 | Unary | r617_4 |
|
||||
| ir.cpp:617:15:617:22 | CallTarget | func:r617_3 |
|
||||
| ir.cpp:617:15:617:22 | ChiPartial | partial:m617_7 |
|
||||
| ir.cpp:617:15:617:22 | ChiPartial | partial:m617_9 |
|
||||
| ir.cpp:617:15:617:22 | ChiPartial | partial:m617_10 |
|
||||
| ir.cpp:617:15:617:22 | ChiTotal | total:m616_6 |
|
||||
| ir.cpp:617:15:617:22 | ChiTotal | total:m617_2 |
|
||||
| ir.cpp:617:15:617:22 | SideEffect | ~m616_6 |
|
||||
@@ -2680,7 +2680,7 @@
|
||||
| ir.cpp:619:12:619:13 | Arg(this) | this:r619_1 |
|
||||
| ir.cpp:619:16:619:30 | CallTarget | func:r619_3 |
|
||||
| ir.cpp:619:16:619:30 | ChiPartial | partial:m619_7 |
|
||||
| ir.cpp:619:16:619:30 | ChiPartial | partial:m619_9 |
|
||||
| ir.cpp:619:16:619:30 | ChiPartial | partial:m619_10 |
|
||||
| ir.cpp:619:16:619:30 | ChiTotal | total:m618_5 |
|
||||
| ir.cpp:619:16:619:30 | ChiTotal | total:m619_2 |
|
||||
| ir.cpp:619:16:619:30 | SideEffect | ~m618_5 |
|
||||
@@ -2906,7 +2906,7 @@
|
||||
| ir.cpp:658:5:658:5 | ChiPartial | partial:m658_3 |
|
||||
| ir.cpp:658:5:658:5 | ChiTotal | total:m658_2 |
|
||||
| ir.cpp:658:5:658:5 | Load | m658_6 |
|
||||
| ir.cpp:658:5:658:5 | SideEffect | m662_9 |
|
||||
| ir.cpp:658:5:658:5 | SideEffect | m662_10 |
|
||||
| ir.cpp:658:5:658:5 | SideEffect | ~m662_7 |
|
||||
| ir.cpp:658:5:658:5 | Unary | m658_6 |
|
||||
| ir.cpp:658:5:658:5 | Unary | m658_6 |
|
||||
@@ -2929,7 +2929,7 @@
|
||||
| ir.cpp:662:9:662:19 | Arg(this) | this:r662_1 |
|
||||
| ir.cpp:662:9:662:19 | CallTarget | func:r662_2 |
|
||||
| ir.cpp:662:9:662:19 | ChiPartial | partial:m662_6 |
|
||||
| ir.cpp:662:9:662:19 | ChiPartial | partial:m662_8 |
|
||||
| ir.cpp:662:9:662:19 | ChiPartial | partial:m662_9 |
|
||||
| ir.cpp:662:9:662:19 | ChiTotal | total:m661_4 |
|
||||
| ir.cpp:662:9:662:19 | ChiTotal | total:m663_5 |
|
||||
| ir.cpp:662:9:662:19 | SideEffect | ~m663_5 |
|
||||
@@ -3147,10 +3147,10 @@
|
||||
| ir.cpp:736:5:736:19 | Arg(this) | this:r736_1 |
|
||||
| ir.cpp:736:5:736:19 | CallTarget | func:r736_3 |
|
||||
| ir.cpp:736:5:736:19 | ChiPartial | partial:m736_7 |
|
||||
| ir.cpp:736:5:736:19 | ChiPartial | partial:m736_9 |
|
||||
| ir.cpp:736:5:736:19 | ChiPartial | partial:m736_10 |
|
||||
| ir.cpp:736:5:736:19 | ChiTotal | total:m724_4 |
|
||||
| ir.cpp:736:5:736:19 | ChiTotal | total:m736_2 |
|
||||
| ir.cpp:736:5:736:19 | Load | m736_10 |
|
||||
| ir.cpp:736:5:736:19 | Load | m736_11 |
|
||||
| ir.cpp:736:5:736:19 | SideEffect | ~m724_4 |
|
||||
| ir.cpp:736:18:736:18 | Address | &:r736_4 |
|
||||
| ir.cpp:736:18:736:18 | Address | &:r736_5 |
|
||||
@@ -3673,11 +3673,11 @@
|
||||
| ir.cpp:809:7:809:13 | Arg(this) | this:r809_3 |
|
||||
| ir.cpp:809:7:809:13 | CallTarget | func:r809_5 |
|
||||
| ir.cpp:809:7:809:13 | ChiPartial | partial:m809_10 |
|
||||
| ir.cpp:809:7:809:13 | ChiPartial | partial:m809_12 |
|
||||
| ir.cpp:809:7:809:13 | ChiPartial | partial:m809_13 |
|
||||
| ir.cpp:809:7:809:13 | ChiTotal | total:m808_8 |
|
||||
| ir.cpp:809:7:809:13 | ChiTotal | total:m809_4 |
|
||||
| ir.cpp:809:7:809:13 | SideEffect | ~m808_8 |
|
||||
| ir.cpp:809:7:809:13 | SideEffect | ~m809_13 |
|
||||
| ir.cpp:809:7:809:13 | SideEffect | ~m809_14 |
|
||||
| ir.cpp:809:7:809:13 | Unary | r809_3 |
|
||||
| ir.cpp:809:7:809:13 | Unary | r809_15 |
|
||||
| ir.cpp:809:13:809:13 | Address | &:r809_8 |
|
||||
@@ -3703,11 +3703,11 @@
|
||||
| ir.cpp:810:7:810:26 | Arg(this) | this:r810_3 |
|
||||
| ir.cpp:810:7:810:26 | CallTarget | func:r810_5 |
|
||||
| ir.cpp:810:7:810:26 | ChiPartial | partial:m810_10 |
|
||||
| ir.cpp:810:7:810:26 | ChiPartial | partial:m810_12 |
|
||||
| ir.cpp:810:7:810:26 | ChiPartial | partial:m810_13 |
|
||||
| ir.cpp:810:7:810:26 | ChiTotal | total:m809_19 |
|
||||
| ir.cpp:810:7:810:26 | ChiTotal | total:m810_4 |
|
||||
| ir.cpp:810:7:810:26 | SideEffect | ~m809_19 |
|
||||
| ir.cpp:810:7:810:26 | SideEffect | ~m810_13 |
|
||||
| ir.cpp:810:7:810:26 | SideEffect | ~m810_14 |
|
||||
| ir.cpp:810:7:810:26 | Unary | r810_3 |
|
||||
| ir.cpp:810:7:810:26 | Unary | r810_15 |
|
||||
| ir.cpp:810:25:810:25 | Address | &:r810_8 |
|
||||
@@ -3819,11 +3819,11 @@
|
||||
| ir.cpp:823:7:823:13 | Arg(this) | this:r823_3 |
|
||||
| ir.cpp:823:7:823:13 | CallTarget | func:r823_5 |
|
||||
| ir.cpp:823:7:823:13 | ChiPartial | partial:m823_11 |
|
||||
| ir.cpp:823:7:823:13 | ChiPartial | partial:m823_13 |
|
||||
| ir.cpp:823:7:823:13 | ChiPartial | partial:m823_14 |
|
||||
| ir.cpp:823:7:823:13 | ChiTotal | total:m822_9 |
|
||||
| ir.cpp:823:7:823:13 | ChiTotal | total:m823_4 |
|
||||
| ir.cpp:823:7:823:13 | SideEffect | ~m822_9 |
|
||||
| ir.cpp:823:7:823:13 | SideEffect | ~m823_14 |
|
||||
| ir.cpp:823:7:823:13 | SideEffect | ~m823_15 |
|
||||
| ir.cpp:823:7:823:13 | Unary | r823_3 |
|
||||
| ir.cpp:823:7:823:13 | Unary | r823_16 |
|
||||
| ir.cpp:823:13:823:13 | Address | &:r823_9 |
|
||||
@@ -3850,11 +3850,11 @@
|
||||
| ir.cpp:824:7:824:26 | Arg(this) | this:r824_3 |
|
||||
| ir.cpp:824:7:824:26 | CallTarget | func:r824_5 |
|
||||
| ir.cpp:824:7:824:26 | ChiPartial | partial:m824_11 |
|
||||
| ir.cpp:824:7:824:26 | ChiPartial | partial:m824_13 |
|
||||
| ir.cpp:824:7:824:26 | ChiPartial | partial:m824_14 |
|
||||
| ir.cpp:824:7:824:26 | ChiTotal | total:m823_20 |
|
||||
| ir.cpp:824:7:824:26 | ChiTotal | total:m824_4 |
|
||||
| ir.cpp:824:7:824:26 | SideEffect | ~m823_20 |
|
||||
| ir.cpp:824:7:824:26 | SideEffect | ~m824_14 |
|
||||
| ir.cpp:824:7:824:26 | SideEffect | ~m824_15 |
|
||||
| ir.cpp:824:7:824:26 | Unary | r824_3 |
|
||||
| ir.cpp:824:7:824:26 | Unary | r824_16 |
|
||||
| ir.cpp:824:25:824:25 | Address | &:r824_9 |
|
||||
@@ -4059,11 +4059,11 @@
|
||||
| ir.cpp:867:1:867:14 | ChiPartial | partial:m867_3 |
|
||||
| ir.cpp:867:1:867:14 | ChiTotal | total:m867_2 |
|
||||
| ir.cpp:867:1:867:14 | Load | m867_6 |
|
||||
| ir.cpp:867:1:867:14 | SideEffect | m868_8 |
|
||||
| ir.cpp:867:1:867:14 | SideEffect | m868_9 |
|
||||
| ir.cpp:867:1:867:14 | SideEffect | ~m868_6 |
|
||||
| ir.cpp:868:3:868:12 | CallTarget | func:r868_1 |
|
||||
| ir.cpp:868:3:868:12 | ChiPartial | partial:m868_5 |
|
||||
| ir.cpp:868:3:868:12 | ChiPartial | partial:m868_7 |
|
||||
| ir.cpp:868:3:868:12 | ChiPartial | partial:m868_8 |
|
||||
| ir.cpp:868:3:868:12 | ChiTotal | total:m867_4 |
|
||||
| ir.cpp:868:3:868:12 | ChiTotal | total:m867_8 |
|
||||
| ir.cpp:868:3:868:12 | SideEffect | ~m867_4 |
|
||||
@@ -4310,7 +4310,7 @@
|
||||
| ir.cpp:954:3:954:27 | CallTarget | func:r954_9 |
|
||||
| ir.cpp:954:3:954:27 | ChiPartial | partial:m954_5 |
|
||||
| ir.cpp:954:3:954:27 | ChiPartial | partial:m954_13 |
|
||||
| ir.cpp:954:3:954:27 | ChiPartial | partial:m954_15 |
|
||||
| ir.cpp:954:3:954:27 | ChiPartial | partial:m954_16 |
|
||||
| ir.cpp:954:3:954:27 | ChiTotal | total:m953_11 |
|
||||
| ir.cpp:954:3:954:27 | ChiTotal | total:m954_6 |
|
||||
| ir.cpp:954:3:954:27 | ChiTotal | total:m954_7 |
|
||||
@@ -5386,10 +5386,10 @@
|
||||
| ir.cpp:1154:5:1154:19 | Arg(this) | this:r1154_1 |
|
||||
| ir.cpp:1154:5:1154:19 | CallTarget | func:r1154_3 |
|
||||
| ir.cpp:1154:5:1154:19 | ChiPartial | partial:m1154_7 |
|
||||
| ir.cpp:1154:5:1154:19 | ChiPartial | partial:m1154_9 |
|
||||
| ir.cpp:1154:5:1154:19 | ChiPartial | partial:m1154_10 |
|
||||
| ir.cpp:1154:5:1154:19 | ChiTotal | total:m1142_4 |
|
||||
| ir.cpp:1154:5:1154:19 | ChiTotal | total:m1154_2 |
|
||||
| ir.cpp:1154:5:1154:19 | Load | m1154_10 |
|
||||
| ir.cpp:1154:5:1154:19 | Load | m1154_11 |
|
||||
| ir.cpp:1154:5:1154:19 | SideEffect | ~m1142_4 |
|
||||
| ir.cpp:1154:18:1154:18 | Address | &:r1154_4 |
|
||||
| ir.cpp:1154:18:1154:18 | Address | &:r1154_5 |
|
||||
@@ -5496,14 +5496,14 @@
|
||||
| ir.cpp:1178:8:1178:23 | Address | &:r1178_5 |
|
||||
| ir.cpp:1178:8:1178:23 | ChiPartial | partial:m1178_3 |
|
||||
| ir.cpp:1178:8:1178:23 | ChiTotal | total:m1178_2 |
|
||||
| ir.cpp:1178:8:1178:23 | Load | m1179_10 |
|
||||
| ir.cpp:1178:8:1178:23 | Load | m1179_11 |
|
||||
| ir.cpp:1178:8:1178:23 | SideEffect | ~m1179_8 |
|
||||
| ir.cpp:1179:3:1179:23 | Address | &:r1179_1 |
|
||||
| ir.cpp:1179:3:1179:23 | Address | &:r1179_1 |
|
||||
| ir.cpp:1179:3:1179:23 | Arg(this) | this:r1179_1 |
|
||||
| ir.cpp:1179:3:1179:23 | CallTarget | func:r1179_3 |
|
||||
| ir.cpp:1179:3:1179:23 | ChiPartial | partial:m1179_7 |
|
||||
| ir.cpp:1179:3:1179:23 | ChiPartial | partial:m1179_9 |
|
||||
| ir.cpp:1179:3:1179:23 | ChiPartial | partial:m1179_10 |
|
||||
| ir.cpp:1179:3:1179:23 | ChiTotal | total:m1178_4 |
|
||||
| ir.cpp:1179:3:1179:23 | ChiTotal | total:m1179_2 |
|
||||
| ir.cpp:1179:3:1179:23 | SideEffect | ~m1178_4 |
|
||||
@@ -5651,7 +5651,7 @@
|
||||
| ir.cpp:1242:19:1242:19 | Address | &:r1242_5 |
|
||||
| ir.cpp:1242:19:1242:19 | Arg(this) | this:r1242_5 |
|
||||
| ir.cpp:1242:19:1242:19 | ChiPartial | partial:m1242_16 |
|
||||
| ir.cpp:1242:19:1242:19 | ChiTotal | total:m1242_13 |
|
||||
| ir.cpp:1242:19:1242:19 | ChiTotal | total:m1242_14 |
|
||||
| ir.cpp:1242:19:1242:19 | Condition | r1242_3 |
|
||||
| ir.cpp:1242:19:1242:19 | Load | ~m1242_1 |
|
||||
| ir.cpp:1242:19:1242:19 | Phi | from 0:~m1240_4 |
|
||||
@@ -5659,7 +5659,7 @@
|
||||
| ir.cpp:1242:19:1242:19 | StoreValue | r1242_15 |
|
||||
| ir.cpp:1242:20:1242:29 | CallTarget | func:r1242_6 |
|
||||
| ir.cpp:1242:20:1242:29 | ChiPartial | partial:m1242_10 |
|
||||
| ir.cpp:1242:20:1242:29 | ChiPartial | partial:m1242_12 |
|
||||
| ir.cpp:1242:20:1242:29 | ChiPartial | partial:m1242_13 |
|
||||
| ir.cpp:1242:20:1242:29 | ChiTotal | total:m1242_1 |
|
||||
| ir.cpp:1242:20:1242:29 | ChiTotal | total:m1242_11 |
|
||||
| ir.cpp:1242:20:1242:29 | SideEffect | ~m1242_1 |
|
||||
@@ -5672,7 +5672,7 @@
|
||||
| ir.cpp:1243:19:1243:19 | Address | &:r1243_5 |
|
||||
| ir.cpp:1243:19:1243:19 | Arg(this) | this:r1243_5 |
|
||||
| ir.cpp:1243:19:1243:19 | ChiPartial | partial:m1243_16 |
|
||||
| ir.cpp:1243:19:1243:19 | ChiTotal | total:m1243_13 |
|
||||
| ir.cpp:1243:19:1243:19 | ChiTotal | total:m1243_14 |
|
||||
| ir.cpp:1243:19:1243:19 | Condition | r1243_3 |
|
||||
| ir.cpp:1243:19:1243:19 | Load | ~m1243_1 |
|
||||
| ir.cpp:1243:19:1243:19 | Phi | from 2:~m1242_1 |
|
||||
@@ -5680,7 +5680,7 @@
|
||||
| ir.cpp:1243:19:1243:19 | StoreValue | r1243_15 |
|
||||
| ir.cpp:1243:20:1243:28 | CallTarget | func:r1243_6 |
|
||||
| ir.cpp:1243:20:1243:28 | ChiPartial | partial:m1243_10 |
|
||||
| ir.cpp:1243:20:1243:28 | ChiPartial | partial:m1243_12 |
|
||||
| ir.cpp:1243:20:1243:28 | ChiPartial | partial:m1243_13 |
|
||||
| ir.cpp:1243:20:1243:28 | ChiTotal | total:m1243_1 |
|
||||
| ir.cpp:1243:20:1243:28 | ChiTotal | total:m1243_11 |
|
||||
| ir.cpp:1243:20:1243:28 | SideEffect | ~m1243_1 |
|
||||
@@ -6200,12 +6200,12 @@
|
||||
| ir.cpp:1370:23:1370:27 | Arg(this) | this:r1370_2 |
|
||||
| ir.cpp:1370:23:1370:27 | CallTarget | func:r1370_4 |
|
||||
| ir.cpp:1370:23:1370:27 | ChiPartial | partial:m1370_8 |
|
||||
| ir.cpp:1370:23:1370:27 | ChiPartial | partial:m1370_10 |
|
||||
| ir.cpp:1370:23:1370:27 | ChiPartial | partial:m1370_11 |
|
||||
| ir.cpp:1370:23:1370:27 | ChiTotal | total:m1369_7 |
|
||||
| ir.cpp:1370:23:1370:27 | ChiTotal | total:m1370_3 |
|
||||
| ir.cpp:1370:23:1370:27 | SideEffect | ~m1365_3 |
|
||||
| ir.cpp:1370:23:1370:27 | SideEffect | ~m1369_7 |
|
||||
| ir.cpp:1370:23:1370:27 | SideEffect | ~m1370_11 |
|
||||
| ir.cpp:1370:23:1370:27 | SideEffect | ~m1370_12 |
|
||||
| ir.cpp:1370:23:1370:27 | Unary | r1370_2 |
|
||||
| ir.cpp:1370:23:1370:27 | Unary | r1370_5 |
|
||||
| ir.cpp:1371:5:1371:15 | CallTarget | func:r1371_1 |
|
||||
@@ -6221,10 +6221,10 @@
|
||||
| ir.cpp:1371:17:1371:17 | Arg(this) | this:r1371_2 |
|
||||
| ir.cpp:1371:17:1371:17 | CallTarget | func:r1371_4 |
|
||||
| ir.cpp:1371:17:1371:17 | ChiPartial | partial:m1371_9 |
|
||||
| ir.cpp:1371:17:1371:17 | ChiPartial | partial:m1371_11 |
|
||||
| ir.cpp:1371:17:1371:17 | ChiPartial | partial:m1371_12 |
|
||||
| ir.cpp:1371:17:1371:17 | ChiTotal | total:m1370_16 |
|
||||
| ir.cpp:1371:17:1371:17 | ChiTotal | total:m1371_3 |
|
||||
| ir.cpp:1371:17:1371:17 | Load | m1371_12 |
|
||||
| ir.cpp:1371:17:1371:17 | Load | m1371_13 |
|
||||
| ir.cpp:1371:17:1371:17 | SideEffect | ~m1366_6 |
|
||||
| ir.cpp:1371:17:1371:17 | SideEffect | ~m1370_16 |
|
||||
| ir.cpp:1371:17:1371:17 | Unary | r1371_5 |
|
||||
@@ -6242,10 +6242,10 @@
|
||||
| ir.cpp:1372:25:1372:29 | Arg(this) | this:r1372_2 |
|
||||
| ir.cpp:1372:25:1372:29 | CallTarget | func:r1372_4 |
|
||||
| ir.cpp:1372:25:1372:29 | ChiPartial | partial:m1372_8 |
|
||||
| ir.cpp:1372:25:1372:29 | ChiPartial | partial:m1372_10 |
|
||||
| ir.cpp:1372:25:1372:29 | ChiPartial | partial:m1372_11 |
|
||||
| ir.cpp:1372:25:1372:29 | ChiTotal | total:m1371_17 |
|
||||
| ir.cpp:1372:25:1372:29 | ChiTotal | total:m1372_3 |
|
||||
| ir.cpp:1372:25:1372:29 | Load | m1372_11 |
|
||||
| ir.cpp:1372:25:1372:29 | Load | m1372_12 |
|
||||
| ir.cpp:1372:25:1372:29 | SideEffect | ~m1365_3 |
|
||||
| ir.cpp:1372:25:1372:29 | SideEffect | ~m1371_17 |
|
||||
| ir.cpp:1372:25:1372:29 | Unary | r1372_5 |
|
||||
@@ -6414,10 +6414,10 @@
|
||||
| ir.cpp:1396:17:1396:17 | Arg(this) | this:r1396_2 |
|
||||
| ir.cpp:1396:17:1396:17 | CallTarget | func:r1396_4 |
|
||||
| ir.cpp:1396:17:1396:17 | ChiPartial | partial:m1396_9 |
|
||||
| ir.cpp:1396:17:1396:17 | ChiPartial | partial:m1396_11 |
|
||||
| ir.cpp:1396:17:1396:17 | ChiPartial | partial:m1396_12 |
|
||||
| ir.cpp:1396:17:1396:17 | ChiTotal | total:m1395_7 |
|
||||
| ir.cpp:1396:17:1396:17 | ChiTotal | total:m1396_3 |
|
||||
| ir.cpp:1396:17:1396:17 | Load | m1396_12 |
|
||||
| ir.cpp:1396:17:1396:17 | Load | m1396_13 |
|
||||
| ir.cpp:1396:17:1396:17 | SideEffect | ~m1392_6 |
|
||||
| ir.cpp:1396:17:1396:17 | SideEffect | ~m1395_7 |
|
||||
| ir.cpp:1396:17:1396:17 | Unary | r1396_5 |
|
||||
@@ -6741,7 +6741,7 @@
|
||||
| smart_ptr.cpp:19:20:19:21 | ChiPartial | partial:m19_18 |
|
||||
| smart_ptr.cpp:19:20:19:21 | ChiTotal | total:m17_8 |
|
||||
| smart_ptr.cpp:19:20:19:21 | ChiTotal | total:m18_8 |
|
||||
| smart_ptr.cpp:19:20:19:21 | Load | m19_11 |
|
||||
| smart_ptr.cpp:19:20:19:21 | Load | m19_12 |
|
||||
| smart_ptr.cpp:19:20:19:21 | SideEffect | m18_9 |
|
||||
| smart_ptr.cpp:19:20:19:21 | SideEffect | ~m17_8 |
|
||||
| smart_ptr.cpp:19:20:19:21 | SideEffect | ~m18_8 |
|
||||
@@ -6766,7 +6766,7 @@
|
||||
| smart_ptr.cpp:31:26:31:37 | CallTarget | func:r31_4 |
|
||||
| smart_ptr.cpp:31:26:31:37 | ChiPartial | partial:m31_9 |
|
||||
| smart_ptr.cpp:31:26:31:37 | ChiTotal | total:m28_4 |
|
||||
| smart_ptr.cpp:31:26:31:37 | Load | m31_11 |
|
||||
| smart_ptr.cpp:31:26:31:37 | Load | m31_12 |
|
||||
| smart_ptr.cpp:31:26:31:37 | SideEffect | m29_2 |
|
||||
| smart_ptr.cpp:31:26:31:37 | SideEffect | ~m28_4 |
|
||||
| smart_ptr.cpp:31:26:31:37 | SideEffect | ~m31_16 |
|
||||
@@ -6791,7 +6791,7 @@
|
||||
| smart_ptr.cpp:35:30:35:49 | ChiPartial | partial:m35_18 |
|
||||
| smart_ptr.cpp:35:30:35:49 | ChiTotal | total:m31_16 |
|
||||
| smart_ptr.cpp:35:30:35:49 | ChiTotal | total:m35_16 |
|
||||
| smart_ptr.cpp:35:30:35:49 | Load | m35_11 |
|
||||
| smart_ptr.cpp:35:30:35:49 | Load | m35_12 |
|
||||
| smart_ptr.cpp:35:30:35:49 | SideEffect | m33_2 |
|
||||
| smart_ptr.cpp:35:30:35:49 | SideEffect | ~m31_16 |
|
||||
| smart_ptr.cpp:35:30:35:49 | SideEffect | ~m35_16 |
|
||||
@@ -6816,7 +6816,7 @@
|
||||
| smart_ptr.cpp:39:37:39:51 | ChiPartial | partial:m39_18 |
|
||||
| smart_ptr.cpp:39:37:39:51 | ChiTotal | total:m35_19 |
|
||||
| smart_ptr.cpp:39:37:39:51 | ChiTotal | total:m39_16 |
|
||||
| smart_ptr.cpp:39:37:39:51 | Load | m39_11 |
|
||||
| smart_ptr.cpp:39:37:39:51 | Load | m39_12 |
|
||||
| smart_ptr.cpp:39:37:39:51 | SideEffect | m37_2 |
|
||||
| smart_ptr.cpp:39:37:39:51 | SideEffect | ~m35_19 |
|
||||
| smart_ptr.cpp:39:37:39:51 | SideEffect | ~m39_16 |
|
||||
@@ -6841,7 +6841,7 @@
|
||||
| smart_ptr.cpp:43:37:43:51 | ChiPartial | partial:m43_18 |
|
||||
| smart_ptr.cpp:43:37:43:51 | ChiTotal | total:m39_19 |
|
||||
| smart_ptr.cpp:43:37:43:51 | ChiTotal | total:m43_16 |
|
||||
| smart_ptr.cpp:43:37:43:51 | Load | m43_11 |
|
||||
| smart_ptr.cpp:43:37:43:51 | Load | m43_12 |
|
||||
| smart_ptr.cpp:43:37:43:51 | SideEffect | m41_2 |
|
||||
| smart_ptr.cpp:43:37:43:51 | SideEffect | ~m39_19 |
|
||||
| smart_ptr.cpp:43:37:43:51 | SideEffect | ~m43_16 |
|
||||
@@ -6863,7 +6863,7 @@
|
||||
| smart_ptr.cpp:47:43:47:63 | CallTarget | func:r47_4 |
|
||||
| smart_ptr.cpp:47:43:47:63 | ChiPartial | partial:m47_9 |
|
||||
| smart_ptr.cpp:47:43:47:63 | ChiTotal | total:m43_19 |
|
||||
| smart_ptr.cpp:47:43:47:63 | Load | m47_11 |
|
||||
| smart_ptr.cpp:47:43:47:63 | Load | m47_12 |
|
||||
| smart_ptr.cpp:47:43:47:63 | SideEffect | m45_2 |
|
||||
| smart_ptr.cpp:47:43:47:63 | SideEffect | ~m43_19 |
|
||||
| smart_ptr.cpp:47:43:47:63 | SideEffect | ~m47_16 |
|
||||
|
||||
@@ -3362,8 +3362,8 @@ ir.cpp:
|
||||
# 617| r617_5(char *) = Convert : r617_4
|
||||
# 617| v617_6(void) = Call[String] : func:r617_3, this:r617_1, 0:r617_5
|
||||
# 617| mu617_7(unknown) = ^CallSideEffect : ~m?
|
||||
# 617| mu617_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r617_1
|
||||
# 617| v617_9(void) = ^BufferReadSideEffect[0] : &:r617_5, ~m?
|
||||
# 617| v617_8(void) = ^BufferReadSideEffect[0] : &:r617_5, ~m?
|
||||
# 617| mu617_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r617_1
|
||||
# 618| r618_1(glval<String>) = VariableAddress[s3] :
|
||||
# 618| r618_2(glval<unknown>) = FunctionAddress[ReturnObject] :
|
||||
# 618| r618_3(String) = Call[ReturnObject] : func:r618_2
|
||||
@@ -3376,8 +3376,8 @@ ir.cpp:
|
||||
# 619| r619_5(char *) = Convert : r619_4
|
||||
# 619| v619_6(void) = Call[String] : func:r619_3, this:r619_1, 0:r619_5
|
||||
# 619| mu619_7(unknown) = ^CallSideEffect : ~m?
|
||||
# 619| mu619_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r619_1
|
||||
# 619| v619_9(void) = ^BufferReadSideEffect[0] : &:r619_5, ~m?
|
||||
# 619| v619_8(void) = ^BufferReadSideEffect[0] : &:r619_5, ~m?
|
||||
# 619| mu619_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r619_1
|
||||
# 620| v620_1(void) = NoOp :
|
||||
# 615| v615_4(void) = ReturnVoid :
|
||||
# 615| v615_5(void) = AliasedUse : ~m?
|
||||
@@ -3628,8 +3628,8 @@ ir.cpp:
|
||||
# 662| r662_4(char *) = Convert : r662_3
|
||||
# 662| v662_5(void) = Call[String] : func:r662_2, this:r662_1, 0:r662_4
|
||||
# 662| mu662_6(unknown) = ^CallSideEffect : ~m?
|
||||
# 662| mu662_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r662_1
|
||||
# 662| v662_8(void) = ^BufferReadSideEffect[0] : &:r662_4, ~m?
|
||||
# 662| v662_7(void) = ^BufferReadSideEffect[0] : &:r662_4, ~m?
|
||||
# 662| mu662_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r662_1
|
||||
# 664| v664_1(void) = NoOp :
|
||||
# 658| v658_8(void) = ReturnIndirection[#this] : &:r658_6, ~m?
|
||||
# 658| v658_9(void) = ReturnVoid :
|
||||
@@ -3924,8 +3924,8 @@ ir.cpp:
|
||||
# 731| r731_15(char *) = Convert : r731_14
|
||||
# 731| v731_16(void) = Call[String] : func:r731_13, this:r731_11, 0:r731_15
|
||||
# 731| mu731_17(unknown) = ^CallSideEffect : ~m?
|
||||
# 731| mu731_18(String) = ^IndirectMayWriteSideEffect[-1] : &:r731_11
|
||||
# 731| v731_19(void) = ^BufferReadSideEffect[0] : &:r731_15, ~m?
|
||||
# 731| v731_18(void) = ^BufferReadSideEffect[0] : &:r731_15, ~m?
|
||||
# 731| mu731_19(String) = ^IndirectMayWriteSideEffect[-1] : &:r731_11
|
||||
# 731| v731_20(void) = ThrowValue : &:r731_11, ~m?
|
||||
#-----| Exception -> Block 9
|
||||
|
||||
@@ -3952,8 +3952,8 @@ ir.cpp:
|
||||
# 736| r736_5(char *) = Load[s] : &:r736_4, ~m?
|
||||
# 736| v736_6(void) = Call[String] : func:r736_3, this:r736_1, 0:r736_5
|
||||
# 736| mu736_7(unknown) = ^CallSideEffect : ~m?
|
||||
# 736| mu736_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r736_1
|
||||
# 736| v736_9(void) = ^BufferReadSideEffect[0] : &:r736_5, ~m?
|
||||
# 736| v736_8(void) = ^BufferReadSideEffect[0] : &:r736_5, ~m?
|
||||
# 736| mu736_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r736_1
|
||||
# 736| v736_10(void) = ThrowValue : &:r736_1, ~m?
|
||||
#-----| Exception -> Block 2
|
||||
|
||||
@@ -4518,8 +4518,8 @@ ir.cpp:
|
||||
# 809| r809_8(Base &) = CopyValue : r809_7
|
||||
# 809| v809_9(void) = Call[Base] : func:r809_5, this:r809_3, 0:r809_8
|
||||
# 809| mu809_10(unknown) = ^CallSideEffect : ~m?
|
||||
# 809| mu809_11(Base) = ^IndirectMayWriteSideEffect[-1] : &:r809_3
|
||||
# 809| v809_12(void) = ^BufferReadSideEffect[0] : &:r809_8, ~m?
|
||||
# 809| v809_11(void) = ^BufferReadSideEffect[0] : &:r809_8, ~m?
|
||||
# 809| mu809_12(Base) = ^IndirectMayWriteSideEffect[-1] : &:r809_3
|
||||
# 809| r809_13(glval<Base>) = Convert : r809_3
|
||||
# 809| r809_14(Base &) = CopyValue : r809_13
|
||||
# 809| r809_15(Base &) = Call[operator=] : func:r809_2, this:r809_1, 0:r809_14
|
||||
@@ -4538,8 +4538,8 @@ ir.cpp:
|
||||
# 810| r810_8(Base &) = CopyValue : r810_7
|
||||
# 810| v810_9(void) = Call[Base] : func:r810_5, this:r810_3, 0:r810_8
|
||||
# 810| mu810_10(unknown) = ^CallSideEffect : ~m?
|
||||
# 810| mu810_11(Base) = ^IndirectMayWriteSideEffect[-1] : &:r810_3
|
||||
# 810| v810_12(void) = ^BufferReadSideEffect[0] : &:r810_8, ~m?
|
||||
# 810| v810_11(void) = ^BufferReadSideEffect[0] : &:r810_8, ~m?
|
||||
# 810| mu810_12(Base) = ^IndirectMayWriteSideEffect[-1] : &:r810_3
|
||||
# 810| r810_13(glval<Base>) = Convert : r810_3
|
||||
# 810| r810_14(Base &) = CopyValue : r810_13
|
||||
# 810| r810_15(Base &) = Call[operator=] : func:r810_2, this:r810_1, 0:r810_14
|
||||
@@ -4630,8 +4630,8 @@ ir.cpp:
|
||||
# 823| r823_9(Base &) = CopyValue : r823_8
|
||||
# 823| v823_10(void) = Call[Base] : func:r823_5, this:r823_3, 0:r823_9
|
||||
# 823| mu823_11(unknown) = ^CallSideEffect : ~m?
|
||||
# 823| mu823_12(Base) = ^IndirectMayWriteSideEffect[-1] : &:r823_3
|
||||
# 823| v823_13(void) = ^BufferReadSideEffect[0] : &:r823_9, ~m?
|
||||
# 823| v823_12(void) = ^BufferReadSideEffect[0] : &:r823_9, ~m?
|
||||
# 823| mu823_13(Base) = ^IndirectMayWriteSideEffect[-1] : &:r823_3
|
||||
# 823| r823_14(glval<Base>) = Convert : r823_3
|
||||
# 823| r823_15(Base &) = CopyValue : r823_14
|
||||
# 823| r823_16(Base &) = Call[operator=] : func:r823_2, this:r823_1, 0:r823_15
|
||||
@@ -4651,8 +4651,8 @@ ir.cpp:
|
||||
# 824| r824_9(Base &) = CopyValue : r824_8
|
||||
# 824| v824_10(void) = Call[Base] : func:r824_5, this:r824_3, 0:r824_9
|
||||
# 824| mu824_11(unknown) = ^CallSideEffect : ~m?
|
||||
# 824| mu824_12(Base) = ^IndirectMayWriteSideEffect[-1] : &:r824_3
|
||||
# 824| v824_13(void) = ^BufferReadSideEffect[0] : &:r824_9, ~m?
|
||||
# 824| v824_12(void) = ^BufferReadSideEffect[0] : &:r824_9, ~m?
|
||||
# 824| mu824_13(Base) = ^IndirectMayWriteSideEffect[-1] : &:r824_3
|
||||
# 824| r824_14(glval<Base>) = Convert : r824_3
|
||||
# 824| r824_15(Base &) = CopyValue : r824_14
|
||||
# 824| r824_16(Base &) = Call[operator=] : func:r824_2, this:r824_1, 0:r824_15
|
||||
@@ -4876,8 +4876,8 @@ ir.cpp:
|
||||
# 868| r868_3(char *) = Convert : r868_2
|
||||
# 868| v868_4(void) = Call[String] : func:r868_1, this:mu867_5, 0:r868_3
|
||||
# 868| mu868_5(unknown) = ^CallSideEffect : ~m?
|
||||
# 868| mu868_6(String) = ^IndirectMayWriteSideEffect[-1] : &:mu867_5
|
||||
# 868| v868_7(void) = ^BufferReadSideEffect[0] : &:r868_3, ~m?
|
||||
# 868| v868_6(void) = ^BufferReadSideEffect[0] : &:r868_3, ~m?
|
||||
# 868| mu868_7(String) = ^IndirectMayWriteSideEffect[-1] : &:mu867_5
|
||||
# 869| v869_1(void) = NoOp :
|
||||
# 867| v867_8(void) = ReturnIndirection[#this] : &:r867_6, ~m?
|
||||
# 867| v867_9(void) = ReturnVoid :
|
||||
@@ -5177,8 +5177,8 @@ ir.cpp:
|
||||
# 954| r954_10(char *) = Convert : r954_9
|
||||
# 954| v954_11(void) = Call[String] : func:r954_8, this:r954_7, 0:r954_10
|
||||
# 954| mu954_12(unknown) = ^CallSideEffect : ~m?
|
||||
# 954| mu954_13(String) = ^IndirectMayWriteSideEffect[-1] : &:r954_7
|
||||
# 954| v954_14(void) = ^BufferReadSideEffect[0] : &:r954_10, ~m?
|
||||
# 954| v954_13(void) = ^BufferReadSideEffect[0] : &:r954_10, ~m?
|
||||
# 954| mu954_14(String) = ^IndirectMayWriteSideEffect[-1] : &:r954_7
|
||||
# 955| r955_1(glval<unknown>) = FunctionAddress[operator new] :
|
||||
# 955| r955_2(unsigned long) = Constant[256] :
|
||||
# 955| r955_3(align_val_t) = Constant[128] :
|
||||
@@ -6423,8 +6423,8 @@ ir.cpp:
|
||||
# 1149| r1149_15(char *) = Convert : r1149_14
|
||||
# 1149| v1149_16(void) = Call[String] : func:r1149_13, this:r1149_11, 0:r1149_15
|
||||
# 1149| mu1149_17(unknown) = ^CallSideEffect : ~m?
|
||||
# 1149| mu1149_18(String) = ^IndirectMayWriteSideEffect[-1] : &:r1149_11
|
||||
# 1149| v1149_19(void) = ^BufferReadSideEffect[0] : &:r1149_15, ~m?
|
||||
# 1149| v1149_18(void) = ^BufferReadSideEffect[0] : &:r1149_15, ~m?
|
||||
# 1149| mu1149_19(String) = ^IndirectMayWriteSideEffect[-1] : &:r1149_11
|
||||
# 1149| v1149_20(void) = ThrowValue : &:r1149_11, ~m?
|
||||
#-----| Exception -> Block 9
|
||||
|
||||
@@ -6451,8 +6451,8 @@ ir.cpp:
|
||||
# 1154| r1154_5(char *) = Load[s] : &:r1154_4, ~m?
|
||||
# 1154| v1154_6(void) = Call[String] : func:r1154_3, this:r1154_1, 0:r1154_5
|
||||
# 1154| mu1154_7(unknown) = ^CallSideEffect : ~m?
|
||||
# 1154| mu1154_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r1154_1
|
||||
# 1154| v1154_9(void) = ^BufferReadSideEffect[0] : &:r1154_5, ~m?
|
||||
# 1154| v1154_8(void) = ^BufferReadSideEffect[0] : &:r1154_5, ~m?
|
||||
# 1154| mu1154_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r1154_1
|
||||
# 1154| v1154_10(void) = ThrowValue : &:r1154_1, ~m?
|
||||
#-----| Exception -> Block 2
|
||||
|
||||
@@ -6577,8 +6577,8 @@ ir.cpp:
|
||||
# 1179| r1179_5(char *) = Convert : r1179_4
|
||||
# 1179| v1179_6(void) = Call[String] : func:r1179_3, this:r1179_1, 0:r1179_5
|
||||
# 1179| mu1179_7(unknown) = ^CallSideEffect : ~m?
|
||||
# 1179| mu1179_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r1179_1
|
||||
# 1179| v1179_9(void) = ^BufferReadSideEffect[0] : &:r1179_5, ~m?
|
||||
# 1179| v1179_8(void) = ^BufferReadSideEffect[0] : &:r1179_5, ~m?
|
||||
# 1179| mu1179_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r1179_1
|
||||
# 1178| r1178_4(glval<String>) = VariableAddress[#return] :
|
||||
# 1178| v1178_5(void) = ReturnValue : &:r1178_4, ~m?
|
||||
# 1178| v1178_6(void) = AliasedUse : ~m?
|
||||
@@ -6832,8 +6832,8 @@ ir.cpp:
|
||||
# 1242| r1242_7(char *) = Convert : r1242_6
|
||||
# 1242| v1242_8(void) = Call[String] : func:r1242_5, this:r1242_4, 0:r1242_7
|
||||
# 1242| mu1242_9(unknown) = ^CallSideEffect : ~m?
|
||||
# 1242| mu1242_10(String) = ^IndirectMayWriteSideEffect[-1] : &:r1242_4
|
||||
# 1242| v1242_11(void) = ^BufferReadSideEffect[0] : &:r1242_7, ~m?
|
||||
# 1242| v1242_10(void) = ^BufferReadSideEffect[0] : &:r1242_7, ~m?
|
||||
# 1242| mu1242_11(String) = ^IndirectMayWriteSideEffect[-1] : &:r1242_4
|
||||
# 1242| r1242_12(bool) = Constant[1] :
|
||||
# 1242| mu1242_13(bool) = Store[b#init] : &:r1242_1, r1242_12
|
||||
#-----| Goto -> Block 4
|
||||
@@ -6852,8 +6852,8 @@ ir.cpp:
|
||||
# 1243| r1243_7(char *) = Load[dynamic] : &:r1243_6, ~m?
|
||||
# 1243| v1243_8(void) = Call[String] : func:r1243_5, this:r1243_4, 0:r1243_7
|
||||
# 1243| mu1243_9(unknown) = ^CallSideEffect : ~m?
|
||||
# 1243| mu1243_10(String) = ^IndirectMayWriteSideEffect[-1] : &:r1243_4
|
||||
# 1243| v1243_11(void) = ^BufferReadSideEffect[0] : &:r1243_7, ~m?
|
||||
# 1243| v1243_10(void) = ^BufferReadSideEffect[0] : &:r1243_7, ~m?
|
||||
# 1243| mu1243_11(String) = ^IndirectMayWriteSideEffect[-1] : &:r1243_4
|
||||
# 1243| r1243_12(bool) = Constant[1] :
|
||||
# 1243| mu1243_13(bool) = Store[c#init] : &:r1243_1, r1243_12
|
||||
#-----| Goto -> Block 6
|
||||
@@ -7481,8 +7481,8 @@ ir.cpp:
|
||||
# 1370| r1370_6(char *) = Convert : r1370_5
|
||||
# 1370| v1370_7(void) = Call[String] : func:r1370_4, this:r1370_2, 0:r1370_6
|
||||
# 1370| mu1370_8(unknown) = ^CallSideEffect : ~m?
|
||||
# 1370| mu1370_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r1370_2
|
||||
# 1370| v1370_10(void) = ^BufferReadSideEffect[0] : &:r1370_6, ~m?
|
||||
# 1370| v1370_9(void) = ^BufferReadSideEffect[0] : &:r1370_6, ~m?
|
||||
# 1370| mu1370_10(String) = ^IndirectMayWriteSideEffect[-1] : &:r1370_2
|
||||
# 1370| r1370_11(String &) = CopyValue : r1370_2
|
||||
# 1370| v1370_12(void) = Call[acceptRef] : func:r1370_1, 0:r1370_11
|
||||
# 1370| mu1370_13(unknown) = ^CallSideEffect : ~m?
|
||||
@@ -7496,8 +7496,8 @@ ir.cpp:
|
||||
# 1371| r1371_7(String &) = CopyValue : r1371_6
|
||||
# 1371| v1371_8(void) = Call[String] : func:r1371_4, this:r1371_2, 0:r1371_7
|
||||
# 1371| mu1371_9(unknown) = ^CallSideEffect : ~m?
|
||||
# 1371| mu1371_10(String) = ^IndirectMayWriteSideEffect[-1] : &:r1371_2
|
||||
# 1371| v1371_11(void) = ^BufferReadSideEffect[0] : &:r1371_7, ~m?
|
||||
# 1371| v1371_10(void) = ^BufferReadSideEffect[0] : &:r1371_7, ~m?
|
||||
# 1371| mu1371_11(String) = ^IndirectMayWriteSideEffect[-1] : &:r1371_2
|
||||
# 1371| r1371_12(String) = Load[#temp1371:17] : &:r1371_2, ~m?
|
||||
# 1371| v1371_13(void) = Call[acceptValue] : func:r1371_1, 0:r1371_12
|
||||
# 1371| mu1371_14(unknown) = ^CallSideEffect : ~m?
|
||||
@@ -7509,8 +7509,8 @@ ir.cpp:
|
||||
# 1372| r1372_6(char *) = Convert : r1372_5
|
||||
# 1372| v1372_7(void) = Call[String] : func:r1372_4, this:r1372_2, 0:r1372_6
|
||||
# 1372| mu1372_8(unknown) = ^CallSideEffect : ~m?
|
||||
# 1372| mu1372_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r1372_2
|
||||
# 1372| v1372_10(void) = ^BufferReadSideEffect[0] : &:r1372_6, ~m?
|
||||
# 1372| v1372_9(void) = ^BufferReadSideEffect[0] : &:r1372_6, ~m?
|
||||
# 1372| mu1372_10(String) = ^IndirectMayWriteSideEffect[-1] : &:r1372_2
|
||||
# 1372| r1372_11(String) = Load[#temp1372:25] : &:r1372_2, ~m?
|
||||
# 1372| v1372_12(void) = Call[acceptValue] : func:r1372_1, 0:r1372_11
|
||||
# 1372| mu1372_13(unknown) = ^CallSideEffect : ~m?
|
||||
@@ -7652,8 +7652,8 @@ ir.cpp:
|
||||
# 1396| r1396_7(copy_constructor &) = CopyValue : r1396_6
|
||||
# 1396| v1396_8(void) = Call[copy_constructor] : func:r1396_4, this:r1396_2, 0:r1396_7
|
||||
# 1396| mu1396_9(unknown) = ^CallSideEffect : ~m?
|
||||
# 1396| mu1396_10(copy_constructor) = ^IndirectMayWriteSideEffect[-1] : &:r1396_2
|
||||
# 1396| v1396_11(void) = ^BufferReadSideEffect[0] : &:r1396_7, ~m?
|
||||
# 1396| v1396_10(void) = ^BufferReadSideEffect[0] : &:r1396_7, ~m?
|
||||
# 1396| mu1396_11(copy_constructor) = ^IndirectMayWriteSideEffect[-1] : &:r1396_2
|
||||
# 1396| r1396_12(copy_constructor) = Load[#temp1396:17] : &:r1396_2, ~m?
|
||||
# 1396| v1396_13(void) = Call[acceptValue] : func:r1396_1, 0:r1396_12
|
||||
# 1396| mu1396_14(unknown) = ^CallSideEffect : ~m?
|
||||
@@ -7967,8 +7967,8 @@ smart_ptr.cpp:
|
||||
# 19| r19_7(shared_ptr<float> &) = CopyValue : r19_6
|
||||
# 19| v19_8(void) = Call[shared_ptr] : func:r19_4, this:r19_2, 0:r19_7
|
||||
# 19| mu19_9(unknown) = ^CallSideEffect : ~m?
|
||||
# 19| mu19_10(shared_ptr<float>) = ^IndirectMustWriteSideEffect[-1] : &:r19_2
|
||||
# 19| v19_11(void) = ^IndirectReadSideEffect[0] : &:r19_7, ~m?
|
||||
# 19| v19_10(void) = ^IndirectReadSideEffect[0] : &:r19_7, ~m?
|
||||
# 19| mu19_11(shared_ptr<float>) = ^IndirectMustWriteSideEffect[-1] : &:r19_2
|
||||
# 19| r19_12(shared_ptr<float>) = Load[#temp19:20] : &:r19_2, ~m?
|
||||
# 19| v19_13(void) = Call[shared_ptr_arg] : func:r19_1, 0:r19_12
|
||||
# 19| mu19_14(unknown) = ^CallSideEffect : ~m?
|
||||
@@ -7996,8 +7996,8 @@ smart_ptr.cpp:
|
||||
# 31| r31_7(shared_ptr<const int> &) = CopyValue : r31_6
|
||||
# 31| v31_8(void) = Call[shared_ptr] : func:r31_4, this:r31_2, 0:r31_7
|
||||
# 31| mu31_9(unknown) = ^CallSideEffect : ~m?
|
||||
# 31| mu31_10(shared_ptr<const int>) = ^IndirectMustWriteSideEffect[-1] : &:r31_2
|
||||
# 31| v31_11(void) = ^IndirectReadSideEffect[0] : &:r31_7, ~m?
|
||||
# 31| v31_10(void) = ^IndirectReadSideEffect[0] : &:r31_7, ~m?
|
||||
# 31| mu31_11(shared_ptr<const int>) = ^IndirectMustWriteSideEffect[-1] : &:r31_2
|
||||
# 31| r31_12(shared_ptr<const int>) = Load[#temp31:26] : &:r31_2, ~m?
|
||||
# 31| v31_13(void) = Call[shared_ptr_const_int] : func:r31_1, 0:r31_12
|
||||
# 31| mu31_14(unknown) = ^CallSideEffect : ~m?
|
||||
@@ -8013,8 +8013,8 @@ smart_ptr.cpp:
|
||||
# 35| r35_7(shared_ptr<int *const> &) = CopyValue : r35_6
|
||||
# 35| v35_8(void) = Call[shared_ptr] : func:r35_4, this:r35_2, 0:r35_7
|
||||
# 35| mu35_9(unknown) = ^CallSideEffect : ~m?
|
||||
# 35| mu35_10(shared_ptr<int *const>) = ^IndirectMustWriteSideEffect[-1] : &:r35_2
|
||||
# 35| v35_11(void) = ^IndirectReadSideEffect[0] : &:r35_7, ~m?
|
||||
# 35| v35_10(void) = ^IndirectReadSideEffect[0] : &:r35_7, ~m?
|
||||
# 35| mu35_11(shared_ptr<int *const>) = ^IndirectMustWriteSideEffect[-1] : &:r35_2
|
||||
# 35| r35_12(shared_ptr<int *const>) = Load[#temp35:30] : &:r35_2, ~m?
|
||||
# 35| v35_13(void) = Call[shared_ptr_const_int_ptr] : func:r35_1, 0:r35_12
|
||||
# 35| mu35_14(unknown) = ^CallSideEffect : ~m?
|
||||
@@ -8031,8 +8031,8 @@ smart_ptr.cpp:
|
||||
# 39| r39_7(shared_ptr<shared_ptr<const int>> &) = CopyValue : r39_6
|
||||
# 39| v39_8(void) = Call[shared_ptr] : func:r39_4, this:r39_2, 0:r39_7
|
||||
# 39| mu39_9(unknown) = ^CallSideEffect : ~m?
|
||||
# 39| mu39_10(shared_ptr<shared_ptr<const int>>) = ^IndirectMustWriteSideEffect[-1] : &:r39_2
|
||||
# 39| v39_11(void) = ^IndirectReadSideEffect[0] : &:r39_7, ~m?
|
||||
# 39| v39_10(void) = ^IndirectReadSideEffect[0] : &:r39_7, ~m?
|
||||
# 39| mu39_11(shared_ptr<shared_ptr<const int>>) = ^IndirectMustWriteSideEffect[-1] : &:r39_2
|
||||
# 39| r39_12(shared_ptr<shared_ptr<const int>>) = Load[#temp39:37] : &:r39_2, ~m?
|
||||
# 39| v39_13(void) = Call[shared_ptr_shared_ptr_const_int] : func:r39_1, 0:r39_12
|
||||
# 39| mu39_14(unknown) = ^CallSideEffect : ~m?
|
||||
@@ -8049,8 +8049,8 @@ smart_ptr.cpp:
|
||||
# 43| r43_7(shared_ptr<const shared_ptr<int>> &) = CopyValue : r43_6
|
||||
# 43| v43_8(void) = Call[shared_ptr] : func:r43_4, this:r43_2, 0:r43_7
|
||||
# 43| mu43_9(unknown) = ^CallSideEffect : ~m?
|
||||
# 43| mu43_10(shared_ptr<const shared_ptr<int>>) = ^IndirectMustWriteSideEffect[-1] : &:r43_2
|
||||
# 43| v43_11(void) = ^IndirectReadSideEffect[0] : &:r43_7, ~m?
|
||||
# 43| v43_10(void) = ^IndirectReadSideEffect[0] : &:r43_7, ~m?
|
||||
# 43| mu43_11(shared_ptr<const shared_ptr<int>>) = ^IndirectMustWriteSideEffect[-1] : &:r43_2
|
||||
# 43| r43_12(shared_ptr<const shared_ptr<int>>) = Load[#temp43:37] : &:r43_2, ~m?
|
||||
# 43| v43_13(void) = Call[shared_ptr_const_shared_ptr_int] : func:r43_1, 0:r43_12
|
||||
# 43| mu43_14(unknown) = ^CallSideEffect : ~m?
|
||||
@@ -8067,8 +8067,8 @@ smart_ptr.cpp:
|
||||
# 47| r47_7(shared_ptr<const shared_ptr<const int>> &) = CopyValue : r47_6
|
||||
# 47| v47_8(void) = Call[shared_ptr] : func:r47_4, this:r47_2, 0:r47_7
|
||||
# 47| mu47_9(unknown) = ^CallSideEffect : ~m?
|
||||
# 47| mu47_10(shared_ptr<const shared_ptr<const int>>) = ^IndirectMustWriteSideEffect[-1] : &:r47_2
|
||||
# 47| v47_11(void) = ^IndirectReadSideEffect[0] : &:r47_7, ~m?
|
||||
# 47| v47_10(void) = ^IndirectReadSideEffect[0] : &:r47_7, ~m?
|
||||
# 47| mu47_11(shared_ptr<const shared_ptr<const int>>) = ^IndirectMustWriteSideEffect[-1] : &:r47_2
|
||||
# 47| r47_12(shared_ptr<const shared_ptr<const int>>) = Load[#temp47:43] : &:r47_2, ~m?
|
||||
# 47| v47_13(void) = Call[shared_ptr_const_shared_ptr_const_int] : func:r47_1, 0:r47_12
|
||||
# 47| mu47_14(unknown) = ^CallSideEffect : ~m?
|
||||
|
||||
@@ -1398,13 +1398,13 @@ ssa.cpp:
|
||||
# 294| v294_25(void) = Call[A] : func:r294_9, this:r294_8, 0:r294_16
|
||||
# 294| m294_26(unknown) = ^CallSideEffect : ~m294_22
|
||||
# 294| m294_27(unknown) = Chi : total:m294_22, partial:m294_26
|
||||
# 294| m294_28(A) = ^IndirectMayWriteSideEffect[-1] : &:r294_8
|
||||
# 294| m294_29(unknown) = Chi : total:m294_7, partial:m294_28
|
||||
# 294| v294_30(void) = ^BufferReadSideEffect[0] : &:r294_16, ~m294_24
|
||||
# 294| v294_28(void) = ^BufferReadSideEffect[0] : &:r294_16, ~m294_24
|
||||
# 294| m294_29(A) = ^IndirectMayWriteSideEffect[-1] : &:r294_8
|
||||
# 294| m294_30(unknown) = Chi : total:m294_7, partial:m294_29
|
||||
# 294| m294_31(unknown) = ^BufferMayWriteSideEffect[0] : &:r294_16
|
||||
# 294| m294_32(unknown) = Chi : total:m294_24, partial:m294_31
|
||||
# 294| r294_33(glval<int>) = FieldAddress[i] : r294_8
|
||||
# 294| r294_34(int) = Load[?] : &:r294_33, ~m294_29
|
||||
# 294| r294_34(int) = Load[?] : &:r294_33, ~m294_30
|
||||
# 294| m294_35(int) = Store[j] : &:r294_1, r294_34
|
||||
# 295| r295_1(glval<A *>) = VariableAddress[a] :
|
||||
# 295| r295_2(glval<unknown>) = FunctionAddress[operator new] :
|
||||
|
||||
@@ -1392,13 +1392,13 @@ ssa.cpp:
|
||||
# 294| v294_25(void) = Call[A] : func:r294_9, this:r294_8, 0:r294_16
|
||||
# 294| m294_26(unknown) = ^CallSideEffect : ~m294_22
|
||||
# 294| m294_27(unknown) = Chi : total:m294_22, partial:m294_26
|
||||
# 294| m294_28(A) = ^IndirectMayWriteSideEffect[-1] : &:r294_8
|
||||
# 294| m294_29(unknown) = Chi : total:m294_7, partial:m294_28
|
||||
# 294| v294_30(void) = ^BufferReadSideEffect[0] : &:r294_16, ~m294_24
|
||||
# 294| v294_28(void) = ^BufferReadSideEffect[0] : &:r294_16, ~m294_24
|
||||
# 294| m294_29(A) = ^IndirectMayWriteSideEffect[-1] : &:r294_8
|
||||
# 294| m294_30(unknown) = Chi : total:m294_7, partial:m294_29
|
||||
# 294| m294_31(unknown) = ^BufferMayWriteSideEffect[0] : &:r294_16
|
||||
# 294| m294_32(unknown) = Chi : total:m294_24, partial:m294_31
|
||||
# 294| r294_33(glval<int>) = FieldAddress[i] : r294_8
|
||||
# 294| r294_34(int) = Load[?] : &:r294_33, ~m294_29
|
||||
# 294| r294_34(int) = Load[?] : &:r294_33, ~m294_30
|
||||
# 294| m294_35(int) = Store[j] : &:r294_1, r294_34
|
||||
# 295| r295_1(glval<A *>) = VariableAddress[a] :
|
||||
# 295| r295_2(glval<unknown>) = FunctionAddress[operator new] :
|
||||
|
||||
@@ -1285,8 +1285,8 @@ ssa.cpp:
|
||||
# 294| mu294_20(A) = ^IndirectMayWriteSideEffect[-1] : &:r294_14
|
||||
# 294| v294_21(void) = Call[A] : func:r294_8, this:r294_7, 0:r294_14
|
||||
# 294| mu294_22(unknown) = ^CallSideEffect : ~m?
|
||||
# 294| mu294_23(A) = ^IndirectMayWriteSideEffect[-1] : &:r294_7
|
||||
# 294| v294_24(void) = ^BufferReadSideEffect[0] : &:r294_14, ~m?
|
||||
# 294| v294_23(void) = ^BufferReadSideEffect[0] : &:r294_14, ~m?
|
||||
# 294| mu294_24(A) = ^IndirectMayWriteSideEffect[-1] : &:r294_7
|
||||
# 294| mu294_25(unknown) = ^BufferMayWriteSideEffect[0] : &:r294_14
|
||||
# 294| r294_26(glval<int>) = FieldAddress[i] : r294_7
|
||||
# 294| r294_27(int) = Load[?] : &:r294_26, ~m?
|
||||
|
||||
@@ -1285,8 +1285,8 @@ ssa.cpp:
|
||||
# 294| mu294_20(A) = ^IndirectMayWriteSideEffect[-1] : &:r294_14
|
||||
# 294| v294_21(void) = Call[A] : func:r294_8, this:r294_7, 0:r294_14
|
||||
# 294| mu294_22(unknown) = ^CallSideEffect : ~m?
|
||||
# 294| mu294_23(A) = ^IndirectMayWriteSideEffect[-1] : &:r294_7
|
||||
# 294| v294_24(void) = ^BufferReadSideEffect[0] : &:r294_14, ~m?
|
||||
# 294| v294_23(void) = ^BufferReadSideEffect[0] : &:r294_14, ~m?
|
||||
# 294| mu294_24(A) = ^IndirectMayWriteSideEffect[-1] : &:r294_7
|
||||
# 294| mu294_25(unknown) = ^BufferMayWriteSideEffect[0] : &:r294_14
|
||||
# 294| r294_26(glval<int>) = FieldAddress[i] : r294_7
|
||||
# 294| r294_27(int) = Load[?] : &:r294_26, ~m?
|
||||
|
||||
Reference in New Issue
Block a user