C++: add indexes for specific side effects

This commit is contained in:
Robert Marsh
2019-09-17 16:41:23 -07:00
parent 24574be007
commit 8649978a43
18 changed files with 966 additions and 784 deletions

View File

@@ -644,6 +644,17 @@ class ConstantValueInstruction extends Instruction {
final string getValue() { result = value }
}
class IndexedInstruction extends Instruction {
int index;
IndexedInstruction() { index = Construction::getInstructionIndex(this) }
final override string getImmediateString() { result = index.toString() }
final int getIndex() { result = index }
}
class EnterFunctionInstruction extends Instruction {
EnterFunctionInstruction() { getOpcode() instanceof Opcode::EnterFunction }
}

View File

@@ -342,6 +342,11 @@ private module Cached {
result = getOldInstruction(instruction).(OldIR::FieldInstruction).getField()
}
cached
int getInstructionIndex(Instruction instruction) {
result = getOldInstruction(instruction).(OldIR::IndexedInstruction).getIndex()
}
cached
Function getInstructionFunction(Instruction instruction) {
result = getOldInstruction(instruction).(OldIR::FunctionInstruction).getFunctionSymbol()

View File

@@ -72,6 +72,8 @@ class BufferSizeOperandTag extends RegisterOperandTag, TBufferSizeOperand {
final override int getSortOrder() { result = 1 }
}
BufferSizeOperandTag bufferSizeOperand() { result = TBufferSizeOperand() }
/**
* The operand representing the read side effect of a `SideEffectInstruction`.
*/

View File

@@ -644,6 +644,17 @@ class ConstantValueInstruction extends Instruction {
final string getValue() { result = value }
}
class IndexedInstruction extends Instruction {
int index;
IndexedInstruction() { index = Construction::getInstructionIndex(this) }
final override string getImmediateString() { result = index.toString() }
final int getIndex() { result = index }
}
class EnterFunctionInstruction extends Instruction {
EnterFunctionInstruction() { getOpcode() instanceof Opcode::EnterFunction }
}

View File

@@ -259,6 +259,14 @@ private module Cached {
.getInstructionConstantValue(getInstructionTag(instruction))
}
cached
int getInstructionIndex(Instruction instruction) {
exists(TranslatedElement element, InstructionTag tag |
instructionOrigin(instruction, element, tag) and
result = element.getInstructionIndex(tag)
)
}
cached
StringLiteral getInstructionStringLiteral(Instruction instruction) {
result = getInstructionTranslatedElement(instruction)

View File

@@ -456,6 +456,12 @@ class TranslatedSideEffect extends TranslatedElement, TTranslatedArgumentSideEff
operandTag instanceof SideEffectOperandTag and
call.getTarget().(SideEffectFunction).hasSpecificReadSideEffect(index, _) and
result = getEnclosingFunction().getUnmodeledDefinitionInstruction()
or
tag instanceof OnlyInstructionTag and
operandTag instanceof BufferSizeOperandTag and
result = getTranslatedExpr(call
.getArgument(call.getTarget().(SideEffectFunction).getParameterSizeIndex(index)).getFullyConverted())
.getResult()
}
override Type getInstructionOperandType(InstructionTag tag, TypedOperandTag operandTag) {
@@ -471,6 +477,16 @@ class TranslatedSideEffect extends TranslatedElement, TTranslatedArgumentSideEff
predicate hasSpecificWriteSideEffect(Opcode op) {
exists(boolean buffer, boolean mustWrite |
if exists(call.getTarget().(SideEffectFunction).getParameterSizeIndex(index))
then
call.getTarget().(SideEffectFunction).hasSpecificWriteSideEffect(index, true, mustWrite) and
buffer = true and
(
mustWrite = false and op instanceof Opcode::SizedBufferMayWriteSideEffect
or
mustWrite = true and op instanceof Opcode::SizedBufferMustWriteSideEffect
)
else (
call.getTarget().(SideEffectFunction).hasSpecificWriteSideEffect(index, buffer, mustWrite) and
(
buffer = true and mustWrite = false and op instanceof Opcode::BufferMayWriteSideEffect
@@ -482,6 +498,7 @@ class TranslatedSideEffect extends TranslatedElement, TTranslatedArgumentSideEff
buffer = false and mustWrite = true and op instanceof Opcode::IndirectMustWriteSideEffect
)
)
)
or
not call.getTarget() instanceof SideEffectFunction and
getArgumentIndex() != -1 and
@@ -495,7 +512,9 @@ class TranslatedSideEffect extends TranslatedElement, TTranslatedArgumentSideEff
predicate hasSpecificReadSideEffect(Opcode op) {
exists(boolean buffer |
call.getTarget().(SideEffectFunction).hasSpecificReadSideEffect(index, buffer) and
(
if exists(call.getTarget().(SideEffectFunction).getParameterSizeIndex(index))
then buffer = true and op instanceof Opcode::SizedBufferReadSideEffect
else (
buffer = true and op instanceof Opcode::BufferReadSideEffect
or
buffer = false and op instanceof Opcode::IndirectReadSideEffect
@@ -506,6 +525,11 @@ class TranslatedSideEffect extends TranslatedElement, TTranslatedArgumentSideEff
op instanceof Opcode::IndirectReadSideEffect
}
final override int getInstructionIndex(InstructionTag tag) {
tag = OnlyInstructionTag() and
result = index
}
/**
* Gets the `TranslatedFunction` containing this expression.
*/

View File

@@ -600,6 +600,12 @@ abstract class TranslatedElement extends TTranslatedElement {
*/
string getInstructionConstantValue(InstructionTag tag) { none() }
/**
* If the instruction specified by `tag` is an `IndexedInstruction`, gets the
* index for that instruction.
*/
int getInstructionIndex(InstructionTag tag) { none() }
/**
* If the instruction specified by `tag` is a `PointerArithmeticInstruction`,
* gets the size of the type pointed to by the pointer.

View File

@@ -644,6 +644,17 @@ class ConstantValueInstruction extends Instruction {
final string getValue() { result = value }
}
class IndexedInstruction extends Instruction {
int index;
IndexedInstruction() { index = Construction::getInstructionIndex(this) }
final override string getImmediateString() { result = index.toString() }
final int getIndex() { result = index }
}
class EnterFunctionInstruction extends Instruction {
EnterFunctionInstruction() { getOpcode() instanceof Opcode::EnterFunction }
}

View File

@@ -342,6 +342,11 @@ private module Cached {
result = getOldInstruction(instruction).(OldIR::FieldInstruction).getField()
}
cached
int getInstructionIndex(Instruction instruction) {
result = getOldInstruction(instruction).(OldIR::IndexedInstruction).getIndex()
}
cached
Function getInstructionFunction(Instruction instruction) {
result = getOldInstruction(instruction).(OldIR::FunctionInstruction).getFunctionSymbol()

View File

@@ -57,5 +57,12 @@ class MemcpyFunction extends ArrayFunction, DataFlowFunction, SideEffectFunction
override predicate hasSpecificReadSideEffect(ParameterIndex i, boolean buffer) {
i = 1 and buffer = true
}
}
override ParameterIndex getParameterSizeIndex(ParameterIndex i) {
result = 2 and
(
i = 0 or
i = 1
)
}
}

View File

@@ -34,5 +34,7 @@ abstract class SideEffectFunction extends Function {
}
predicate hasSpecificReadSideEffect(ParameterIndex i, boolean buffer) { none() }
}
// TODO: name?
ParameterIndex getParameterSizeIndex(ParameterIndex i) { none() }
}

View File

@@ -14,8 +14,8 @@ bad_asts.cpp:
# 16| r0_10(int) = Constant[1] :
# 16| r0_11(int) = Call : func:r0_9, this:r0_8, 0:r0_10
# 16| mu0_12(unknown) = ^CallSideEffect : ~mu0_2
# 16| v0_13(void) = ^IndirectReadSideEffect : &:r0_8, ~mu0_2
# 16| mu0_14(S) = ^IndirectMayWriteSideEffect : &:r0_8, ~mu0_2
# 16| v0_13(void) = ^IndirectReadSideEffect[-1] : &:r0_8, ~mu0_2
# 16| mu0_14(S) = ^IndirectMayWriteSideEffect[-1] : &:r0_8, ~mu0_2
# 17| v0_15(void) = NoOp :
# 14| v0_16(void) = ReturnVoid :
# 14| v0_17(void) = UnmodeledUse : mu*
@@ -2675,10 +2675,10 @@ ir.cpp:
# 585| r0_8(char *) = Convert : r0_7
# 585| v0_9(void) = Call : func:r0_3, 0:r0_5, 1:r0_6, 2:r0_8
# 585| mu0_10(unknown) = ^CallSideEffect : ~mu0_2
# 585| v0_11(void) = ^IndirectReadSideEffect : &:r0_5, ~mu0_2
# 585| v0_12(void) = ^IndirectReadSideEffect : &:r0_8, ~mu0_2
# 585| mu0_13(unknown) = ^BufferMayWriteSideEffect : &:r0_5, ~mu0_2
# 585| mu0_14(unknown) = ^BufferMayWriteSideEffect : &:r0_8, ~mu0_2
# 585| v0_11(void) = ^IndirectReadSideEffect[0] : &:r0_5, ~mu0_2
# 585| v0_12(void) = ^IndirectReadSideEffect[2] : &:r0_8, ~mu0_2
# 585| mu0_13(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_5, ~mu0_2
# 585| mu0_14(unknown) = ^BufferMayWriteSideEffect[2] : &:r0_8, ~mu0_2
# 586| v0_15(void) = NoOp :
# 584| v0_16(void) = ReturnVoid :
# 584| v0_17(void) = UnmodeledUse : mu*
@@ -2721,8 +2721,8 @@ ir.cpp:
# 617| r0_10(char *) = Convert : r0_9
# 617| v0_11(void) = Call : func:r0_8, this:r0_7, 0:r0_10
# 617| mu0_12(unknown) = ^CallSideEffect : ~mu0_2
# 617| v0_13(void) = ^IndirectReadSideEffect : &:r0_10, ~mu0_2
# 617| mu0_14(unknown) = ^BufferMayWriteSideEffect : &:r0_10, ~mu0_2
# 617| v0_13(void) = ^IndirectReadSideEffect[0] : &:r0_10, ~mu0_2
# 617| mu0_14(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_10, ~mu0_2
# 618| r0_15(glval<String>) = VariableAddress[s3] :
# 618| r0_16(glval<unknown>) = FunctionAddress[ReturnObject] :
# 618| r0_17(String) = Call : func:r0_16
@@ -2734,8 +2734,8 @@ ir.cpp:
# 619| r0_23(char *) = Convert : r0_22
# 619| v0_24(void) = Call : func:r0_21, this:r0_20, 0:r0_23
# 619| mu0_25(unknown) = ^CallSideEffect : ~mu0_2
# 619| v0_26(void) = ^IndirectReadSideEffect : &:r0_23, ~mu0_2
# 619| mu0_27(unknown) = ^BufferMayWriteSideEffect : &:r0_23, ~mu0_2
# 619| v0_26(void) = ^IndirectReadSideEffect[0] : &:r0_23, ~mu0_2
# 619| mu0_27(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_23, ~mu0_2
# 620| v0_28(void) = NoOp :
# 615| v0_29(void) = ReturnVoid :
# 615| v0_30(void) = UnmodeledUse : mu*
@@ -2758,23 +2758,23 @@ ir.cpp:
# 623| r0_12(glval<unknown>) = FunctionAddress[c_str] :
# 623| r0_13(char *) = Call : func:r0_12, this:r0_11
# 623| mu0_14(unknown) = ^CallSideEffect : ~mu0_2
# 623| v0_15(void) = ^IndirectReadSideEffect : &:r0_11, ~mu0_2
# 623| mu0_16(String) = ^IndirectMayWriteSideEffect : &:r0_11, ~mu0_2
# 623| v0_15(void) = ^IndirectReadSideEffect[-1] : &:r0_11, ~mu0_2
# 623| mu0_16(String) = ^IndirectMayWriteSideEffect[-1] : &:r0_11, ~mu0_2
# 624| r0_17(glval<String *>) = VariableAddress[p] :
# 624| r0_18(String *) = Load : &:r0_17, ~mu0_2
# 624| r0_19(String *) = Convert : r0_18
# 624| r0_20(glval<unknown>) = FunctionAddress[c_str] :
# 624| r0_21(char *) = Call : func:r0_20, this:r0_19
# 624| mu0_22(unknown) = ^CallSideEffect : ~mu0_2
# 624| v0_23(void) = ^IndirectReadSideEffect : &:r0_19, ~mu0_2
# 624| mu0_24(String) = ^IndirectMayWriteSideEffect : &:r0_19, ~mu0_2
# 624| v0_23(void) = ^IndirectReadSideEffect[-1] : &:r0_19, ~mu0_2
# 624| mu0_24(String) = ^IndirectMayWriteSideEffect[-1] : &:r0_19, ~mu0_2
# 625| r0_25(glval<String>) = VariableAddress[s] :
# 625| r0_26(glval<String>) = Convert : r0_25
# 625| r0_27(glval<unknown>) = FunctionAddress[c_str] :
# 625| r0_28(char *) = Call : func:r0_27, this:r0_26
# 625| mu0_29(unknown) = ^CallSideEffect : ~mu0_2
# 625| v0_30(void) = ^IndirectReadSideEffect : &:r0_26, ~mu0_2
# 625| mu0_31(String) = ^IndirectMayWriteSideEffect : &:r0_26, ~mu0_2
# 625| v0_30(void) = ^IndirectReadSideEffect[-1] : &:r0_26, ~mu0_2
# 625| mu0_31(String) = ^IndirectMayWriteSideEffect[-1] : &:r0_26, ~mu0_2
# 626| v0_32(void) = NoOp :
# 622| v0_33(void) = ReturnVoid :
# 622| v0_34(void) = UnmodeledUse : mu*
@@ -2881,22 +2881,22 @@ ir.cpp:
# 653| r0_6(int) = Constant[0] :
# 653| r0_7(int) = Call : func:r0_5, this:r0_4, 0:r0_6
# 653| mu0_8(unknown) = ^CallSideEffect : ~mu0_2
# 653| v0_9(void) = ^IndirectReadSideEffect : &:r0_4, ~mu0_2
# 653| mu0_10(C) = ^IndirectMayWriteSideEffect : &:r0_4, ~mu0_2
# 653| v0_9(void) = ^IndirectReadSideEffect[-1] : &:r0_4, ~mu0_2
# 653| mu0_10(C) = ^IndirectMayWriteSideEffect[-1] : &:r0_4, ~mu0_2
# 654| r0_11(C *) = CopyValue : r0_3
# 654| r0_12(glval<unknown>) = FunctionAddress[InstanceMemberFunction] :
# 654| r0_13(int) = Constant[1] :
# 654| r0_14(int) = Call : func:r0_12, this:r0_11, 0:r0_13
# 654| mu0_15(unknown) = ^CallSideEffect : ~mu0_2
# 654| v0_16(void) = ^IndirectReadSideEffect : &:r0_11, ~mu0_2
# 654| mu0_17(C) = ^IndirectMayWriteSideEffect : &:r0_11, ~mu0_2
# 654| v0_16(void) = ^IndirectReadSideEffect[-1] : &:r0_11, ~mu0_2
# 654| mu0_17(C) = ^IndirectMayWriteSideEffect[-1] : &:r0_11, ~mu0_2
#-----| r0_18(C *) = CopyValue : r0_3
# 655| r0_19(glval<unknown>) = FunctionAddress[InstanceMemberFunction] :
# 655| r0_20(int) = Constant[2] :
# 655| r0_21(int) = Call : func:r0_19, this:r0_18, 0:r0_20
# 655| mu0_22(unknown) = ^CallSideEffect : ~mu0_2
#-----| v0_23(void) = ^IndirectReadSideEffect : &:r0_18, ~mu0_2
#-----| mu0_24(C) = ^IndirectMayWriteSideEffect : &:r0_18, ~mu0_2
#-----| v0_23(void) = ^IndirectReadSideEffect[-1] : &:r0_18, ~mu0_2
#-----| mu0_24(C) = ^IndirectMayWriteSideEffect[-1] : &:r0_18, ~mu0_2
# 656| v0_25(void) = NoOp :
# 652| v0_26(void) = ReturnVoid :
# 652| v0_27(void) = UnmodeledUse : mu*
@@ -2927,8 +2927,8 @@ ir.cpp:
# 662| r0_20(char *) = Convert : r0_19
# 662| v0_21(void) = Call : func:r0_18, this:r0_17, 0:r0_20
# 662| mu0_22(unknown) = ^CallSideEffect : ~mu0_2
# 662| v0_23(void) = ^IndirectReadSideEffect : &:r0_20, ~mu0_2
# 662| mu0_24(unknown) = ^BufferMayWriteSideEffect : &:r0_20, ~mu0_2
# 662| v0_23(void) = ^IndirectReadSideEffect[0] : &:r0_20, ~mu0_2
# 662| mu0_24(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_20, ~mu0_2
# 664| v0_25(void) = NoOp :
# 658| v0_26(void) = ReturnVoid :
# 658| v0_27(void) = UnmodeledUse : mu*
@@ -3127,8 +3127,8 @@ ir.cpp:
# 721| r0_6(char) = Constant[111] :
# 721| r0_7(long) = Call : func:r0_4, 0:r0_5, 1:r0_6
# 721| mu0_8(unknown) = ^CallSideEffect : ~mu0_2
# 721| v0_9(void) = ^IndirectReadSideEffect : &:r0_5, ~mu0_2
# 721| mu0_10(unknown) = ^BufferMayWriteSideEffect : &:r0_5, ~mu0_2
# 721| v0_9(void) = ^IndirectReadSideEffect[0] : &:r0_5, ~mu0_2
# 721| mu0_10(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_5, ~mu0_2
# 721| r0_11(double) = Convert : r0_7
# 721| mu0_12(double) = Store : &:r0_3, r0_11
# 720| r0_13(glval<double>) = VariableAddress[#return] :
@@ -3201,8 +3201,8 @@ ir.cpp:
# 731| r7_3(char *) = Convert : r7_2
# 731| v7_4(void) = Call : func:r7_1, this:r7_0, 0:r7_3
# 731| mu7_5(unknown) = ^CallSideEffect : ~mu0_2
# 731| v7_6(void) = ^IndirectReadSideEffect : &:r7_3, ~mu0_2
# 731| mu7_7(unknown) = ^BufferMayWriteSideEffect : &:r7_3, ~mu0_2
# 731| v7_6(void) = ^IndirectReadSideEffect[0] : &:r7_3, ~mu0_2
# 731| mu7_7(unknown) = ^BufferMayWriteSideEffect[0] : &:r7_3, ~mu0_2
# 731| v7_8(void) = ThrowValue : &:r7_0, ~mu0_2
#-----| Exception -> Block 9
@@ -3226,8 +3226,8 @@ ir.cpp:
# 736| r10_5(char *) = Load : &:r10_4, ~mu0_2
# 736| v10_6(void) = Call : func:r10_3, this:r10_2, 0:r10_5
# 736| mu10_7(unknown) = ^CallSideEffect : ~mu0_2
# 736| v10_8(void) = ^IndirectReadSideEffect : &:r10_5, ~mu0_2
# 736| mu10_9(unknown) = ^BufferMayWriteSideEffect : &:r10_5, ~mu0_2
# 736| v10_8(void) = ^IndirectReadSideEffect[0] : &:r10_5, ~mu0_2
# 736| mu10_9(unknown) = ^BufferMayWriteSideEffect[0] : &:r10_5, ~mu0_2
# 736| v10_10(void) = ThrowValue : &:r10_2, ~mu0_2
#-----| Exception -> Block 2
@@ -3268,10 +3268,10 @@ ir.cpp:
#-----| r0_11(glval<String>) = FieldAddress[base_s] : r0_10
# 745| r0_12(String &) = Call : func:r0_8, this:r0_7, 0:r0_11
# 745| mu0_13(unknown) = ^CallSideEffect : ~mu0_2
#-----| v0_14(void) = ^IndirectReadSideEffect : &:r0_7, ~mu0_2
#-----| v0_15(void) = ^IndirectReadSideEffect : &:r0_11, ~mu0_2
#-----| mu0_16(String) = ^IndirectMayWriteSideEffect : &:r0_7, ~mu0_2
#-----| mu0_17(unknown) = ^BufferMayWriteSideEffect : &:r0_11, ~mu0_2
#-----| v0_14(void) = ^IndirectReadSideEffect[-1] : &:r0_7, ~mu0_2
#-----| v0_15(void) = ^IndirectReadSideEffect[0] : &:r0_11, ~mu0_2
#-----| mu0_16(String) = ^IndirectMayWriteSideEffect[-1] : &:r0_7, ~mu0_2
#-----| mu0_17(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_11, ~mu0_2
#-----| r0_18(glval<Base &>) = VariableAddress[#return] :
#-----| r0_19(Base *) = CopyValue : r0_3
#-----| mu0_20(Base &) = Store : &:r0_18, r0_19
@@ -3343,10 +3343,10 @@ ir.cpp:
#-----| r0_11(Base *) = ConvertToBase[Middle : Base] : r0_10
# 754| r0_12(Base &) = Call : func:r0_8, this:r0_7, 0:r0_11
# 754| mu0_13(unknown) = ^CallSideEffect : ~mu0_2
#-----| v0_14(void) = ^IndirectReadSideEffect : &:r0_7, ~mu0_2
#-----| v0_15(void) = ^IndirectReadSideEffect : &:r0_11, ~mu0_2
#-----| mu0_16(Base) = ^IndirectMayWriteSideEffect : &:r0_7, ~mu0_2
#-----| mu0_17(unknown) = ^BufferMayWriteSideEffect : &:r0_11, ~mu0_2
#-----| v0_14(void) = ^IndirectReadSideEffect[-1] : &:r0_7, ~mu0_2
#-----| v0_15(void) = ^IndirectReadSideEffect[0] : &:r0_11, ~mu0_2
#-----| mu0_16(Base) = ^IndirectMayWriteSideEffect[-1] : &:r0_7, ~mu0_2
#-----| mu0_17(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_11, ~mu0_2
#-----| r0_18(Middle *) = CopyValue : r0_3
#-----| r0_19(glval<String>) = FieldAddress[middle_s] : r0_18
# 754| r0_20(glval<unknown>) = FunctionAddress[operator=] :
@@ -3355,10 +3355,10 @@ ir.cpp:
#-----| r0_23(glval<String>) = FieldAddress[middle_s] : r0_22
# 754| r0_24(String &) = Call : func:r0_20, this:r0_19, 0:r0_23
# 754| mu0_25(unknown) = ^CallSideEffect : ~mu0_2
#-----| v0_26(void) = ^IndirectReadSideEffect : &:r0_19, ~mu0_2
#-----| v0_27(void) = ^IndirectReadSideEffect : &:r0_23, ~mu0_2
#-----| mu0_28(String) = ^IndirectMayWriteSideEffect : &:r0_19, ~mu0_2
#-----| mu0_29(unknown) = ^BufferMayWriteSideEffect : &:r0_23, ~mu0_2
#-----| v0_26(void) = ^IndirectReadSideEffect[-1] : &:r0_19, ~mu0_2
#-----| v0_27(void) = ^IndirectReadSideEffect[0] : &:r0_23, ~mu0_2
#-----| mu0_28(String) = ^IndirectMayWriteSideEffect[-1] : &:r0_19, ~mu0_2
#-----| mu0_29(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_23, ~mu0_2
#-----| r0_30(glval<Middle &>) = VariableAddress[#return] :
#-----| r0_31(Middle *) = CopyValue : r0_3
#-----| mu0_32(Middle &) = Store : &:r0_30, r0_31
@@ -3421,10 +3421,10 @@ ir.cpp:
#-----| r0_11(Middle *) = ConvertToBase[Derived : Middle] : r0_10
# 763| r0_12(Middle &) = Call : func:r0_8, this:r0_7, 0:r0_11
# 763| mu0_13(unknown) = ^CallSideEffect : ~mu0_2
#-----| v0_14(void) = ^IndirectReadSideEffect : &:r0_7, ~mu0_2
#-----| v0_15(void) = ^IndirectReadSideEffect : &:r0_11, ~mu0_2
#-----| mu0_16(Middle) = ^IndirectMayWriteSideEffect : &:r0_7, ~mu0_2
#-----| mu0_17(unknown) = ^BufferMayWriteSideEffect : &:r0_11, ~mu0_2
#-----| v0_14(void) = ^IndirectReadSideEffect[-1] : &:r0_7, ~mu0_2
#-----| v0_15(void) = ^IndirectReadSideEffect[0] : &:r0_11, ~mu0_2
#-----| mu0_16(Middle) = ^IndirectMayWriteSideEffect[-1] : &:r0_7, ~mu0_2
#-----| mu0_17(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_11, ~mu0_2
#-----| r0_18(Derived *) = CopyValue : r0_3
#-----| r0_19(glval<String>) = FieldAddress[derived_s] : r0_18
# 763| r0_20(glval<unknown>) = FunctionAddress[operator=] :
@@ -3433,10 +3433,10 @@ ir.cpp:
#-----| r0_23(glval<String>) = FieldAddress[derived_s] : r0_22
# 763| r0_24(String &) = Call : func:r0_20, this:r0_19, 0:r0_23
# 763| mu0_25(unknown) = ^CallSideEffect : ~mu0_2
#-----| v0_26(void) = ^IndirectReadSideEffect : &:r0_19, ~mu0_2
#-----| v0_27(void) = ^IndirectReadSideEffect : &:r0_23, ~mu0_2
#-----| mu0_28(String) = ^IndirectMayWriteSideEffect : &:r0_19, ~mu0_2
#-----| mu0_29(unknown) = ^BufferMayWriteSideEffect : &:r0_23, ~mu0_2
#-----| v0_26(void) = ^IndirectReadSideEffect[-1] : &:r0_19, ~mu0_2
#-----| v0_27(void) = ^IndirectReadSideEffect[0] : &:r0_23, ~mu0_2
#-----| mu0_28(String) = ^IndirectMayWriteSideEffect[-1] : &:r0_19, ~mu0_2
#-----| mu0_29(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_23, ~mu0_2
#-----| r0_30(glval<Derived &>) = VariableAddress[#return] :
#-----| r0_31(Derived *) = CopyValue : r0_3
#-----| mu0_32(Derived &) = Store : &:r0_30, r0_31
@@ -3645,10 +3645,10 @@ ir.cpp:
# 808| r0_27(glval<Base>) = ConvertToBase[Middle : Base] : r0_26
# 808| r0_28(Base &) = Call : func:r0_25, this:r0_24, 0:r0_27
# 808| mu0_29(unknown) = ^CallSideEffect : ~mu0_2
# 808| v0_30(void) = ^IndirectReadSideEffect : &:r0_24, ~mu0_2
# 808| v0_31(void) = ^IndirectReadSideEffect : &:r0_27, ~mu0_2
# 808| mu0_32(Base) = ^IndirectMayWriteSideEffect : &:r0_24, ~mu0_2
# 808| mu0_33(unknown) = ^BufferMayWriteSideEffect : &:r0_27, ~mu0_2
# 808| v0_30(void) = ^IndirectReadSideEffect[-1] : &:r0_24, ~mu0_2
# 808| v0_31(void) = ^IndirectReadSideEffect[0] : &:r0_27, ~mu0_2
# 808| mu0_32(Base) = ^IndirectMayWriteSideEffect[-1] : &:r0_24, ~mu0_2
# 808| mu0_33(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_27, ~mu0_2
# 809| r0_34(glval<Base>) = VariableAddress[b] :
# 809| r0_35(glval<unknown>) = FunctionAddress[operator=] :
# 809| r0_36(glval<unknown>) = FunctionAddress[Base] :
@@ -3656,15 +3656,15 @@ ir.cpp:
# 809| r0_38(glval<Base>) = ConvertToBase[Middle : Base] : r0_37
# 809| v0_39(void) = Call : func:r0_36, 0:r0_38
# 809| mu0_40(unknown) = ^CallSideEffect : ~mu0_2
# 809| v0_41(void) = ^IndirectReadSideEffect : &:r0_38, ~mu0_2
# 809| mu0_42(unknown) = ^BufferMayWriteSideEffect : &:r0_38, ~mu0_2
# 809| v0_41(void) = ^IndirectReadSideEffect[0] : &:r0_38, ~mu0_2
# 809| mu0_42(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_38, ~mu0_2
# 809| r0_43(glval<Base>) = Convert : v0_39
# 809| r0_44(Base &) = Call : func:r0_35, this:r0_34, 0:r0_43
# 809| mu0_45(unknown) = ^CallSideEffect : ~mu0_2
# 809| v0_46(void) = ^IndirectReadSideEffect : &:r0_34, ~mu0_2
# 809| v0_47(void) = ^IndirectReadSideEffect : &:r0_43, ~mu0_2
# 809| mu0_48(Base) = ^IndirectMayWriteSideEffect : &:r0_34, ~mu0_2
# 809| mu0_49(unknown) = ^BufferMayWriteSideEffect : &:r0_43, ~mu0_2
# 809| v0_46(void) = ^IndirectReadSideEffect[-1] : &:r0_34, ~mu0_2
# 809| v0_47(void) = ^IndirectReadSideEffect[0] : &:r0_43, ~mu0_2
# 809| mu0_48(Base) = ^IndirectMayWriteSideEffect[-1] : &:r0_34, ~mu0_2
# 809| mu0_49(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_43, ~mu0_2
# 810| r0_50(glval<Base>) = VariableAddress[b] :
# 810| r0_51(glval<unknown>) = FunctionAddress[operator=] :
# 810| r0_52(glval<unknown>) = FunctionAddress[Base] :
@@ -3672,15 +3672,15 @@ ir.cpp:
# 810| r0_54(glval<Base>) = ConvertToBase[Middle : Base] : r0_53
# 810| v0_55(void) = Call : func:r0_52, 0:r0_54
# 810| mu0_56(unknown) = ^CallSideEffect : ~mu0_2
# 810| v0_57(void) = ^IndirectReadSideEffect : &:r0_54, ~mu0_2
# 810| mu0_58(unknown) = ^BufferMayWriteSideEffect : &:r0_54, ~mu0_2
# 810| v0_57(void) = ^IndirectReadSideEffect[0] : &:r0_54, ~mu0_2
# 810| mu0_58(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_54, ~mu0_2
# 810| r0_59(glval<Base>) = Convert : v0_55
# 810| r0_60(Base &) = Call : func:r0_51, this:r0_50, 0:r0_59
# 810| mu0_61(unknown) = ^CallSideEffect : ~mu0_2
# 810| v0_62(void) = ^IndirectReadSideEffect : &:r0_50, ~mu0_2
# 810| v0_63(void) = ^IndirectReadSideEffect : &:r0_59, ~mu0_2
# 810| mu0_64(Base) = ^IndirectMayWriteSideEffect : &:r0_50, ~mu0_2
# 810| mu0_65(unknown) = ^BufferMayWriteSideEffect : &:r0_59, ~mu0_2
# 810| v0_62(void) = ^IndirectReadSideEffect[-1] : &:r0_50, ~mu0_2
# 810| v0_63(void) = ^IndirectReadSideEffect[0] : &:r0_59, ~mu0_2
# 810| mu0_64(Base) = ^IndirectMayWriteSideEffect[-1] : &:r0_50, ~mu0_2
# 810| mu0_65(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_59, ~mu0_2
# 811| r0_66(glval<Middle *>) = VariableAddress[pm] :
# 811| r0_67(Middle *) = Load : &:r0_66, ~mu0_2
# 811| r0_68(Base *) = ConvertToBase[Middle : Base] : r0_67
@@ -3708,10 +3708,10 @@ ir.cpp:
# 816| r0_90(glval<Middle>) = Convert : r0_89
# 816| r0_91(Middle &) = Call : func:r0_87, this:r0_86, 0:r0_90
# 816| mu0_92(unknown) = ^CallSideEffect : ~mu0_2
# 816| v0_93(void) = ^IndirectReadSideEffect : &:r0_86, ~mu0_2
# 816| v0_94(void) = ^IndirectReadSideEffect : &:r0_90, ~mu0_2
# 816| mu0_95(Middle) = ^IndirectMayWriteSideEffect : &:r0_86, ~mu0_2
# 816| mu0_96(unknown) = ^BufferMayWriteSideEffect : &:r0_90, ~mu0_2
# 816| v0_93(void) = ^IndirectReadSideEffect[-1] : &:r0_86, ~mu0_2
# 816| v0_94(void) = ^IndirectReadSideEffect[0] : &:r0_90, ~mu0_2
# 816| mu0_95(Middle) = ^IndirectMayWriteSideEffect[-1] : &:r0_86, ~mu0_2
# 816| mu0_96(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_90, ~mu0_2
# 817| r0_97(glval<Middle>) = VariableAddress[m] :
# 817| r0_98(glval<unknown>) = FunctionAddress[operator=] :
# 817| r0_99(glval<Base>) = VariableAddress[b] :
@@ -3719,10 +3719,10 @@ ir.cpp:
# 817| r0_101(glval<Middle>) = Convert : r0_100
# 817| r0_102(Middle &) = Call : func:r0_98, this:r0_97, 0:r0_101
# 817| mu0_103(unknown) = ^CallSideEffect : ~mu0_2
# 817| v0_104(void) = ^IndirectReadSideEffect : &:r0_97, ~mu0_2
# 817| v0_105(void) = ^IndirectReadSideEffect : &:r0_101, ~mu0_2
# 817| mu0_106(Middle) = ^IndirectMayWriteSideEffect : &:r0_97, ~mu0_2
# 817| mu0_107(unknown) = ^BufferMayWriteSideEffect : &:r0_101, ~mu0_2
# 817| v0_104(void) = ^IndirectReadSideEffect[-1] : &:r0_97, ~mu0_2
# 817| v0_105(void) = ^IndirectReadSideEffect[0] : &:r0_101, ~mu0_2
# 817| mu0_106(Middle) = ^IndirectMayWriteSideEffect[-1] : &:r0_97, ~mu0_2
# 817| mu0_107(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_101, ~mu0_2
# 818| r0_108(glval<Base *>) = VariableAddress[pb] :
# 818| r0_109(Base *) = Load : &:r0_108, ~mu0_2
# 818| r0_110(Middle *) = ConvertToDerived[Middle : Base] : r0_109
@@ -3745,10 +3745,10 @@ ir.cpp:
# 822| r0_127(glval<Base>) = ConvertToBase[Middle : Base] : r0_126
# 822| r0_128(Base &) = Call : func:r0_124, this:r0_123, 0:r0_127
# 822| mu0_129(unknown) = ^CallSideEffect : ~mu0_2
# 822| v0_130(void) = ^IndirectReadSideEffect : &:r0_123, ~mu0_2
# 822| v0_131(void) = ^IndirectReadSideEffect : &:r0_127, ~mu0_2
# 822| mu0_132(Base) = ^IndirectMayWriteSideEffect : &:r0_123, ~mu0_2
# 822| mu0_133(unknown) = ^BufferMayWriteSideEffect : &:r0_127, ~mu0_2
# 822| v0_130(void) = ^IndirectReadSideEffect[-1] : &:r0_123, ~mu0_2
# 822| v0_131(void) = ^IndirectReadSideEffect[0] : &:r0_127, ~mu0_2
# 822| mu0_132(Base) = ^IndirectMayWriteSideEffect[-1] : &:r0_123, ~mu0_2
# 822| mu0_133(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_127, ~mu0_2
# 823| r0_134(glval<Base>) = VariableAddress[b] :
# 823| r0_135(glval<unknown>) = FunctionAddress[operator=] :
# 823| r0_136(glval<unknown>) = FunctionAddress[Base] :
@@ -3757,15 +3757,15 @@ ir.cpp:
# 823| r0_139(glval<Base>) = ConvertToBase[Middle : Base] : r0_138
# 823| v0_140(void) = Call : func:r0_136, 0:r0_139
# 823| mu0_141(unknown) = ^CallSideEffect : ~mu0_2
# 823| v0_142(void) = ^IndirectReadSideEffect : &:r0_139, ~mu0_2
# 823| mu0_143(unknown) = ^BufferMayWriteSideEffect : &:r0_139, ~mu0_2
# 823| v0_142(void) = ^IndirectReadSideEffect[0] : &:r0_139, ~mu0_2
# 823| mu0_143(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_139, ~mu0_2
# 823| r0_144(glval<Base>) = Convert : v0_140
# 823| r0_145(Base &) = Call : func:r0_135, this:r0_134, 0:r0_144
# 823| mu0_146(unknown) = ^CallSideEffect : ~mu0_2
# 823| v0_147(void) = ^IndirectReadSideEffect : &:r0_134, ~mu0_2
# 823| v0_148(void) = ^IndirectReadSideEffect : &:r0_144, ~mu0_2
# 823| mu0_149(Base) = ^IndirectMayWriteSideEffect : &:r0_134, ~mu0_2
# 823| mu0_150(unknown) = ^BufferMayWriteSideEffect : &:r0_144, ~mu0_2
# 823| v0_147(void) = ^IndirectReadSideEffect[-1] : &:r0_134, ~mu0_2
# 823| v0_148(void) = ^IndirectReadSideEffect[0] : &:r0_144, ~mu0_2
# 823| mu0_149(Base) = ^IndirectMayWriteSideEffect[-1] : &:r0_134, ~mu0_2
# 823| mu0_150(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_144, ~mu0_2
# 824| r0_151(glval<Base>) = VariableAddress[b] :
# 824| r0_152(glval<unknown>) = FunctionAddress[operator=] :
# 824| r0_153(glval<unknown>) = FunctionAddress[Base] :
@@ -3774,15 +3774,15 @@ ir.cpp:
# 824| r0_156(glval<Base>) = ConvertToBase[Middle : Base] : r0_155
# 824| v0_157(void) = Call : func:r0_153, 0:r0_156
# 824| mu0_158(unknown) = ^CallSideEffect : ~mu0_2
# 824| v0_159(void) = ^IndirectReadSideEffect : &:r0_156, ~mu0_2
# 824| mu0_160(unknown) = ^BufferMayWriteSideEffect : &:r0_156, ~mu0_2
# 824| v0_159(void) = ^IndirectReadSideEffect[0] : &:r0_156, ~mu0_2
# 824| mu0_160(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_156, ~mu0_2
# 824| r0_161(glval<Base>) = Convert : v0_157
# 824| r0_162(Base &) = Call : func:r0_152, this:r0_151, 0:r0_161
# 824| mu0_163(unknown) = ^CallSideEffect : ~mu0_2
# 824| v0_164(void) = ^IndirectReadSideEffect : &:r0_151, ~mu0_2
# 824| v0_165(void) = ^IndirectReadSideEffect : &:r0_161, ~mu0_2
# 824| mu0_166(Base) = ^IndirectMayWriteSideEffect : &:r0_151, ~mu0_2
# 824| mu0_167(unknown) = ^BufferMayWriteSideEffect : &:r0_161, ~mu0_2
# 824| v0_164(void) = ^IndirectReadSideEffect[-1] : &:r0_151, ~mu0_2
# 824| v0_165(void) = ^IndirectReadSideEffect[0] : &:r0_161, ~mu0_2
# 824| mu0_166(Base) = ^IndirectMayWriteSideEffect[-1] : &:r0_151, ~mu0_2
# 824| mu0_167(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_161, ~mu0_2
# 825| r0_168(glval<Derived *>) = VariableAddress[pd] :
# 825| r0_169(Derived *) = Load : &:r0_168, ~mu0_2
# 825| r0_170(Middle *) = ConvertToBase[Derived : Middle] : r0_169
@@ -3814,10 +3814,10 @@ ir.cpp:
# 830| r0_196(glval<Derived>) = Convert : r0_195
# 830| r0_197(Derived &) = Call : func:r0_192, this:r0_191, 0:r0_196
# 830| mu0_198(unknown) = ^CallSideEffect : ~mu0_2
# 830| v0_199(void) = ^IndirectReadSideEffect : &:r0_191, ~mu0_2
# 830| v0_200(void) = ^IndirectReadSideEffect : &:r0_196, ~mu0_2
# 830| mu0_201(Derived) = ^IndirectMayWriteSideEffect : &:r0_191, ~mu0_2
# 830| mu0_202(unknown) = ^BufferMayWriteSideEffect : &:r0_196, ~mu0_2
# 830| v0_199(void) = ^IndirectReadSideEffect[-1] : &:r0_191, ~mu0_2
# 830| v0_200(void) = ^IndirectReadSideEffect[0] : &:r0_196, ~mu0_2
# 830| mu0_201(Derived) = ^IndirectMayWriteSideEffect[-1] : &:r0_191, ~mu0_2
# 830| mu0_202(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_196, ~mu0_2
# 831| r0_203(glval<Derived>) = VariableAddress[d] :
# 831| r0_204(glval<unknown>) = FunctionAddress[operator=] :
# 831| r0_205(glval<Base>) = VariableAddress[b] :
@@ -3826,10 +3826,10 @@ ir.cpp:
# 831| r0_208(glval<Derived>) = Convert : r0_207
# 831| r0_209(Derived &) = Call : func:r0_204, this:r0_203, 0:r0_208
# 831| mu0_210(unknown) = ^CallSideEffect : ~mu0_2
# 831| v0_211(void) = ^IndirectReadSideEffect : &:r0_203, ~mu0_2
# 831| v0_212(void) = ^IndirectReadSideEffect : &:r0_208, ~mu0_2
# 831| mu0_213(Derived) = ^IndirectMayWriteSideEffect : &:r0_203, ~mu0_2
# 831| mu0_214(unknown) = ^BufferMayWriteSideEffect : &:r0_208, ~mu0_2
# 831| v0_211(void) = ^IndirectReadSideEffect[-1] : &:r0_203, ~mu0_2
# 831| v0_212(void) = ^IndirectReadSideEffect[0] : &:r0_208, ~mu0_2
# 831| mu0_213(Derived) = ^IndirectMayWriteSideEffect[-1] : &:r0_203, ~mu0_2
# 831| mu0_214(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_208, ~mu0_2
# 832| r0_215(glval<Base *>) = VariableAddress[pb] :
# 832| r0_216(Base *) = Load : &:r0_215, ~mu0_2
# 832| r0_217(Middle *) = ConvertToDerived[Middle : Base] : r0_216
@@ -3972,8 +3972,8 @@ ir.cpp:
# 868| r0_6(char *) = Convert : r0_5
# 868| v0_7(void) = Call : func:r0_4, this:r0_3, 0:r0_6
# 868| mu0_8(unknown) = ^CallSideEffect : ~mu0_2
# 868| v0_9(void) = ^IndirectReadSideEffect : &:r0_6, ~mu0_2
# 868| mu0_10(unknown) = ^BufferMayWriteSideEffect : &:r0_6, ~mu0_2
# 868| v0_9(void) = ^IndirectReadSideEffect[0] : &:r0_6, ~mu0_2
# 868| mu0_10(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_6, ~mu0_2
# 869| v0_11(void) = NoOp :
# 867| v0_12(void) = ReturnVoid :
# 867| v0_13(void) = UnmodeledUse : mu*
@@ -4189,8 +4189,8 @@ ir.cpp:
# 945| r0_37(char *) = Convert : r0_36
# 945| v0_38(void) = Call : func:r0_35, this:r0_34, 0:r0_37
# 945| mu0_39(unknown) = ^CallSideEffect : ~mu0_2
# 945| v0_40(void) = ^IndirectReadSideEffect : &:r0_37, ~mu0_2
# 945| mu0_41(unknown) = ^BufferMayWriteSideEffect : &:r0_37, ~mu0_2
# 945| v0_40(void) = ^IndirectReadSideEffect[0] : &:r0_37, ~mu0_2
# 945| mu0_41(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_37, ~mu0_2
# 946| r0_42(glval<unknown>) = FunctionAddress[operator new] :
# 946| r0_43(unsigned long) = Constant[256] :
# 946| r0_44(align_val_t) = Constant[128] :
@@ -4677,8 +4677,8 @@ ir.cpp:
# 1035| r0_28(float) = Constant[1.0] :
# 1035| r0_29(char) = Call : func:r0_27, this:r0_26, 0:r0_28
# 1035| mu0_30(unknown) = ^CallSideEffect : ~mu0_2
# 1035| v0_31(void) = ^IndirectReadSideEffect : &:r0_26, ~mu0_2
# 1035| mu0_32(decltype([...](...){...})) = ^IndirectMayWriteSideEffect : &:r0_26, ~mu0_2
# 1035| v0_31(void) = ^IndirectReadSideEffect[-1] : &:r0_26, ~mu0_2
# 1035| mu0_32(decltype([...](...){...})) = ^IndirectMayWriteSideEffect[-1] : &:r0_26, ~mu0_2
# 1036| r0_33(glval<decltype([...](...){...})>) = VariableAddress[lambda_val] :
# 1036| r0_34(glval<unknown>) = FunctionAddress[(constructor)] :
# 1036| r0_35(glval<decltype([...](...){...})>) = VariableAddress[#temp1036:21] :
@@ -4694,16 +4694,16 @@ ir.cpp:
# 1036| r0_45(decltype([...](...){...})) = Load : &:r0_35, ~mu0_2
# 1036| v0_46(void) = Call : func:r0_34, this:r0_33, 0:r0_45
# 1036| mu0_47(unknown) = ^CallSideEffect : ~mu0_2
# 1036| v0_48(void) = ^IndirectReadSideEffect : &:r0_45, ~mu0_2
# 1036| mu0_49(unknown) = ^BufferMayWriteSideEffect : &:r0_45, ~mu0_2
# 1036| v0_48(void) = ^IndirectReadSideEffect[0] : &:r0_45, ~mu0_2
# 1036| mu0_49(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_45, ~mu0_2
# 1037| r0_50(glval<decltype([...](...){...})>) = VariableAddress[lambda_val] :
# 1037| r0_51(glval<decltype([...](...){...})>) = Convert : r0_50
# 1037| r0_52(glval<unknown>) = FunctionAddress[operator()] :
# 1037| r0_53(float) = Constant[2.0] :
# 1037| r0_54(char) = Call : func:r0_52, this:r0_51, 0:r0_53
# 1037| mu0_55(unknown) = ^CallSideEffect : ~mu0_2
# 1037| v0_56(void) = ^IndirectReadSideEffect : &:r0_51, ~mu0_2
# 1037| mu0_57(decltype([...](...){...})) = ^IndirectMayWriteSideEffect : &:r0_51, ~mu0_2
# 1037| v0_56(void) = ^IndirectReadSideEffect[-1] : &:r0_51, ~mu0_2
# 1037| mu0_57(decltype([...](...){...})) = ^IndirectMayWriteSideEffect[-1] : &:r0_51, ~mu0_2
# 1038| r0_58(glval<decltype([...](...){...})>) = VariableAddress[lambda_ref_explicit] :
# 1038| r0_59(glval<decltype([...](...){...})>) = VariableAddress[#temp1038:30] :
# 1038| mu0_60(decltype([...](...){...})) = Uninitialized[#temp1038:30] : &:r0_59
@@ -4719,8 +4719,8 @@ ir.cpp:
# 1039| r0_70(float) = Constant[3.0] :
# 1039| r0_71(char) = Call : func:r0_69, this:r0_68, 0:r0_70
# 1039| mu0_72(unknown) = ^CallSideEffect : ~mu0_2
# 1039| v0_73(void) = ^IndirectReadSideEffect : &:r0_68, ~mu0_2
# 1039| mu0_74(decltype([...](...){...})) = ^IndirectMayWriteSideEffect : &:r0_68, ~mu0_2
# 1039| v0_73(void) = ^IndirectReadSideEffect[-1] : &:r0_68, ~mu0_2
# 1039| mu0_74(decltype([...](...){...})) = ^IndirectMayWriteSideEffect[-1] : &:r0_68, ~mu0_2
# 1040| r0_75(glval<decltype([...](...){...})>) = VariableAddress[lambda_val_explicit] :
# 1040| r0_76(glval<unknown>) = FunctionAddress[(constructor)] :
# 1040| r0_77(glval<decltype([...](...){...})>) = VariableAddress[#temp1040:30] :
@@ -4732,16 +4732,16 @@ ir.cpp:
# 1040| r0_83(decltype([...](...){...})) = Load : &:r0_77, ~mu0_2
# 1040| v0_84(void) = Call : func:r0_76, this:r0_75, 0:r0_83
# 1040| mu0_85(unknown) = ^CallSideEffect : ~mu0_2
# 1040| v0_86(void) = ^IndirectReadSideEffect : &:r0_83, ~mu0_2
# 1040| mu0_87(unknown) = ^BufferMayWriteSideEffect : &:r0_83, ~mu0_2
# 1040| v0_86(void) = ^IndirectReadSideEffect[0] : &:r0_83, ~mu0_2
# 1040| mu0_87(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_83, ~mu0_2
# 1041| r0_88(glval<decltype([...](...){...})>) = VariableAddress[lambda_val_explicit] :
# 1041| r0_89(glval<decltype([...](...){...})>) = Convert : r0_88
# 1041| r0_90(glval<unknown>) = FunctionAddress[operator()] :
# 1041| r0_91(float) = Constant[4.0] :
# 1041| r0_92(char) = Call : func:r0_90, this:r0_89, 0:r0_91
# 1041| mu0_93(unknown) = ^CallSideEffect : ~mu0_2
# 1041| v0_94(void) = ^IndirectReadSideEffect : &:r0_89, ~mu0_2
# 1041| mu0_95(decltype([...](...){...})) = ^IndirectMayWriteSideEffect : &:r0_89, ~mu0_2
# 1041| v0_94(void) = ^IndirectReadSideEffect[-1] : &:r0_89, ~mu0_2
# 1041| mu0_95(decltype([...](...){...})) = ^IndirectMayWriteSideEffect[-1] : &:r0_89, ~mu0_2
# 1042| r0_96(glval<decltype([...](...){...})>) = VariableAddress[lambda_mixed_explicit] :
# 1042| r0_97(glval<decltype([...](...){...})>) = VariableAddress[#temp1042:32] :
# 1042| mu0_98(decltype([...](...){...})) = Uninitialized[#temp1042:32] : &:r0_97
@@ -4761,8 +4761,8 @@ ir.cpp:
# 1043| r0_112(float) = Constant[5.0] :
# 1043| r0_113(char) = Call : func:r0_111, this:r0_110, 0:r0_112
# 1043| mu0_114(unknown) = ^CallSideEffect : ~mu0_2
# 1043| v0_115(void) = ^IndirectReadSideEffect : &:r0_110, ~mu0_2
# 1043| mu0_116(decltype([...](...){...})) = ^IndirectMayWriteSideEffect : &:r0_110, ~mu0_2
# 1043| v0_115(void) = ^IndirectReadSideEffect[-1] : &:r0_110, ~mu0_2
# 1043| mu0_116(decltype([...](...){...})) = ^IndirectMayWriteSideEffect[-1] : &:r0_110, ~mu0_2
# 1044| r0_117(glval<int>) = VariableAddress[r] :
# 1044| r0_118(glval<int>) = VariableAddress[x] :
# 1044| r0_119(int) = Load : &:r0_118, ~mu0_2
@@ -4797,8 +4797,8 @@ ir.cpp:
# 1046| r0_148(float) = Constant[6.0] :
# 1046| r0_149(char) = Call : func:r0_147, this:r0_146, 0:r0_148
# 1046| mu0_150(unknown) = ^CallSideEffect : ~mu0_2
# 1046| v0_151(void) = ^IndirectReadSideEffect : &:r0_146, ~mu0_2
# 1046| mu0_152(decltype([...](...){...})) = ^IndirectMayWriteSideEffect : &:r0_146, ~mu0_2
# 1046| v0_151(void) = ^IndirectReadSideEffect[-1] : &:r0_146, ~mu0_2
# 1046| mu0_152(decltype([...](...){...})) = ^IndirectMayWriteSideEffect[-1] : &:r0_146, ~mu0_2
# 1047| v0_153(void) = NoOp :
# 1031| v0_154(void) = ReturnVoid :
# 1031| v0_155(void) = UnmodeledUse : mu*
@@ -4862,8 +4862,8 @@ ir.cpp:
# 1034| r0_10(glval<unknown>) = FunctionAddress[c_str] :
# 1034| r0_11(char *) = Call : func:r0_10, this:r0_9
# 1034| mu0_12(unknown) = ^CallSideEffect : ~mu0_2
# 1034| v0_13(void) = ^IndirectReadSideEffect : &:r0_9, ~mu0_2
# 1034| mu0_14(String) = ^IndirectMayWriteSideEffect : &:r0_9, ~mu0_2
# 1034| v0_13(void) = ^IndirectReadSideEffect[-1] : &:r0_9, ~mu0_2
# 1034| mu0_14(String) = ^IndirectMayWriteSideEffect[-1] : &:r0_9, ~mu0_2
#-----| r0_15(lambda [] type at line 1034, col. 21 *) = CopyValue : r0_3
#-----| r0_16(glval<int &>) = FieldAddress[x] : r0_15
#-----| r0_17(int &) = Load : &:r0_16, ~mu0_2
@@ -4905,8 +4905,8 @@ ir.cpp:
# 1036| r0_9(glval<unknown>) = FunctionAddress[c_str] :
# 1036| r0_10(char *) = Call : func:r0_9, this:r0_8
# 1036| mu0_11(unknown) = ^CallSideEffect : ~mu0_2
#-----| v0_12(void) = ^IndirectReadSideEffect : &:r0_8, ~mu0_2
#-----| mu0_13(String) = ^IndirectMayWriteSideEffect : &:r0_8, ~mu0_2
#-----| v0_12(void) = ^IndirectReadSideEffect[-1] : &:r0_8, ~mu0_2
#-----| mu0_13(String) = ^IndirectMayWriteSideEffect[-1] : &:r0_8, ~mu0_2
#-----| r0_14(lambda [] type at line 1036, col. 21 *) = CopyValue : r0_3
#-----| r0_15(glval<int>) = FieldAddress[x] : r0_14
#-----| r0_16(int) = Load : &:r0_15, ~mu0_2
@@ -4933,8 +4933,8 @@ ir.cpp:
# 1038| r0_10(glval<unknown>) = FunctionAddress[c_str] :
# 1038| r0_11(char *) = Call : func:r0_10, this:r0_9
# 1038| mu0_12(unknown) = ^CallSideEffect : ~mu0_2
# 1038| v0_13(void) = ^IndirectReadSideEffect : &:r0_9, ~mu0_2
# 1038| mu0_14(String) = ^IndirectMayWriteSideEffect : &:r0_9, ~mu0_2
# 1038| v0_13(void) = ^IndirectReadSideEffect[-1] : &:r0_9, ~mu0_2
# 1038| mu0_14(String) = ^IndirectMayWriteSideEffect[-1] : &:r0_9, ~mu0_2
# 1038| r0_15(int) = Constant[0] :
# 1038| r0_16(glval<char>) = PointerAdd[1] : r0_11, r0_15
# 1038| r0_17(char) = Load : &:r0_16, ~mu0_2
@@ -4990,8 +4990,8 @@ ir.cpp:
# 1040| r0_9(glval<unknown>) = FunctionAddress[c_str] :
# 1040| r0_10(char *) = Call : func:r0_9, this:r0_8
# 1040| mu0_11(unknown) = ^CallSideEffect : ~mu0_2
#-----| v0_12(void) = ^IndirectReadSideEffect : &:r0_8, ~mu0_2
#-----| mu0_13(String) = ^IndirectMayWriteSideEffect : &:r0_8, ~mu0_2
#-----| v0_12(void) = ^IndirectReadSideEffect[-1] : &:r0_8, ~mu0_2
#-----| mu0_13(String) = ^IndirectMayWriteSideEffect[-1] : &:r0_8, ~mu0_2
# 1040| r0_14(int) = Constant[0] :
# 1040| r0_15(glval<char>) = PointerAdd[1] : r0_10, r0_14
# 1040| r0_16(char) = Load : &:r0_15, ~mu0_2
@@ -5016,8 +5016,8 @@ ir.cpp:
# 1042| r0_10(glval<unknown>) = FunctionAddress[c_str] :
# 1042| r0_11(char *) = Call : func:r0_10, this:r0_9
# 1042| mu0_12(unknown) = ^CallSideEffect : ~mu0_2
# 1042| v0_13(void) = ^IndirectReadSideEffect : &:r0_9, ~mu0_2
# 1042| mu0_14(String) = ^IndirectMayWriteSideEffect : &:r0_9, ~mu0_2
# 1042| v0_13(void) = ^IndirectReadSideEffect[-1] : &:r0_9, ~mu0_2
# 1042| mu0_14(String) = ^IndirectMayWriteSideEffect[-1] : &:r0_9, ~mu0_2
#-----| r0_15(lambda [] type at line 1042, col. 32 *) = CopyValue : r0_3
#-----| r0_16(glval<int>) = FieldAddress[x] : r0_15
#-----| r0_17(int) = Load : &:r0_16, ~mu0_2
@@ -5044,8 +5044,8 @@ ir.cpp:
# 1045| r0_10(glval<unknown>) = FunctionAddress[c_str] :
# 1045| r0_11(char *) = Call : func:r0_10, this:r0_9
# 1045| mu0_12(unknown) = ^CallSideEffect : ~mu0_2
# 1045| v0_13(void) = ^IndirectReadSideEffect : &:r0_9, ~mu0_2
# 1045| mu0_14(String) = ^IndirectMayWriteSideEffect : &:r0_9, ~mu0_2
# 1045| v0_13(void) = ^IndirectReadSideEffect[-1] : &:r0_9, ~mu0_2
# 1045| mu0_14(String) = ^IndirectMayWriteSideEffect[-1] : &:r0_9, ~mu0_2
#-----| r0_15(lambda [] type at line 1045, col. 23 *) = CopyValue : r0_3
#-----| r0_16(glval<int>) = FieldAddress[x] : r0_15
#-----| r0_17(int) = Load : &:r0_16, ~mu0_2
@@ -5083,8 +5083,8 @@ ir.cpp:
# 1069| r0_12(glval<unknown>) = FunctionAddress[begin] :
# 1069| r0_13(iterator) = Call : func:r0_12, this:r0_11
# 1069| mu0_14(unknown) = ^CallSideEffect : ~mu0_2
#-----| v0_15(void) = ^IndirectReadSideEffect : &:r0_11, ~mu0_2
#-----| mu0_16(vector<int>) = ^IndirectMayWriteSideEffect : &:r0_11, ~mu0_2
#-----| v0_15(void) = ^IndirectReadSideEffect[-1] : &:r0_11, ~mu0_2
#-----| mu0_16(vector<int>) = ^IndirectMayWriteSideEffect[-1] : &:r0_11, ~mu0_2
# 1069| mu0_17(iterator) = Store : &:r0_9, r0_13
# 1069| r0_18(glval<iterator>) = VariableAddress[(__end)] :
#-----| r0_19(glval<vector<int> &>) = VariableAddress[(__range)] :
@@ -5092,8 +5092,8 @@ ir.cpp:
# 1069| r0_21(glval<unknown>) = FunctionAddress[end] :
# 1069| r0_22(iterator) = Call : func:r0_21, this:r0_20
# 1069| mu0_23(unknown) = ^CallSideEffect : ~mu0_2
#-----| v0_24(void) = ^IndirectReadSideEffect : &:r0_20, ~mu0_2
#-----| mu0_25(vector<int>) = ^IndirectMayWriteSideEffect : &:r0_20, ~mu0_2
#-----| v0_24(void) = ^IndirectReadSideEffect[-1] : &:r0_20, ~mu0_2
#-----| mu0_25(vector<int>) = ^IndirectMayWriteSideEffect[-1] : &:r0_20, ~mu0_2
# 1069| mu0_26(iterator) = Store : &:r0_18, r0_22
#-----| Goto -> Block 4
@@ -5104,8 +5104,8 @@ ir.cpp:
# 1075| r1_3(glval<unknown>) = FunctionAddress[operator*] :
# 1075| r1_4(int &) = Call : func:r1_3, this:r1_2
# 1075| mu1_5(unknown) = ^CallSideEffect : ~mu0_2
#-----| v1_6(void) = ^IndirectReadSideEffect : &:r1_2, ~mu0_2
#-----| mu1_7(iterator) = ^IndirectMayWriteSideEffect : &:r1_2, ~mu0_2
#-----| v1_6(void) = ^IndirectReadSideEffect[-1] : &:r1_2, ~mu0_2
#-----| mu1_7(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r1_2, ~mu0_2
# 1075| r1_8(glval<int>) = Convert : r1_4
# 1075| mu1_9(int &) = Store : &:r1_0, r1_8
# 1076| r1_10(glval<int &>) = VariableAddress[e] :
@@ -5136,8 +5136,8 @@ ir.cpp:
#-----| r4_4(iterator) = Load : &:r4_3, ~mu0_2
# 1069| r4_5(bool) = Call : func:r4_2, this:r4_1, 0:r4_4
# 1069| mu4_6(unknown) = ^CallSideEffect : ~mu0_2
#-----| v4_7(void) = ^IndirectReadSideEffect : &:r4_1, ~mu0_2
#-----| mu4_8(iterator) = ^IndirectMayWriteSideEffect : &:r4_1, ~mu0_2
#-----| v4_7(void) = ^IndirectReadSideEffect[-1] : &:r4_1, ~mu0_2
#-----| mu4_8(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r4_1, ~mu0_2
# 1069| v4_9(void) = ConditionalBranch : r4_5
#-----| False -> Block 8
#-----| True -> Block 5
@@ -5149,8 +5149,8 @@ ir.cpp:
# 1069| r5_3(glval<unknown>) = FunctionAddress[operator*] :
# 1069| r5_4(int &) = Call : func:r5_3, this:r5_2
# 1069| mu5_5(unknown) = ^CallSideEffect : ~mu0_2
#-----| v5_6(void) = ^IndirectReadSideEffect : &:r5_2, ~mu0_2
#-----| mu5_7(iterator) = ^IndirectMayWriteSideEffect : &:r5_2, ~mu0_2
#-----| v5_6(void) = ^IndirectReadSideEffect[-1] : &:r5_2, ~mu0_2
#-----| mu5_7(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r5_2, ~mu0_2
# 1069| r5_8(int) = Load : &:r5_4, ~mu0_2
# 1069| mu5_9(int) = Store : &:r5_0, r5_8
# 1070| r5_10(glval<int>) = VariableAddress[e] :
@@ -5171,8 +5171,8 @@ ir.cpp:
# 1069| r7_2(glval<unknown>) = FunctionAddress[operator++] :
# 1069| r7_3(iterator &) = Call : func:r7_2, this:r7_1
# 1069| mu7_4(unknown) = ^CallSideEffect : ~mu0_2
#-----| v7_5(void) = ^IndirectReadSideEffect : &:r7_1, ~mu0_2
#-----| mu7_6(iterator) = ^IndirectMayWriteSideEffect : &:r7_1, ~mu0_2
#-----| v7_5(void) = ^IndirectReadSideEffect[-1] : &:r7_1, ~mu0_2
#-----| mu7_6(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r7_1, ~mu0_2
#-----| Goto (back edge) -> Block 4
# 1075| Block 8
@@ -5186,8 +5186,8 @@ ir.cpp:
# 1075| r8_7(glval<unknown>) = FunctionAddress[begin] :
# 1075| r8_8(iterator) = Call : func:r8_7, this:r8_6
# 1075| mu8_9(unknown) = ^CallSideEffect : ~mu0_2
#-----| v8_10(void) = ^IndirectReadSideEffect : &:r8_6, ~mu0_2
#-----| mu8_11(vector<int>) = ^IndirectMayWriteSideEffect : &:r8_6, ~mu0_2
#-----| v8_10(void) = ^IndirectReadSideEffect[-1] : &:r8_6, ~mu0_2
#-----| mu8_11(vector<int>) = ^IndirectMayWriteSideEffect[-1] : &:r8_6, ~mu0_2
# 1075| mu8_12(iterator) = Store : &:r8_4, r8_8
# 1075| r8_13(glval<iterator>) = VariableAddress[(__end)] :
#-----| r8_14(glval<vector<int> &>) = VariableAddress[(__range)] :
@@ -5195,8 +5195,8 @@ ir.cpp:
# 1075| r8_16(glval<unknown>) = FunctionAddress[end] :
# 1075| r8_17(iterator) = Call : func:r8_16, this:r8_15
# 1075| mu8_18(unknown) = ^CallSideEffect : ~mu0_2
#-----| v8_19(void) = ^IndirectReadSideEffect : &:r8_15, ~mu0_2
#-----| mu8_20(vector<int>) = ^IndirectMayWriteSideEffect : &:r8_15, ~mu0_2
#-----| v8_19(void) = ^IndirectReadSideEffect[-1] : &:r8_15, ~mu0_2
#-----| mu8_20(vector<int>) = ^IndirectMayWriteSideEffect[-1] : &:r8_15, ~mu0_2
# 1075| mu8_21(iterator) = Store : &:r8_13, r8_17
#-----| Goto -> Block 9
@@ -5208,8 +5208,8 @@ ir.cpp:
#-----| r9_4(iterator) = Load : &:r9_3, ~mu0_2
# 1075| r9_5(bool) = Call : func:r9_2, this:r9_1, 0:r9_4
# 1075| mu9_6(unknown) = ^CallSideEffect : ~mu0_2
#-----| v9_7(void) = ^IndirectReadSideEffect : &:r9_1, ~mu0_2
#-----| mu9_8(iterator) = ^IndirectMayWriteSideEffect : &:r9_1, ~mu0_2
#-----| v9_7(void) = ^IndirectReadSideEffect[-1] : &:r9_1, ~mu0_2
#-----| mu9_8(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r9_1, ~mu0_2
# 1075| v9_9(void) = ConditionalBranch : r9_5
#-----| False -> Block 3
#-----| True -> Block 1
@@ -5219,8 +5219,8 @@ ir.cpp:
# 1075| r10_1(glval<unknown>) = FunctionAddress[operator++] :
# 1075| r10_2(iterator &) = Call : func:r10_1, this:r10_0
# 1075| mu10_3(unknown) = ^CallSideEffect : ~mu0_2
#-----| v10_4(void) = ^IndirectReadSideEffect : &:r10_0, ~mu0_2
#-----| mu10_5(iterator) = ^IndirectMayWriteSideEffect : &:r10_0, ~mu0_2
#-----| v10_4(void) = ^IndirectReadSideEffect[-1] : &:r10_0, ~mu0_2
#-----| mu10_5(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r10_0, ~mu0_2
#-----| Goto (back edge) -> Block 9
# 1099| int AsmStmt(int)
@@ -5378,8 +5378,8 @@ ir.cpp:
# 1140| r7_3(char *) = Convert : r7_2
# 1140| v7_4(void) = Call : func:r7_1, this:r7_0, 0:r7_3
# 1140| mu7_5(unknown) = ^CallSideEffect : ~mu0_2
# 1140| v7_6(void) = ^IndirectReadSideEffect : &:r7_3, ~mu0_2
# 1140| mu7_7(unknown) = ^BufferMayWriteSideEffect : &:r7_3, ~mu0_2
# 1140| v7_6(void) = ^IndirectReadSideEffect[0] : &:r7_3, ~mu0_2
# 1140| mu7_7(unknown) = ^BufferMayWriteSideEffect[0] : &:r7_3, ~mu0_2
# 1140| v7_8(void) = ThrowValue : &:r7_0, ~mu0_2
#-----| Exception -> Block 9
@@ -5403,8 +5403,8 @@ ir.cpp:
# 1145| r10_5(char *) = Load : &:r10_4, ~mu0_2
# 1145| v10_6(void) = Call : func:r10_3, this:r10_2, 0:r10_5
# 1145| mu10_7(unknown) = ^CallSideEffect : ~mu0_2
# 1145| v10_8(void) = ^IndirectReadSideEffect : &:r10_5, ~mu0_2
# 1145| mu10_9(unknown) = ^BufferMayWriteSideEffect : &:r10_5, ~mu0_2
# 1145| v10_8(void) = ^IndirectReadSideEffect[0] : &:r10_5, ~mu0_2
# 1145| mu10_9(unknown) = ^BufferMayWriteSideEffect[0] : &:r10_5, ~mu0_2
# 1145| v10_10(void) = ThrowValue : &:r10_2, ~mu0_2
#-----| Exception -> Block 2
@@ -5502,8 +5502,8 @@ ir.cpp:
# 1165| r0_11(void *) = Convert : r0_10
# 1165| r0_12(int) = Constant[4] :
# 1165| r0_13(void *) = Call : func:r0_7, 0:r0_9, 1:r0_11, 2:r0_12
# 1165| v0_14(void) = ^BufferReadSideEffect : &:r0_11, ~mu0_2
# 1165| mu0_15(unknown) = ^BufferMustWriteSideEffect : &:r0_9
# 1165| v0_14(void) = ^SizedBufferReadSideEffect[1] : &:r0_11, r0_12, ~mu0_2
# 1165| mu0_15(unknown) = ^SizedBufferMustWriteSideEffect[0] : &:r0_9, r0_12
# 1166| r0_16(glval<int>) = VariableAddress[#return] :
# 1166| r0_17(glval<int>) = VariableAddress[y] :
# 1166| r0_18(int) = Load : &:r0_17, ~mu0_2

View File

@@ -327,8 +327,8 @@ ssa.cpp:
# 97| v0_13(void) = Call : func:r0_10, 0:r0_12
# 97| m0_14(unknown) = ^CallSideEffect : ~m0_5
# 97| m0_15(unknown) = Chi : total:m0_5, partial:m0_14
# 97| v0_16(void) = ^IndirectReadSideEffect : &:r0_12, ~m0_15
# 97| m0_17(unknown) = ^BufferMayWriteSideEffect : &:r0_12, ~m0_15
# 97| v0_16(void) = ^IndirectReadSideEffect[0] : &:r0_12, ~m0_15
# 97| m0_17(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_12, ~m0_15
# 97| m0_18(unknown) = Chi : total:m0_15, partial:m0_17
# 98| v0_19(void) = NoOp :
# 95| v0_20(void) = ReturnVoid :
@@ -381,8 +381,8 @@ ssa.cpp:
# 108| v0_19(void) = Call : func:r0_16, 0:r0_18
# 108| m0_20(unknown) = ^CallSideEffect : ~m0_5
# 108| m0_21(unknown) = Chi : total:m0_5, partial:m0_20
# 108| v0_22(void) = ^IndirectReadSideEffect : &:r0_18, ~m0_21
# 108| m0_23(unknown) = ^BufferMayWriteSideEffect : &:r0_18, ~m0_21
# 108| v0_22(void) = ^IndirectReadSideEffect[0] : &:r0_18, ~m0_21
# 108| m0_23(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_18, ~m0_21
# 108| m0_24(unknown) = Chi : total:m0_21, partial:m0_23
# 109| v0_25(void) = NoOp :
# 105| v0_26(void) = ReturnVoid :
@@ -451,8 +451,8 @@ ssa.cpp:
# 119| v0_27(void) = Call : func:r0_24, 0:r0_26
# 119| m0_28(unknown) = ^CallSideEffect : ~m0_19
# 119| m0_29(unknown) = Chi : total:m0_19, partial:m0_28
# 119| v0_30(void) = ^IndirectReadSideEffect : &:r0_26, ~m0_29
# 119| m0_31(unknown) = ^BufferMayWriteSideEffect : &:r0_26, ~m0_29
# 119| v0_30(void) = ^IndirectReadSideEffect[0] : &:r0_26, ~m0_29
# 119| m0_31(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_26, ~m0_29
# 119| m0_32(unknown) = Chi : total:m0_29, partial:m0_31
# 120| v0_33(void) = NoOp :
# 116| v0_34(void) = ReturnVoid :
@@ -835,8 +835,8 @@ ssa.cpp:
# 209| r0_13(void *) = Convert : r0_12
# 209| r0_14(int) = Constant[4] :
# 209| r0_15(void *) = Call : func:r0_9, 0:r0_11, 1:r0_13, 2:r0_14
# 209| v0_16(void) = ^BufferReadSideEffect : &:r0_13, ~m0_4
# 209| m0_17(unknown) = ^BufferMustWriteSideEffect : &:r0_11
# 209| v0_16(void) = ^SizedBufferReadSideEffect[1] : &:r0_13, r0_14, ~mu0_2
# 209| m0_17(unknown) = ^SizedBufferMustWriteSideEffect[0] : &:r0_11, r0_14
# 209| m0_18(unknown) = Chi : total:m0_8, partial:m0_17
# 210| r0_19(glval<int>) = VariableAddress[#return] :
# 210| r0_20(glval<int>) = VariableAddress[y] :

View File

@@ -326,8 +326,8 @@ ssa.cpp:
# 97| r0_11(void *) = Convert : r0_10
# 97| v0_12(void) = Call : func:r0_9, 0:r0_11
# 97| mu0_13(unknown) = ^CallSideEffect : ~mu0_2
# 97| v0_14(void) = ^IndirectReadSideEffect : &:r0_11, ~mu0_2
# 97| mu0_15(unknown) = ^BufferMayWriteSideEffect : &:r0_11, ~mu0_2
# 97| v0_14(void) = ^IndirectReadSideEffect[0] : &:r0_11, ~mu0_2
# 97| mu0_15(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_11, ~mu0_2
# 98| v0_16(void) = NoOp :
# 95| v0_17(void) = ReturnVoid :
# 95| v0_18(void) = UnmodeledUse : mu*
@@ -377,8 +377,8 @@ ssa.cpp:
# 108| r0_17(void *) = Convert : r0_16
# 108| v0_18(void) = Call : func:r0_15, 0:r0_17
# 108| mu0_19(unknown) = ^CallSideEffect : ~mu0_2
# 108| v0_20(void) = ^IndirectReadSideEffect : &:r0_17, ~mu0_2
# 108| mu0_21(unknown) = ^BufferMayWriteSideEffect : &:r0_17, ~mu0_2
# 108| v0_20(void) = ^IndirectReadSideEffect[0] : &:r0_17, ~mu0_2
# 108| mu0_21(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_17, ~mu0_2
# 109| v0_22(void) = NoOp :
# 105| v0_23(void) = ReturnVoid :
# 105| v0_24(void) = UnmodeledUse : mu*
@@ -440,8 +440,8 @@ ssa.cpp:
# 119| r0_23(void *) = Convert : r0_22
# 119| v0_24(void) = Call : func:r0_21, 0:r0_23
# 119| mu0_25(unknown) = ^CallSideEffect : ~mu0_2
# 119| v0_26(void) = ^IndirectReadSideEffect : &:r0_23, ~mu0_2
# 119| mu0_27(unknown) = ^BufferMayWriteSideEffect : &:r0_23, ~mu0_2
# 119| v0_26(void) = ^IndirectReadSideEffect[0] : &:r0_23, ~mu0_2
# 119| mu0_27(unknown) = ^BufferMayWriteSideEffect[0] : &:r0_23, ~mu0_2
# 120| v0_28(void) = NoOp :
# 116| v0_29(void) = ReturnVoid :
# 116| v0_30(void) = UnmodeledUse : mu*
@@ -796,8 +796,8 @@ ssa.cpp:
# 209| r0_11(void *) = Convert : r0_10
# 209| r0_12(int) = Constant[4] :
# 209| r0_13(void *) = Call : func:r0_7, 0:r0_9, 1:r0_11, 2:r0_12
# 209| v0_14(void) = ^BufferReadSideEffect : &:r0_11, ~mu0_2
# 209| mu0_15(unknown) = ^BufferMustWriteSideEffect : &:r0_9
# 209| v0_14(void) = ^SizedBufferReadSideEffect[1] : &:r0_11, r0_12, ~mu0_2
# 209| mu0_15(unknown) = ^SizedBufferMustWriteSideEffect[0] : &:r0_9, r0_12
# 210| r0_16(glval<int>) = VariableAddress[#return] :
# 210| r0_17(glval<int>) = VariableAddress[y] :
# 210| r0_18(int) = Load : &:r0_17, ~mu0_2

View File

@@ -71,6 +71,9 @@ private newtype TOpcode =
TBufferReadSideEffect() or
TBufferMustWriteSideEffect() or
TBufferMayWriteSideEffect() or
TSizedBufferReadSideEffect() or
TSizedBufferMustWriteSideEffect() or
TSizedBufferMayWriteSideEffect() or
TChi() or
TInlineAsm() or
TUnreached() or
@@ -147,10 +150,16 @@ abstract class MustWriteSideEffectOpcode extends WriteSideEffectOpcode { }
abstract class MayWriteSideEffectOpcode extends WriteSideEffectOpcode { }
/**
* An opcode that accesses a buffer via an `AddressOperand` and a `BufferSizeOperand`.
* An opcode that accesses a buffer via an `AddressOperand`.
*/
abstract class BufferAccessOpcode extends MemoryAccessOpcode { }
/**
* An opcode that accesses a buffer via an `AddressOperand` with a `BufferSizeOperand` specifying
* the number of elements accessed.
*/
abstract class SizedBufferAccessOpcode extends BufferAccessOpcode { }
module Opcode {
class NoOp extends Opcode, TNoOp {
final override string toString() { result = "NoOp" }
@@ -445,6 +454,21 @@ module Opcode {
final override string toString() { result = "BufferMayWriteSideEffect" }
}
class SizedBufferReadSideEffect extends ReadSideEffectOpcode, SizedBufferAccessOpcode,
TSizedBufferReadSideEffect {
final override string toString() { result = "SizedBufferReadSideEffect" }
}
class SizedBufferMustWriteSideEffect extends MustWriteSideEffectOpcode, SizedBufferAccessOpcode,
TSizedBufferMustWriteSideEffect {
final override string toString() { result = "SizedBufferMustWriteSideEffect" }
}
class SizedBufferMayWriteSideEffect extends MayWriteSideEffectOpcode, SizedBufferAccessOpcode,
TSizedBufferMayWriteSideEffect {
final override string toString() { result = "SizedBufferMayWriteSideEffect" }
}
class Chi extends Opcode, TChi {
final override string toString() { result = "Chi" }
}

View File

@@ -66,12 +66,14 @@ AddressOperandTag addressOperand() { result = TAddressOperand() }
* The buffer size operand of an instruction that represents a read or write of
* a buffer.
*/
class BufferSizeOperand extends RegisterOperandTag, TBufferSizeOperand {
class BufferSizeOperandTag extends RegisterOperandTag, TBufferSizeOperand {
final override string toString() { result = "BufferSize" }
final override int getSortOrder() { result = 1 }
}
BufferSizeOperandTag bufferSizeOperand() { result = TBufferSizeOperand() }
/**
* The operand representing the read side effect of a `SideEffectInstruction`.
*/

View File

@@ -30,7 +30,7 @@ module InstructionSanity {
or
opcode instanceof MemoryAccessOpcode and tag instanceof AddressOperandTag
or
opcode instanceof BufferAccessOpcode and tag instanceof BufferSizeOperand
opcode instanceof SizedBufferAccessOpcode and tag instanceof BufferSizeOperandTag
or
opcode instanceof OpcodeWithCondition and tag instanceof ConditionOperandTag
or
@@ -644,6 +644,17 @@ class ConstantValueInstruction extends Instruction {
final string getValue() { result = value }
}
class IndexedInstruction extends Instruction {
int index;
IndexedInstruction() { index = Construction::getInstructionIndex(this) }
final override string getImmediateString() { result = index.toString() }
final int getIndex() { result = index }
}
class EnterFunctionInstruction extends Instruction {
EnterFunctionInstruction() { getOpcode() instanceof Opcode::EnterFunction }
}
@@ -1176,7 +1187,7 @@ class CallReadSideEffectInstruction extends SideEffectInstruction {
class IndirectReadSideEffectInstruction extends SideEffectInstruction {
IndirectReadSideEffectInstruction() { getOpcode() instanceof Opcode::IndirectReadSideEffect }
Instruction getArgumentInstruction() { result = getAnOperand().(AddressOperand).getDef() }
Instruction getArgumentDef() { result = getAnOperand().(AddressOperand).getDef() }
}
/**
@@ -1185,7 +1196,20 @@ class IndirectReadSideEffectInstruction extends SideEffectInstruction {
class BufferReadSideEffectInstruction extends SideEffectInstruction {
BufferReadSideEffectInstruction() { getOpcode() instanceof Opcode::BufferReadSideEffect }
Instruction getArgumentInstruction() { result = getAnOperand().(AddressOperand).getDef() }
Instruction getArgumentDef() { result = getAnOperand().(AddressOperand).getDef() }
}
/**
* An instruction representing the read of an indirect buffer parameter within a function call.
*/
class SizedBufferReadSideEffectInstruction extends SideEffectInstruction {
SizedBufferReadSideEffectInstruction() {
getOpcode() instanceof Opcode::SizedBufferReadSideEffect
}
Instruction getArgumentDef() { result = getAnOperand().(AddressOperand).getDef() }
Instruction getSizeDef() { result = getAnOperand().(BufferSizeOperand).getDef() }
}
/**
@@ -1194,7 +1218,7 @@ class BufferReadSideEffectInstruction extends SideEffectInstruction {
class WriteSideEffectInstruction extends SideEffectInstruction {
WriteSideEffectInstruction() { getOpcode() instanceof WriteSideEffectOpcode }
Instruction getArgumentInstruction() { result = getAnOperand().(AddressOperand).getDef() }
Instruction getArgumentDef() { result = getAnOperand().(AddressOperand).getDef() }
}
/**
@@ -1220,6 +1244,20 @@ class BufferMustWriteSideEffectInstruction extends WriteSideEffectInstruction {
final override MemoryAccessKind getResultMemoryAccess() { result instanceof BufferMemoryAccess }
}
/**
* An instruction representing the write of an indirect buffer parameter within a function call. The
* entire buffer is overwritten.
*/
class SizedBufferMustWriteSideEffectInstruction extends WriteSideEffectInstruction {
SizedBufferMustWriteSideEffectInstruction() {
getOpcode() instanceof Opcode::SizedBufferMustWriteSideEffect
}
final override MemoryAccessKind getResultMemoryAccess() { result instanceof BufferMemoryAccess }
Instruction getSizeDef() { result = getAnOperand().(BufferSizeOperand).getDef() }
}
/**
* An instruction representing the potential write of an indirect parameter within a function call.
* Unlike `IndirectWriteSideEffectInstruction`, the location might not be completely overwritten.
@@ -1247,6 +1285,22 @@ class BufferMayWriteSideEffectInstruction extends WriteSideEffectInstruction {
}
}
/**
* An instruction representing the write of an indirect buffer parameter within a function call.
* Unlike `BufferWriteSideEffectInstruction`, the buffer might not be completely overwritten.
*/
class SizedBufferMayWriteSideEffectInstruction extends WriteSideEffectInstruction {
SizedBufferMayWriteSideEffectInstruction() {
getOpcode() instanceof Opcode::SizedBufferMayWriteSideEffect
}
final override MemoryAccessKind getResultMemoryAccess() {
result instanceof BufferMayMemoryAccess
}
Instruction getSizeDef() { result = getAnOperand().(BufferSizeOperand).getDef() }
}
/**
* An instruction representing a GNU or MSVC inline assembly statement.
*/

View File

@@ -254,6 +254,16 @@ class AddressOperand extends RegisterOperand {
override string toString() { result = "Address" }
}
/**
* The buffer size operand of an instruction that represents a read or write of
* a buffer.
*/
class BufferSizeOperand extends RegisterOperand {
override BufferSizeOperandTag tag;
override string toString() { result = "BufferSize" }
}
/**
* The source value operand of an instruction that loads a value from memory (e.g. `Load`,
* `ReturnValue`, `ThrowValue`).