From 68b067c8a5e1053ad23d31a58e584100407d7b08 Mon Sep 17 00:00:00 2001 From: Langston Barrett Date: Thu, 6 Oct 2022 18:57:30 -0400 Subject: [PATCH 01/11] Rename global variable relations This is the beginning of a series of commits that will try to unify the naming conventions of the Fact Generator and Datalog code. It's important to undertake this while the git history of the project is relatively short, so as to not hide valuable history by doing it later. At the same time, this set of changes will endeavor to make consistent, reasonable trade-offs between identifier clarity and brevity, and document these choices. --- FactGenerator/include/predicates.inc | 30 ++++++------- FactGenerator/src/constants.cpp | 4 +- FactGenerator/src/globals.cpp | 5 ++- datalog/export/debug-output-extended.dl | 32 +++++++------- datalog/export/debug-output.dl | 6 +-- datalog/points-to/allocations-decl.dl | 2 +- datalog/points-to/allocations-globals.dl | 8 ++-- datalog/points-to/allocations-sizes.dl | 4 +- datalog/points-to/class-type.dl | 14 +++--- datalog/points-to/constant-init.dl | 4 +- datalog/points-to/constant-points-to.dl | 4 +- datalog/points-to/cplusplus-exceptions.dl | 4 +- datalog/points-to/cplusplus.dl | 2 +- datalog/points-to/virtual-tables.dl | 20 ++++----- datalog/schema/constants.dl | 28 ++++++------ datalog/schema/global.dl | 44 +++++++++---------- .../symbol-lookup/resolve-function-calls.dl | 6 +-- doc/dev.rst | 33 ++++++++++++++ 18 files changed, 142 insertions(+), 108 deletions(-) diff --git a/FactGenerator/include/predicates.inc b/FactGenerator/include/predicates.inc index 610e326..e755f3e 100644 --- a/FactGenerator/include/predicates.inc +++ b/FactGenerator/include/predicates.inc @@ -15,17 +15,17 @@ PREDICATE(basic_block, predecessor, _basicblock_preds) GROUP_END(basic_block) GROUP_BEGIN(global_var) -PREDICATE(global_var, id, global_variable) -PREDICATE(global_var, name, global_variable_has_name) -PREDICATE(global_var, unmangl_name, global_variable_has_unmangled_name) -PREDICATE(global_var, type, global_variable_has_type) -PREDICATE(global_var, initializer, global_variable_has_initializer) -PREDICATE(global_var, section, global_variable_in_section) -PREDICATE(global_var, align, global_variable_aligned_to) -PREDICATE(global_var, flag, global_variable_has_flag) -PREDICATE(global_var, linkage, global_variable_has_linkage_type) -PREDICATE(global_var, visibility, global_variable_has_visibility) -PREDICATE(global_var, threadlocal_mode, global_variable_in_threadlocal_mode) +PREDICATE(global_var, id, global_var) +PREDICATE(global_var, name, global_var_name) +PREDICATE(global_var, demangled_name, global_var_demangled_name) +PREDICATE(global_var, type, global_var_type) +PREDICATE(global_var, initializer, global_var_initializer) +PREDICATE(global_var, section, global_var_in_section) +PREDICATE(global_var, align, global_var_aligned_to) +PREDICATE(global_var, flag, global_var_flag) +PREDICATE(global_var, linkage, global_var_linkage_type) +PREDICATE(global_var, visibility, global_var_visibility) +PREDICATE(global_var, threadlocal_mode, global_var_threadlocal_mode) GROUP_END(global_var) GROUP_BEGIN(alias) @@ -555,10 +555,10 @@ PREDICATE(function_constant, id, function_constant) PREDICATE(function_constant, name, function_constant_fn_name) GROUP_END(function_constant) -GROUP_BEGIN(global_variable_constant) -PREDICATE(global_variable_constant, id, global_variable_constant) -PREDICATE(global_variable_constant, name, global_variable_constant_name) -GROUP_END(global_variable_constant) +GROUP_BEGIN(global_var_constant) +PREDICATE(global_var_constant, id, global_var_constant) +PREDICATE(global_var_constant, name, global_var_constant_name) +GROUP_END(global_var_constant) GROUP_BEGIN(constant_array) PREDICATE(constant_array, id, constant_array) diff --git a/FactGenerator/src/constants.cpp b/FactGenerator/src/constants.cpp index d894ed0..3a6656e 100644 --- a/FactGenerator/src/constants.cpp +++ b/FactGenerator/src/constants.cpp @@ -68,8 +68,8 @@ auto FactGenerator::writeConstant(const llvm::Constant &c) const auto &global_var = cast(c); const std::string varname = "@" + global_var.getName().str(); - writeFact(pred::global_variable_constant::id, id); - writeFact(pred::global_variable_constant::name, id, varname); + writeFact(pred::global_var_constant::id, id); + writeFact(pred::global_var_constant::name, id, varname); } else if (isa(c)) { writeConstantExpr(cast(c), id); } else if (isa(c)) { diff --git a/FactGenerator/src/globals.cpp b/FactGenerator/src/globals.cpp index 58e1209..a02112f 100644 --- a/FactGenerator/src/globals.cpp +++ b/FactGenerator/src/globals.cpp @@ -69,8 +69,9 @@ void FactGenerator::writeGlobalVar( refmode_t varType = recordType(gv.getType()->getElementType()); refmode_t thrLocMode = refmode(gv.getThreadLocalMode()); - // Record unmangled variable name - writeFact(pred::global_var::unmangl_name, id, demangle(gv.getName().data())); + // Record demangled variable name + writeFact( + pred::global_var::demangled_name, id, demangle(gv.getName().data())); // Record external linkage if (!gv.hasInitializer() && gv.hasExternalLinkage()) diff --git a/datalog/export/debug-output-extended.dl b/datalog/export/debug-output-extended.dl index 1fa26cf..dfb5b3a 100644 --- a/datalog/export/debug-output-extended.dl +++ b/datalog/export/debug-output-extended.dl @@ -438,21 +438,21 @@ .output global_allocation_by_name (compress=true) .output global_allocation_by_variable (compress=true) .output global_region (compress=true) -.output global_variable (compress=true) -.output global_variable_aligned_to (compress=true) -.output global_variable_constant (compress=true) -.output global_variable_constant_name (compress=true) -.output global_variable_constant_reference (compress=true) -.output global_variable_has_flag (compress=true) -.output global_variable_has_initializer (compress=true) -.output global_variable_has_linkage_type (compress=true) -.output global_variable_has_name (compress=true) -.output global_variable_has_type (compress=true) -.output global_variable_has_unmangled_name (compress=true) -.output global_variable_has_visibility (compress=true) -.output global_variable_in_section (compress=true) -.output global_variable_in_threadlocal_mode (compress=true) -.output global_variable_is_constant (compress=true) +.output global_var (compress=true) +.output global_var_aligned_to (compress=true) +.output global_var_constant (compress=true) +.output global_var_constant_name (compress=true) +.output global_var_constant_reference (compress=true) +.output global_var_flag (compress=true) +.output global_var_initializer (compress=true) +.output global_var_linkage_type (compress=true) +.output global_var_name (compress=true) +.output global_var_type (compress=true) +.output global_var_demangled_name (compress=true) +.output global_var_visibility (compress=true) +.output global_var_in_section (compress=true) +.output global_var_in_threadlocal_mode (compress=true) +.output global_var_is_constant (compress=true) .output half_type (compress=true) .output heap_alloc_function (compress=true) .output heap_allocation (compress=true) @@ -685,7 +685,7 @@ .output schema_invalid_alias (compress=true) .output schema_invalid_constant (compress=true) .output schema_invalid_function (compress=true) -.output schema_invalid_global_variable (compress=true) +.output schema_invalid_global_var (compress=true) .output schema_invalid_instruction (compress=true) .output schema_invalid_type (compress=true) .output schema_multiple_function_names (compress=true) diff --git a/datalog/export/debug-output.dl b/datalog/export/debug-output.dl index 1e870b2..9d5accf 100644 --- a/datalog/export/debug-output.dl +++ b/datalog/export/debug-output.dl @@ -285,8 +285,8 @@ .output global_allocation_by_name (compress=true) .output global_allocation_by_variable (compress=true) .output global_region (compress=true) -.output global_variable_constant_reference (compress=true) -.output global_variable_is_constant (compress=true) +.output global_var_constant_reference (compress=true) +.output global_var_is_constant (compress=true) .output half_type (compress=true) .output heap_alloc_function (compress=true) .output heap_allocation (compress=true) @@ -424,7 +424,7 @@ .output schema_invalid_alias (compress=true) .output schema_invalid_constant (compress=true) .output schema_invalid_function (compress=true) -.output schema_invalid_global_variable (compress=true) +.output schema_invalid_global_var (compress=true) .output schema_invalid_instruction (compress=true) .output schema_invalid_type (compress=true) .output schema_multiple_function_names (compress=true) diff --git a/datalog/points-to/allocations-decl.dl b/datalog/points-to/allocations-decl.dl index 21b80aa..31d71c9 100644 --- a/datalog/points-to/allocations-decl.dl +++ b/datalog/points-to/allocations-decl.dl @@ -88,7 +88,7 @@ ptr_compatible_allocation(?alloc) :- // would change their contents ptr_compatible_allocation(?alloc) :- global_allocation_by_variable(?globalVar,?alloc), - ! global_variable_constant(?globalVar). + ! global_var_constant(?globalVar). //------------------------------------- // Additional pseudo-allocation types diff --git a/datalog/points-to/allocations-globals.dl b/datalog/points-to/allocations-globals.dl index ccf61a3..7b6f686 100644 --- a/datalog/points-to/allocations-globals.dl +++ b/datalog/points-to/allocations-globals.dl @@ -9,8 +9,8 @@ global_allocation(?alloc), global_allocation_by_variable(?gVar, ?alloc) :- - global_variable(?gVar), - global_variable_has_name(?gVar, ?name), + global_var(?gVar), + global_var_name(?gVar, ?name), ?alloc = cat("*global_alloc",?name). /// 2. Function Allocations @@ -25,7 +25,7 @@ global_allocation_by_function(?func, ?alloc) ?alloc = cat("*global_alloc",?name). global_allocation_by_name(?globalName, ?alloc) :- - global_variable_has_name(?global, ?globalName), + global_var_name(?global, ?globalName), global_allocation_by_variable(?global, ?alloc). global_allocation_by_name(?globalName, ?alloc) :- @@ -38,4 +38,4 @@ static_allocation_type(?alloc, ?type) :- static_allocation_type(?alloc, ?type) :- global_allocation_by_variable(?gVar, ?alloc), - global_variable_has_type(?gVar, ?type). \ No newline at end of file + global_var_type(?gVar, ?type). \ No newline at end of file diff --git a/datalog/points-to/allocations-sizes.dl b/datalog/points-to/allocations-sizes.dl index 333d749..241e54c 100644 --- a/datalog/points-to/allocations-sizes.dl +++ b/datalog/points-to/allocations-sizes.dl @@ -14,7 +14,7 @@ array_allocation(?alloc) :- allocation_size(?globalAlloc, ?n) :- global_allocation_by_variable(?globalVar, ?globalAlloc), - global_variable_has_linkage_type(?globalVar, ?linkage), + global_var_linkage_type(?globalVar, ?linkage), ! external_linkage_type(?linkage), static_allocation_type(?globalAlloc, ?type), type_has_size(?type, ?n), @@ -23,7 +23,7 @@ allocation_size(?globalAlloc, ?n) :- // The sizes of external globals may not match the size of their types. dynamically_sized_alloc(?alloc) :- external_linkage_type(?externalLinkage), - global_variable_has_linkage_type(?globalVar, ?externalLinkage), + global_var_linkage_type(?globalVar, ?externalLinkage), global_allocation_by_variable(?globalVar, ?alloc). //----------------------- diff --git a/datalog/points-to/class-type.dl b/datalog/points-to/class-type.dl index 093b2f8..91a9095 100644 --- a/datalog/points-to/class-type.dl +++ b/datalog/points-to/class-type.dl @@ -61,12 +61,12 @@ class_type_name(?type, ?name) :- .decl class_type_typeinfo(?classType: ClassType, ?typeInfo: GlobalVariable) -// Extract class name from unmangled type info name. The latter is of +// Extract class name from demangled type info name. The latter is of // the form: typeinfo for CLASS-NAME .decl _typeinfo_class_name(?typeInfo: GlobalVariable, ?className: symbol) _typeinfo_class_name(?typeInfo, ?className) :- typeinfo(?typeInfo), - global_variable_has_unmangled_name(?typeInfo, ?tIName), + global_var_demangled_name(?typeInfo, ?tIName), contains("typeinfo for ", ?tIName), ?n = strlen(?tIName), ?className = substr(?tIName, 13, ?n - 13). @@ -81,15 +81,15 @@ class_type_typeinfo(?classType, ?typeInfo) :- class_type_name(?classType, ?className), _typeinfo_by_class_name(?className, ?typeInfo). -// Extract class name from unmangled vtable name. The latter is of the +// Extract class name from demangled vtable name. The latter is of the // form: vtable for CLASS-NAME .decl _vtable_class_name(?vt: GlobalVariable, ?className: symbol) _vtable_class_name(?vt, ?className) :- vtable(?vt, _), - global_variable_has_unmangled_name(?vt, ?unmangledName), - contains("vtable for ", ?unmangledName), - ?n = strlen(?unmangledName), - ?className = substr(?unmangledName, 11, ?n - 11). + global_var_demangled_name(?vt, ?demangledName), + contains("vtable for ", ?demangledName), + ?n = strlen(?demangledName), + ?className = substr(?demangledName, 11, ?n - 11). .decl _vtable_by_class_name(?className: symbol, ?vt: GlobalVariable) _vtable_by_class_name(?className, ?vt) :- diff --git a/datalog/points-to/constant-init.dl b/datalog/points-to/constant-init.dl index cc4b305..4fb51e1 100644 --- a/datalog/points-to/constant-init.dl +++ b/datalog/points-to/constant-init.dl @@ -3,11 +3,11 @@ .decl initialized_by_constant(?alloc: Allocation, ?constant: Constant) initialized_by_constant(?baseAlloc, ?init) :- - global_variable_has_initializer(?var, ?init), + global_var_initializer(?var, ?init), global_allocation_by_variable(?var, ?baseAlloc). initialized_by_constant(?alloc, ?init) :- - global_variable_has_initializer(?var, ?init), + global_var_initializer(?var, ?init), global_allocation_by_variable(?var, ?baseAlloc), static_subobjects.alloc_subregion_at_array_index(?baseAlloc, 0, ?alloc). diff --git a/datalog/points-to/constant-points-to.dl b/datalog/points-to/constant-points-to.dl index 25f1cc0..b0eaada 100644 --- a/datalog/points-to/constant-points-to.dl +++ b/datalog/points-to/constant-points-to.dl @@ -21,8 +21,8 @@ constant_points_to(?constant, ?null) :- // allocation. constant_points_to(?constant, ?alloc) :- - global_variable_constant_name(?constant, ?name), - global_variable_has_name(?gVar, ?name), + global_var_constant_name(?constant, ?name), + global_var_name(?gVar, ?name), global_allocation_by_variable(?gVar, ?alloc). constant_points_to(?constant, ?alloc) :- diff --git a/datalog/points-to/cplusplus-exceptions.dl b/datalog/points-to/cplusplus-exceptions.dl index db188b3..0a1defb 100644 --- a/datalog/points-to/cplusplus-exceptions.dl +++ b/datalog/points-to/cplusplus-exceptions.dl @@ -153,8 +153,8 @@ _type_info_by_alloc(?obj, ?excTypeInfo) :- typeinfo(?var), external_typeinfo(?var) :- external_linkage_type(?externalLinkage), - global_variable_has_linkage_type(?var, ?externalLinkage), - global_variable_has_name(?var, ?name), + global_var_linkage_type(?var, ?externalLinkage), + global_var_name(?var, ?name), substr(?name, 0, strlen("@_ZTI")) = "@_ZTI". .comp ThrowInstruction { diff --git a/datalog/points-to/cplusplus.dl b/datalog/points-to/cplusplus.dl index 3b8acb4..bd04002 100644 --- a/datalog/points-to/cplusplus.dl +++ b/datalog/points-to/cplusplus.dl @@ -8,7 +8,7 @@ .decl cxx_new_function(?func: FunctionDecl) // Consider only functions with a single parameter of integer type, no -// definition, and whose unmangled name contains the keyword `new` +// definition, and whose demangled name contains the keyword `new` cxx_new_function(?func), heap_alloc_function(?func) diff --git a/datalog/points-to/virtual-tables.dl b/datalog/points-to/virtual-tables.dl index 343dd4e..7ef853b 100644 --- a/datalog/points-to/virtual-tables.dl +++ b/datalog/points-to/virtual-tables.dl @@ -24,8 +24,8 @@ vtable(?vt, ?name) :- typeinfo_vtable(?vt, ?name) :- external_linkage_type(?externalLinkage), - global_variable_has_linkage_type(?vt, ?externalLinkage), - global_variable_has_name(?vt, ?name), + global_var_linkage_type(?vt, ?externalLinkage), + global_var_name(?vt, ?name), contains("class_type_info", ?name), contains("cxxabi", ?name). @@ -51,7 +51,7 @@ typeinfo_vtable_multiple_inheritance(?vt, ?name) :- .decl constant_contains_vptr(?vt: VirtualTable, ?constant: Constant) constant_contains_vptr(?vt, ?constant) :- - global_variable_constant_name(?constant, ?name), + global_var_constant_name(?constant, ?name), vtable(?vt, ?name). constant_contains_vptr(?vt, ?outer) :- @@ -74,7 +74,7 @@ typeinfo(?typeInfo), typeinfo_has_vtable(?typeInfo,?vt) :- constant_contains_vptr(?vt, ?initializer), typeinfo_vtable(?vt, _), - global_variable_has_initializer(?typeInfo, ?initializer). + global_var_initializer(?typeInfo, ?initializer). .decl typeinfo_baseclass(?typeInfo: GlobalVariable) typeinfo_baseclass(?typeInfo) :- @@ -96,7 +96,7 @@ typeinfo_multiple_inheritance(?typeInfo) :- .decl _constant_contains_typeinfo(?typeInfo: GlobalVariable, ?constant:Constant) _constant_contains_typeinfo(?typeInfo, ?constant) :- - global_variable_constant_reference(?constant, ?typeInfo), + global_var_constant_reference(?constant, ?typeInfo), typeinfo(?typeInfo). _constant_contains_typeinfo(?typeinfo, ?outer) :- @@ -105,8 +105,8 @@ _constant_contains_typeinfo(?typeinfo, ?outer) :- vtable(?vt, ?name), vtable_typeinfo(?vt,?typeinfo) :- - global_variable_has_name(?vt, ?name), - global_variable_has_initializer(?vt, ?initializer), // get array constant of vtable + global_var_name(?vt, ?name), + global_var_initializer(?vt, ?initializer), // get array constant of vtable constant_array_index(?initializer, 1, ?tic), // type info is at index 1 _constant_contains_typeinfo(?typeinfo, ?tic). @@ -116,7 +116,7 @@ vtable_typeinfo(?vt,?typeinfo) :- .decl _typeinfo_contains_typeinfo(?outer: GlobalVariable, ?index:number, ?inner: GlobalVariable) _typeinfo_contains_typeinfo(?outer, ?index, ?inner) :- typeinfo(?outer), - global_variable_has_initializer(?outer, ?init), + global_var_initializer(?outer, ?init), constant_struct_index(?init, ?index, ?tic), _constant_contains_typeinfo(?inner, ?tic). @@ -131,7 +131,7 @@ typeinfo_base_class(?typeinfo, 0, ?baseTypeinfo) :- typeinfo_base_class(?typeinfo, ?offset, ?baseTypeinfo) :- typeinfo_multiple_inheritance(?typeinfo), _typeinfo_contains_typeinfo(?typeinfo, ?index, ?baseTypeinfo), - global_variable_has_initializer(?typeinfo, ?init), + global_var_initializer(?typeinfo, ?init), constant_struct_index(?init, ?index + 1, ?constant), constant_to_int(?constant, ?offsetMask), ?offset = ?offsetMask / 256. @@ -143,7 +143,7 @@ typeinfo_base_class(?typeinfo, ?offset, ?baseTypeinfo) :- vtable_function(?vt,?index,?func) :- vtable(?vt, _), - global_variable_has_initializer(?vt,?init), + global_var_initializer(?vt,?init), constant_array_index(?init, ?index, ?funcAsInteger), bitcast_constant_expression_from(?funcAsInteger, ?funcConstant), function_constant_fn_name(?funcConstant, ?funcName), diff --git a/datalog/schema/constants.dl b/datalog/schema/constants.dl index c41bd47..b78ada9 100644 --- a/datalog/schema/constants.dl +++ b/datalog/schema/constants.dl @@ -37,7 +37,7 @@ .decl fp_constant(c:FPConstant) .decl nullptr_constant(c:NullPtrConstant) .decl function_constant(c:FunctionConstant) -.decl global_variable_constant(c:GlobalVariableConstant) +.decl global_var_constant(c:GlobalVariableConstant) .decl constant_array(c:ConstantArray) .decl constant_struct(c:ConstantStruct) .decl constant_vector(c:ConstantVector) @@ -52,7 +52,7 @@ constant(c) :- constant_expression(c) ; constant_array(c) ; constant_struct(c) - ; global_variable_constant(c) + ; global_var_constant(c) ; integer_constant(c) ; fp_constant(c) ; nullptr_constant(c) @@ -83,28 +83,28 @@ schema_invalid_constant(Constant, __FILE__, __LINE__) :- // Constant that references global variable //--------------------------------------------- -.decl global_variable_constant_name(c:GlobalVariableConstant, name:symbol) -.decl global_variable_constant_reference(c:GlobalVariableConstant, gv:GlobalVariable) +.decl global_var_constant_name(c:GlobalVariableConstant, name:symbol) +.decl global_var_constant_reference(c:GlobalVariableConstant, gv:GlobalVariable) -global_variable_constant_reference(C, GVar) :- - global_variable_constant_name(C, Name), - global_variable_has_name(GVar, Name). +global_var_constant_reference(C, GVar) :- + global_var_constant_name(C, Name), + global_var_name(GVar, Name). schema_invalid_constant(Constant, __FILE__, __LINE__) :- schema_sanity(), - global_variable_constant(Constant), - !global_variable_constant_name(Constant, _). + global_var_constant(Constant), + !global_var_constant_name(Constant, _). schema_invalid_constant(Constant, __FILE__, __LINE__) :- schema_sanity(), - global_variable_constant(Constant), - !global_variable_constant_reference(Constant, _). + global_var_constant(Constant), + !global_var_constant_reference(Constant, _). schema_invalid_constant(Constant, __FILE__, __LINE__) :- schema_sanity(), - global_variable_constant(Constant), - global_variable_constant_reference(Constant, GVar), - global_variable_has_type(GVar, Type), + global_var_constant(Constant), + global_var_constant_reference(Constant, GVar), + global_var_type(GVar, Type), constant_has_type(Constant, PtrType), !pointer_type_has_component(PtrType, Type). diff --git a/datalog/schema/global.dl b/datalog/schema/global.dl index ed6d48e..18330a4 100644 --- a/datalog/schema/global.dl +++ b/datalog/schema/global.dl @@ -1,33 +1,33 @@ // http://llvm.org/docs/LangRef.html#global-variables .type GlobalVariable <: symbol -.decl global_variable(gv:GlobalVariable) -.decl global_variable_has_type(gv:GlobalVariable, type:Type) -.decl global_variable_has_name(gv:GlobalVariable, name:GlobalVarName) -.decl global_variable_has_unmangled_name(gv:GlobalVariable, name:symbol) -.decl global_variable_has_flag(gv:GlobalVariable, flag:Flag) -.decl global_variable_has_linkage_type(gv:GlobalVariable, link:LinkageType) -.decl global_variable_has_initializer(gv:GlobalVariable, init:Constant) -.decl global_variable_has_visibility(gv:GlobalVariable, vis:Visibility) -.decl global_variable_in_section(gv:GlobalVariable, sect:symbol) -.decl global_variable_in_threadlocal_mode(gv:GlobalVariable, mode:ThreadLocalMode) -.decl global_variable_aligned_to(gv:GlobalVariable, alignment:number) +.decl global_var(gv:GlobalVariable) +.decl global_var_type(gv:GlobalVariable, type:Type) +.decl global_var_name(gv:GlobalVariable, name:GlobalVarName) +.decl global_var_demangled_name(gv:GlobalVariable, name:symbol) +.decl global_var_flag(gv:GlobalVariable, flag:Flag) +.decl global_var_linkage_type(gv:GlobalVariable, link:LinkageType) +.decl global_var_initializer(gv:GlobalVariable, init:Constant) +.decl global_var_visibility(gv:GlobalVariable, vis:Visibility) +.decl global_var_in_section(gv:GlobalVariable, sect:symbol) +.decl global_var_threadlocal_mode(gv:GlobalVariable, mode:ThreadLocalMode) +.decl global_var_aligned_to(gv:GlobalVariable, alignment:number) -flag(Flag) :- global_variable_has_flag(_, Flag). +flag(Flag) :- global_var_flag(_, Flag). // For constraints -.decl schema_invalid_global_variable(gv:GlobalVariable, file:File, line:Line) +.decl schema_invalid_global_var(gv:GlobalVariable, file:File, line:Line) -schema_invalid_global_variable(GVar, __FILE__, __LINE__) :- +schema_invalid_global_var(GVar, __FILE__, __LINE__) :- schema_sanity(), - global_variable(GVar), - !global_variable_has_visibility(GVar, _). + global_var(GVar), + !global_var_visibility(GVar, _). -schema_invalid_global_variable(GVar, __FILE__, __LINE__) :- +schema_invalid_global_var(GVar, __FILE__, __LINE__) :- schema_sanity(), - global_variable(GVar), - !global_variable_has_linkage_type(GVar, _). + global_var(GVar), + !global_var_linkage_type(GVar, _). //------------------------------------------------------------------------------ @@ -42,10 +42,10 @@ schema_invalid_global_variable(GVar, __FILE__, __LINE__) :- // //------------------------------------------------------------------------------ -.decl global_variable_is_constant(gv:GlobalVariable) +.decl global_var_is_constant(gv:GlobalVariable) -global_variable_is_constant(GVar) :- - global_variable_has_flag(GVar, "constant"). +global_var_is_constant(GVar) :- + global_var_flag(GVar, "constant"). //------------------------------------------------------------------------------ diff --git a/datalog/symbol-lookup/resolve-function-calls.dl b/datalog/symbol-lookup/resolve-function-calls.dl index 636ecd6..f6ca9cb 100644 --- a/datalog/symbol-lookup/resolve-function-calls.dl +++ b/datalog/symbol-lookup/resolve-function-calls.dl @@ -34,9 +34,9 @@ constant_references_function(FC, Func) :- // Retrieve variable names from constants constant_references_variable(GC, GVar) :- - global_variable_constant(GC), - global_variable_constant_name(GC, Name), - global_variable_has_name(GVar, Name). + global_var_constant(GC), + global_var_constant_name(GC, Name), + global_var_name(GVar, Name). // A constant may be enclosed by a bitcast constant diff --git a/doc/dev.rst b/doc/dev.rst index 9e66be1..b1be0f7 100644 --- a/doc/dev.rst +++ b/doc/dev.rst @@ -31,6 +31,39 @@ on Github. Worked example: After waiting for the CI build, manually edit the release as required and hit "publish". +Naming Conventions +****************** + +Due to historical circumstance, cclyzer++ has many different naming conventions +in use in the Datalog code. The conventions in this section are prescriptive, +but only apply to new code. + +Abbreviations +~~~~~~~~~~~~~ + +Names must strike a balance between brevity and comprehensibility. This section +enumerates abbreviations that are considered reasonable trade-offs in this +space. This judgment is highly subjective, but must be made somehow. + +- ``asm``: Assembly +- ``block``: LLVM basic block +- ``const``: Constant +- ``global_var``: Global variable +- ``expr``: Expression +- ``func``: Function +- ``gep``: ``getelementptr`` +- ``instr``: Instruction +- ``int``: Integer +- ``ptr``: Pointer +- ``var``: Variable +- ``vec``: Vector + +Explicitly **not** further abbreviated: + +- ``array`` +- ``struct`` +- ``type`` + Performance Tuning ****************** From 2dfd0bda2476c358a1a356b7c926e028cd3a68d6 Mon Sep 17 00:00:00 2001 From: Langston Barrett Date: Thu, 6 Oct 2022 19:05:57 -0400 Subject: [PATCH 02/11] Rename block relations --- FactGenerator/include/predicates.inc | 6 +- FactGenerator/src/FactGenerator.cpp | 2 +- datalog/export/debug-output-extended.dl | 23 +- datalog/export/debug-output.dl | 352 ++++++++++++++++++++++- datalog/import/todo.dl | 14 +- datalog/schema/basic-block.dl | 42 +-- datalog/schema/landingpad-instruction.dl | 16 +- 7 files changed, 398 insertions(+), 57 deletions(-) diff --git a/FactGenerator/include/predicates.inc b/FactGenerator/include/predicates.inc index e755f3e..2c0c52d 100644 --- a/FactGenerator/include/predicates.inc +++ b/FactGenerator/include/predicates.inc @@ -10,9 +10,9 @@ #define PREDICATE(group, name, fname) #endif -GROUP_BEGIN(basic_block) -PREDICATE(basic_block, predecessor, _basicblock_preds) -GROUP_END(basic_block) +GROUP_BEGIN(block) +PREDICATE(block, predecessor, block_predecessor) +GROUP_END(block) GROUP_BEGIN(global_var) PREDICATE(global_var, id, global_var) diff --git a/FactGenerator/src/FactGenerator.cpp b/FactGenerator/src/FactGenerator.cpp index ba26f26..1ab267c 100644 --- a/FactGenerator/src/FactGenerator.cpp +++ b/FactGenerator/src/FactGenerator.cpp @@ -140,7 +140,7 @@ auto FactGenerator::processModule( pi != pi_end; ++pi) { refmode_t predBB = refmode(**pi); - writeFact(pred::basic_block::predecessor, bbRef, predBB); + writeFact(pred::block::predecessor, bbRef, predBB); } // iterating over basic block instructions diff --git a/datalog/export/debug-output-extended.dl b/datalog/export/debug-output-extended.dl index dfb5b3a..1c4a471 100644 --- a/datalog/export/debug-output-extended.dl +++ b/datalog/export/debug-output-extended.dl @@ -6,7 +6,6 @@ .output _assert_type_compatible_ptr_points_to_alias (compress=true) .output _assert_type_compatible_relaxed (compress=true) .output _assert_type_compatible_relaxed_inner (compress=true) -.output _basicblock_preds (compress=true) .output _catch_clause (compress=true) .output _clause (compress=true) .output _constant_contains_typeinfo (compress=true) @@ -144,11 +143,6 @@ .output attribute (compress=true) .output available_externally_linkage_type (compress=true) .output basic_allocation (compress=true) -.output basicblock (compress=true) -.output basicblock_first_instruction (compress=true) -.output basicblock_last_instruction (compress=true) -.output basicblock_of_label (compress=true) -.output basicblock_predecessors (compress=true) .output bitcast_constant_expression (compress=true) .output bitcast_constant_expression_from (compress=true) .output bitcast_constant_expression_to_type (compress=true) @@ -156,6 +150,12 @@ .output bitcast_instruction_from_operand (compress=true) .output bitcast_instruction_from_type (compress=true) .output bitcast_instruction_to_type (compress=true) +.output block (compress=true) +.output block_first_instruction (compress=true) +.output block_last_instruction (compress=true) +.output block_of_label (compress=true) +.output block_predecessor (compress=true) +.output block_predecessors (compress=true) .output boolean_type (compress=true) .output boolean_vector_type (compress=true) .output br_cond_instruction (compress=true) @@ -194,6 +194,7 @@ .output cmpxchg_instruction_is_volatile (compress=true) .output cmpxchg_instruction_new_value (compress=true) .output cmpxchg_instruction_ordering (compress=true) +.output cmpxchg_instruction_type (compress=true) .output cold_calling_convention (compress=true) .output common_linkage_type (compress=true) .output constant (compress=true) @@ -443,16 +444,16 @@ .output global_var_constant (compress=true) .output global_var_constant_name (compress=true) .output global_var_constant_reference (compress=true) +.output global_var_demangled_name (compress=true) .output global_var_flag (compress=true) +.output global_var_in_section (compress=true) .output global_var_initializer (compress=true) +.output global_var_is_constant (compress=true) .output global_var_linkage_type (compress=true) .output global_var_name (compress=true) +.output global_var_threadlocal_mode (compress=true) .output global_var_type (compress=true) -.output global_var_demangled_name (compress=true) .output global_var_visibility (compress=true) -.output global_var_in_section (compress=true) -.output global_var_in_threadlocal_mode (compress=true) -.output global_var_is_constant (compress=true) .output half_type (compress=true) .output heap_alloc_function (compress=true) .output heap_allocation (compress=true) @@ -512,7 +513,7 @@ .output instruction (compress=true) .output instruction_assigns_to (compress=true) .output instruction_has_flag (compress=true) -.output instruction_in_basicblock (compress=true) +.output instruction_in_block (compress=true) .output instruction_in_function (compress=true) .output instruction_pos (compress=true) .output instruction_returns_type (compress=true) diff --git a/datalog/export/debug-output.dl b/datalog/export/debug-output.dl index 9d5accf..1c4a471 100644 --- a/datalog/export/debug-output.dl +++ b/datalog/export/debug-output.dl @@ -10,6 +10,7 @@ .output _clause (compress=true) .output _constant_contains_typeinfo (compress=true) .output _constant_expression_next_index (compress=true) +.output _constant_in_function (compress=true) .output _eligible_base_type (compress=true) .output _filter_clause (compress=true) .output _getelementptr_constant_expression_base_type (compress=true) @@ -17,14 +18,21 @@ .output _getelementptr_constant_expression_interm_type (compress=true) .output _getelementptr_constant_expression_value_type (compress=true) .output _instr_calls_func (compress=true) +.output _instruction_bb_entry (compress=true) .output _landingpad_contains_landingpad_instruction (compress=true) .output _landingpad_first_nonphi (compress=true) +.output _landingpad_instruction_catch_clause (compress=true) .output _landingpad_instruction_clause (compress=true) +.output _landingpad_instruction_filter_clause (compress=true) .output _landingpad_starting_phi (compress=true) .output _nvars_by_pt_total (compress=true) .output _phi_instruction_pair (compress=true) +.output _phi_instruction_pair_label (compress=true) +.output _phi_instruction_pair_value (compress=true) .output _string_iteration_trick (compress=true) .output _switch_instruction_case (compress=true) +.output _switch_instruction_case_label (compress=true) +.output _switch_instruction_case_value (compress=true) .output _type_expands_base_type (compress=true) .output _type_info_by_alloc (compress=true) .output _typed_alloc (compress=true) @@ -33,21 +41,38 @@ .output _typeinfo_class_type (compress=true) .output _typeinfo_contains_typeinfo (compress=true) .output _valid_landingpad (compress=true) +.output _variable_in_function (compress=true) .output _vtable_by_class_name (compress=true) .output _vtable_class_name (compress=true) .output acq_rel_ordering (compress=true) .output acquire_ordering (compress=true) .output actual_arg (compress=true) +.output add_instruction (compress=true) +.output add_instruction_first_operand (compress=true) +.output add_instruction_second_operand (compress=true) .output aggregate_type (compress=true) +.output alias (compress=true) +.output alias_aliasee (compress=true) +.output alias_has_linkage_type (compress=true) +.output alias_has_name (compress=true) +.output alias_has_type (compress=true) +.output alias_has_visibility (compress=true) .output aliased_constants (compress=true) .output alloc_context (compress=true) .output alloc_points_to_sizes (compress=true) .output alloc_region (compress=true) +.output alloca_instruction (compress=true) +.output alloca_instruction_alignment (compress=true) +.output alloca_instruction_size (compress=true) +.output alloca_instruction_type (compress=true) .output allocation (compress=true) .output allocation_by_instruction (compress=true) .output allocation_pos (compress=true) .output allocation_size (compress=true) .output analyze_pointer_arithmetic (compress=true) +.output and_instruction (compress=true) +.output and_instruction_first_operand (compress=true) +.output and_instruction_second_operand (compress=true) .output appending_linkage_type (compress=true) .output argv_alloc (compress=true) .output argv_ptr_points_to (compress=true) @@ -60,6 +85,12 @@ .output array_indices__no_typecomp (compress=true) .output array_offset (compress=true) .output array_pointer_type (compress=true) +.output array_type (compress=true) +.output array_type_has_component (compress=true) +.output array_type_has_size (compress=true) +.output ashr_instruction (compress=true) +.output ashr_instruction_first_operand (compress=true) +.output ashr_instruction_second_operand (compress=true) .output asm_call_instruction (compress=true) .output assert_alloc_with_ctx_complete (compress=true) .output assert_array_type_size (compress=true) @@ -103,21 +134,48 @@ .output atomic_operation_umin (compress=true) .output atomic_operation_xchg (compress=true) .output atomic_operation_xor (compress=true) +.output atomicrmw_instruction (compress=true) +.output atomicrmw_instruction_address (compress=true) +.output atomicrmw_instruction_is_volatile (compress=true) +.output atomicrmw_instruction_operation (compress=true) +.output atomicrmw_instruction_ordering (compress=true) +.output atomicrmw_instruction_value (compress=true) .output attribute (compress=true) .output available_externally_linkage_type (compress=true) .output basic_allocation (compress=true) -.output basicblock (compress=true) -.output basicblock_first_instruction (compress=true) -.output basicblock_last_instruction (compress=true) -.output basicblock_of_label (compress=true) -.output basicblock_predecessors (compress=true) +.output bitcast_constant_expression (compress=true) +.output bitcast_constant_expression_from (compress=true) .output bitcast_constant_expression_to_type (compress=true) +.output bitcast_instruction (compress=true) +.output bitcast_instruction_from_operand (compress=true) .output bitcast_instruction_from_type (compress=true) +.output bitcast_instruction_to_type (compress=true) +.output block (compress=true) +.output block_first_instruction (compress=true) +.output block_last_instruction (compress=true) +.output block_of_label (compress=true) +.output block_predecessor (compress=true) +.output block_predecessors (compress=true) .output boolean_type (compress=true) .output boolean_vector_type (compress=true) +.output br_cond_instruction (compress=true) +.output br_cond_instruction_condition (compress=true) +.output br_cond_instruction_iffalse_label (compress=true) +.output br_cond_instruction_iftrue_label (compress=true) +.output br_instruction (compress=true) +.output br_uncond_instruction (compress=true) +.output br_uncond_instruction_dest_label (compress=true) +.output call_instruction (compress=true) +.output call_instruction_arg (compress=true) +.output call_instruction_fn_operand (compress=true) .output call_instruction_fn_target (compress=true) .output call_instruction_fn_type (compress=true) +.output call_instruction_is_tail_opt (compress=true) .output call_instruction_return_type (compress=true) +.output call_instruction_with_calling_convention (compress=true) +.output call_instruction_with_fn_attribute (compress=true) +.output call_instruction_with_param_attribute (compress=true) +.output call_instruction_with_return_attribute (compress=true) .output call_or_invoke_instruction_fn_type (compress=true) .output called_at_startup (compress=true) .output calling_convention (compress=true) @@ -129,16 +187,37 @@ .output class_type_typeinfo (compress=true) .output class_type_vtable (compress=true) .output clause (compress=true) +.output cmpxchg_instruction (compress=true) +.output cmpxchg_instruction_address (compress=true) +.output cmpxchg_instruction_cmp_value (compress=true) .output cmpxchg_instruction_cmp_value_type (compress=true) +.output cmpxchg_instruction_is_volatile (compress=true) +.output cmpxchg_instruction_new_value (compress=true) +.output cmpxchg_instruction_ordering (compress=true) +.output cmpxchg_instruction_type (compress=true) .output cold_calling_convention (compress=true) .output common_linkage_type (compress=true) +.output constant (compress=true) +.output constant_array (compress=true) +.output constant_array_has_size (compress=true) +.output constant_array_index (compress=true) .output constant_contains_vptr (compress=true) +.output constant_expression (compress=true) +.output constant_has_type (compress=true) +.output constant_has_value (compress=true) .output constant_hashes_to (compress=true) .output constant_in_function (compress=true) .output constant_points_to (compress=true) .output constant_ptr_points_to (compress=true) .output constant_references_function (compress=true) .output constant_references_variable (compress=true) +.output constant_struct (compress=true) +.output constant_struct_has_size (compress=true) +.output constant_struct_index (compress=true) +.output constant_to_int (compress=true) +.output constant_vector (compress=true) +.output constant_vector_has_size (compress=true) +.output constant_vector_index (compress=true) .output constructor_class_type (compress=true) .output context (compress=true) .output context_depth (compress=true) @@ -178,10 +257,20 @@ .output extern_weak_linkage_type (compress=true) .output external_linkage_type (compress=true) .output external_typeinfo (compress=true) +.output extractelement_instruction (compress=true) +.output extractelement_instruction_base (compress=true) +.output extractelement_instruction_index (compress=true) .output extractelement_instruction_type (compress=true) +.output extractvalue_instruction (compress=true) +.output extractvalue_instruction_base (compress=true) .output extractvalue_instruction_base_type (compress=true) +.output extractvalue_instruction_index (compress=true) .output extractvalue_instruction_interm_type (compress=true) +.output extractvalue_instruction_nindices (compress=true) .output extractvalue_instruction_value_type (compress=true) +.output fadd_instruction (compress=true) +.output fadd_instruction_first_operand (compress=true) +.output fadd_instruction_second_operand (compress=true) .output failing_assert_every_gep_instruction_points_to_something (compress=true) .output failing_assert_global_allocations_have_sizes (compress=true) .output failing_assert_reachable_pointer_vars_point_to_something (compress=true) @@ -204,18 +293,52 @@ .output fcmp_condition__ult (compress=true) .output fcmp_condition__une (compress=true) .output fcmp_condition__uno (compress=true) +.output fcmp_instruction (compress=true) +.output fcmp_instruction_condition (compress=true) +.output fcmp_instruction_first_operand (compress=true) .output fcmp_instruction_from_type (compress=true) +.output fcmp_instruction_second_operand (compress=true) .output fcmp_instruction_to_type (compress=true) +.output fdiv_instruction (compress=true) +.output fdiv_instruction_first_operand (compress=true) +.output fdiv_instruction_second_operand (compress=true) +.output fence_instruction (compress=true) +.output fence_instruction_ordering (compress=true) .output filter_clause (compress=true) .output flag (compress=true) .output float_type (compress=true) +.output fmul_instruction (compress=true) +.output fmul_instruction_first_operand (compress=true) +.output fmul_instruction_second_operand (compress=true) .output fp128_type (compress=true) +.output fp_constant (compress=true) .output fp_pointer_type (compress=true) +.output fp_type (compress=true) .output fp_vector_type (compress=true) +.output fpext_instruction (compress=true) +.output fpext_instruction_from_operand (compress=true) .output fpext_instruction_from_type (compress=true) +.output fpext_instruction_to_type (compress=true) +.output fptosi_instruction (compress=true) +.output fptosi_instruction_from_operand (compress=true) .output fptosi_instruction_from_type (compress=true) +.output fptosi_instruction_to_type (compress=true) +.output fptoui_instruction (compress=true) +.output fptoui_instruction_from_operand (compress=true) .output fptoui_instruction_from_type (compress=true) +.output fptoui_instruction_to_type (compress=true) +.output fptrunc_instruction (compress=true) +.output fptrunc_instruction_from_operand (compress=true) .output fptrunc_instruction_from_type (compress=true) +.output fptrunc_instruction_to_type (compress=true) +.output frem_instruction (compress=true) +.output frem_instruction_first_operand (compress=true) +.output frem_instruction_second_operand (compress=true) +.output fsub_instruction (compress=true) +.output fsub_instruction_first_operand (compress=true) +.output fsub_instruction_second_operand (compress=true) +.output function (compress=true) +.output function_alignment (compress=true) .output function_attribute__alignstack (compress=true) .output function_attribute__alwaysinline (compress=true) .output function_attribute__argmemonly (compress=true) @@ -253,22 +376,44 @@ .output function_by_location (compress=true) .output function_by_value_param (compress=true) .output function_calls_function (compress=true) +.output function_constant (compress=true) +.output function_constant_fn_name (compress=true) +.output function_decl (compress=true) .output function_decl_to_defn (compress=true) +.output function_has_linkage_type (compress=true) +.output function_has_name (compress=true) .output function_has_pts_signature (compress=true) +.output function_has_signature (compress=true) +.output function_has_type (compress=true) +.output function_has_visibility (compress=true) .output function_in_degree (compress=true) +.output function_in_section (compress=true) .output function_is_illformed (compress=true) .output function_is_wellformed (compress=true) .output function_missing_pts_signature (compress=true) .output function_needs_pts_signature (compress=true) .output function_nparams (compress=true) .output function_out_degree (compress=true) +.output function_param (compress=true) .output function_param_by_value (compress=true) .output function_param_not_by_value (compress=true) .output function_returns_value (compress=true) +.output function_type (compress=true) .output function_type_has_no_pointer_args (compress=true) .output function_type_has_no_pointer_return (compress=true) .output function_type_has_pointer_arg (compress=true) .output function_type_has_pointer_return (compress=true) +.output function_type_has_varargs (compress=true) +.output function_type_nparams (compress=true) +.output function_type_param (compress=true) +.output function_type_return (compress=true) +.output function_with_attribute (compress=true) +.output function_with_calling_convention (compress=true) +.output function_with_gc (compress=true) +.output function_with_param_attribute (compress=true) +.output function_with_pers_fn (compress=true) +.output function_with_return_attribute (compress=true) +.output function_with_unnamed_addr (compress=true) .output functions_by_in_degree (compress=true) .output functions_by_out_degree (compress=true) .output gep_constant_expr_index_offset (compress=true) @@ -276,17 +421,39 @@ .output gep_constant_expr_points_to (compress=true) .output gep_is_vector_based (compress=true) .output gep_zero_index_offset (compress=true) +.output getelementptr_constant_expression (compress=true) +.output getelementptr_constant_expression_base (compress=true) +.output getelementptr_constant_expression_index (compress=true) +.output getelementptr_constant_expression_nindices (compress=true) +.output getelementptr_instruction (compress=true) +.output getelementptr_instruction_base (compress=true) .output getelementptr_instruction_base_type (compress=true) +.output getelementptr_instruction_index (compress=true) .output getelementptr_instruction_index_type (compress=true) .output getelementptr_instruction_interm_type (compress=true) +.output getelementptr_instruction_is_inbounds (compress=true) +.output getelementptr_instruction_nindices (compress=true) .output getelementptr_instruction_value_type (compress=true) .output global_allocation (compress=true) .output global_allocation_by_function (compress=true) .output global_allocation_by_name (compress=true) .output global_allocation_by_variable (compress=true) .output global_region (compress=true) +.output global_var (compress=true) +.output global_var_aligned_to (compress=true) +.output global_var_constant (compress=true) +.output global_var_constant_name (compress=true) .output global_var_constant_reference (compress=true) +.output global_var_demangled_name (compress=true) +.output global_var_flag (compress=true) +.output global_var_in_section (compress=true) +.output global_var_initializer (compress=true) .output global_var_is_constant (compress=true) +.output global_var_linkage_type (compress=true) +.output global_var_name (compress=true) +.output global_var_threadlocal_mode (compress=true) +.output global_var_type (compress=true) +.output global_var_visibility (compress=true) .output half_type (compress=true) .output heap_alloc_function (compress=true) .output heap_allocation (compress=true) @@ -310,21 +477,45 @@ .output icmp_condition__ugt (compress=true) .output icmp_condition__ule (compress=true) .output icmp_condition__ult (compress=true) +.output icmp_instruction (compress=true) +.output icmp_instruction_condition (compress=true) +.output icmp_instruction_first_operand (compress=true) .output icmp_instruction_from_type (compress=true) +.output icmp_instruction_second_operand (compress=true) .output icmp_instruction_to_type (compress=true) .output indirect_call_instruction (compress=true) .output indirect_call_or_invoke_instruction (compress=true) .output indirect_invoke_instruction (compress=true) +.output indirectbr_instruction (compress=true) +.output indirectbr_instruction_address (compress=true) +.output indirectbr_instruction_label (compress=true) +.output indirectbr_instruction_nlabels (compress=true) .output initial_exec_threadlocal_mode (compress=true) .output initialized_by_constant (compress=true) +.output inline_asm (compress=true) +.output inline_asm_constraints (compress=true) +.output inline_asm_text (compress=true) .output inlined_constructors (compress=true) .output insensitive (compress=true) +.output insertelement_instruction (compress=true) +.output insertelement_instruction_base (compress=true) +.output insertelement_instruction_index (compress=true) .output insertelement_instruction_type (compress=true) +.output insertelement_instruction_value (compress=true) +.output insertvalue_instruction (compress=true) +.output insertvalue_instruction_base (compress=true) .output insertvalue_instruction_base_type (compress=true) +.output insertvalue_instruction_index (compress=true) .output insertvalue_instruction_interm_type (compress=true) +.output insertvalue_instruction_nindices (compress=true) +.output insertvalue_instruction_value (compress=true) .output insertvalue_instruction_value_type (compress=true) .output instruction (compress=true) -.output instruction_in_basicblock (compress=true) +.output instruction_assigns_to (compress=true) +.output instruction_has_flag (compress=true) +.output instruction_in_block (compress=true) +.output instruction_in_function (compress=true) +.output instruction_pos (compress=true) .output instruction_returns_type (compress=true) .output int1_type (compress=true) .output int32_type (compress=true) @@ -332,27 +523,55 @@ .output int64_type (compress=true) .output int8_array_type (compress=true) .output int8_type (compress=true) +.output integer_constant (compress=true) .output integer_pointer_type (compress=true) +.output integer_type (compress=true) .output integer_vector_type (compress=true) .output intel_ocl_bi_calling_convention (compress=true) .output internal_linkage_type (compress=true) +.output inttoptr_constant_expression (compress=true) +.output inttoptr_constant_expression_from (compress=true) +.output inttoptr_instruction (compress=true) +.output inttoptr_instruction_from_operand (compress=true) .output inttoptr_instruction_from_type (compress=true) +.output inttoptr_instruction_to_type (compress=true) +.output invoke_instruction (compress=true) +.output invoke_instruction_arg (compress=true) +.output invoke_instruction_exception_label (compress=true) +.output invoke_instruction_fn_operand (compress=true) .output invoke_instruction_fn_target (compress=true) .output invoke_instruction_fn_type (compress=true) +.output invoke_instruction_normal_label (compress=true) .output invoke_instruction_return_type (compress=true) +.output invoke_instruction_with_calling_convention (compress=true) +.output invoke_instruction_with_fn_attribute (compress=true) +.output invoke_instruction_with_param_attribute (compress=true) +.output invoke_instruction_with_return_attribute (compress=true) .output label_type (compress=true) .output landingpad (compress=true) +.output landingpad_instruction (compress=true) .output landingpad_instruction_clause (compress=true) +.output landingpad_instruction_is_cleanup (compress=true) +.output landingpad_instruction_nclauses (compress=true) .output landingpad_instruction_pers_fn (compress=true) +.output landingpad_instruction_type (compress=true) .output linkage_type (compress=true) .output linker_private_linkage_type (compress=true) .output linker_private_weak_linkage_type (compress=true) .output linkonce_linkage_type (compress=true) .output linkonce_odr_linkage_type (compress=true) +.output load_instruction (compress=true) +.output load_instruction_address (compress=true) .output load_instruction_address_ptr_type (compress=true) +.output load_instruction_alignment (compress=true) .output load_instruction_is_atomic (compress=true) +.output load_instruction_is_volatile (compress=true) +.output load_instruction_ordering (compress=true) .output local_dynamic_threadlocal_mode (compress=true) .output local_exec_threadlocal_mode (compress=true) +.output lshr_instruction (compress=true) +.output lshr_instruction_first_operand (compress=true) +.output lshr_instruction_second_operand (compress=true) .output main_context (compress=true) .output main_function (compress=true) .output max_context_depth (compress=true) @@ -363,7 +582,11 @@ .output minimal_suffix_len (compress=true) .output monotonic_ordering (compress=true) .output msp430_intr_calling_convention (compress=true) +.output mul_instruction (compress=true) +.output mul_instruction_first_operand (compress=true) +.output mul_instruction_second_operand (compress=true) .output nallocs_by_pt_size (compress=true) +.output next_instruction (compress=true) .output next_instruction_index (compress=true) .output non_allocation (compress=true) .output nonempty_ptr (compress=true) @@ -372,14 +595,19 @@ .output nonempty_vars (compress=true) .output not_array_index (compress=true) .output null_location (compress=true) +.output nullptr_constant (compress=true) .output num_direct_calls_to_func (compress=true) .output num_indirect_calls_to_compatible_func (compress=true) .output nvars_by_pt_size (compress=true) +.output opaque_struct_type (compress=true) .output operand (compress=true) .output operand_has_type (compress=true) .output operand_is_firstclass (compress=true) .output operand_is_pointer (compress=true) .output operand_to_int (compress=true) +.output or_instruction (compress=true) +.output or_instruction_first_operand (compress=true) +.output or_instruction_second_operand (compress=true) .output ordering (compress=true) .output parameter_attribute__align (compress=true) .output parameter_attribute__byval (compress=true) @@ -402,18 +630,48 @@ .output path_component_at_index (compress=true) .output path_ends_in (compress=true) .output path_ends_in_array_index (compress=true) +.output phi_instruction (compress=true) +.output phi_instruction_npairs (compress=true) .output phi_instruction_pair (compress=true) +.output phi_instruction_type (compress=true) .output pointer_index (compress=true) .output pointer_offset (compress=true) +.output pointer_type (compress=true) .output pointer_type_base_component (compress=true) +.output pointer_type_has_addr_space (compress=true) +.output pointer_type_has_component (compress=true) .output pointer_type_to_firstclass (compress=true) .output pointer_vector_type (compress=true) +.output poison_constant (compress=true) .output ppc_fp128_type (compress=true) .output primary_superclass (compress=true) +.output primitive_type (compress=true) .output private_linkage_type (compress=true) .output protected_visibility (compress=true) .output ptr_compatible_allocation (compress=true) +.output ptrtoint_constant_expression (compress=true) +.output ptrtoint_constant_expression_from (compress=true) +.output ptrtoint_instruction (compress=true) +.output ptrtoint_instruction_from_operand (compress=true) .output ptrtoint_instruction_from_type (compress=true) +.output ptrtoint_instruction_to_type (compress=true) +.output pts_signature_arg_alloc (compress=true) +.output pts_signature_arg_alloc_once (compress=true) +.output pts_signature_arg_memcpy_arg (compress=true) +.output pts_signature_arg_memcpy_arg_reachable (compress=true) +.output pts_signature_arg_memcpy_global (compress=true) +.output pts_signature_arg_memcpy_global_reachable (compress=true) +.output pts_signature_arg_points_to_global (compress=true) +.output pts_signature_global_memcpy_arg (compress=true) +.output pts_signature_global_memcpy_arg_reachable (compress=true) +.output pts_signature_none (compress=true) +.output pts_signature_return_aliases_arg (compress=true) +.output pts_signature_return_aliases_arg_reachable (compress=true) +.output pts_signature_return_aliases_global (compress=true) +.output pts_signature_return_aliases_global_reachable (compress=true) +.output pts_signature_return_alloc (compress=true) +.output pts_signature_return_alloc_once (compress=true) +.output pts_signature_return_points_to_global (compress=true) .output ptx_device_calling_convention (compress=true) .output ptx_kernel_calling_convention (compress=true) .output reachable_var (compress=true) @@ -421,6 +679,10 @@ .output region (compress=true) .output release_ordering (compress=true) .output relevant_suffix_position (compress=true) +.output resume_instruction (compress=true) +.output resume_instruction_operand (compress=true) +.output ret_instruction (compress=true) +.output ret_instruction_value (compress=true) .output schema_invalid_alias (compress=true) .output schema_invalid_constant (compress=true) .output schema_invalid_function (compress=true) @@ -429,16 +691,39 @@ .output schema_invalid_type (compress=true) .output schema_multiple_function_names (compress=true) .output schema_sanity (compress=true) +.output sdiv_instruction (compress=true) +.output sdiv_instruction_first_operand (compress=true) +.output sdiv_instruction_second_operand (compress=true) .output secondary_superclass (compress=true) +.output select_instruction (compress=true) +.output select_instruction_condition (compress=true) +.output select_instruction_first_operand (compress=true) +.output select_instruction_second_operand (compress=true) .output seq_cst_ordering (compress=true) +.output sext_instruction (compress=true) +.output sext_instruction_from_operand (compress=true) .output sext_instruction_from_type (compress=true) +.output sext_instruction_to_type (compress=true) +.output shl_instruction (compress=true) +.output shl_instruction_first_operand (compress=true) +.output shl_instruction_second_operand (compress=true) +.output shufflevector_instruction (compress=true) .output shufflevector_instruction_element_type (compress=true) +.output shufflevector_instruction_first_vector (compress=true) .output shufflevector_instruction_input_type (compress=true) +.output shufflevector_instruction_mask (compress=true) .output shufflevector_instruction_mask_type (compress=true) +.output shufflevector_instruction_second_vector (compress=true) .output signature_allocation (compress=true) +.output sitofp_instruction (compress=true) +.output sitofp_instruction_from_operand (compress=true) .output sitofp_instruction_from_type (compress=true) +.output sitofp_instruction_to_type (compress=true) .output sized_alloc_instr (compress=true) .output split_path (compress=true) +.output srem_instruction (compress=true) +.output srem_instruction_first_operand (compress=true) +.output srem_instruction_second_operand (compress=true) .output stack_allocation (compress=true) .output stack_allocation_by_instruction (compress=true) .output stack_allocation_by_parameter (compress=true) @@ -446,28 +731,53 @@ .output stack_region (compress=true) .output startup_context (compress=true) .output static_allocation_type (compress=true) +.output store_instruction (compress=true) +.output store_instruction_address (compress=true) .output store_instruction_address_ptr_type (compress=true) +.output store_instruction_alignment (compress=true) .output store_instruction_is_atomic (compress=true) +.output store_instruction_is_volatile (compress=true) +.output store_instruction_ordering (compress=true) +.output store_instruction_value (compress=true) .output store_instruction_value_type (compress=true) .output stripctx_var_alias (compress=true) .output struct_pointer_type (compress=true) +.output struct_type (compress=true) +.output struct_type_field (compress=true) +.output struct_type_field_bit_offset (compress=true) .output struct_type_field_name (compress=true) .output struct_type_field_name_at_offset (compress=true) +.output struct_type_field_offset (compress=true) +.output struct_type_has_name (compress=true) .output struct_type_inherits_at_offset (compress=true) +.output struct_type_nfields (compress=true) +.output sub_instruction (compress=true) +.output sub_instruction_first_operand (compress=true) +.output sub_instruction_second_operand (compress=true) .output suffix (compress=true) .output superclass (compress=true) +.output switch_instruction (compress=true) .output switch_instruction_case (compress=true) +.output switch_instruction_default_label (compress=true) +.output switch_instruction_ncases (compress=true) +.output switch_instruction_operand (compress=true) +.output target_dependent_attribute (compress=true) .output template_type (compress=true) .output template_typeinfo (compress=true) .output terminator_instruction (compress=true) .output threadlocal_mode (compress=true) +.output trunc_instruction (compress=true) +.output trunc_instruction_from_operand (compress=true) .output trunc_instruction_from_type (compress=true) +.output trunc_instruction_to_type (compress=true) .output type (compress=true) .output type_compatible (compress=true) .output type_compatible_up_to_arg (compress=true) .output type_compatible_up_to_field (compress=true) .output type_contains_pointer (compress=true) +.output type_has_size (compress=true) .output type_has_subelement (compress=true) +.output type_has_unpadded_size (compress=true) .output type_is_firstclass (compress=true) .output typeinfo (compress=true) .output typeinfo_base_class (compress=true) @@ -479,26 +789,50 @@ .output typeinfo_vtable_baseclass (compress=true) .output typeinfo_vtable_multiple_inheritance (compress=true) .output typeinfo_vtable_single_inheritance (compress=true) +.output udiv_instruction (compress=true) +.output udiv_instruction_first_operand (compress=true) +.output udiv_instruction_second_operand (compress=true) +.output uitofp_instruction (compress=true) +.output uitofp_instruction_from_operand (compress=true) .output uitofp_instruction_from_type (compress=true) +.output uitofp_instruction_to_type (compress=true) +.output undef_constant (compress=true) .output unify_allocation_size (compress=true) .output unknown_location (compress=true) .output unordered_ordering (compress=true) .output unpadded_struct_type (compress=true) +.output unreachable_instruction (compress=true) +.output urem_instruction (compress=true) +.output urem_instruction_first_operand (compress=true) +.output urem_instruction_second_operand (compress=true) .output user_option_default (compress=true) .output user_option_defaulted (compress=true) .output user_option_invalid (compress=true) .output user_option_selected (compress=true) .output user_option_valid_value (compress=true) .output user_option_value (compress=true) +.output user_options (compress=true) +.output va_arg_instruction (compress=true) +.output va_arg_instruction_type (compress=true) +.output va_arg_instruction_va_list (compress=true) .output var_alias (compress=true) .output var_alias_sizes (compress=true) .output var_points_to_sizes (compress=true) +.output variable (compress=true) +.output variable_has_debug_decl_pos (compress=true) +.output variable_has_debug_source_name (compress=true) +.output variable_has_name (compress=true) +.output variable_has_type (compress=true) .output variable_in_function (compress=true) .output variable_is_firstclass (compress=true) .output variable_is_label (compress=true) .output variable_is_pointer (compress=true) .output vector_pointer_type (compress=true) +.output vector_type (compress=true) +.output vector_type_has_component (compress=true) +.output vector_type_has_size (compress=true) .output visibility (compress=true) +.output void_ret_instruction (compress=true) .output void_type (compress=true) .output vtable (compress=true) .output vtable_function (compress=true) @@ -510,4 +844,10 @@ .output x86_stdcall_calling_convention (compress=true) .output x86_thiscall_calling_convention (compress=true) .output x86mmx_type (compress=true) +.output xor_instruction (compress=true) +.output xor_instruction_first_operand (compress=true) +.output xor_instruction_second_operand (compress=true) +.output zext_instruction (compress=true) +.output zext_instruction_from_operand (compress=true) .output zext_instruction_from_type (compress=true) +.output zext_instruction_to_type (compress=true) diff --git a/datalog/import/todo.dl b/datalog/import/todo.dl index 1a78c5a..776f9f9 100644 --- a/datalog/import/todo.dl +++ b/datalog/import/todo.dl @@ -1,20 +1,20 @@ // TODO(lb): Move these elsewhere! These were erroneously included in the // import*.dl files before these were derived from predicates.inc. -.decl _basicblock_preds(v0:symbol, v1:symbol) -basicblock_predecessors(bb0, bb1) :- - _basicblock_preds(e0, e1), +.decl block_predecessor(v0:symbol, v1:symbol) +block_predecessors(bb0, bb1) :- + block_predecessor(e0, e1), variable_is_label(e0), variable_is_label(e1), - basicblock_of_label(bb0, e0), - basicblock_of_label(bb1, e1). + block_of_label(bb0, e0), + block_of_label(bb1, e1). .decl _instruction_bb_entry(v0:symbol, v1:symbol) -instruction_in_basicblock(e0, bb) :- +instruction_in_block(e0, bb) :- _instruction_bb_entry(e0, e1), instruction(e0), variable_is_label(e1), - basicblock_of_label(bb, e1). + block_of_label(bb, e1). .decl _phi_instruction_pair_label(v0:symbol, v1:number, v2:symbol) .decl _phi_instruction_pair_value(v0:symbol, v1:number, v2:symbol) diff --git a/datalog/schema/basic-block.dl b/datalog/schema/basic-block.dl index 7bc11a0..5788b3e 100644 --- a/datalog/schema/basic-block.dl +++ b/datalog/schema/basic-block.dl @@ -3,44 +3,44 @@ //------------------------------------ .type BasicBlock <: symbol -.decl basicblock(bb:BasicBlock) +.decl block(bb:BasicBlock) // Every instruction must be inside a single basic block -.decl instruction_in_basicblock(instr:Instruction, bb:BasicBlock) +.decl instruction_in_block(instr:Instruction, bb:BasicBlock) schema_invalid_instruction(Instr, __FILE__, __LINE__) :- schema_sanity(), instruction(Instr), - !instruction_in_basicblock(Instr, _). + !instruction_in_block(Instr, _). // Basic block predicates -.decl basicblock_of_label(bb:BasicBlock, label:Variable) -.decl basicblock_predecessors(bb:BasicBlock, bbpred:BasicBlock) -.decl basicblock_first_instruction(bb:BasicBlock, instr:Instruction) -.decl basicblock_last_instruction(bb:BasicBlock, instr:Instruction) +.decl block_of_label(bb:BasicBlock, label:Variable) +.decl block_predecessors(bb:BasicBlock, bbpred:BasicBlock) +.decl block_first_instruction(bb:BasicBlock, instr:Instruction) +.decl block_last_instruction(bb:BasicBlock, instr:Instruction) -basicblock(BB) :- basicblock_of_label(BB, _). -basicblock_of_label(cat("basicblock:", Label), Label) :- +block(BB) :- block_of_label(BB, _). +block_of_label(cat("block:", Label), Label) :- variable_is_label(Label). -basicblock_first_instruction(BB, First) :- - instruction_in_basicblock(First, BB), +block_first_instruction(BB, First) :- + instruction_in_block(First, BB), !next_instruction(_, First). -basicblock_first_instruction(BB2, First) :- +block_first_instruction(BB2, First) :- next_instruction(Last, First), - instruction_in_basicblock(Last, BB1), - instruction_in_basicblock(First, BB2), + instruction_in_block(Last, BB1), + instruction_in_block(First, BB2), BB1 != BB2. -basicblock_last_instruction(BB1, Last) :- +block_last_instruction(BB1, Last) :- next_instruction(Last, First), - instruction_in_basicblock(Last, BB1), - instruction_in_basicblock(First, BB2), + instruction_in_block(Last, BB1), + instruction_in_block(First, BB2), BB1 != BB2. -basicblock_last_instruction(BB, Last) :- - instruction_in_basicblock(Last, BB), +block_last_instruction(BB, Last) :- + instruction_in_block(Last, BB), !next_instruction(Last, _). @@ -55,7 +55,7 @@ basicblock_last_instruction(BB, Last) :- schema_invalid_instruction(Instr, __FILE__, __LINE__) :- schema_sanity(), next_instruction(Instr, NextInstr), - instruction_in_basicblock(Instr, BB1), - instruction_in_basicblock(NextInstr, BB2), + instruction_in_block(Instr, BB1), + instruction_in_block(NextInstr, BB2), !terminator_instruction(Instr), BB1 != BB2. diff --git a/datalog/schema/landingpad-instruction.dl b/datalog/schema/landingpad-instruction.dl index 5e6797f..c77154e 100644 --- a/datalog/schema/landingpad-instruction.dl +++ b/datalog/schema/landingpad-instruction.dl @@ -58,7 +58,7 @@ landingpad_instruction_pers_fn(Instr, PersFunction) :- landingpad(BB) :- invoke_instruction_exception_label(_, Label), - basicblock_of_label(BB, Label). + block_of_label(BB, Label). // Compute the segment of consecutive phi-instructions from starting @@ -68,14 +68,14 @@ landingpad(BB) :- _landingpad_starting_phi(BB, Instr) :- landingpad(BB), - basicblock_first_instruction(BB, Instr), + block_first_instruction(BB, Instr), phi_instruction(Instr). _landingpad_starting_phi(BB, NextInstr) :- _landingpad_starting_phi(BB, Instr), next_instruction(Instr, NextInstr), phi_instruction(NextInstr), - instruction_in_basicblock(NextInstr, BB). + instruction_in_block(NextInstr, BB). // Compute the first non-phi instruction, per landing pad. @@ -84,14 +84,14 @@ _landingpad_starting_phi(BB, NextInstr) :- _landingpad_first_nonphi(BB, Instr) :- landingpad(BB), - basicblock_first_instruction(BB, Instr), + block_first_instruction(BB, Instr), !phi_instruction(Instr). _landingpad_first_nonphi(BB, NextInstr) :- _landingpad_starting_phi(BB, Instr), next_instruction(Instr, NextInstr), !phi_instruction(NextInstr), - instruction_in_basicblock(NextInstr, BB). + instruction_in_block(NextInstr, BB). // Same as above, via different computation. @@ -99,7 +99,7 @@ _landingpad_first_nonphi(BB, NextInstr) :- _landingpad_contains_landingpad_instruction(BB, Instr) :- landingpad_instruction(Instr), - instruction_in_basicblock(Instr, BB), + instruction_in_block(Instr, BB), landingpad(BB). @@ -192,7 +192,7 @@ schema_invalid_instruction(Instr, __FILE__, __LINE__) :- schema_invalid_instruction(Instr, __FILE__, __LINE__) :- schema_sanity(), landingpad(BB), !_valid_landingpad(BB), - basicblock_first_instruction(BB, Instr). + block_first_instruction(BB, Instr). // 3rd Constraint: in case of multiple landing pad instructions in a @@ -206,7 +206,7 @@ schema_invalid_instruction(Instr, __FILE__, __LINE__) :- schema_invalid_instruction(Instr, __FILE__, __LINE__) :- schema_sanity(), landingpad_instruction(Instr), - instruction_in_basicblock(Instr, BB), + instruction_in_block(Instr, BB), !landingpad(BB). From b0f1e1eef4973e967bc329cf1e257ff47f8598a3 Mon Sep 17 00:00:00 2001 From: Langston Barrett Date: Thu, 6 Oct 2022 19:07:49 -0400 Subject: [PATCH 03/11] Rename alias relations --- FactGenerator/include/predicates.inc | 8 ++++---- datalog/export/debug-output-extended.dl | 8 ++++---- datalog/export/debug-output.dl | 8 ++++---- datalog/schema/global.dl | 14 +++++++------- datalog/symbol-lookup/resolve-function-calls.dl | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/FactGenerator/include/predicates.inc b/FactGenerator/include/predicates.inc index 2c0c52d..cc218e8 100644 --- a/FactGenerator/include/predicates.inc +++ b/FactGenerator/include/predicates.inc @@ -30,10 +30,10 @@ GROUP_END(global_var) GROUP_BEGIN(alias) PREDICATE(alias, id, alias) -PREDICATE(alias, name, alias_has_name) -PREDICATE(alias, type, alias_has_type) -PREDICATE(alias, linkage, alias_has_linkage_type) -PREDICATE(alias, visibility, alias_has_visibility) +PREDICATE(alias, name, alias_name) +PREDICATE(alias, type, alias_type) +PREDICATE(alias, linkage, alias_linkage_type) +PREDICATE(alias, visibility, alias_visibility) PREDICATE(alias, aliasee, alias_aliasee) GROUP_END(alias) diff --git a/datalog/export/debug-output-extended.dl b/datalog/export/debug-output-extended.dl index 1c4a471..3b335bc 100644 --- a/datalog/export/debug-output-extended.dl +++ b/datalog/export/debug-output-extended.dl @@ -53,10 +53,10 @@ .output aggregate_type (compress=true) .output alias (compress=true) .output alias_aliasee (compress=true) -.output alias_has_linkage_type (compress=true) -.output alias_has_name (compress=true) -.output alias_has_type (compress=true) -.output alias_has_visibility (compress=true) +.output alias_linkage_type (compress=true) +.output alias_name (compress=true) +.output alias_type (compress=true) +.output alias_visibility (compress=true) .output aliased_constants (compress=true) .output alloc_context (compress=true) .output alloc_points_to_sizes (compress=true) diff --git a/datalog/export/debug-output.dl b/datalog/export/debug-output.dl index 1c4a471..3b335bc 100644 --- a/datalog/export/debug-output.dl +++ b/datalog/export/debug-output.dl @@ -53,10 +53,10 @@ .output aggregate_type (compress=true) .output alias (compress=true) .output alias_aliasee (compress=true) -.output alias_has_linkage_type (compress=true) -.output alias_has_name (compress=true) -.output alias_has_type (compress=true) -.output alias_has_visibility (compress=true) +.output alias_linkage_type (compress=true) +.output alias_name (compress=true) +.output alias_type (compress=true) +.output alias_visibility (compress=true) .output aliased_constants (compress=true) .output alloc_context (compress=true) .output alloc_points_to_sizes (compress=true) diff --git a/datalog/schema/global.dl b/datalog/schema/global.dl index 18330a4..02c5298 100644 --- a/datalog/schema/global.dl +++ b/datalog/schema/global.dl @@ -134,10 +134,10 @@ local_exec_threadlocal_mode("thread_local(localexec)"). .type Alias <: symbol .decl alias(x:Alias) .decl alias_aliasee(x:Alias, y:Constant) -.decl alias_has_name(x:Alias, name:symbol) -.decl alias_has_type(x:Alias, type:Type) -.decl alias_has_linkage_type(x:Alias, link:LinkageType) -.decl alias_has_visibility(x:Alias, vis:Visibility) +.decl alias_name(x:Alias, name:symbol) +.decl alias_type(x:Alias, type:Type) +.decl alias_linkage_type(x:Alias, link:LinkageType) +.decl alias_visibility(x:Alias, vis:Visibility) // For constraints .decl schema_invalid_alias(x:Alias, file:File, line:Line) @@ -145,16 +145,16 @@ local_exec_threadlocal_mode("thread_local(localexec)"). schema_invalid_alias(Var, __FILE__, __LINE__) :- schema_sanity(), alias(Var), - !alias_has_type(Var, _). + !alias_type(Var, _). schema_invalid_alias(Var, __FILE__, __LINE__) :- schema_sanity(), alias(Var), - !alias_has_name(Var, _). + !alias_name(Var, _). schema_invalid_alias(Var, __FILE__, __LINE__) :- schema_sanity(), - alias_has_linkage_type(Var, Link), + alias_linkage_type(Var, Link), !private_linkage_type(Link), !linker_private_linkage_type(Link), !linker_private_weak_linkage_type(Link), diff --git a/datalog/symbol-lookup/resolve-function-calls.dl b/datalog/symbol-lookup/resolve-function-calls.dl index f6ca9cb..3588742 100644 --- a/datalog/symbol-lookup/resolve-function-calls.dl +++ b/datalog/symbol-lookup/resolve-function-calls.dl @@ -68,7 +68,7 @@ _aliasee(Constant, Alias) :- // `Constant` is actually an alias (via `Alias`) _alias(Constant, Alias) :- constant_has_value(Constant, AliasName), - alias_has_name(Alias, AliasName). + alias_name(Alias, AliasName). // `OtherConstant` is an alias of `Constant` aliased_constants(OtherConstant, Constant) :- From e119c5718083be5c1da503610a9c465e89721fa7 Mon Sep 17 00:00:00 2001 From: Langston Barrett Date: Thu, 6 Oct 2022 19:32:16 -0400 Subject: [PATCH 04/11] Rename function relations --- FactGenerator/include/predicates.inc | 80 +++--- FactGenerator/src/FactGenerator.cpp | 2 +- FactGenerator/src/constants.cpp | 6 +- FactGenerator/src/functions.cpp | 41 ++- FactGenerator/src/variables.cpp | 2 +- datalog/CMakeLists.txt | 6 +- datalog/callgraph/entry-points.dl | 24 +- datalog/context/drop.dl | 44 ++-- datalog/context/interface.dl | 6 +- datalog/context/lift.dl | 2 +- datalog/export/debug-output-extended.dl | 234 +++++++++--------- datalog/export/debug-output.dl | 234 +++++++++--------- datalog/export/statistics.dl | 4 +- datalog/import/todo.dl | 16 +- datalog/options/user-options.dl | 4 +- datalog/points-to/allocations-decl.dl | 14 +- datalog/points-to/allocations-globals.dl | 18 +- datalog/points-to/allocations-sizes.dl | 12 +- datalog/points-to/allocations-subobjects.dl | 18 +- datalog/points-to/allocations-type.dl | 6 +- datalog/points-to/allocations.dl | 50 ++-- datalog/points-to/assertions.dl | 22 +- datalog/points-to/assignment.dl | 20 +- datalog/points-to/at-exit.dl | 46 ++-- datalog/points-to/class-type.dl | 12 +- datalog/points-to/constant-points-to.dl | 14 +- datalog/points-to/core.dl | 16 +- datalog/points-to/cplusplus-exceptions.dl | 32 +-- datalog/points-to/cplusplus.dl | 40 +-- datalog/points-to/interprocedural.dl | 86 +++---- datalog/points-to/memcpy.dl | 2 +- datalog/points-to/points-to-statistics.dl | 68 ++--- datalog/points-to/region.dl | 8 +- datalog/points-to/signatures.dl | 102 ++++---- datalog/points-to/subset.dl | 4 +- datalog/points-to/type-back-propagation.dl | 12 +- datalog/points-to/type_compatibility.dl | 20 +- datalog/points-to/types.dl | 4 +- datalog/points-to/unification.dl | 18 +- datalog/points-to/virtual-tables.dl | 10 +- datalog/schema/attr.dl | 124 ++++++++++ datalog/schema/attribute.dl | 124 ---------- datalog/schema/call-instruction.dl | 76 +++--- datalog/schema/calling-convention.dl | 2 +- datalog/schema/constants.dl | 12 +- datalog/schema/func.dl | 163 ++++++++++++ datalog/schema/function.dl | 163 ------------ datalog/schema/global.dl | 2 +- datalog/schema/indirectbr-instruction.dl | 2 +- datalog/schema/instruction.dl | 6 +- datalog/schema/invoke-instruction.dl | 74 +++--- datalog/schema/landingpad-instruction.dl | 34 +-- datalog/schema/resume-instruction.dl | 6 +- datalog/schema/ret-instruction.dl | 36 +-- datalog/schema/schema.project | 4 +- datalog/schema/type.dl | 24 +- ...unction-calls.dl => resolve-func-calls.dl} | 68 ++--- datalog/symbol-lookup/symbol-lookup.project | 2 +- doc/dev.rst | 6 +- test/pa_invariant_test.py | 24 +- 60 files changed, 1157 insertions(+), 1154 deletions(-) create mode 100644 datalog/schema/attr.dl delete mode 100644 datalog/schema/attribute.dl create mode 100644 datalog/schema/func.dl delete mode 100644 datalog/schema/function.dl rename datalog/symbol-lookup/{resolve-function-calls.dl => resolve-func-calls.dl} (68%) diff --git a/FactGenerator/include/predicates.inc b/FactGenerator/include/predicates.inc index cc218e8..d7866bd 100644 --- a/FactGenerator/include/predicates.inc +++ b/FactGenerator/include/predicates.inc @@ -37,24 +37,24 @@ PREDICATE(alias, visibility, alias_visibility) PREDICATE(alias, aliasee, alias_aliasee) GROUP_END(alias) -GROUP_BEGIN(function) -PREDICATE(function, id_defn, function) -PREDICATE(function, id_decl, function_decl) -PREDICATE(function, unnamed_addr, function_with_unnamed_addr) -PREDICATE(function, linkage, function_has_linkage_type) -PREDICATE(function, visibility, function_has_visibility) -PREDICATE(function, calling_conv, function_with_calling_convention) -PREDICATE(function, section, function_in_section) -PREDICATE(function, alignment, function_alignment) -PREDICATE(function, fn_attr, function_with_attribute) -PREDICATE(function, gc, function_with_gc) -PREDICATE(function, pers_fn, function_with_pers_fn) -PREDICATE(function, name, function_has_name) -PREDICATE(function, type, function_has_type) -PREDICATE(function, signature, function_has_signature) -PREDICATE(function, param, function_param) -PREDICATE(function, ret_attr, function_with_return_attribute) -PREDICATE(function, param_attr, function_with_param_attribute) +GROUP_BEGIN(func) +PREDICATE(func, id_defn, func) +PREDICATE(func, id_decl, func_decl) +PREDICATE(func, unnamed_addr, func_unnamed_addr) +PREDICATE(func, linkage, func_linkage_type) +PREDICATE(func, visibility, func_visibility) +PREDICATE(func, calling_conv, func_calling_convention) +PREDICATE(func, section, func_section) +PREDICATE(func, alignment, func_alignment) +PREDICATE(func, fn_attr, func_attr) +PREDICATE(func, gc, func_gc) +PREDICATE(func, pers_fn, func_pers_fn) +PREDICATE(func, name, func_name) +PREDICATE(func, type, func_ty) +PREDICATE(func, signature, func_signature) +PREDICATE(func, param, func_param) +PREDICATE(func, ret_attr, func_return_attr) +PREDICATE(func, param_attr, func_param_attr) GROUP_END(function) GROUP_BEGIN(instruction) @@ -62,7 +62,7 @@ PREDICATE(instruction, to, instruction_assigns_to) PREDICATE(instruction, flag, instruction_has_flag) PREDICATE(instruction, next, next_instruction) PREDICATE(instruction, bb_entry, _instruction_bb_entry) -PREDICATE(instruction, function, instruction_in_function) +PREDICATE(instruction, function, instruction_in_func) PREDICATE(instruction, pos, instruction_pos) PREDICATE(instruction, unreachable, unreachable_instruction) GROUP_END(instruction) @@ -223,9 +223,9 @@ PREDICATE(invoke, instr_indirect, indirect_invoke_instruction) PREDICATE(invoke, function, invoke_instruction_fn_operand) PREDICATE(invoke, arg, invoke_instruction_arg) PREDICATE(invoke, calling_conv, invoke_instruction_with_calling_convention) -PREDICATE(invoke, ret_attr, invoke_instruction_with_return_attribute) -PREDICATE(invoke, param_attr, invoke_instruction_with_param_attribute) -PREDICATE(invoke, fn_attr, invoke_instruction_with_fn_attribute) +PREDICATE(invoke, ret_attr, invoke_instruction_with_return_attr) +PREDICATE(invoke, param_attr, invoke_instruction_with_param_attr) +PREDICATE(invoke, fn_attr, invoke_instruction_with_fn_attr) PREDICATE(invoke, normal_label, invoke_instruction_normal_label) PREDICATE(invoke, exc_label, invoke_instruction_exception_label) GROUP_END(invoke) @@ -445,9 +445,9 @@ PREDICATE(call, instr_indirect, indirect_call_instruction) PREDICATE(call, function, call_instruction_fn_operand) PREDICATE(call, arg, call_instruction_arg) PREDICATE(call, calling_conv, call_instruction_with_calling_convention) -PREDICATE(call, ret_attr, call_instruction_with_return_attribute) -PREDICATE(call, param_attr, call_instruction_with_param_attribute) -PREDICATE(call, fn_attr, call_instruction_with_fn_attribute) +PREDICATE(call, ret_attr, call_instruction_with_return_attr) +PREDICATE(call, param_attr, call_instruction_with_param_attr) +PREDICATE(call, fn_attr, call_instruction_with_fn_attr) PREDICATE(call, tail, call_instruction_is_tail_opt) GROUP_END(call) @@ -480,11 +480,11 @@ PREDICATE(type, store_size, type_has_unpadded_size) GROUP_END(type) GROUP_BEGIN(func_type) -PREDICATE(func_type, id, function_type) -PREDICATE(func_type, varargs, function_type_has_varargs) -PREDICATE(func_type, return_type, function_type_return) -PREDICATE(func_type, param_type, function_type_param) -PREDICATE(func_type, nparams, function_type_nparams) +PREDICATE(func_type, id, func_type) +PREDICATE(func_type, varargs, func_type_has_varargs) +PREDICATE(func_type, return_type, func_type_return) +PREDICATE(func_type, param_type, func_type_param) +PREDICATE(func_type, nparams, func_type_nparams) GROUP_END(func_type) GROUP_BEGIN(ptr_type) @@ -522,7 +522,7 @@ PREDICATE(variable, id, variable) PREDICATE(variable, type, variable_has_type) PREDICATE(variable, source_name, variable_has_debug_source_name) PREDICATE(variable, pos, variable_has_debug_decl_pos) -PREDICATE(variable, in_function, _variable_in_function) +PREDICATE(variable, in_func, _variable_in_func) PREDICATE(variable, name, variable_has_name) GROUP_END(variable) @@ -530,7 +530,7 @@ GROUP_BEGIN(constant) PREDICATE(constant, id, constant) PREDICATE(constant, type, constant_has_type) PREDICATE(constant, value, constant_has_value) -PREDICATE(constant, in_function, _constant_in_function) +PREDICATE(constant, in_func, _constant_in_func) PREDICATE(constant, expr, constant_expression) PREDICATE(constant, hash, constant_hashes_to) PREDICATE(constant, to_integer, constant_to_int) @@ -550,10 +550,10 @@ GROUP_BEGIN(nullptr_constant) PREDICATE(nullptr_constant, id, nullptr_constant) GROUP_END(nullptr_constant) -GROUP_BEGIN(function_constant) -PREDICATE(function_constant, id, function_constant) -PREDICATE(function_constant, name, function_constant_fn_name) -GROUP_END(function_constant) +GROUP_BEGIN(func_constant) +PREDICATE(func_constant, id, func_constant) +PREDICATE(func_constant, name, func_constant_fn_name) +GROUP_END(func_constant) GROUP_BEGIN(global_var_constant) PREDICATE(global_var_constant, id, global_var_constant) @@ -620,11 +620,11 @@ PREDICATE(inline_asm, text, inline_asm_text) PREDICATE(inline_asm, constraints, inline_asm_constraints) GROUP_END(inline_asm) -// Function Attributes +// Function Attrs -GROUP_BEGIN(attribute) -PREDICATE(attribute, target_dependent, target_dependent_attribute) -GROUP_END(attribute) +GROUP_BEGIN(attr) +PREDICATE(attr, target_dependent, target_dependent_attr) +GROUP_END(attr) // Signatures diff --git a/FactGenerator/src/FactGenerator.cpp b/FactGenerator/src/FactGenerator.cpp index 1ab267c..395dc9b 100644 --- a/FactGenerator/src/FactGenerator.cpp +++ b/FactGenerator/src/FactGenerator.cpp @@ -127,7 +127,7 @@ auto FactGenerator::processModule( // Record basic block entry as a label writeFact(pred::variable::id, bbRef); writeFact(pred::variable::type, bbRef, "label"); - writeFact(pred::variable::in_function, bbRef, func.getName().str()); + writeFact(pred::variable::in_func, bbRef, func.getName().str()); // Record variable name part size_t idx = bbRef.find_last_of("%!"); diff --git a/FactGenerator/src/constants.cpp b/FactGenerator/src/constants.cpp index 3a6656e..7a92985 100644 --- a/FactGenerator/src/constants.cpp +++ b/FactGenerator/src/constants.cpp @@ -31,7 +31,7 @@ auto FactGenerator::writeConstant(const llvm::Constant &c) const llvm::Function *containingFunction = functionContext(); if (containingFunction) { const std::string funcname = "@" + containingFunction->getName().str(); - writeFact(pred::constant::in_function, id, funcname); + writeFact(pred::constant::in_func, id, funcname); } // Record constant value @@ -62,8 +62,8 @@ auto FactGenerator::writeConstant(const llvm::Constant &c) const auto &func = cast(c); const std::string funcname = "@" + func.getName().str(); - writeFact(pred::function_constant::id, id); - writeFact(pred::function_constant::name, id, funcname); + writeFact(pred::func_constant::id, id); + writeFact(pred::func_constant::name, id, funcname); } else if (isa(c)) { const auto &global_var = cast(c); const std::string varname = "@" + global_var.getName().str(); diff --git a/FactGenerator/src/functions.cpp b/FactGenerator/src/functions.cpp index bfbfeaa..589dfa7 100644 --- a/FactGenerator/src/functions.cpp +++ b/FactGenerator/src/functions.cpp @@ -21,40 +21,39 @@ void FactGenerator::writeFunction( refmode_t typeSignature = recordType(func.getFunctionType()); // Record function type signature - writeFact(pred::function::type, funcref, typeSignature); + writeFact(pred::func::type, funcref, typeSignature); // Record function signature (name plus type signature) after // unmangling - writeFact( - pred::function::signature, funcref, demangle(func.getName().data())); + writeFact(pred::func::signature, funcref, demangle(func.getName().data())); // Record function linkage, visibility, alignment, and GC - if (!linkage.empty()) writeFact(pred::function::linkage, funcref, linkage); + if (!linkage.empty()) writeFact(pred::func::linkage, funcref, linkage); if (!visibility.empty()) - writeFact(pred::function::visibility, funcref, visibility); + writeFact(pred::func::visibility, funcref, visibility); if (func.getAlignment()) - writeFact(pred::function::alignment, funcref, func.getAlignment()); + writeFact(pred::func::alignment, funcref, func.getAlignment()); - if (func.hasGC()) writeFact(pred::function::gc, funcref, func.getGC()); + if (func.hasGC()) writeFact(pred::func::gc, funcref, func.getGC()); if (func.hasPersonalityFn()) { llvm::Constant *pers_fn = func.getPersonalityFn(); refmode_t pers_fn_ref = writeConstant(*pers_fn); - writeFact(pred::function::pers_fn, funcref, pers_fn_ref); + writeFact(pred::func::pers_fn, funcref, pers_fn_ref); } // Record calling convection if it not defaults to C if (func.getCallingConv() != llvm::CallingConv::C) { refmode_t cconv = refmode(func.getCallingConv()); - writeFact(pred::function::calling_conv, funcref, cconv); + writeFact(pred::func::calling_conv, funcref, cconv); } // Record function name const std::string funcname = "@" + func.getName().str(); - writeFact(pred::function::name, funcref, funcname); + writeFact(pred::func::name, funcref, funcname); // Address not significant @@ -63,7 +62,7 @@ void FactGenerator::writeFunction( // NB: for macOS LLVM-3.9.0svn this does not work, i.e. the test should be //#if LLVM_VERSION_MAJOR > 3 or equivalent to force else case if (func.hasGlobalUnnamedAddr()) { - writeFact(pred::function::unnamed_addr, funcref); + writeFact(pred::func::unnamed_addr, funcref); } // TODO Record appropriately @@ -71,7 +70,7 @@ void FactGenerator::writeFunction( } #else if (func.hasUnnamedAddr()) { - writeFact(pred::function::unnamed_addr, funcref); + writeFact(pred::func::unnamed_addr, funcref); } #endif @@ -80,31 +79,31 @@ void FactGenerator::writeFunction( if (Attrs.hasAttributes(Attributes::ReturnIndex)) writeFact( - pred::function::ret_attr, + pred::func::ret_attr, funcref, Attrs.getAsString(Attributes::ReturnIndex)); - writeFnAttributes(funcref, Attrs); + writeFnAttributes(funcref, Attrs); if (func.isDeclaration()) { // Record as a function declaration entity - writeFact(pred::function::id_decl, funcref); + writeFact(pred::func::id_decl, funcref); // Nothing more to do for function declarations return; } // Record function definition entity - writeFact(pred::function::id_defn, funcref); + writeFact(pred::func::id_defn, funcref); // Record section if (func.hasSection()) { #if LLVM_VERSION_MAJOR > 3 || \ (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 9) llvm::StringRef secStr = func.getSection(); - writeFact(pred::function::section, funcref, secStr.str()); + writeFact(pred::func::section, funcref, secStr.str()); #else - writeFact(pred::function::section, funcref, func.getSection()); + writeFact(pred::func::section, funcref, func.getSection()); #endif } @@ -120,7 +119,7 @@ void FactGenerator::writeFunction( // Save parameters for CPG result_map_.insert({boost::flyweight(varId), arg}); - writeFact(pred::function::param, funcref, index++, varId); + writeFact(pred::func::param, funcref, index++, varId); recordVariable(varId, arg->getType()); } } @@ -154,7 +153,7 @@ void FactGenerator::writeFnAttributes( // Record target-dependent attributes if (attrib.isStringAttribute()) - writeFact(pred::attribute::target_dependent, attr); + writeFact(pred::attr::target_dependent, attr); // Record attribute by kind switch (index) { @@ -174,7 +173,7 @@ void FactGenerator::writeFnAttributes( // Instantiate template method -template void FactGenerator::writeFnAttributes( +template void FactGenerator::writeFnAttributes( const refmode_t &refmode, const Attributes Attrs); template void FactGenerator::writeFnAttributes( diff --git a/FactGenerator/src/variables.cpp b/FactGenerator/src/variables.cpp index 761a9af..9ce2435 100644 --- a/FactGenerator/src/variables.cpp +++ b/FactGenerator/src/variables.cpp @@ -17,7 +17,7 @@ void FactGenerator::writeLocalVariables() { // Record variable entity with its type and containing function writeFact(pred::variable::id, varId); writeFact(pred::variable::type, varId, recordType(type)); - writeFact(pred::variable::in_function, varId, funcname); + writeFact(pred::variable::in_func, varId, funcname); // Record variable name part size_t idx = varId.find_last_of("%!"); diff --git a/datalog/CMakeLists.txt b/datalog/CMakeLists.txt index ea96565..efde69d 100644 --- a/datalog/CMakeLists.txt +++ b/datalog/CMakeLists.txt @@ -1,7 +1,7 @@ set(DL_SOURCES ${CMAKE_CURRENT_LIST_DIR}/import/import.dl ${CMAKE_CURRENT_LIST_DIR}/import/todo.dl - ${CMAKE_CURRENT_LIST_DIR}/symbol-lookup/resolve-function-calls.dl + ${CMAKE_CURRENT_LIST_DIR}/symbol-lookup/resolve-func-calls.dl ${CMAKE_CURRENT_LIST_DIR}/points-to/allocations-globals.dl ${CMAKE_CURRENT_LIST_DIR}/points-to/allocations-sizes.dl ${CMAKE_CURRENT_LIST_DIR}/points-to/allocations-type.dl @@ -41,7 +41,7 @@ set(DL_SOURCES ${CMAKE_CURRENT_LIST_DIR}/schema/udiv-instruction.dl ${CMAKE_CURRENT_LIST_DIR}/schema/va-arg-instruction.dl ${CMAKE_CURRENT_LIST_DIR}/schema/debug.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/function.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/func.dl ${CMAKE_CURRENT_LIST_DIR}/schema/fcmp-instruction.dl ${CMAKE_CURRENT_LIST_DIR}/schema/fdiv-instruction.dl ${CMAKE_CURRENT_LIST_DIR}/schema/select-instruction.dl @@ -101,7 +101,7 @@ set(DL_SOURCES ${CMAKE_CURRENT_LIST_DIR}/schema/switch-instruction.dl ${CMAKE_CURRENT_LIST_DIR}/schema/lshr-instruction.dl ${CMAKE_CURRENT_LIST_DIR}/schema/fpext-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/attribute.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/attr.dl ${CMAKE_CURRENT_LIST_DIR}/schema/landingpad-instruction.dl ${CMAKE_CURRENT_LIST_DIR}/callgraph/entry-points.dl ${CMAKE_CURRENT_LIST_DIR}/export/auxiliary-records.dl diff --git a/datalog/callgraph/entry-points.dl b/datalog/callgraph/entry-points.dl index 9f59528..db1d96d 100644 --- a/datalog/callgraph/entry-points.dl +++ b/datalog/callgraph/entry-points.dl @@ -1,22 +1,22 @@ -// Entry points; functions reachable by definition (call-graph roots) +// Entry points; funcs reachable by definition (call-graph roots) .decl entry_point(func:FunctionDecl) -// The main function and any other functions called automatically at +// The main func and any other funcs called automatically at // startup, are our program's entry points entry_point(Func) :- - main_function(Func) + main_func(Func) ; called_at_startup(Func). //----------------------------------------------------------------------- -// Main function +// Main func //----------------------------------------------------------------------- -.decl main_function(func:Function) +.decl main_func(func:Function) -main_function(MainFn) :- - function_has_name(MainFn, "@main"), - function(MainFn). +main_func(MainFn) :- + func_name(MainFn, "@main"), + func(MainFn). // Set up argv .decl argv_alloc(alloc: BasicAllocation) @@ -48,18 +48,18 @@ dynamically_sized_alloc(newAlloc) .decl argv_var_points_to(?aCtx: Context, ?alloc: Allocation, ?ctx: Context, ?var: Variable) argv_var_points_to(aCtx, argvAlloc, mainCtx, argvVar) :- - main_function(main), + main_func(main), argv_alloc(argvAlloc), - function_param(main, 1, argvVar), + func_param(main, 1, argvVar), empty_alloc_context(aCtx), main_context(mainCtx). //----------------------------------------------------------------------- // C Runtime performs initializations before running main() by calling -// functions (e.g., global constructors) insided special sections. +// funcs (e.g., global constructors) insided special sections. //----------------------------------------------------------------------- .decl called_at_startup(func:FunctionDecl) called_at_startup(StartupFn) :- - function_in_section(StartupFn, ".text.startup"). + func_section(StartupFn, ".text.startup"). diff --git a/datalog/context/drop.dl b/datalog/context/drop.dl index bed3455..d60a83e 100644 --- a/datalog/context/drop.dl +++ b/datalog/context/drop.dl @@ -10,13 +10,13 @@ // Data-Driven Context Tunneling". // // For callsite-sensitivity, we skip adding a new context item when it can be -// statically proven that the function has exactly one callsite. In this case, the +// statically proven that the func has exactly one callsite. In this case, the // callsite is not an informative context entry, whereas the caller's callsite // might be. This behavior leads to more contexts/precision, so is toggleable. // -// Moreover, if the function takes no pointer arguments, the callsite can't have -// *any* impact on the points-to facts in the body of the function, so we erase the -// entire context. Similarly, if the function does not return any pointers, it +// Moreover, if the func takes no pointer arguments, the callsite can't have +// *any* impact on the points-to facts in the body of the func, so we erase the +// entire context. Similarly, if the func does not return any pointers, it // can't have any impact on the points-to facts in the caller. //--------------------------------------------------------- @@ -25,7 +25,7 @@ .decl num_direct_calls_to_func(?n: number, ?func: FunctionDecl) num_direct_calls_to_func(?n, ?func) :- - function_decl(?func), + func_decl(?func), ?n = count : _instr_calls_func(_, ?func). .decl call_or_invoke_instruction_fn_type(?instr: Instruction, ?type: Type) @@ -41,7 +41,7 @@ indirect_call_or_invoke_instruction(?instr) :- .decl num_indirect_calls_to_compatible_func(?n: number, ?func: FunctionDecl) num_indirect_calls_to_compatible_func(?n, ?func) :- - function_has_type(?func, ?targetType), + func_ty(?func, ?targetType), ?n = count : { indirect_call_or_invoke_instruction(?instr), call_or_invoke_instruction_fn_type(?instr, ?fnType), @@ -67,25 +67,25 @@ type_contains_pointer(?type) :- type_has_subelement(?type, ?sub), pointer_type(?sub). -.decl function_type_has_pointer_arg(?funcType: FunctionType) -function_type_has_pointer_arg(?funcType) :- - function_type_param(?funcType, _, ?paramType), +.decl func_type_has_pointer_arg(?funcType: FunctionType) +func_type_has_pointer_arg(?funcType) :- + func_type_param(?funcType, _, ?paramType), type_contains_pointer(?paramType). -.decl function_type_has_no_pointer_args(?funcType: FunctionType) -function_type_has_no_pointer_args(?funcType) :- - function_type(?funcType), - !function_type_has_pointer_arg(?funcType). +.decl func_type_has_no_pointer_args(?funcType: FunctionType) +func_type_has_no_pointer_args(?funcType) :- + func_type(?funcType), + !func_type_has_pointer_arg(?funcType). -.decl function_type_has_pointer_return(?funcType: FunctionType) -function_type_has_pointer_return(?funcType) :- - function_type_return(?funcType, ?returnType), +.decl func_type_has_pointer_return(?funcType: FunctionType) +func_type_has_pointer_return(?funcType) :- + func_type_return(?funcType, ?returnType), type_contains_pointer(?returnType). -.decl function_type_has_no_pointer_return(?funcType: FunctionType) -function_type_has_no_pointer_return(?funcType) :- - function_type(?funcType), - !function_type_has_pointer_return(?funcType). +.decl func_type_has_no_pointer_return(?funcType: FunctionType) +func_type_has_no_pointer_return(?funcType) :- + func_type(?funcType), + !func_type_has_pointer_return(?funcType). drop_context_by_invoc(?invoc) :- user_option_value("drop_redundant_contexts", "on"), @@ -94,5 +94,5 @@ drop_context_by_invoc(?invoc) :- ), operand_has_type(?funcOp, ?funcOpType), pointer_type_has_component(?funcOpType, ?declaredType), - function_type_has_no_pointer_args(?declaredType), - function_type_has_no_pointer_return(?declaredType). + func_type_has_no_pointer_args(?declaredType), + func_type_has_no_pointer_return(?declaredType). diff --git a/datalog/context/interface.dl b/datalog/context/interface.dl index 47faeab..af1712b 100644 --- a/datalog/context/interface.dl +++ b/datalog/context/interface.dl @@ -81,7 +81,7 @@ drop_last(?out, ?in), .decl _reachable_call(?ctx: Context, ?instr: Instruction) _reachable_call(?ctx, ?instr) :- (call_instruction(?instr); invoke_instruction(?instr)), - instruction_in_function(?instr, ?func), + instruction_in_func(?instr, ?func), reachable_context(?ctx, ?func). // Merge is the constructor for new calling contexts. @@ -268,8 +268,8 @@ context_item_by_invoc_interim(?invoc, ?ctxItem) :- ; Config = "9-caller" ), (call_instruction(?invoc); invoke_instruction(?invoc)), - instruction_in_function(?invoc, ?func), - function_has_name(?func, ?name), + instruction_in_func(?invoc, ?func), + func_name(?func, ?name), ?ctxItem = ?name. //--------------------------------------------------------- diff --git a/datalog/context/lift.dl b/datalog/context/lift.dl index bccfb93..50768ae 100644 --- a/datalog/context/lift.dl +++ b/datalog/context/lift.dl @@ -70,7 +70,7 @@ allocation_by_instruction_ctx(ctx, insn, actx, alloc) :- reachable_context(ctx, fun), - instruction_in_function(insn, fun), + instruction_in_func(insn, fun), allocation_by_instruction(insn, alloc), instruction_assigns_to(insn, var), var_points_to(actx, alloc, ctx, var). diff --git a/datalog/export/debug-output-extended.dl b/datalog/export/debug-output-extended.dl index 3b335bc..ca5f25d 100644 --- a/datalog/export/debug-output-extended.dl +++ b/datalog/export/debug-output-extended.dl @@ -10,7 +10,7 @@ .output _clause (compress=true) .output _constant_contains_typeinfo (compress=true) .output _constant_expression_next_index (compress=true) -.output _constant_in_function (compress=true) +.output _constant_in_func (compress=true) .output _eligible_base_type (compress=true) .output _filter_clause (compress=true) .output _getelementptr_constant_expression_base_type (compress=true) @@ -41,7 +41,7 @@ .output _typeinfo_class_type (compress=true) .output _typeinfo_contains_typeinfo (compress=true) .output _valid_landingpad (compress=true) -.output _variable_in_function (compress=true) +.output _variable_in_func (compress=true) .output _vtable_by_class_name (compress=true) .output _vtable_class_name (compress=true) .output acq_rel_ordering (compress=true) @@ -95,7 +95,7 @@ .output assert_alloc_with_ctx_complete (compress=true) .output assert_array_type_size (compress=true) .output assert_basic_or_path (compress=true) -.output assert_bitcast_operand_in_same_function (compress=true) +.output assert_bitcast_operand_in_same_func (compress=true) .output assert_dynamic_or_known_size (compress=true) .output assert_every_allocation_has_a_region (compress=true) .output assert_every_allocation_has_a_type (compress=true) @@ -140,7 +140,7 @@ .output atomicrmw_instruction_operation (compress=true) .output atomicrmw_instruction_ordering (compress=true) .output atomicrmw_instruction_value (compress=true) -.output attribute (compress=true) +.output attr (compress=true) .output available_externally_linkage_type (compress=true) .output basic_allocation (compress=true) .output bitcast_constant_expression (compress=true) @@ -173,9 +173,9 @@ .output call_instruction_is_tail_opt (compress=true) .output call_instruction_return_type (compress=true) .output call_instruction_with_calling_convention (compress=true) -.output call_instruction_with_fn_attribute (compress=true) -.output call_instruction_with_param_attribute (compress=true) -.output call_instruction_with_return_attribute (compress=true) +.output call_instruction_with_fn_attr (compress=true) +.output call_instruction_with_param_attr (compress=true) +.output call_instruction_with_return_attr (compress=true) .output call_or_invoke_instruction_fn_type (compress=true) .output called_at_startup (compress=true) .output calling_convention (compress=true) @@ -206,10 +206,10 @@ .output constant_has_type (compress=true) .output constant_has_value (compress=true) .output constant_hashes_to (compress=true) -.output constant_in_function (compress=true) +.output constant_in_func (compress=true) .output constant_points_to (compress=true) .output constant_ptr_points_to (compress=true) -.output constant_references_function (compress=true) +.output constant_references_func (compress=true) .output constant_references_variable (compress=true) .output constant_struct (compress=true) .output constant_struct_has_size (compress=true) @@ -225,9 +225,9 @@ .output context_item_by_invoc_interim (compress=true) .output context_to_string (compress=true) .output cxx_alloc_exception (compress=true) -.output cxx_atexit_function (compress=true) -.output cxx_new_function (compress=true) -.output cxx_throw_function (compress=true) +.output cxx_atexit_func (compress=true) +.output cxx_new_func (compress=true) +.output cxx_throw_func (compress=true) .output default_visibility (compress=true) .output derived_type (compress=true) .output destructor_class_type (compress=true) @@ -337,85 +337,85 @@ .output fsub_instruction (compress=true) .output fsub_instruction_first_operand (compress=true) .output fsub_instruction_second_operand (compress=true) -.output function (compress=true) -.output function_alignment (compress=true) -.output function_attribute__alignstack (compress=true) -.output function_attribute__alwaysinline (compress=true) -.output function_attribute__argmemonly (compress=true) -.output function_attribute__builtin (compress=true) -.output function_attribute__cold (compress=true) -.output function_attribute__convergent (compress=true) -.output function_attribute__inaccessiblemem_or_argmemonly (compress=true) -.output function_attribute__inaccessiblememonly (compress=true) -.output function_attribute__inlinehint (compress=true) -.output function_attribute__jumptable (compress=true) -.output function_attribute__minsize (compress=true) -.output function_attribute__naked (compress=true) -.output function_attribute__nobuiltin (compress=true) -.output function_attribute__noduplicate (compress=true) -.output function_attribute__noimplicitfloat (compress=true) -.output function_attribute__noinline (compress=true) -.output function_attribute__nonlazybind (compress=true) -.output function_attribute__norecurse (compress=true) -.output function_attribute__noredzone (compress=true) -.output function_attribute__noreturn (compress=true) -.output function_attribute__nounwind (compress=true) -.output function_attribute__optnone (compress=true) -.output function_attribute__optsize (compress=true) -.output function_attribute__readnone (compress=true) -.output function_attribute__readonly (compress=true) -.output function_attribute__returns_twice (compress=true) -.output function_attribute__safestack (compress=true) -.output function_attribute__sanitize_address (compress=true) -.output function_attribute__sanitize_memory (compress=true) -.output function_attribute__sanitize_thread (compress=true) -.output function_attribute__ssp (compress=true) -.output function_attribute__sspreq (compress=true) -.output function_attribute__sspstrong (compress=true) -.output function_attribute__uwtable (compress=true) -.output function_by_location (compress=true) -.output function_by_value_param (compress=true) -.output function_calls_function (compress=true) -.output function_constant (compress=true) -.output function_constant_fn_name (compress=true) -.output function_decl (compress=true) -.output function_decl_to_defn (compress=true) -.output function_has_linkage_type (compress=true) -.output function_has_name (compress=true) -.output function_has_pts_signature (compress=true) -.output function_has_signature (compress=true) -.output function_has_type (compress=true) -.output function_has_visibility (compress=true) -.output function_in_degree (compress=true) -.output function_in_section (compress=true) -.output function_is_illformed (compress=true) -.output function_is_wellformed (compress=true) -.output function_missing_pts_signature (compress=true) -.output function_needs_pts_signature (compress=true) -.output function_nparams (compress=true) -.output function_out_degree (compress=true) -.output function_param (compress=true) -.output function_param_by_value (compress=true) -.output function_param_not_by_value (compress=true) -.output function_returns_value (compress=true) -.output function_type (compress=true) -.output function_type_has_no_pointer_args (compress=true) -.output function_type_has_no_pointer_return (compress=true) -.output function_type_has_pointer_arg (compress=true) -.output function_type_has_pointer_return (compress=true) -.output function_type_has_varargs (compress=true) -.output function_type_nparams (compress=true) -.output function_type_param (compress=true) -.output function_type_return (compress=true) -.output function_with_attribute (compress=true) -.output function_with_calling_convention (compress=true) -.output function_with_gc (compress=true) -.output function_with_param_attribute (compress=true) -.output function_with_pers_fn (compress=true) -.output function_with_return_attribute (compress=true) -.output function_with_unnamed_addr (compress=true) -.output functions_by_in_degree (compress=true) -.output functions_by_out_degree (compress=true) +.output func (compress=true) +.output func_alignment (compress=true) +.output func_attr__alignstack (compress=true) +.output func_attr__alwaysinline (compress=true) +.output func_attr__argmemonly (compress=true) +.output func_attr__builtin (compress=true) +.output func_attr__cold (compress=true) +.output func_attr__convergent (compress=true) +.output func_attr__inaccessiblemem_or_argmemonly (compress=true) +.output func_attr__inaccessiblememonly (compress=true) +.output func_attr__inlinehint (compress=true) +.output func_attr__jumptable (compress=true) +.output func_attr__minsize (compress=true) +.output func_attr__naked (compress=true) +.output func_attr__nobuiltin (compress=true) +.output func_attr__noduplicate (compress=true) +.output func_attr__noimplicitfloat (compress=true) +.output func_attr__noinline (compress=true) +.output func_attr__nonlazybind (compress=true) +.output func_attr__norecurse (compress=true) +.output func_attr__noredzone (compress=true) +.output func_attr__noreturn (compress=true) +.output func_attr__nounwind (compress=true) +.output func_attr__optnone (compress=true) +.output func_attr__optsize (compress=true) +.output func_attr__readnone (compress=true) +.output func_attr__readonly (compress=true) +.output func_attr__returns_twice (compress=true) +.output func_attr__safestack (compress=true) +.output func_attr__sanitize_address (compress=true) +.output func_attr__sanitize_memory (compress=true) +.output func_attr__sanitize_thread (compress=true) +.output func_attr__ssp (compress=true) +.output func_attr__sspreq (compress=true) +.output func_attr__sspstrong (compress=true) +.output func_attr__uwtable (compress=true) +.output func_by_location (compress=true) +.output func_by_value_param (compress=true) +.output func_calls_func (compress=true) +.output func_constant (compress=true) +.output func_constant_fn_name (compress=true) +.output func_decl (compress=true) +.output func_decl_to_defn (compress=true) +.output func_linkage_type (compress=true) +.output func_name (compress=true) +.output func_pts_signature (compress=true) +.output func_signature (compress=true) +.output func_type (compress=true) +.output func_visibility (compress=true) +.output func_degree (compress=true) +.output func_section (compress=true) +.output func_is_illformed (compress=true) +.output func_is_wellformed (compress=true) +.output func_missing_pts_signature (compress=true) +.output func_needs_pts_signature (compress=true) +.output func_nparams (compress=true) +.output func_out_degree (compress=true) +.output func_param (compress=true) +.output func_param_by_value (compress=true) +.output func_param_not_by_value (compress=true) +.output func_returns_value (compress=true) +.output func_type (compress=true) +.output func_type_has_no_pointer_args (compress=true) +.output func_type_has_no_pointer_return (compress=true) +.output func_type_has_pointer_arg (compress=true) +.output func_type_has_pointer_return (compress=true) +.output func_type_has_varargs (compress=true) +.output func_type_nparams (compress=true) +.output func_type_param (compress=true) +.output func_type_return (compress=true) +.output func_attr (compress=true) +.output func_calling_convention (compress=true) +.output func_gc (compress=true) +.output func_param_attr (compress=true) +.output func_pers_fn (compress=true) +.output func_return_attr (compress=true) +.output func_unnamed_addr (compress=true) +.output funcs_by_in_degree (compress=true) +.output funcs_by_out_degree (compress=true) .output gep_constant_expr_index_offset (compress=true) .output gep_constant_expr_indexes_from (compress=true) .output gep_constant_expr_points_to (compress=true) @@ -435,7 +435,7 @@ .output getelementptr_instruction_nindices (compress=true) .output getelementptr_instruction_value_type (compress=true) .output global_allocation (compress=true) -.output global_allocation_by_function (compress=true) +.output global_allocation_by_func (compress=true) .output global_allocation_by_name (compress=true) .output global_allocation_by_variable (compress=true) .output global_region (compress=true) @@ -455,7 +455,7 @@ .output global_var_type (compress=true) .output global_var_visibility (compress=true) .output half_type (compress=true) -.output heap_alloc_function (compress=true) +.output heap_alloc_func (compress=true) .output heap_allocation (compress=true) .output heap_allocation_by_calloc (compress=true) .output heap_allocation_by_instruction (compress=true) @@ -514,7 +514,7 @@ .output instruction_assigns_to (compress=true) .output instruction_has_flag (compress=true) .output instruction_in_block (compress=true) -.output instruction_in_function (compress=true) +.output instruction_in_func (compress=true) .output instruction_pos (compress=true) .output instruction_returns_type (compress=true) .output int1_type (compress=true) @@ -544,9 +544,9 @@ .output invoke_instruction_normal_label (compress=true) .output invoke_instruction_return_type (compress=true) .output invoke_instruction_with_calling_convention (compress=true) -.output invoke_instruction_with_fn_attribute (compress=true) -.output invoke_instruction_with_param_attribute (compress=true) -.output invoke_instruction_with_return_attribute (compress=true) +.output invoke_instruction_with_fn_attr (compress=true) +.output invoke_instruction_with_param_attr (compress=true) +.output invoke_instruction_with_return_attr (compress=true) .output label_type (compress=true) .output landingpad (compress=true) .output landingpad_instruction (compress=true) @@ -573,7 +573,7 @@ .output lshr_instruction_first_operand (compress=true) .output lshr_instruction_second_operand (compress=true) .output main_context (compress=true) -.output main_function (compress=true) +.output main_func (compress=true) .output max_context_depth (compress=true) .output max_num_callsites (compress=true) .output memcpy_pass_by_value (compress=true) @@ -609,20 +609,20 @@ .output or_instruction_first_operand (compress=true) .output or_instruction_second_operand (compress=true) .output ordering (compress=true) -.output parameter_attribute__align (compress=true) -.output parameter_attribute__byval (compress=true) -.output parameter_attribute__dereferenceable (compress=true) -.output parameter_attribute__dereferenceable_or_null (compress=true) -.output parameter_attribute__inalloca (compress=true) -.output parameter_attribute__inreg (compress=true) -.output parameter_attribute__nest (compress=true) -.output parameter_attribute__noalias (compress=true) -.output parameter_attribute__nocapture (compress=true) -.output parameter_attribute__nonnull (compress=true) -.output parameter_attribute__returned (compress=true) -.output parameter_attribute__signext (compress=true) -.output parameter_attribute__sret (compress=true) -.output parameter_attribute__zeroext (compress=true) +.output parameter_attr__align (compress=true) +.output parameter_attr__byval (compress=true) +.output parameter_attr__dereferenceable (compress=true) +.output parameter_attr__dereferenceable_or_null (compress=true) +.output parameter_attr__inalloca (compress=true) +.output parameter_attr__inreg (compress=true) +.output parameter_attr__nest (compress=true) +.output parameter_attr__noalias (compress=true) +.output parameter_attr__nocapture (compress=true) +.output parameter_attr__nonnull (compress=true) +.output parameter_attr__returned (compress=true) +.output parameter_attr__signext (compress=true) +.output parameter_attr__sret (compress=true) +.output parameter_attr__zeroext (compress=true) .output path (compress=true) .output path_component (compress=true) .output path_component_at_any_index (compress=true) @@ -685,11 +685,11 @@ .output ret_instruction_value (compress=true) .output schema_invalid_alias (compress=true) .output schema_invalid_constant (compress=true) -.output schema_invalid_function (compress=true) +.output schema_invalid_func (compress=true) .output schema_invalid_global_var (compress=true) .output schema_invalid_instruction (compress=true) .output schema_invalid_type (compress=true) -.output schema_multiple_function_names (compress=true) +.output schema_multiple_func_names (compress=true) .output schema_sanity (compress=true) .output sdiv_instruction (compress=true) .output sdiv_instruction_first_operand (compress=true) @@ -761,7 +761,7 @@ .output switch_instruction_default_label (compress=true) .output switch_instruction_ncases (compress=true) .output switch_instruction_operand (compress=true) -.output target_dependent_attribute (compress=true) +.output target_dependent_attr (compress=true) .output template_type (compress=true) .output template_typeinfo (compress=true) .output terminator_instruction (compress=true) @@ -823,7 +823,7 @@ .output variable_has_debug_source_name (compress=true) .output variable_has_name (compress=true) .output variable_has_type (compress=true) -.output variable_in_function (compress=true) +.output variable_in_func (compress=true) .output variable_is_firstclass (compress=true) .output variable_is_label (compress=true) .output variable_is_pointer (compress=true) @@ -835,7 +835,7 @@ .output void_ret_instruction (compress=true) .output void_type (compress=true) .output vtable (compress=true) -.output vtable_function (compress=true) +.output vtable_func (compress=true) .output vtable_typeinfo (compress=true) .output weak_linkage_type (compress=true) .output weak_odr_linkage_type (compress=true) diff --git a/datalog/export/debug-output.dl b/datalog/export/debug-output.dl index 3b335bc..ca5f25d 100644 --- a/datalog/export/debug-output.dl +++ b/datalog/export/debug-output.dl @@ -10,7 +10,7 @@ .output _clause (compress=true) .output _constant_contains_typeinfo (compress=true) .output _constant_expression_next_index (compress=true) -.output _constant_in_function (compress=true) +.output _constant_in_func (compress=true) .output _eligible_base_type (compress=true) .output _filter_clause (compress=true) .output _getelementptr_constant_expression_base_type (compress=true) @@ -41,7 +41,7 @@ .output _typeinfo_class_type (compress=true) .output _typeinfo_contains_typeinfo (compress=true) .output _valid_landingpad (compress=true) -.output _variable_in_function (compress=true) +.output _variable_in_func (compress=true) .output _vtable_by_class_name (compress=true) .output _vtable_class_name (compress=true) .output acq_rel_ordering (compress=true) @@ -95,7 +95,7 @@ .output assert_alloc_with_ctx_complete (compress=true) .output assert_array_type_size (compress=true) .output assert_basic_or_path (compress=true) -.output assert_bitcast_operand_in_same_function (compress=true) +.output assert_bitcast_operand_in_same_func (compress=true) .output assert_dynamic_or_known_size (compress=true) .output assert_every_allocation_has_a_region (compress=true) .output assert_every_allocation_has_a_type (compress=true) @@ -140,7 +140,7 @@ .output atomicrmw_instruction_operation (compress=true) .output atomicrmw_instruction_ordering (compress=true) .output atomicrmw_instruction_value (compress=true) -.output attribute (compress=true) +.output attr (compress=true) .output available_externally_linkage_type (compress=true) .output basic_allocation (compress=true) .output bitcast_constant_expression (compress=true) @@ -173,9 +173,9 @@ .output call_instruction_is_tail_opt (compress=true) .output call_instruction_return_type (compress=true) .output call_instruction_with_calling_convention (compress=true) -.output call_instruction_with_fn_attribute (compress=true) -.output call_instruction_with_param_attribute (compress=true) -.output call_instruction_with_return_attribute (compress=true) +.output call_instruction_with_fn_attr (compress=true) +.output call_instruction_with_param_attr (compress=true) +.output call_instruction_with_return_attr (compress=true) .output call_or_invoke_instruction_fn_type (compress=true) .output called_at_startup (compress=true) .output calling_convention (compress=true) @@ -206,10 +206,10 @@ .output constant_has_type (compress=true) .output constant_has_value (compress=true) .output constant_hashes_to (compress=true) -.output constant_in_function (compress=true) +.output constant_in_func (compress=true) .output constant_points_to (compress=true) .output constant_ptr_points_to (compress=true) -.output constant_references_function (compress=true) +.output constant_references_func (compress=true) .output constant_references_variable (compress=true) .output constant_struct (compress=true) .output constant_struct_has_size (compress=true) @@ -225,9 +225,9 @@ .output context_item_by_invoc_interim (compress=true) .output context_to_string (compress=true) .output cxx_alloc_exception (compress=true) -.output cxx_atexit_function (compress=true) -.output cxx_new_function (compress=true) -.output cxx_throw_function (compress=true) +.output cxx_atexit_func (compress=true) +.output cxx_new_func (compress=true) +.output cxx_throw_func (compress=true) .output default_visibility (compress=true) .output derived_type (compress=true) .output destructor_class_type (compress=true) @@ -337,85 +337,85 @@ .output fsub_instruction (compress=true) .output fsub_instruction_first_operand (compress=true) .output fsub_instruction_second_operand (compress=true) -.output function (compress=true) -.output function_alignment (compress=true) -.output function_attribute__alignstack (compress=true) -.output function_attribute__alwaysinline (compress=true) -.output function_attribute__argmemonly (compress=true) -.output function_attribute__builtin (compress=true) -.output function_attribute__cold (compress=true) -.output function_attribute__convergent (compress=true) -.output function_attribute__inaccessiblemem_or_argmemonly (compress=true) -.output function_attribute__inaccessiblememonly (compress=true) -.output function_attribute__inlinehint (compress=true) -.output function_attribute__jumptable (compress=true) -.output function_attribute__minsize (compress=true) -.output function_attribute__naked (compress=true) -.output function_attribute__nobuiltin (compress=true) -.output function_attribute__noduplicate (compress=true) -.output function_attribute__noimplicitfloat (compress=true) -.output function_attribute__noinline (compress=true) -.output function_attribute__nonlazybind (compress=true) -.output function_attribute__norecurse (compress=true) -.output function_attribute__noredzone (compress=true) -.output function_attribute__noreturn (compress=true) -.output function_attribute__nounwind (compress=true) -.output function_attribute__optnone (compress=true) -.output function_attribute__optsize (compress=true) -.output function_attribute__readnone (compress=true) -.output function_attribute__readonly (compress=true) -.output function_attribute__returns_twice (compress=true) -.output function_attribute__safestack (compress=true) -.output function_attribute__sanitize_address (compress=true) -.output function_attribute__sanitize_memory (compress=true) -.output function_attribute__sanitize_thread (compress=true) -.output function_attribute__ssp (compress=true) -.output function_attribute__sspreq (compress=true) -.output function_attribute__sspstrong (compress=true) -.output function_attribute__uwtable (compress=true) -.output function_by_location (compress=true) -.output function_by_value_param (compress=true) -.output function_calls_function (compress=true) -.output function_constant (compress=true) -.output function_constant_fn_name (compress=true) -.output function_decl (compress=true) -.output function_decl_to_defn (compress=true) -.output function_has_linkage_type (compress=true) -.output function_has_name (compress=true) -.output function_has_pts_signature (compress=true) -.output function_has_signature (compress=true) -.output function_has_type (compress=true) -.output function_has_visibility (compress=true) -.output function_in_degree (compress=true) -.output function_in_section (compress=true) -.output function_is_illformed (compress=true) -.output function_is_wellformed (compress=true) -.output function_missing_pts_signature (compress=true) -.output function_needs_pts_signature (compress=true) -.output function_nparams (compress=true) -.output function_out_degree (compress=true) -.output function_param (compress=true) -.output function_param_by_value (compress=true) -.output function_param_not_by_value (compress=true) -.output function_returns_value (compress=true) -.output function_type (compress=true) -.output function_type_has_no_pointer_args (compress=true) -.output function_type_has_no_pointer_return (compress=true) -.output function_type_has_pointer_arg (compress=true) -.output function_type_has_pointer_return (compress=true) -.output function_type_has_varargs (compress=true) -.output function_type_nparams (compress=true) -.output function_type_param (compress=true) -.output function_type_return (compress=true) -.output function_with_attribute (compress=true) -.output function_with_calling_convention (compress=true) -.output function_with_gc (compress=true) -.output function_with_param_attribute (compress=true) -.output function_with_pers_fn (compress=true) -.output function_with_return_attribute (compress=true) -.output function_with_unnamed_addr (compress=true) -.output functions_by_in_degree (compress=true) -.output functions_by_out_degree (compress=true) +.output func (compress=true) +.output func_alignment (compress=true) +.output func_attr__alignstack (compress=true) +.output func_attr__alwaysinline (compress=true) +.output func_attr__argmemonly (compress=true) +.output func_attr__builtin (compress=true) +.output func_attr__cold (compress=true) +.output func_attr__convergent (compress=true) +.output func_attr__inaccessiblemem_or_argmemonly (compress=true) +.output func_attr__inaccessiblememonly (compress=true) +.output func_attr__inlinehint (compress=true) +.output func_attr__jumptable (compress=true) +.output func_attr__minsize (compress=true) +.output func_attr__naked (compress=true) +.output func_attr__nobuiltin (compress=true) +.output func_attr__noduplicate (compress=true) +.output func_attr__noimplicitfloat (compress=true) +.output func_attr__noinline (compress=true) +.output func_attr__nonlazybind (compress=true) +.output func_attr__norecurse (compress=true) +.output func_attr__noredzone (compress=true) +.output func_attr__noreturn (compress=true) +.output func_attr__nounwind (compress=true) +.output func_attr__optnone (compress=true) +.output func_attr__optsize (compress=true) +.output func_attr__readnone (compress=true) +.output func_attr__readonly (compress=true) +.output func_attr__returns_twice (compress=true) +.output func_attr__safestack (compress=true) +.output func_attr__sanitize_address (compress=true) +.output func_attr__sanitize_memory (compress=true) +.output func_attr__sanitize_thread (compress=true) +.output func_attr__ssp (compress=true) +.output func_attr__sspreq (compress=true) +.output func_attr__sspstrong (compress=true) +.output func_attr__uwtable (compress=true) +.output func_by_location (compress=true) +.output func_by_value_param (compress=true) +.output func_calls_func (compress=true) +.output func_constant (compress=true) +.output func_constant_fn_name (compress=true) +.output func_decl (compress=true) +.output func_decl_to_defn (compress=true) +.output func_linkage_type (compress=true) +.output func_name (compress=true) +.output func_pts_signature (compress=true) +.output func_signature (compress=true) +.output func_type (compress=true) +.output func_visibility (compress=true) +.output func_degree (compress=true) +.output func_section (compress=true) +.output func_is_illformed (compress=true) +.output func_is_wellformed (compress=true) +.output func_missing_pts_signature (compress=true) +.output func_needs_pts_signature (compress=true) +.output func_nparams (compress=true) +.output func_out_degree (compress=true) +.output func_param (compress=true) +.output func_param_by_value (compress=true) +.output func_param_not_by_value (compress=true) +.output func_returns_value (compress=true) +.output func_type (compress=true) +.output func_type_has_no_pointer_args (compress=true) +.output func_type_has_no_pointer_return (compress=true) +.output func_type_has_pointer_arg (compress=true) +.output func_type_has_pointer_return (compress=true) +.output func_type_has_varargs (compress=true) +.output func_type_nparams (compress=true) +.output func_type_param (compress=true) +.output func_type_return (compress=true) +.output func_attr (compress=true) +.output func_calling_convention (compress=true) +.output func_gc (compress=true) +.output func_param_attr (compress=true) +.output func_pers_fn (compress=true) +.output func_return_attr (compress=true) +.output func_unnamed_addr (compress=true) +.output funcs_by_in_degree (compress=true) +.output funcs_by_out_degree (compress=true) .output gep_constant_expr_index_offset (compress=true) .output gep_constant_expr_indexes_from (compress=true) .output gep_constant_expr_points_to (compress=true) @@ -435,7 +435,7 @@ .output getelementptr_instruction_nindices (compress=true) .output getelementptr_instruction_value_type (compress=true) .output global_allocation (compress=true) -.output global_allocation_by_function (compress=true) +.output global_allocation_by_func (compress=true) .output global_allocation_by_name (compress=true) .output global_allocation_by_variable (compress=true) .output global_region (compress=true) @@ -455,7 +455,7 @@ .output global_var_type (compress=true) .output global_var_visibility (compress=true) .output half_type (compress=true) -.output heap_alloc_function (compress=true) +.output heap_alloc_func (compress=true) .output heap_allocation (compress=true) .output heap_allocation_by_calloc (compress=true) .output heap_allocation_by_instruction (compress=true) @@ -514,7 +514,7 @@ .output instruction_assigns_to (compress=true) .output instruction_has_flag (compress=true) .output instruction_in_block (compress=true) -.output instruction_in_function (compress=true) +.output instruction_in_func (compress=true) .output instruction_pos (compress=true) .output instruction_returns_type (compress=true) .output int1_type (compress=true) @@ -544,9 +544,9 @@ .output invoke_instruction_normal_label (compress=true) .output invoke_instruction_return_type (compress=true) .output invoke_instruction_with_calling_convention (compress=true) -.output invoke_instruction_with_fn_attribute (compress=true) -.output invoke_instruction_with_param_attribute (compress=true) -.output invoke_instruction_with_return_attribute (compress=true) +.output invoke_instruction_with_fn_attr (compress=true) +.output invoke_instruction_with_param_attr (compress=true) +.output invoke_instruction_with_return_attr (compress=true) .output label_type (compress=true) .output landingpad (compress=true) .output landingpad_instruction (compress=true) @@ -573,7 +573,7 @@ .output lshr_instruction_first_operand (compress=true) .output lshr_instruction_second_operand (compress=true) .output main_context (compress=true) -.output main_function (compress=true) +.output main_func (compress=true) .output max_context_depth (compress=true) .output max_num_callsites (compress=true) .output memcpy_pass_by_value (compress=true) @@ -609,20 +609,20 @@ .output or_instruction_first_operand (compress=true) .output or_instruction_second_operand (compress=true) .output ordering (compress=true) -.output parameter_attribute__align (compress=true) -.output parameter_attribute__byval (compress=true) -.output parameter_attribute__dereferenceable (compress=true) -.output parameter_attribute__dereferenceable_or_null (compress=true) -.output parameter_attribute__inalloca (compress=true) -.output parameter_attribute__inreg (compress=true) -.output parameter_attribute__nest (compress=true) -.output parameter_attribute__noalias (compress=true) -.output parameter_attribute__nocapture (compress=true) -.output parameter_attribute__nonnull (compress=true) -.output parameter_attribute__returned (compress=true) -.output parameter_attribute__signext (compress=true) -.output parameter_attribute__sret (compress=true) -.output parameter_attribute__zeroext (compress=true) +.output parameter_attr__align (compress=true) +.output parameter_attr__byval (compress=true) +.output parameter_attr__dereferenceable (compress=true) +.output parameter_attr__dereferenceable_or_null (compress=true) +.output parameter_attr__inalloca (compress=true) +.output parameter_attr__inreg (compress=true) +.output parameter_attr__nest (compress=true) +.output parameter_attr__noalias (compress=true) +.output parameter_attr__nocapture (compress=true) +.output parameter_attr__nonnull (compress=true) +.output parameter_attr__returned (compress=true) +.output parameter_attr__signext (compress=true) +.output parameter_attr__sret (compress=true) +.output parameter_attr__zeroext (compress=true) .output path (compress=true) .output path_component (compress=true) .output path_component_at_any_index (compress=true) @@ -685,11 +685,11 @@ .output ret_instruction_value (compress=true) .output schema_invalid_alias (compress=true) .output schema_invalid_constant (compress=true) -.output schema_invalid_function (compress=true) +.output schema_invalid_func (compress=true) .output schema_invalid_global_var (compress=true) .output schema_invalid_instruction (compress=true) .output schema_invalid_type (compress=true) -.output schema_multiple_function_names (compress=true) +.output schema_multiple_func_names (compress=true) .output schema_sanity (compress=true) .output sdiv_instruction (compress=true) .output sdiv_instruction_first_operand (compress=true) @@ -761,7 +761,7 @@ .output switch_instruction_default_label (compress=true) .output switch_instruction_ncases (compress=true) .output switch_instruction_operand (compress=true) -.output target_dependent_attribute (compress=true) +.output target_dependent_attr (compress=true) .output template_type (compress=true) .output template_typeinfo (compress=true) .output terminator_instruction (compress=true) @@ -823,7 +823,7 @@ .output variable_has_debug_source_name (compress=true) .output variable_has_name (compress=true) .output variable_has_type (compress=true) -.output variable_in_function (compress=true) +.output variable_in_func (compress=true) .output variable_is_firstclass (compress=true) .output variable_is_label (compress=true) .output variable_is_pointer (compress=true) @@ -835,7 +835,7 @@ .output void_ret_instruction (compress=true) .output void_type (compress=true) .output vtable (compress=true) -.output vtable_function (compress=true) +.output vtable_func (compress=true) .output vtable_typeinfo (compress=true) .output weak_linkage_type (compress=true) .output weak_odr_linkage_type (compress=true) diff --git a/datalog/export/statistics.dl b/datalog/export/statistics.dl index 22b4983..6c4e766 100644 --- a/datalog/export/statistics.dl +++ b/datalog/export/statistics.dl @@ -1,6 +1,6 @@ .output subset._merge.count_context_items (compress=true) .output subset._merge.count_contexts (compress=true) -.output function_in_degree (compress=true) -.output function_out_degree (compress=true) +.output func_degree (compress=true) +.output func_out_degree (compress=true) .output var_alias_sizes (compress=true) .output var_points_to_sizes (compress=true) diff --git a/datalog/import/todo.dl b/datalog/import/todo.dl index 776f9f9..a5950dc 100644 --- a/datalog/import/todo.dl +++ b/datalog/import/todo.dl @@ -43,13 +43,13 @@ catch_clause([v2]), landingpad_instruction_clause(v0, v1, [v2]) :- filter_clause([v2]), landingpad_instruction_clause(v0, v1, [v2]) :- _landingpad_instruction_filter_clause(v0, v1, v2). -.decl _constant_in_function(v0:Constant, v1:FunctionName) -.decl _variable_in_function(v0:Variable, v1:FunctionName) +.decl _constant_in_func(v0:Constant, v1:FunctionName) +.decl _variable_in_func(v0:Variable, v1:FunctionName) -constant_in_function(Constant, Function) :- - _constant_in_function(Constant, FuncName), - function_has_name(Function, FuncName). +constant_in_func(Constant, Function) :- + _constant_in_func(Constant, FuncName), + func_name(Function, FuncName). -variable_in_function(Variable, Function) :- - _variable_in_function(Variable, FuncName), - function_has_name(Function, FuncName). \ No newline at end of file +variable_in_func(Variable, Function) :- + _variable_in_func(Variable, FuncName), + func_name(Function, FuncName). \ No newline at end of file diff --git a/datalog/options/user-options.dl b/datalog/options/user-options.dl index 8fb484e..062f8f0 100644 --- a/datalog/options/user-options.dl +++ b/datalog/options/user-options.dl @@ -77,11 +77,11 @@ user_option_valid_value("drop_redundant_contexts","off"). user_option_default("drop_redundant_contexts","on"). //------------------------------------------------------------------------------ -// [Marks all functions as reachable] +// [Marks all funcs as reachable] // // This is useful if the artifact to be analyzed doesn't have any // known entry points (e.g., dynamic library). In such a case, it -// makes sense to treat all functions defined therein as potential +// makes sense to treat all funcs defined therein as potential // entry points. //------------------------------------------------------------------------------ diff --git a/datalog/points-to/allocations-decl.dl b/datalog/points-to/allocations-decl.dl index 31d71c9..577fded 100644 --- a/datalog/points-to/allocations-decl.dl +++ b/datalog/points-to/allocations-decl.dl @@ -38,16 +38,16 @@ basic_allocation(?alloc) :- .decl heap_allocation_by_instruction(?insn:CallInstruction, ?heapAlloc:HeapAllocation) .decl heap_allocation_by_type_instruction(?type:Type, ?insn:CallInstruction, ?heapAlloc:HeapAllocation) -.decl global_allocation_by_function(?func:FunctionDecl, ?globalAlloc:GlobalAllocation) +.decl global_allocation_by_func(?func:FunctionDecl, ?globalAlloc:GlobalAllocation) .decl global_allocation_by_variable(?var:GlobalVariable, ?globalAlloc:GlobalAllocation) .decl global_allocation_by_name(?global:GlobalName, ?globalAlloc:GlobalAllocation) -.decl heap_alloc_function(?function:Function) -heap_alloc_function(?func) :- - function_has_name(?func, "@malloc") - ; function_has_name(?func, "@calloc") - ; function_has_name(?func, "@realloc") - ; function_has_name(?func, "@mmap"). +.decl heap_alloc_func(?func:Function) +heap_alloc_func(?func) :- + func_name(?func, "@malloc") + ; func_name(?func, "@calloc") + ; func_name(?func, "@realloc") + ; func_name(?func, "@mmap"). .decl heap_allocation_by_malloc(?insn:CallInstruction, ?heapAlloc:HeapAllocation) .decl heap_allocation_by_calloc(?insn:CallInstruction, ?heapAlloc:HeapAllocation) diff --git a/datalog/points-to/allocations-globals.dl b/datalog/points-to/allocations-globals.dl index 7b6f686..cac1f8f 100644 --- a/datalog/points-to/allocations-globals.dl +++ b/datalog/points-to/allocations-globals.dl @@ -15,13 +15,13 @@ global_allocation_by_variable(?gVar, ?alloc) /// 2. Function Allocations global_allocation(?alloc), -global_allocation_by_function(?func, ?alloc) +global_allocation_by_func(?func, ?alloc) :- - (function(?func); - function_decl(?func), - !function_decl_to_defn(?func,_)), + (func(?func); + func_decl(?func), + !func_decl_to_defn(?func,_)), - function_has_name(?func, ?name), + func_name(?func, ?name), ?alloc = cat("*global_alloc",?name). global_allocation_by_name(?globalName, ?alloc) :- @@ -29,12 +29,12 @@ global_allocation_by_name(?globalName, ?alloc) :- global_allocation_by_variable(?global, ?alloc). global_allocation_by_name(?globalName, ?alloc) :- - function_has_name(?global, ?globalName), - global_allocation_by_function(?global, ?alloc). + func_name(?global, ?globalName), + global_allocation_by_func(?global, ?alloc). static_allocation_type(?alloc, ?type) :- - global_allocation_by_function(?func, ?alloc), - function_has_type(?func,?type). + global_allocation_by_func(?func, ?alloc), + func_ty(?func, ?type). static_allocation_type(?alloc, ?type) :- global_allocation_by_variable(?gVar, ?alloc), diff --git a/datalog/points-to/allocations-sizes.dl b/datalog/points-to/allocations-sizes.dl index 241e54c..36f9c2b 100644 --- a/datalog/points-to/allocations-sizes.dl +++ b/datalog/points-to/allocations-sizes.dl @@ -90,31 +90,31 @@ allocation_size(?heapAlloc, ?size) :- .decl sized_alloc_instr(?insn: Instruction, ?size: Bytes) sized_alloc_instr(?insn, as(?size, Bytes)) :- - function_has_name(?func, "@malloc"), + func_name(?func, "@malloc"), call_instruction_fn_target(?insn, ?func), call_instruction_arg(?insn, 0, ?operand), constant_to_int(?operand, ?size). sized_alloc_instr(?insn, as(?size, Bytes)) :- - function_has_name(?func, "@malloc"), + func_name(?func, "@malloc"), invoke_instruction_fn_target(?insn, ?func), invoke_instruction_arg(?insn, 0, ?operand), constant_to_int(?operand, ?size). sized_alloc_instr(?insn, as(?size, Bytes)) :- - function_has_name(?func, "@realloc"), + func_name(?func, "@realloc"), invoke_instruction_fn_target(?insn, ?func), invoke_instruction_arg(?insn, 1, ?operand), constant_to_int(?operand, ?size). sized_alloc_instr(?insn, as(?size, Bytes)) :- - function_has_name(?func, "@realloc"), + func_name(?func, "@realloc"), call_instruction_fn_target(?insn, ?func), call_instruction_arg(?insn, 1, ?operand), constant_to_int(?operand, ?size). sized_alloc_instr(?insn, as(n, Bytes)) :- - function_has_name(?func, "@calloc"), + func_name(?func, "@calloc"), invoke_instruction_fn_target(?insn, ?func), invoke_instruction_arg(?insn, 0, ?nmembOp), invoke_instruction_arg(?insn, 1, ?sizeOp), @@ -123,7 +123,7 @@ sized_alloc_instr(?insn, as(n, Bytes)) :- n = size * nmemb. sized_alloc_instr(?insn, as(n, Bytes)) :- - function_has_name(?func, "@calloc"), + func_name(?func, "@calloc"), call_instruction_fn_target(?insn, ?func), call_instruction_arg(?insn, 0, ?nmembOp), call_instruction_arg(?insn, 1, ?sizeOp), diff --git a/datalog/points-to/allocations-subobjects.dl b/datalog/points-to/allocations-subobjects.dl index 2f58634..122e4dc 100644 --- a/datalog/points-to/allocations-subobjects.dl +++ b/datalog/points-to/allocations-subobjects.dl @@ -21,7 +21,7 @@ // that computes the offset from a base pointer variable and assigns // it to some other variable, which may then be supplied as the // address operand to a `load`/`store` instruction. These two -// instructions may reside in different functions, so an +// instructions may reside in different funcs, so an // intraprocedural matching would not work. // // This is an important difference with the Java Bytecode IR, where no @@ -311,12 +311,12 @@ not_array_index(?component) :- path_component_at_any_index(?component). longest_path_to(?root, ?start, ?mid), _alloc_subregion(?sub, ?mid, ?end, ?root, ?fullPath, _). - // Global allocations holding functions don't have any suballocations, it's + // Global allocations holding funcs don't have any suballocations, it's // illegal to add offsets to pointers to such allocations. - .decl _non_function_basic_allocation(?alloc: BasicAllocation) - _non_function_basic_allocation(?alloc) :- + .decl _non_func_basic_allocation(?alloc: BasicAllocation) + _non_func_basic_allocation(?alloc) :- basic_allocation(?alloc), - ! global_allocation_by_function(_, ?alloc). + ! global_allocation_by_func(_, ?alloc). //--------------------------------------------------------------- // [Field Selections] @@ -362,7 +362,7 @@ not_array_index(?component) :- path_component_at_any_index(?component). :- allocation_type(?alloc, ?type), // base object - _non_function_basic_allocation(?alloc), + _non_func_basic_allocation(?alloc), path_component_at_any_index(?component), component_to_path(?component, ?path), ?newAlloc=cat(?alloc, ?component). @@ -387,7 +387,7 @@ not_array_index(?component) :- path_component_at_any_index(?component). .decl index_in_bounds(?alloc: Allocation, ?index: ArrayIndex) index_in_bounds(?alloc, ?index) :- - _non_function_basic_allocation(?alloc), + _non_func_basic_allocation(?alloc), input_allocation_size(?alloc, ?size), allocation_type(?alloc, ?type), alloc_region(?alloc, ?region), @@ -399,7 +399,7 @@ not_array_index(?component) :- path_component_at_any_index(?component). ?elemSize * ?index < ?size. index_in_bounds(?alloc, ?index) :- - _non_function_basic_allocation(?alloc), + _non_func_basic_allocation(?alloc), dynamically_sized_alloc(?alloc), allocation_type(?alloc, ?type), alloc_region(?alloc, ?region), @@ -435,7 +435,7 @@ not_array_index(?component) :- path_component_at_any_index(?component). :- allocation_type(?alloc, ?type), // base object - _non_function_basic_allocation(?alloc), + _non_func_basic_allocation(?alloc), index_in_bounds(?alloc, ?index), ?newAlloc= cat(?alloc, "[", to_string(?index), "]"), ?component = cat("[", to_string(?index), "]"). diff --git a/datalog/points-to/allocations-type.dl b/datalog/points-to/allocations-type.dl index 20e23aa..fcbf9b5 100644 --- a/datalog/points-to/allocations-type.dl +++ b/datalog/points-to/allocations-type.dl @@ -34,10 +34,10 @@ //---------------------------------------------------------------------------- // The actual type of the object must match its size, and the relevant - // constructor must be in the same function that allocates it. + // constructor must be in the same func that allocates it. allocation_type(?heapAlloc, ?type) :- !inlined_constructors(), - instruction_in_function(?allocInsn, ?inFunction), + instruction_in_func(?allocInsn, ?inFunction), heap_allocation_by_new(?allocInsn, ?heapAlloc), allocation_size(?heapAlloc, ?size), type_has_size(?type, ?size), @@ -45,7 +45,7 @@ allocation_type(?excObj, ?type) :- !inlined_constructors(), - instruction_in_function(?allocInsn, ?inFunction), + instruction_in_func(?allocInsn, ?inFunction), heap_allocation_by_alloc_exc(?allocInsn, ?excObj), allocation_size(?excObj, ?size), type_has_size(?type, ?size), diff --git a/datalog/points-to/allocations.dl b/datalog/points-to/allocations.dl index 217faeb..bc6e988 100644 --- a/datalog/points-to/allocations.dl +++ b/datalog/points-to/allocations.dl @@ -1,12 +1,12 @@ -.decl build_stack_allocation(stackAlloc: StackAllocation, function: Function, type: Type, var: Variable) inline -build_stack_allocation(stackAlloc, function, type, var) :- - function_has_name(function, funcName), +.decl build_stack_allocation(stackAlloc: StackAllocation, func: Function, type: Type, var: Variable) inline +build_stack_allocation(stackAlloc, func, type, var) :- + func_name(func, funcName), variable_has_name(var, varName), stackAlloc = cat("*stack_alloc", funcName, "[", type, " ", varName, "]"). -.decl build_heap_allocation(heapAlloc: HeapAllocation, function: Function, type: Type, var: Variable) inline +.decl build_heap_allocation(heapAlloc: HeapAllocation, func: Function, type: Type, var: Variable) inline build_heap_allocation(heapAlloc, func, type, var) :- - function_has_name(func, funcName), + func_name(func, funcName), variable_has_name(var, varName), heapAlloc = cat("*heap_alloc", funcName, "[", type, " ", varName, "]"). @@ -15,7 +15,7 @@ build_heap_allocation(heapAlloc, func, type, var) :- // always shared between them, but the set of basic allocations is. // // See subset-rules.dl and unification-rules.dl -.decl any_reachable_function(?func: FunctionDecl) inline +.decl any_reachable_func(?func: FunctionDecl) inline //--------------------------------------------------------------------- // [Stack Allocations] @@ -28,9 +28,9 @@ stack_allocation(?stackAlloc), :- alloca_instruction(?instr), instruction_assigns_to(?instr, ?var), - instruction_in_function(?instr, ?instrFunc), + instruction_in_func(?instr, ?instrFunc), variable_has_type(?var,?type), - any_reachable_function(?instrFunc), + any_reachable_func(?instrFunc), build_stack_allocation(?stackAlloc, ?instrFunc, ?type, ?var). static_allocation_type(?stackAlloc, ?type) :- @@ -43,16 +43,16 @@ static_allocation_type(?stackAlloc, ?type) :- stack_allocation(?stackAlloc), stack_allocation_by_parameter(?func, ?index, ?stackAlloc) :- - function_param_by_value(?func, ?index), - function_param(?func, ?index, ?param), + func_param_by_value(?func, ?index), + func_param(?func, ?index, ?param), variable_has_type(?param, ?type), - any_reachable_function(?func), + any_reachable_func(?func), build_stack_allocation(?stackAlloc, ?func, ?type, ?param). static_allocation_type(?stackAlloc, ?type) :- stack_allocation_by_parameter(?func, ?index, ?stackAlloc), - function_has_type(?func,?funcType), - function_type_param(?funcType, ?index, ?paramType), + func_ty(?func, ?funcType), + func_type_param(?funcType, ?index, ?paramType), pointer_type_has_component(?paramType, ?type). //--------------------------------------------------------------------- @@ -66,39 +66,39 @@ heap_allocation(?heapAlloc), heap_allocation_by_instruction(?instr, ?heapAlloc), static_allocation_type(?heapAlloc, ?elementType) :- - heap_alloc_function(?func), + heap_alloc_func(?func), ( call_instruction_fn_target(?instr, ?func) ; invoke_instruction_fn_target(?instr, ?func)), instruction_assigns_to(?instr, ?var), - instruction_in_function(?instr, ?instrFunc), + instruction_in_func(?instr, ?instrFunc), variable_has_type(?var, ?type), pointer_type_has_component(?type, ?elementType), - any_reachable_function(?instrFunc), + any_reachable_func(?instrFunc), build_heap_allocation(?heapAlloc, ?instrFunc, ?type, ?var). heap_allocation(?heapAlloc), heap_allocation_by_malloc(?insn, ?heapAlloc) :- - function_has_name(?func, "@malloc"), + func_name(?func, "@malloc"), call_instruction_fn_target(?insn, ?func), heap_allocation_by_instruction(?insn, ?heapAlloc). heap_allocation(?heapAlloc), heap_allocation_by_calloc(?insn, ?heapAlloc) :- - function_has_name(?func, "@calloc"), + func_name(?func, "@calloc"), call_instruction_fn_target(?insn, ?func), heap_allocation_by_instruction(?insn, ?heapAlloc). heap_allocation(?heapAlloc), heap_allocation_by_realloc(?insn, ?heapAlloc) :- - function_has_name(?func, "@realloc"), + func_name(?func, "@realloc"), call_instruction_fn_target(?insn, ?func), heap_allocation_by_instruction(?insn, ?heapAlloc). heap_allocation(?heapAlloc), heap_allocation_by_mmap(?insn, ?heapAlloc) :- - function_has_name(?func, "@mmap"), + func_name(?func, "@mmap"), call_instruction_fn_target(?insn, ?func), heap_allocation_by_instruction(?insn, ?heapAlloc). @@ -146,15 +146,15 @@ heap_allocation_by_mmap(?insn, ?heapAlloc) :- :- stack_allocation_by_instruction(?instr, ?stackAlloc), instruction_assigns_to(?instr, ?var), - instruction_in_function(?instr, ?instrFunc), + instruction_in_func(?instr, ?instrFunc), reachable_context(?ctx, ?instrFunc), record(?newCtx, ?stackAlloc, ?ctx). allocated_at(?newCtx, ?stackAlloc, ?ctx, ?param) :- stack_allocation_by_parameter(?func, ?index, ?stackAlloc), - function_param_by_value(?func, ?index), - function_param(?func, ?index, ?param), + func_param_by_value(?func, ?index), + func_param(?func, ?index, ?param), reachable_context(?ctx, ?func), record(?newCtx, ?stackAlloc, ?ctx). @@ -162,7 +162,7 @@ heap_allocation_by_mmap(?insn, ?heapAlloc) :- :- heap_allocation_by_instruction(?instr, ?heapAlloc), instruction_assigns_to(?instr, ?var), - instruction_in_function(?instr, ?instrFunc), + instruction_in_func(?instr, ?instrFunc), reachable_context(?ctx, ?instrFunc), record(?newCtx, ?heapAlloc, ?ctx). } @@ -178,5 +178,5 @@ allocation_pos(?alloc, ?line, ?column) :- allocation_pos(?alloc, ?line, ?column) :- stack_allocation_by_parameter(?func, ?index, ?alloc), - function_param(?func, ?index, ?param), + func_param(?func, ?index, ?param), variable_has_debug_decl_pos(?param, ?line, ?column). diff --git a/datalog/points-to/assertions.dl b/datalog/points-to/assertions.dl index 5d28299..98e4739 100644 --- a/datalog/points-to/assertions.dl +++ b/datalog/points-to/assertions.dl @@ -27,7 +27,7 @@ assert_array_type_size(?type, ?numElems, ?elemSize, ?size) :- .decl assert_type_has_size(?type: Type) assert_type_has_size(?type) :- type(?type), - ! function_type(?type), + ! func_type(?type), ! opaque_struct_type(?type), ! void_type(?type), ! label_type(?type), @@ -70,7 +70,7 @@ _assert_type_compatible_relaxed(?integerType, ?to) :- // The remaining rules consider pointer/array types compatible if the elements // they point to have compatible types, where compatibility is also relaxed -// to allow function or struct types to be compatible up to a given argument +// to allow func or struct types to be compatible up to a given argument // or field. This allows the relation to handle, e.g., pointers to a class or its // subclass, which are structs with a common prefix. The relation // `_assert_type_compatible_relaxed_inner` is used to prevent these rules @@ -234,7 +234,7 @@ assert_global_allocations_have_one_type(?alloc) :- // variables. Their sizes should just be emitted by the fact generator. .decl failing_assert_global_allocations_have_sizes(?alloc: GlobalAllocation) failing_assert_global_allocations_have_sizes(?alloc) :- - // global_allocation includes "allocations" for functions, which naturally + // global_allocation includes "allocations" for funcs, which naturally // don't have sizes. global_allocation_by_variable(_, ?alloc), ! allocation_size(?alloc, _). @@ -254,22 +254,22 @@ failing_assert_global_allocations_have_sizes(?alloc) :- assert_var_points_to_implies_reachable(?aCtx, ?alloc, ?ctx, ?toVar) :- subset.var_points_to(?aCtx, ?alloc, ?ctx, ?toVar), instruction_assigns_to(?instr, ?toVar), - instruction_in_function(?instr, ?instrFunc), + instruction_in_func(?instr, ?instrFunc), ! subset.callgraph.reachable_context(?ctx, ?instrFunc). -// Instructions can't access variables defined outside their own function. -.decl assert_bitcast_operand_in_same_function(?bitcastInstr: Instruction) -assert_bitcast_operand_in_same_function(?bitcastInstr) :- +// Instructions can't access variables defined outside their own func. +.decl assert_bitcast_operand_in_same_func(?bitcastInstr: Instruction) +assert_bitcast_operand_in_same_func(?bitcastInstr) :- bitcast_instruction_from_operand(?bitcastInstr, ?fromOperand), instruction_assigns_to(?instr, ?fromOperand), - instruction_in_function(?bitcastInstr, ?instrFunc), - ! instruction_in_function(?instr, ?instrFunc). + instruction_in_func(?bitcastInstr, ?instrFunc), + ! instruction_in_func(?instr, ?instrFunc). .decl assert_reachable_direct_calls_have_callees(?ctx: Context, ?call : Instruction) assert_reachable_direct_calls_have_callees(?ctx, ?call) :- subset.callgraph.reachable_context(?ctx, ?instrFunc), - instruction_in_function(?call, ?instrFunc), + instruction_in_func(?call, ?instrFunc), direct_call_instruction(?call), call_instruction_fn_operand(?call, ?funcOp), ! undef_constant(?funcOp), @@ -388,7 +388,7 @@ assert_basic_or_path(?alloc) :- .decl assert_dynamic_or_known_size(?alloc: Allocation) assert_dynamic_or_known_size(?alloc) :- allocation(?alloc), - ! global_allocation_by_function(_, ?alloc), + ! global_allocation_by_func(_, ?alloc), ! allocation_size(?alloc, _), ! dynamically_sized_alloc(?alloc). diff --git a/datalog/points-to/assignment.dl b/datalog/points-to/assignment.dl index 57c90b4..4d4ad23 100644 --- a/datalog/points-to/assignment.dl +++ b/datalog/points-to/assignment.dl @@ -5,7 +5,7 @@ // points-to set of a variable to another. // // Cast instructions such as `bitcast` fall to this category. Often -// the returned type of a `@malloc` function call is different than +// the returned type of a `@malloc` func call is different than // the declared type of the target variable. The LLVM IR adds a // temporary variable of type `i8*` to hold the result and then an // intermediate `bitcast` instruction that casts this temporary @@ -14,7 +14,7 @@ // Another class of assignment instructions are the interprocedural // assignments. This way we can model the implicit flow from (i) the // actual arguments to the formal parameters, and from (ii) the return -// value of the called function to the variable that is assigned the +// value of the called func to the variable that is assigned the // result of the `call instruction`. // // A simple field-insensitive approach would also treat getelementptr as an @@ -24,30 +24,30 @@ .decl assign_instruction(?toVar: Variable, ?value: Operand) // `bitcast` instructions assign_instruction(?toVar, ?value) :- - any_reachable_function(?instrFunc), - instruction_in_function(?instr, ?instrFunc), + any_reachable_func(?instrFunc), + instruction_in_func(?instr, ?instrFunc), bitcast_instruction_from_operand(?instr, ?value), // TODO: consider adding type check instruction_assigns_to(?instr, ?toVar). // `ptrtoint` instructions assign_instruction(?toVar, ?value) :- - any_reachable_function(?instrFunc), - instruction_in_function(?instr, ?instrFunc), + any_reachable_func(?instrFunc), + instruction_in_func(?instr, ?instrFunc), ptrtoint_instruction_from_operand(?instr, ?value), instruction_assigns_to(?instr, ?toVar). // `phi` instructions: treat every possible pair value as a potential // assignment to the target variable assign_instruction(?toVar, ?value) :- - any_reachable_function(?instrFunc), - instruction_in_function(?instr, ?instrFunc), + any_reachable_func(?instrFunc), + instruction_in_func(?instr, ?instrFunc), phi_instruction_pair(?instr, _, [?value, _]), instruction_assigns_to(?instr, ?toVar). // `select` instructions; similar to `phi` instructions assign_instruction(?toVar, ?value) :- - any_reachable_function(?instrFunc), - instruction_in_function(?instr, ?instrFunc), + any_reachable_func(?instrFunc), + instruction_in_func(?instr, ?instrFunc), select_instruction(?instr), ( select_instruction_first_operand(?instr, ?value) ; select_instruction_second_operand(?instr, ?value) ), diff --git a/datalog/points-to/at-exit.dl b/datalog/points-to/at-exit.dl index 43ff279..540c946 100644 --- a/datalog/points-to/at-exit.dl +++ b/datalog/points-to/at-exit.dl @@ -4,30 +4,30 @@ // Signature: // int __cxa_atexit(void (*func) (void *), void * arg, void * dso_handle); // -// Registers a destructor function to be called by exit() or when a +// Registers a destructor func to be called by exit() or when a // shared library is unloaded. // // Its arguments are: -// * A pointer to the destructor function +// * A pointer to the destructor func // * The receiver object of the call // * A handle to the shared library // // This routine never returns. //------------------------------------------------------------------------------ -.decl cxx_atexit_function(?func: FunctionDecl) +.decl cxx_atexit_func(?func: FunctionDecl) -cxx_atexit_function(?func) :- - function_has_name(?func, "@__cxa_atexit"), - function_has_type(?func, ?fType), - function_type_param(?fType, 0, ?type1), - function_type_param(?fType, 1, ?type2), - function_type_param(?fType, 2, ?type3), +cxx_atexit_func(?func) :- + func_name(?func, "@__cxa_atexit"), + func_ty(?func, ?fType), + func_type_param(?fType, 0, ?type1), + func_type_param(?fType, 1, ?type2), + func_type_param(?fType, 2, ?type3), pointer_type_has_component(?type1, ?compType1), - function_type(?compType1), + func_type(?compType1), integer_pointer_type(?type2), integer_pointer_type(?type3), - function_type_nparams(?fType, 3). + func_type_nparams(?fType, 3). // Model effects of `__cxa_atexit` @@ -53,19 +53,19 @@ cxx_atexit_function(?func) :- .decl _registers_dtor_atexit(?callCtx: Context, ?dtorOperand: Operand, ?recvOperand: Operand) _registers_dtor_atexit(?callCtx, ?dtorOperand, ?recvOperand) :- - cxx_atexit_function(?atExit), + cxx_atexit_func(?atExit), callgraph_edge(_, ?atExit, ?callCtx, ?callInstr), call_instruction_arg(?callInstr, 0, ?dtorOperand), call_instruction_arg(?callInstr, 1, ?recvOperand). - // The following rule augments the logic about identifying functions + // The following rule augments the logic about identifying funcs // registered to run at program exit, so that it also works with - // function pointers. + // func pointers. .decl _registers_atexit(?callerCtx: Context, ?funcOp: Operand) _registers_atexit(?callerCtx, ?funcOp) :- - function_has_name(?atExit, "@atexit"), + func_name(?atExit, "@atexit"), callgraph_edge(_, ?atExit, ?callerCtx, ?callerInstr), actual_arg(?callerInstr, 0, ?funcOp). @@ -76,15 +76,15 @@ cxx_atexit_function(?func) :- called_at_exit(?callback) :- _registers_atexit(?ctx, ?funcOp), operand_points_to(_, ?alloc, ?ctx, ?funcOp), - function_by_location(?alloc, ?callback). + func_by_location(?alloc, ?callback). called_at_exit(Callback) :- - function_has_name(AtExit, "@atexit"), + func_name(AtExit, "@atexit"), callgraph_edge(_, AtExit, _, CallerInstr), call_instruction_arg(CallerInstr, 0, Constant), // the following is a simplified version of logic that can only - // work with direct function calls - constant_references_function(Constant, Callback). + // work with direct func calls + constant_references_func(Constant, Callback). .decl _dtor_accepts_recv(?aCtx: Context, ?recvObj: GlobalAllocation , ?dtor: FunctionDecl) @@ -95,9 +95,9 @@ cxx_atexit_function(?func) :- alloc_aliases(?recvObj, ?someObj), global_allocation(?recvObj), static_allocation_type(?recvObj, ?recvType), - function_by_location(?dtorObj, ?dtor), - function_has_type(?dtor, ?dtorType), - function_type_param(?dtorType, 0, ?ptrType), + func_by_location(?dtorObj, ?dtor), + func_ty(?dtor, ?dtorType), + func_type_param(?dtorType, 0, ?ptrType), pointer_type_has_component(?ptrType, ?recvType). called_at_exit(?dtor) :- _dtor_accepts_recv(_, _, ?dtor). @@ -107,5 +107,5 @@ cxx_atexit_function(?func) :- exit_context(?exitCtx), _dtor_accepts_recv(?aCtx, ?recvObj, ?dtor), reachable_context(?exitCtx, ?dtor), - function_param(?dtor, 0, ?this). + func_param(?dtor, 0, ?this). } diff --git a/datalog/points-to/class-type.dl b/datalog/points-to/class-type.dl index 91a9095..5af6a0f 100644 --- a/datalog/points-to/class-type.dl +++ b/datalog/points-to/class-type.dl @@ -263,9 +263,9 @@ template_typeinfo(?typeInfo) :- class_type_constructor(?ctor, ?type) :- struct_type(?type), - function_has_name(?ctor, ?funcName), - function_has_type(?ctor, ?fType), - function_type_param(?fType, 0, ?ptrType), + func_name(?ctor, ?funcName), + func_ty(?ctor, ?fType), + func_type_param(?fType, 0, ?ptrType), pointer_type_has_component(?ptrType, ?type), ( contains("C1", ?funcName) ; contains("C2", ?funcName) @@ -276,9 +276,9 @@ class_type_constructor(?ctor, ?type) class_type_destructor(?dtor, ?type) :- struct_type(?type), - function_has_name(?dtor, ?funcName), - function_has_type(?dtor, ?fType), - function_type_param(?fType, 0, ?ptrType), + func_name(?dtor, ?funcName), + func_ty(?dtor, ?fType), + func_type_param(?fType, 0, ?ptrType), pointer_type_has_component(?ptrType, ?type), ( contains("D1", ?funcName) ; contains("D2", ?funcName) diff --git a/datalog/points-to/constant-points-to.dl b/datalog/points-to/constant-points-to.dl index b0eaada..56ec793 100644 --- a/datalog/points-to/constant-points-to.dl +++ b/datalog/points-to/constant-points-to.dl @@ -1,5 +1,5 @@ // A relation that tracks flow of allocations among program constants. Note that -// references to global variables or functions are considered a type of constant in +// references to global variables or funcs are considered a type of constant in // LLVM IR. Constant addresses are another type of constant that may point to // memory. Moreover, a constant may be expanded to a larger complex constant // (e.g., by a `bitcast` expression), through constant expressions. @@ -16,7 +16,7 @@ constant_points_to(?constant, ?null) :- nullptr_constant(?constant), null_location(?null). -// Global variable and function references is a common type of +// Global variable and func references is a common type of // constants. They should be matched to the corresponding global // allocation. @@ -26,14 +26,14 @@ constant_points_to(?constant, ?alloc) :- global_allocation_by_variable(?gVar, ?alloc). constant_points_to(?constant, ?alloc) :- - function_constant_fn_name(?constant, ?fName), - function_has_name(?func, ?fName), - global_allocation_by_function(?func, ?alloc). + func_constant_fn_name(?constant, ?fName), + func_name(?func, ?fName), + global_allocation_by_func(?func, ?alloc). constant_points_to(?constant, ?alloc) :- constant_references_variable(?constant, ?gVar), global_allocation_by_variable(?gVar, ?alloc). constant_points_to(?constant, ?alloc) :- - constant_references_function(?constant, ?func), - global_allocation_by_function(?func, ?alloc). + constant_references_func(?constant, ?func), + global_allocation_by_func(?func, ?alloc). diff --git a/datalog/points-to/core.dl b/datalog/points-to/core.dl index 09fec76..fead62d 100644 --- a/datalog/points-to/core.dl +++ b/datalog/points-to/core.dl @@ -19,11 +19,11 @@ _merge.reachable_context(?ctx, ?func) :- callgraph.reachable_context(?ctx, ?func). - callgraph.function_pointer_operand_points_to(?aCtx, ?alloc, ?ctx, ?operand) :- + callgraph.func_pointer_operand_points_to(?aCtx, ?alloc, ?ctx, ?operand) :- operand_points_to(?aCtx, ?alloc, ?ctx, ?operand). memcpy_pass_by_value(?calleeCtx, ?param, ?callerCtx, ?argument) :- - function_by_value_param(?callee, ?index, ?param), + func_by_value_param(?callee, ?index, ?param), callgraph.callgraph_edge(?calleeCtx, ?callee, ?callerCtx, ?callerInstr), actual_arg(?callerInstr, ?index, ?argument). @@ -34,7 +34,7 @@ var_points_to(aCtx, argvAlloc, mainCtx, argvVar) :- argv_var_points_to(aCtx, argvAlloc, mainCtx, argvVar). - any_reachable_function(?func) :- callgraph.reachable_function(?func). + any_reachable_func(?func) :- callgraph.reachable_func(?func). //----------------------------------------------------------------------- // [Output Relations] @@ -60,7 +60,7 @@ unknown_location(?unknown), inttoptr_instruction(?instr), instruction_assigns_to(?instr, ?toVar), - instruction_in_function(?instr, ?instrFunc), + instruction_in_func(?instr, ?instrFunc), callgraph.reachable_context(?ctx, ?instrFunc). //---------------------------- @@ -89,23 +89,23 @@ operand_points_to(?aCtx, ?alloc, ?ctx, ?cons) :- empty_alloc_context(?aCtx), - constant_in_function(?cons, ?enclosingFunc), + constant_in_func(?cons, ?enclosingFunc), constant_points_to(?cons, ?alloc), callgraph.reachable_context(?ctx, ?enclosingFunc). //------------------------------------------------------------------------------ - // [Marks all functions as reachable] + // [Marks all funcs as reachable] // // This is useful if the artifact to be analyzed doesn't have any // known entry points (e.g., dynamic library). In such a case, it - // makes sense to treat all functions defined therein as potential + // makes sense to treat all funcs defined therein as potential // entry points. //------------------------------------------------------------------------------ callgraph.reachable_context(?ctx, ?func) :- user_option_value("entrypoints", "library"), empty_context(?ctx), - function(?func). + func(?func). //----------------------------------------------------------------------- // [Re-exports] diff --git a/datalog/points-to/cplusplus-exceptions.dl b/datalog/points-to/cplusplus-exceptions.dl index 0a1defb..ef45cc0 100644 --- a/datalog/points-to/cplusplus-exceptions.dl +++ b/datalog/points-to/cplusplus-exceptions.dl @@ -1,5 +1,5 @@ //------------------------------------------------------------------------------ -// Exceptions - Important functions in the libc++ ABI +// Exceptions - Important funcs in the libc++ ABI //------------------------------------------------------------------------------ //------------------------------------------------------------------------- @@ -22,13 +22,13 @@ .decl cxx_alloc_exception(?func: FunctionDecl) cxx_alloc_exception(?func), - heap_alloc_function(?func) + heap_alloc_func(?func) :- - function_has_name(?func, "@__cxa_allocate_exception"), - function_has_type(?func, ?fType), - function_type_param(?fType, 0, ?type), + func_name(?func, "@__cxa_allocate_exception"), + func_ty(?func, ?fType), + func_type_param(?fType, 0, ?type), integer_type(?type), - function_type_nparams(?fType, 1). + func_type_nparams(?fType, 1). // Exception Object @@ -123,18 +123,18 @@ sized_alloc_instr(?insn, as(?size, Bytes)) :- // This routine never returns. //------------------------------------------------------------------------- -.decl cxx_throw_function(?func: FunctionDecl) +.decl cxx_throw_func(?func: FunctionDecl) -cxx_throw_function(?func) :- - function_has_name(?func, "@__cxa_throw"), - function_has_type(?func, ?fType), - function_type_param(?fType, 0, ?type1), - function_type_param(?fType, 1, ?type2), - function_type_param(?fType, 2, ?type3), +cxx_throw_func(?func) :- + func_name(?func, "@__cxa_throw"), + func_ty(?func, ?fType), + func_type_param(?fType, 0, ?type1), + func_type_param(?fType, 1, ?type2), + func_type_param(?fType, 2, ?type3), pointer_type(?type1), pointer_type(?type2), pointer_type(?type3), - function_type_nparams(?fType, 3). + func_type_nparams(?fType, 3). //------------------------------------------------ @@ -180,7 +180,7 @@ typeinfo(?var), .decl _cxx_throw_instruction(?throwInsn: Instruction) _cxx_throw_instruction(?throwInsn) :- - cxx_throw_function(?throwFunc), + cxx_throw_func(?throwFunc), callgraph_edge(_, ?throwFunc, _, ?throwInsn). .decl _cxx_throw_instruction_exception(?excObj: ExceptionObject, ?throwInsn: Instruction) @@ -204,7 +204,7 @@ typeinfo(?var), _cxx_throw_instruction(?throwInsn), actual_arg(?throwInsn, 2, ?dtorArg), stripctx_operand_points_to(?alloc, ?dtorArg), - function_by_location(?alloc, ?dtor). + func_by_location(?alloc, ?dtor). .decl _cxx_throw_instruction_no_dtor(?throwInsn: Instruction) _cxx_throw_instruction_no_dtor(?throwInsn) :- diff --git a/datalog/points-to/cplusplus.dl b/datalog/points-to/cplusplus.dl index bd04002..bb30e94 100644 --- a/datalog/points-to/cplusplus.dl +++ b/datalog/points-to/cplusplus.dl @@ -1,31 +1,31 @@ //------------------------------------------------------------------------------ -// Identify the new() function for C++ +// Identify the new() func for C++ //------------------------------------------------------------------------------ -// There must be a single allocating function +// There must be a single allocating func -.decl cxx_new_function(?func: FunctionDecl) +.decl cxx_new_func(?func: FunctionDecl) -// Consider only functions with a single parameter of integer type, no +// Consider only funcs with a single parameter of integer type, no // definition, and whose demangled name contains the keyword `new` -cxx_new_function(?func), - heap_alloc_function(?func) +cxx_new_func(?func), + heap_alloc_func(?func) :- - function_has_signature(?func, ?signature), - function_has_type(?func, ?fType), + func_signature(?func, ?signature), + func_ty(?func, ?fType), contains("operator new", ?signature), - function_type_param(?fType, 0, ?type), + func_type_param(?fType, 0, ?type), integer_type(?type), - function_type_nparams(?fType, 1), - !function_decl_to_defn(?func, _). + func_type_nparams(?fType, 1), + !func_decl_to_defn(?func, _). // Introduce new heap allocation selector .decl heap_allocation_by_new(?insn: Instruction, ?heapAlloc: HeapAllocation) heap_allocation_by_new(?insn, ?heapAlloc) :- - cxx_new_function(?func), + cxx_new_func(?func), ( call_instruction_fn_target(?insn, ?func) ; invoke_instruction_fn_target(?insn, ?func) ), heap_allocation_by_instruction(?insn, ?heapAlloc). @@ -33,13 +33,13 @@ heap_allocation_by_new(?insn, ?heapAlloc) :- // Compute allocation size sized_alloc_instr(?insn, as(?size, Bytes)) :- - cxx_new_function(?func), + cxx_new_func(?func), call_instruction_fn_target(?insn, ?func), call_instruction_arg(?insn, 0, ?operand), constant_to_int(?operand, ?size). sized_alloc_instr(?insn, as(?size, Bytes)) :- - cxx_new_function(?func), + cxx_new_func(?func), invoke_instruction_fn_target(?insn, ?func), invoke_instruction_arg(?insn, 0, ?operand), constant_to_int(?operand, ?size). @@ -79,8 +79,8 @@ destructor_class_type(?dtor, ?classType) :- // implementation details, and should not be accessed outside the component. //---------------------------------------------------------------------------- - // We have a direct call to a constructor function (associated with - // type `Type`) inside function `InFunction`, where `this` points to + // We have a direct call to a constructor func (associated with + // type `Type`) inside func `InFunction`, where `this` points to // `Alloc`. Note that the latter may be initialized by many // constructors, unless it is of a base type. // TODO(lb): Remove "is_" prefix when upgrading Souffle @@ -90,7 +90,7 @@ destructor_class_type(?dtor, ?classType) :- ( call_instruction_fn_target(?initInstr, ?ctor) ; invoke_instruction_fn_target(?initInstr, ?ctor) ), constructor_class_type(?ctor, ?type), - instruction_in_function(?initInstr, ?inFunction), + instruction_in_func(?initInstr, ?inFunction), actual_arg(?initInstr, 0, ?this), stripctx_operand_points_to(?alloc, ?this). @@ -178,7 +178,7 @@ destructor_class_type(?dtor, ?classType) :- class_instance_vtable(?alloc, ?vTable) :- class_instance_constructor(?alloc, ?ctor), - instruction_in_function(?storeInsn, ?ctor), + instruction_in_func(?storeInsn, ?ctor), store_instruction_value(?storeInsn, ?value), store_instruction_address(?storeInsn, ?pointer), stripctx_operand_points_to(?alloc, ?pointer), @@ -193,7 +193,7 @@ destructor_class_type(?dtor, ?classType) :- // We do that by identifying instructions that store a pointer to a // vtable to the vpointer of some class instance, inside some // constructor. We already now the class type associated with each - // constructor function, hence we now have the association between the + // constructor func, hence we now have the association between the // class type and its vtable too. // This does not always work. TODO: fix @@ -201,7 +201,7 @@ destructor_class_type(?dtor, ?classType) :- // vtable:class_type[VTable] = Type // <- // init_by_ctor(Type, Ctor, _, Alloc), - // instruction:function[StoreInsn] = Ctor, + // instruction:func[StoreInsn] = Ctor, // store_instruction:value[StoreInsn] = Value, // store_instruction:address[StoreInsn] = Pointer, // operand_points_to(Alloc, Pointer), diff --git a/datalog/points-to/interprocedural.dl b/datalog/points-to/interprocedural.dl index 9f66fd1..50a80b9 100644 --- a/datalog/points-to/interprocedural.dl +++ b/datalog/points-to/interprocedural.dl @@ -2,9 +2,9 @@ // [Interprocedural Logic] //------------------------------------------------------------------------------ -.decl function_by_location(?alloc: GlobalAllocation, ?callee: FunctionDecl) -function_by_location(?alloc, ?callee) :- - global_allocation_by_function(?callee, ?alloc). +.decl func_by_location(?alloc: GlobalAllocation, ?callee: FunctionDecl) +func_by_location(?alloc, ?callee) :- + global_allocation_by_func(?callee, ?alloc). .comp Callgraph { @@ -15,7 +15,7 @@ function_by_location(?alloc, ?callee) :- //---------------------------------------------------------------------------- .decl called_at_exit(func: FunctionDecl) inline - .decl function_pointer_operand_points_to(?aCtx: Context, ?alloc: Allocation, ?ctx: Context, ?operand: Operand) inline + .decl func_pointer_operand_points_to(?aCtx: Context, ?alloc: Allocation, ?ctx: Context, ?operand: Operand) inline .decl merge(?newCtx: Context, ?callerInstr: Instruction, ?callerCtx: Context) @@ -29,24 +29,24 @@ function_by_location(?alloc, ?callee) :- // Reachability .decl reachable_context(?ctx: Context, ?func: FunctionDecl) - .decl reachable_function(func: FunctionDecl) + .decl reachable_func(func: FunctionDecl) .decl reachable_instruction(instr: Instruction) reachable_context(?calleeCtx, ?callee) :- callgraph_edge(?calleeCtx, ?callee, _, _). - reachable_function(?func) :- + reachable_func(?func) :- reachable_context(_, ?func). reachable_instruction(Instr) :- - reachable_function(Func), - instruction_in_function(Instr, Func). + reachable_func(Func), + instruction_in_func(Instr, Func). // TODO: transition from startup to main? reachable_context(?ctx, ?func) :- ! insensitive(), - ( main_function(?func), + ( main_func(?func), main_context(?ctx) ; called_at_startup(?func), startup_context(?ctx) @@ -57,7 +57,7 @@ function_by_location(?alloc, ?callee) :- reachable_context(?ctx, ?func) :- insensitive(), empty_context(?ctx), - ( main_function(?func) + ( main_func(?func) ; called_at_startup(?func) ; called_at_exit(?func) ). @@ -66,7 +66,7 @@ function_by_location(?alloc, ?callee) :- reachable_store(?ctx, ?toAddress, ?value) :- reachable_context(?ctx, ?instrFunc), - instruction_in_function(?instr, ?instrFunc), + instruction_in_func(?instr, ?instrFunc), store_instruction_value(?instr, ?value), store_instruction_address(?instr, ?toAddress). @@ -74,7 +74,7 @@ function_by_location(?alloc, ?callee) :- reachable_load(?ctx, ?toVar, ?fromAddress) :- reachable_context(?ctx, ?instrFunc), - instruction_in_function(?instr, ?instrFunc), + instruction_in_func(?instr, ?instrFunc), load_instruction_address(?instr, ?fromAddress), instruction_assigns_to(?instr, ?toVar). @@ -82,7 +82,7 @@ function_by_location(?alloc, ?callee) :- .decl callgraph_edge(?calleeCtx: Context, ?callee: FunctionDecl, ?callerCtx: Context, ?callerInstr: Instruction) - // Direct function calls + // Direct func calls .decl _callgraph_edge_interim_direct_call(?callee: FunctionDecl, ?callerCtx: Context, ?callerInstr: Instruction) @@ -90,7 +90,7 @@ function_by_location(?alloc, ?callee) :- :- direct_call_instruction(?callerInstr), call_instruction_fn_target(?callerInstr, ?callee), - instruction_in_function(?callerInstr, ?instrFunc), + instruction_in_func(?callerInstr, ?instrFunc), reachable_context(?callerCtx, ?instrFunc). callgraph_edge(?calleeCtx, ?callee, ?callerCtx, ?callerInstr) @@ -105,7 +105,7 @@ function_by_location(?alloc, ?callee) :- :- direct_call_instruction(?callerInstr), invoke_instruction_fn_target(?callerInstr, ?callee), - instruction_in_function(?callerInstr, ?instrFunc), + instruction_in_func(?callerInstr, ?instrFunc), reachable_context(?callerCtx, ?instrFunc). callgraph_edge(?calleeCtx, ?callee, ?callerCtx, ?callerInstr) @@ -115,7 +115,7 @@ function_by_location(?alloc, ?callee) :- merge(?calleeCtx, ?callerInstr, ?callerCtx). - // Indirect function calls (via function pointers) + // Indirect func calls (via func pointers) .decl _callgraph_edge_interim_indirect_call(?callee: FunctionDecl, ?callerCtx: Context, ?aCtx: Context, ?callerInstr: Instruction) @@ -123,9 +123,9 @@ function_by_location(?alloc, ?callee) :- :- indirect_call_instruction(?callerInstr), call_instruction_fn_operand(?callerInstr, ?funcOp), - function_pointer_operand_points_to(?aCtx, ?funcLoc, ?callerCtx, ?funcOp), - function_by_location(?funcLoc, ?callee), - function_has_type(?callee, ?actualType), + func_pointer_operand_points_to(?aCtx, ?funcLoc, ?callerCtx, ?funcOp), + func_by_location(?funcLoc, ?callee), + func_ty(?callee, ?actualType), operand_has_type(?funcOp, ?funcOpType), pointer_type_has_component(?funcOpType, ?declaredType), type_compatible(?actualType, ?declaredType). @@ -142,9 +142,9 @@ function_by_location(?alloc, ?callee) :- :- invoke_instruction(?callerInstr), invoke_instruction_fn_operand(?callerInstr, ?funcOp), - function_pointer_operand_points_to(?aCtx, ?funcLoc, ?callerCtx, ?funcOp), - function_by_location(?funcLoc, ?callee), - function_has_type(?callee, ?actualType), + func_pointer_operand_points_to(?aCtx, ?funcLoc, ?callerCtx, ?funcOp), + func_by_location(?funcLoc, ?callee), + func_ty(?callee, ?actualType), operand_has_type(?funcOp, ?funcOpType), pointer_type_has_component(?funcOpType, ?declaredType), type_compatible(?actualType, ?declaredType). @@ -160,7 +160,7 @@ function_by_location(?alloc, ?callee) :- // Interprocedural Assignments //------------------------------------------------------------------------------ -// Actual argument of function call +// Actual argument of func call .decl actual_arg(?instr: Instruction, ?index: ArgumentIndex, ?argument: Operand) @@ -170,17 +170,17 @@ actual_arg(?invokeInstr, ?index, ?argument) :- actual_arg(?callInstr, ?index, ?argument) :- call_instruction_arg(?callInstr, ?index, ?argument). -.decl function_param_not_by_value(?callee: Function, ?index: ArgumentIndex, ?param: Variable) +.decl func_param_not_by_value(?callee: Function, ?index: ArgumentIndex, ?param: Variable) -function_param_not_by_value(?callee, ?index, ?param) :- - function_param(?callee, ?index, ?param), - !function_param_by_value(?callee, ?index). +func_param_not_by_value(?callee, ?index, ?param) :- + func_param(?callee, ?index, ?param), + !func_param_by_value(?callee, ?index). -.decl function_returns_value(?retValue: Operand, ?inFunction: Function) +.decl func_returns_value(?retValue: Operand, ?inFunction: Function) -function_returns_value(?retValue, ?inFunction) :- +func_returns_value(?retValue, ?inFunction) :- ret_instruction_value(?retInsn, ?retValue), - instruction_in_function(?retInsn, ?inFunction). + instruction_in_func(?retInsn, ?inFunction). .comp InterpAssignment { @@ -199,20 +199,20 @@ function_returns_value(?retValue, ?inFunction) :- // implementation details, and should not be accessed outside the component. //---------------------------------------------------------------------------- - // Interprocedural assignment due to function call + // Interprocedural assignment due to func call .decl interp_assignment(?toCtx: Context, ?toVar: Variable, ?fromCtx: Context, ?fromValue: Operand) // Actual argument to formal parameter `assignment` interp_assignment(?calleeCtx, ?param, ?callerCtx, ?argument) :- callgraph_edge(?calleeCtx, ?callee, ?callerCtx, ?callerInstr), - function_param_not_by_value(?callee, ?index, ?param), + func_param_not_by_value(?callee, ?index, ?param), actual_arg(?callerInstr, ?index, ?argument). // Returned value to target variable `assignment` interp_assignment(?callerCtx, ?toVar, ?calleeCtx, ?retValue) :- callgraph_edge(?calleeCtx, ?callee, ?callerCtx, ?callerInstr), - function_returns_value(?retValue, ?callee), + func_returns_value(?retValue, ?callee), instruction_assigns_to(?callerInstr, ?toVar). //------------------------------------------------------------------------------ @@ -222,7 +222,7 @@ function_returns_value(?retValue, ?inFunction) :- // `va_arg` instruction // // TODO: model target-specific value `va_list` and calls to related - // LLVM intrinsic functions. Right now this may produce nothing + // LLVM intrinsic funcs. Right now this may produce nothing .decl _va_arg_target(?toVar: Variable, ?argType: Type, ?callee: Function) @@ -230,13 +230,13 @@ function_returns_value(?retValue, ?inFunction) :- va_arg_instruction(?vAArgInstr), va_arg_instruction_type(?vAArgInstr, ?argType), instruction_assigns_to(?vAArgInstr, ?toVar), - instruction_in_function(?vAArgInstr, ?callee). + instruction_in_func(?vAArgInstr, ?callee). interp_assignment(?calleeCtx, ?toVar, ?callerCtx, ?argument) :- _va_arg_target(?toVar, ?argType, ?callee), - function_has_type(?callee, ?type), - function_type_has_varargs(?type), - function_type_nparams(?type, ?n), + func_ty(?callee, ?type), + func_type_has_varargs(?type), + func_type_nparams(?type, ?n), callgraph_edge(?calleeCtx, ?callee, ?callerCtx, ?callerInstr), actual_arg(?callerInstr, ?index, ?argument), ?index >= ?n, @@ -248,12 +248,12 @@ function_returns_value(?retValue, ?inFunction) :- // Pass-by-value Semantics //------------------------------------------------------------------------------ -// Interprocedural memcpy due to function call +// Interprocedural memcpy due to func call .decl memcpy_pass_by_value(?toCtx: Context, ?toVar: Variable, ?fromCtx: Context, ?fromValue: Operand) -.decl function_by_value_param(?callee: Function, ?index: ArgumentIndex, ?param: Variable) +.decl func_by_value_param(?callee: Function, ?index: ArgumentIndex, ?param: Variable) -function_by_value_param(?callee, ?index, ?param) :- - function_param(?callee, ?index, ?param), - function_param_by_value(?callee, ?index). +func_by_value_param(?callee, ?index, ?param) :- + func_param(?callee, ?index, ?param), + func_param_by_value(?callee, ?index). diff --git a/datalog/points-to/memcpy.dl b/datalog/points-to/memcpy.dl index ecdfee8..0483757 100644 --- a/datalog/points-to/memcpy.dl +++ b/datalog/points-to/memcpy.dl @@ -38,7 +38,7 @@ .decl _memcpy_call(?ctx: Context, ?to: Operand, ?from: Operand, ?size: number) _memcpy_call(?callerCtx, ?to, ?from, ?size) :- - function_has_name(?callee, ?name), + func_name(?callee, ?name), ( "@memcpy"=substr(?name,0,7); "@llvm.memcpy"=substr(?name,0,12) diff --git a/datalog/points-to/points-to-statistics.dl b/datalog/points-to/points-to-statistics.dl index 9e6d96c..bae7d11 100644 --- a/datalog/points-to/points-to-statistics.dl +++ b/datalog/points-to/points-to-statistics.dl @@ -1,12 +1,12 @@ // There is code to plot some of these statistics in ../../plot -// The containing function of a variable +// The containing func of a variable -variable_in_function(?var, ?func) :- - _variable_in_function(?var, ?funcName), - function_has_name(?func, ?funcName). +variable_in_func(?var, ?func) :- + _variable_in_func(?var, ?funcName), + func_name(?func, ?funcName). -// Compute variables defined in reachable functions +// Compute variables defined in reachable funcs .decl reachable_var(?var: Variable) .decl reachable_vars(?nVars: number) @@ -29,8 +29,8 @@ variable_in_function(?var, ?func) :- .decl stripctx_var_alias(?var1 : Variable, ?var2 : Variable) reachable_var(?var) :- - variable_in_function(?var, ?func), - subset.callgraph.reachable_function(?func). + variable_in_func(?var, ?func), + subset.callgraph.reachable_func(?func). reachable_vars(?nVars) :- ?nVars = count : reachable_var(_). @@ -159,32 +159,32 @@ _nallocs_by_pt_total[] = NVars //------------------------------------------------------------------------------ // Intermediate relationship -.decl function_calls_function(?caller: Function, ?callee: Function) -function_calls_function(?caller, ?callee) :- - instruction_in_function(?callerInstr, ?caller), +.decl func_calls_func(?caller: Function, ?callee: Function) +func_calls_func(?caller, ?callee) :- + instruction_in_func(?callerInstr, ?caller), subset.callgraph.callgraph_edge(_, ?callee, _, ?callerInstr). -// How many functions does this function call? -.decl function_out_degree(?functionName: FunctionName, ?degree: number) -// How many functions is this function called by? -.decl function_in_degree(?functionName: FunctionName, ?degree: number) -// How many functions call this number of functions? -.decl functions_by_in_degree(?degree: number, ?functions: number) -// How many functions are called by this number of functions? -.decl functions_by_out_degree(?degree: number, ?functions: number) - -function_out_degree(?functionName, ?degree) :- - function_has_name(?func, ?functionName), - ?degree = count : function_calls_function(?func, _). - -function_in_degree(?functionName, ?degree) :- - function_has_name(?func, ?functionName), - ?degree = count : function_calls_function(_, ?func). - -functions_by_out_degree(?degree, ?functions) :- - function_out_degree(_, ?degree), // ground it - ?functions = count : function_out_degree(_, ?degree). - -functions_by_in_degree(?degree, ?functions) :- - function_in_degree(_, ?degree), // ground it - ?functions = count : function_in_degree(_, ?degree). +// How many funcs does this func call? +.decl func_out_degree(?funcName: FunctionName, ?degree: number) +// How many funcs is this func called by? +.decl func_degree(?funcName: FunctionName, ?degree: number) +// How many funcs call this number of funcs? +.decl funcs_by_in_degree(?degree: number, ?funcs: number) +// How many funcs are called by this number of funcs? +.decl funcs_by_out_degree(?degree: number, ?funcs: number) + +func_out_degree(?funcName, ?degree) :- + func_name(?func, ?funcName), + ?degree = count : func_calls_func(?func, _). + +func_degree(?funcName, ?degree) :- + func_name(?func, ?funcName), + ?degree = count : func_calls_func(_, ?func). + +funcs_by_out_degree(?degree, ?funcs) :- + func_out_degree(_, ?degree), // ground it + ?funcs = count : func_out_degree(_, ?degree). + +funcs_by_in_degree(?degree, ?funcs) :- + func_degree(_, ?degree), // ground it + ?funcs = count : func_degree(_, ?degree). diff --git a/datalog/points-to/region.dl b/datalog/points-to/region.dl index 3874310..c9ca7ca 100644 --- a/datalog/points-to/region.dl +++ b/datalog/points-to/region.dl @@ -12,7 +12,7 @@ region(r) :- stack_region(r). heap_region("heap"). stack_region("stack"). global_region("global"). -region("function"). +region("func"). region("null"). region("unknown"). @@ -26,10 +26,10 @@ alloc_region(?alloc, "heap") :- heap_allocation(?alloc). alloc_region(?alloc, "heap") :- heap_allocation_by_new(_, ?alloc). alloc_region(?alloc, "stack") :- stack_allocation(?alloc). alloc_region(?alloc, "global") :- global_allocation_by_variable(_, ?alloc). -// NOTE: Functions each get their own region because it's costly to unify functions -// - each call to one becomes a call to each other function, causing many more +// NOTE: Functions each get their own region because it's costly to unify funcs +// - each call to one becomes a call to each other func, causing many more // contexts. alloc_region(?alloc, as(?func, Region)), region(as(?func, Region)) :- - global_allocation_by_function(?func, ?alloc). + global_allocation_by_func(?func, ?alloc). diff --git a/datalog/points-to/signatures.dl b/datalog/points-to/signatures.dl index 913b1b3..c02e8bc 100644 --- a/datalog/points-to/signatures.dl +++ b/datalog/points-to/signatures.dl @@ -17,9 +17,9 @@ .decl pts_signature_global_memcpy_arg_reachable(?func : FunctionName, ?global : GlobalVarName, ?index : ArgumentIndex) .decl pts_signature_none(?func : FunctionName) -.decl function_needs_pts_signature(?function : FunctionDecl) -.decl function_has_pts_signature(?function : FunctionDecl) -.decl function_missing_pts_signature(?function : FunctionDecl) +.decl func_needs_pts_signature(?func : FunctionDecl) +.decl func_pts_signature(?func : FunctionDecl) +.decl func_missing_pts_signature(?func : FunctionDecl) .decl type_has_subelement(?type : Type, ?elem : Type) @@ -38,32 +38,32 @@ type_has_subelement(?type, ?elem) :- type_has_subelement(?type, ?type) :- type(?type). -function_needs_pts_signature(?function) :- - function_decl(?function), - function_has_name(?function, ?name), - !(function_decl_to_defn(?function,_); - heap_alloc_function(?function); +func_needs_pts_signature(?func) :- + func_decl(?func), + func_name(?func, ?name), + !(func_decl_to_defn(?func,_); + heap_alloc_func(?func); "@memcpy"=substr(?name,0,7); "@llvm.memcpy"=substr(?name,0,12)), - function_has_type(?function, ?type), - function_type_return(?type, ?rtype), + func_ty(?func, ?type), + func_type_return(?type, ?rtype), pointer_type(?rtype). -function_needs_pts_signature(?function) :- - function_decl(?function), - function_has_name(?function, ?name), - !(function_decl_to_defn(?function,_); - heap_alloc_function(?function); +func_needs_pts_signature(?func) :- + func_decl(?func), + func_name(?func, ?name), + !(func_decl_to_defn(?func,_); + heap_alloc_func(?func); "@memcpy"=substr(?name,0,7); "@llvm.memcpy"=substr(?name,0,12)), - function_has_type(?function, ?type), - function_type_param(?type, _, ?ptype), + func_ty(?func, ?type), + func_type_param(?type, _, ?ptype), pointer_type_has_component(?ptype, ?comp), type_has_subelement(?comp, ?elem), pointer_type(?elem). -function_has_pts_signature(?function) :- - function_has_name(?function, ?name), +func_pts_signature(?func) :- + func_name(?func, ?name), (pts_signature_none(?name); pts_signature_return_alloc(?name); pts_signature_return_alloc_once(?name); @@ -82,24 +82,24 @@ function_has_pts_signature(?function) :- pts_signature_global_memcpy_arg(?name, _, _); pts_signature_global_memcpy_arg_reachable(?name, _, _)). -function_missing_pts_signature(?function) :- - function_needs_pts_signature(?function), - !function_has_pts_signature(?function). +func_missing_pts_signature(?func) :- + func_needs_pts_signature(?func), + !func_pts_signature(?func). //------------------------------------------------------------------------------ -// Allocation functions +// Allocation funcs //------------------------------------------------------------------------------ .decl build_signature_allocation(sigAlloc: SignatureAllocation, func: Function, caller: Function, type: Type, var: Variable, pos: symbol) inline build_signature_allocation(sigAlloc, func, caller, type, var, pos) :- - function_has_name(func, funcName), - function_has_name(caller, callerName), + func_name(func, funcName), + func_name(caller, callerName), variable_has_name(var, varName), sigAlloc = cat("*sig_alloc", funcName, "|", callerName, "[", type, " ", varName, "(", pos, ")", "]"). .decl build_signature_allocation_once(sigAlloc: SignatureAllocation, func: Function, type: Type, pos: symbol) inline build_signature_allocation_once(sigAlloc, func, type, pos) :- - function_has_name(func, funcName), + func_name(func, funcName), sigAlloc = cat("*sig_alloc", funcName, "[", type, "(", pos, ")]"). .comp Signatures { @@ -158,12 +158,12 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- _sig_ptr_alloc(?newCtx, ?sigAlloc, ?ctx, ?ptr, _). _sig_var_alloc(?newCtx, ?sigAlloc, ?ctx, ?var, ?type) :- - function_has_name(?func, ?sname), + func_name(?func, ?sname), pts_signature_return_alloc(?sname), ( call_instruction_fn_target(?instr, ?func) ; invoke_instruction_fn_target(?instr, ?func)), instruction_assigns_to(?instr, ?var), - instruction_in_function(?instr, ?instrFunc), + instruction_in_func(?instr, ?instrFunc), variable_has_type(?var,?ptrType), pointer_type_has_component(?ptrType, ?type), @@ -173,12 +173,12 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- record(?newCtx, ?sigAlloc, ?ctx). _sig_var_alloc(?newCtx, ?sigAlloc, ?ctx, ?var, ?type) :- - function_has_name(?func, ?sname), + func_name(?func, ?sname), pts_signature_return_alloc_once(?sname), ( call_instruction_fn_target(?instr, ?func) ; invoke_instruction_fn_target(?instr, ?func)), instruction_assigns_to(?instr, ?var), - instruction_in_function(?instr, ?instrFunc), + instruction_in_func(?instr, ?instrFunc), variable_has_type(?var,?ptrType), pointer_type_has_component(?ptrType, ?type), @@ -188,11 +188,11 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- empty_alloc_context(?newCtx). _sig_ptr_alloc(?newCtx, ?sigAlloc, ?ptrCtx, ?ptr, ?type) :- - function_has_name(?func, ?sname), + func_name(?func, ?sname), pts_signature_arg_alloc(?sname, ?index), ( call_instruction_fn_target(?instr, ?func) ; invoke_instruction_fn_target(?instr, ?func)), - instruction_in_function(?instr, ?instrFunc), + instruction_in_func(?instr, ?instrFunc), actual_arg(?instr, ?index, ?var), reachable_context(?ctx, ?instrFunc), @@ -206,11 +206,11 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- record(?newCtx, ?sigAlloc, ?ctx). _sig_ptr_alloc(?newCtx, ?sigAlloc, ?ptrCtx, ?ptr, ?type) :- - function_has_name(?func, ?sname), + func_name(?func, ?sname), pts_signature_arg_alloc_once(?sname, ?index), ( call_instruction_fn_target(?instr, ?func) ; invoke_instruction_fn_target(?instr, ?func)), - instruction_in_function(?instr, ?instrFunc), + instruction_in_func(?instr, ?instrFunc), actual_arg(?instr, ?index, ?var), reachable_context(?ctx, ?instrFunc), @@ -250,7 +250,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- signature_var_points_to_base(?aCtx, ?alloc, ?callerCtx, ?toVar) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), - function_has_name(?callee, ?name), + func_name(?callee, ?name), pts_signature_return_aliases_arg(?name, ?index), instruction_assigns_to(?callerInstr, ?toVar), actual_arg(?callerInstr, ?index, ?fromValue), @@ -258,14 +258,14 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- _ptr_reaches_to_request(?ptrACtx, ?ptrAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), - function_has_name(?callee, ?name), + func_name(?callee, ?name), pts_signature_return_aliases_arg_reachable(?name, ?index), actual_arg(?callerInstr, ?index, ?fromValue), operand_points_to(?ptrACtx, ?ptrAlloc, ?callerCtx, ?fromValue). signature_var_points_to_base(?aCtx, ?alloc, ?callerCtx, ?toVar) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), - function_has_name(?callee, ?name), + func_name(?callee, ?name), pts_signature_return_aliases_arg_reachable(?name, ?index), instruction_assigns_to(?callerInstr, ?toVar), actual_arg(?callerInstr, ?index, ?fromValue), @@ -274,7 +274,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- signature_var_points_to_base(?aCtx, ?alloc, ?callerCtx, ?toVar) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), - function_has_name(?callee, ?name), + func_name(?callee, ?name), pts_signature_return_points_to_global(?name, ?globalName), global_allocation_by_name(?globalName, ?alloc), empty_context(?aCtx), @@ -282,7 +282,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- signature_var_points_to_base(?aCtx, ?alloc, ?callerCtx, ?toVar) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), - function_has_name(?callee, ?name), + func_name(?callee, ?name), pts_signature_return_aliases_global(?name, ?globalName), global_allocation_by_name(?globalName, ?globalAlloc), empty_context(?globalCtx), @@ -291,7 +291,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- _ptr_reaches_to_request(?globalCtx, ?globalAlloc) :- callgraph_edge(_, ?callee, _, ?callerInstr), - function_has_name(?callee, ?name), + func_name(?callee, ?name), pts_signature_return_aliases_global_reachable(?name, ?globalName), global_allocation_by_name(?globalName, ?globalAlloc), empty_context(?globalCtx), @@ -299,7 +299,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- signature_var_points_to_base(?aCtx, ?alloc, ?callerCtx, ?toVar) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), - function_has_name(?callee, ?name), + func_name(?callee, ?name), pts_signature_return_aliases_global_reachable(?name, ?globalName), global_allocation_by_name(?globalName, ?globalAlloc), empty_context(?globalCtx), @@ -308,7 +308,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- memcpy_sig(?toACtx, ?toAlloc, ?fromACtx, ?fromAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), - function_has_name(?callee, ?name), + func_name(?callee, ?name), pts_signature_arg_memcpy_arg(?name, ?toIndex, ?fromIndex), actual_arg(?callerInstr, ?toIndex, ?toValue), actual_arg(?callerInstr, ?fromIndex, ?fromValue), @@ -317,7 +317,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- _ptr_reaches_to_request(?fromPtrACtx, ?fromPtrAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), - function_has_name(?callee, ?name), + func_name(?callee, ?name), pts_signature_arg_memcpy_arg_reachable(?name, ?toIndex, ?fromIndex), actual_arg(?callerInstr, ?toIndex, ?toValue), actual_arg(?callerInstr, ?fromIndex, ?fromValue), @@ -326,7 +326,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- memcpy_sig(?toACtx, ?toAlloc, ?fromACtx, ?fromAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), - function_has_name(?callee, ?name), + func_name(?callee, ?name), pts_signature_arg_memcpy_arg_reachable(?name, ?toIndex, ?fromIndex), actual_arg(?callerInstr, ?toIndex, ?toValue), actual_arg(?callerInstr, ?fromIndex, ?fromValue), @@ -336,7 +336,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- signature_ptr_points_to_base(?gACtx, ?gAlloc, ?ptrACtx, ?ptrAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), - function_has_name(?callee, ?name), + func_name(?callee, ?name), pts_signature_arg_points_to_global(?name, ?index, ?globalName), actual_arg(?callerInstr, ?index, ?toValue), operand_points_to(?ptrACtx, ?ptrAlloc, ?callerCtx, ?toValue), @@ -345,7 +345,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- memcpy_sig(?toACtx, ?toAlloc, ?fromACtx, ?fromAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), - function_has_name(?callee, ?name), + func_name(?callee, ?name), pts_signature_arg_memcpy_global(?name, ?index, ?globalName), actual_arg(?callerInstr, ?index, ?toValue), operand_points_to(?toACtx, ?toAlloc, ?callerCtx, ?toValue), @@ -354,7 +354,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- _ptr_reaches_to_request(?gACtx, ?gAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), - function_has_name(?callee, ?name), + func_name(?callee, ?name), pts_signature_arg_memcpy_global_reachable(?name, ?index, ?globalName), actual_arg(?callerInstr, ?index, ?toValue), operand_points_to(_, _, ?callerCtx, ?toValue), @@ -363,7 +363,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- memcpy_sig(?toACtx, ?toAlloc, ?fromACtx, ?fromAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), - function_has_name(?callee, ?name), + func_name(?callee, ?name), pts_signature_arg_memcpy_global_reachable(?name, ?index, ?globalName), actual_arg(?callerInstr, ?index, ?toValue), operand_points_to(?toACtx, ?toAlloc, ?callerCtx, ?toValue), @@ -373,7 +373,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- memcpy_sig(?toACtx, ?toAlloc, ?fromACtx, ?fromAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), - function_has_name(?callee, ?name), + func_name(?callee, ?name), pts_signature_global_memcpy_arg(?name, ?globalName, ?index), actual_arg(?callerInstr, ?index, ?toValue), operand_points_to(?fromACtx, ?fromAlloc, ?callerCtx, ?toValue), @@ -382,14 +382,14 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- _ptr_reaches_to_request(?ptrACtx, ?ptrAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), - function_has_name(?callee, ?name), + func_name(?callee, ?name), pts_signature_global_memcpy_arg_reachable(?name, _, ?index), actual_arg(?callerInstr, ?index, ?toValue), operand_points_to(?ptrACtx, ?ptrAlloc, ?callerCtx, ?toValue). memcpy_sig(?toACtx, ?toAlloc, ?fromACtx, ?fromAlloc) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), - function_has_name(?callee, ?name), + func_name(?callee, ?name), pts_signature_global_memcpy_arg_reachable(?name, ?globalName, ?index), actual_arg(?callerInstr, ?index, ?toValue), operand_points_to(?ptrACtx, ?ptrAlloc, ?callerCtx, ?toValue), diff --git a/datalog/points-to/subset.dl b/datalog/points-to/subset.dl index 18130aa..ddf6f52 100644 --- a/datalog/points-to/subset.dl +++ b/datalog/points-to/subset.dl @@ -264,8 +264,8 @@ static_subobjects.input_allocation_size(?alloc, ?size) :- // Copy in results from static subobjects subset_subobjects._alloc_subregion(?allocSub, ?base, ?component, ?root, ?path, ?type) :- static_subobjects._alloc_subregion(?allocSub, ?base, ?component, ?root, ?path, ?type). -subset_subobjects._non_function_basic_allocation(?alloc) :- - static_subobjects._non_function_basic_allocation(?alloc). +subset_subobjects._non_func_basic_allocation(?alloc) :- + static_subobjects._non_func_basic_allocation(?alloc). subset_subobjects.alloc_subregion_at_field(?alloc, ?index, ?region) :- static_subobjects.alloc_subregion_at_field(?alloc, ?index, ?region). subset_subobjects.alloc_subregion_at_any_array_index(?alloc, ?region) :- diff --git a/datalog/points-to/type-back-propagation.dl b/datalog/points-to/type-back-propagation.dl index 7d68328..2681833 100644 --- a/datalog/points-to/type-back-propagation.dl +++ b/datalog/points-to/type-back-propagation.dl @@ -84,9 +84,9 @@ heap_allocation_by_instruction(?allocInstr, ?alloc), ty_indication(?type, ?aCtx, ?alloc), instruction_assigns_to(?allocInstr, ?var), - variable_in_function(?var, ?func), + variable_in_func(?var, ?func), variable_has_name(?var, ?name), - function_has_name(?func, ?funcName), + func_name(?func, ?funcName), pointer_type_has_component(?ptrType, ?type), ?typedAlloc= cat("*typed_heap_alloc", ?funcName, "[" , ?ptrType , " ", ?name, "]"). @@ -112,7 +112,7 @@ // %4 = getelementptr inbounds %struct.foo, %struct.foo* %2, i64 0, i32 1, // store i8 %4, i8* @somebuf, align 4, // %5 = load i64, i64* %1, align 8, - // %6 = call i8 @function_with_foo_arg_passed_by_value(i64 %5) + // %6 = call i8 @func_foo_arg_passed_by_value(i64 %5) // ``` // instead of: // ``` @@ -121,7 +121,7 @@ // store i32 42, i32* %2, align 8, // %3 = getelementptr inbounds %struct.foo, %struct.foo* %2, i64 0, i32 1, // store i8 %3, i8* @somebuf, align 4, - // %4 = call i8 @function_with_foo_arg_passed_by_value(%struct.foo* %1) + // %4 = call i8 @func_foo_arg_passed_by_value(%struct.foo* %1) // ``` // // Where this causes problems is that instructions like `%4 = @@ -158,9 +158,9 @@ stack_allocation_by_instruction(?allocInstr, ?alloc), stack_type_indication(?type, ?aCtx, ?alloc), instruction_assigns_to(?allocInstr, ?var), - variable_in_function(?var, ?func), + variable_in_func(?var, ?func), variable_has_name(?var, ?name), - function_has_name(?func, ?funcName), + func_name(?func, ?funcName), pointer_type_has_component(?ptrType, ?type), ?typedAlloc= cat("*typed_stack_alloc", ?funcName, "[", ?ptrType, " ", ?name, "]"). diff --git a/datalog/points-to/type_compatibility.dl b/datalog/points-to/type_compatibility.dl index 3a15130..974240b 100644 --- a/datalog/points-to/type_compatibility.dl +++ b/datalog/points-to/type_compatibility.dl @@ -42,28 +42,28 @@ type_compatible(?type1,?type2) :- .decl type_compatible_up_to_arg(?from:FunctionType, ?to:FunctionType, ?index:ArgumentIndex) type_compatible_up_to_arg(?from, ?to, 0) :- - function_type_return(?from, ?returnType1), - function_type_return(?to , ?returnType2), + func_type_return(?from, ?returnType1), + func_type_return(?to , ?returnType2), type_compatible(?returnType1, ?returnType2). type_compatible_up_to_arg(?from, ?to, i+1) :- type_compatible_up_to_arg(?from, ?to, i), - function_type_param(?from, i , ?param1), - function_type_param(?to, i , ?param2), + func_type_param(?from, i , ?param1), + func_type_param(?to, i , ?param2), type_compatible(?param1, ?param2). type_compatible(?from,?to) :- - function_type_nparams(?from, ?nparams), - function_type_nparams(?to, ?nparams), + func_type_nparams(?from, ?nparams), + func_type_nparams(?to, ?nparams), type_compatible_up_to_arg(?from, ?to, ?nparams). type_compatible(?from,?to) :- - function_type_nparams(?from, 0), + func_type_nparams(?from, 0), type_compatible_up_to_arg(?from, ?to, 0). type_compatible(?from,?to) :- - function_type_nparams(?to, ?nparams), - function_type_has_varargs(?to), + func_type_nparams(?to, ?nparams), + func_type_has_varargs(?to), type_compatible_up_to_arg(?from, ?to, ?nparams). // Array types @@ -89,7 +89,7 @@ type_compatible(?ptrType1, ?ptrType2) :- pointer_type_has_component(?ptrType2 , ?type2), type_compatible(?type1, ?type2). -// Any (non-function) pointer type can be seen as an array of bytes +// Any (non-func) pointer type can be seen as an array of bytes type_compatible(?from, ?to) :- pointer_type_has_component(?to, ?i8), diff --git a/datalog/points-to/types.dl b/datalog/points-to/types.dl index 4af6b84..dbd7ae9 100644 --- a/datalog/points-to/types.dl +++ b/datalog/points-to/types.dl @@ -7,7 +7,7 @@ // A column number in a source file .type ColumnNumber <: number -// Name of a function +// Name of a func .type FunctionName <: symbol // Name of a global variable @@ -26,5 +26,5 @@ // An index into a struct, e.g. in a getelementptr instruction .type FieldIndex <: number -// An index of an argument to a function +// An index of an argument to a func .type ArgumentIndex <: number \ No newline at end of file diff --git a/datalog/points-to/unification.dl b/datalog/points-to/unification.dl index 60a0a01..5560c58 100644 --- a/datalog/points-to/unification.dl +++ b/datalog/points-to/unification.dl @@ -26,7 +26,7 @@ // [Relations with Choice] //----------------------------------------------------------------------- - // "choice-domain" introduces a functional dependency on ?ctx, ?var, ?region, + // "choice-domain" introduces a funcal dependency on ?ctx, ?var, ?region, // ?type, and ?info: only one result will be computed (non-deterministically) for // each (?ctx, ?var, ?region, ?type, ?info) tuple in the relation. Thus we will // choose *one* representative element of ?var's points-to set to record (for @@ -40,7 +40,7 @@ // // The entries in the choice-domain must agree with the rules that have // `unify` as their head atom/conclusion, i.e. those rules shouldn't cause - // any allocations to be unified unless they agree on all the attributes in + // any allocations to be unified unless they agree on all the attrs in // the choice-domain. // // The qualifiers are necessary for correctness as well. For each variable, we @@ -53,10 +53,10 @@ // equivalence class are treated identically by all the rules of the analysis. To // accomplish this, we can either // - // 1. copy the feature/attribute between unified allocations - // 2. never unify allocations that differ in some feature, adding the attribute + // 1. copy the feature/attr between unified allocations + // 2. never unify allocations that differ in some feature, adding the attr // to the `choice-domain` (e.g. what's done for allocation types) - // 3. iterate over `unify` when producing inputs for rules that branch on the attribute. + // 3. iterate over `unify` when producing inputs for rules that branch on the attr. // // The rules for GEP branch on more features of allocations than any other rules. // @@ -73,7 +73,7 @@ // aren't suballocations of arr1[x] and arr2[x]. They need to be passed to the // GEP rules to be unified in the first place. - // Note that there is one "region" per function, which is important for + // Note that there is one "region" per func, which is important for // maintaining a precise callgraph, which is also crucial for analysis speed. .decl var_points_to_choice(?aCtx: Context, ?alloc: Allocation, ?ctx: Context, ?var: Variable, ?region: Region, ?type: Type, ?info: GEPAllocInfo) choice-domain (?ctx, ?var, ?region, ?type, ?info) .decl ptr_points_to_choice(?aCtx: Context, ?alloc: Allocation, ?ptrACtx: Context, ?ptrAlloc: Allocation, ?region: Region, ?type: Type, ?info: GEPAllocInfo) choice-domain (?ptrACtx, ?ptrAlloc, ?region, ?type, ?info) @@ -420,7 +420,7 @@ var_points_to_final(?reprCtx, ?repr, ?ctx, ?operand). operand_points_to_final(?reprCtx, ?repr, ?ctx, ?cons) :- empty_alloc_context(?aCtx), - constant_in_function(?cons, ?enclosingFunc), + constant_in_func(?cons, ?enclosingFunc), constant_points_to(?cons, ?alloc), callgraph.reachable_context(?ctx, ?enclosingFunc), unify_repr(?aCtx, ?alloc, ?reprCtx, ?repr). @@ -652,8 +652,8 @@ static_subobjects.input_allocation_size(?alloc, ?size) :- // Copy in results from static subobjects unification_subobjects._alloc_subregion(?allocSub, ?base, ?component, ?root, ?path, ?type) :- static_subobjects._alloc_subregion(?allocSub, ?base, ?component, ?root, ?path, ?type). -unification_subobjects._non_function_basic_allocation(?alloc) :- - static_subobjects._non_function_basic_allocation(?alloc). +unification_subobjects._non_func_basic_allocation(?alloc) :- + static_subobjects._non_func_basic_allocation(?alloc). unification_subobjects.alloc_subregion_at_field(?alloc, ?index, ?region) :- static_subobjects.alloc_subregion_at_field(?alloc, ?index, ?region). unification_subobjects.alloc_subregion_at_any_array_index(?alloc, ?region) :- diff --git a/datalog/points-to/virtual-tables.dl b/datalog/points-to/virtual-tables.dl index 7ef853b..d09c27e 100644 --- a/datalog/points-to/virtual-tables.dl +++ b/datalog/points-to/virtual-tables.dl @@ -138,13 +138,13 @@ typeinfo_base_class(?typeinfo, ?offset, ?baseTypeinfo) :- // see RTTI Layout of Itanium C++ ABI -// Find the functions stored inside each vtable -.decl vtable_function(?vt: VirtualTable, ?index: number, ?func: FunctionDecl) +// Find the funcs stored inside each vtable +.decl vtable_func(?vt: VirtualTable, ?index: number, ?func: FunctionDecl) -vtable_function(?vt,?index,?func) :- +vtable_func(?vt,?index,?func) :- vtable(?vt, _), global_var_initializer(?vt,?init), constant_array_index(?init, ?index, ?funcAsInteger), bitcast_constant_expression_from(?funcAsInteger, ?funcConstant), - function_constant_fn_name(?funcConstant, ?funcName), - function_has_name(?func,?funcName). + func_constant_fn_name(?funcConstant, ?funcName), + func_name(?func,?funcName). diff --git a/datalog/schema/attr.dl b/datalog/schema/attr.dl new file mode 100644 index 0000000..e374f08 --- /dev/null +++ b/datalog/schema/attr.dl @@ -0,0 +1,124 @@ +// Atribute +.type Attribute <: symbol +.decl attr(attr:Attribute) +.decl target_dependent_attr(attr:Attribute) + +attr(a) :- target_dependent_attr(a). + +// Parameter Attributes +.decl parameter_attr__zeroext(attr:Attribute) +.decl parameter_attr__signext(attr:Attribute) +.decl parameter_attr__inreg(attr:Attribute) +.decl parameter_attr__byval(attr:Attribute) +.decl parameter_attr__inalloca(attr:Attribute) +.decl parameter_attr__sret(attr:Attribute) +.decl parameter_attr__noalias(attr:Attribute) +.decl parameter_attr__nocapture(attr:Attribute) +.decl parameter_attr__nest(attr:Attribute) +.decl parameter_attr__returned(attr:Attribute) +.decl parameter_attr__nonnull(attr:Attribute) +.decl parameter_attr__dereferenceable(attr:Attribute) +.decl parameter_attr__dereferenceable_or_null(attr:Attribute) +.decl parameter_attr__align(attr:Attribute) + + +attr("zeroext"). parameter_attr__zeroext("zeroext"). +attr("signext"). parameter_attr__signext("signext"). +attr("inreg"). parameter_attr__inreg("inreg"). +attr("byval"). parameter_attr__byval("byval"). +attr("inalloca"). parameter_attr__inalloca("inalloca"). +attr("sret"). parameter_attr__sret("sret"). +attr("noalias"). parameter_attr__noalias("noalias"). +attr("nocapture"). parameter_attr__nocapture("nocapture"). +attr("nest"). parameter_attr__nest("nest"). +attr("returned"). parameter_attr__returned("returned"). +attr("nonnull"). parameter_attr__nonnull("nonnull"). + +parameter_attr__dereferenceable(Attr) :- + attr(Attr), + substr(Attr, 0, strlen("dereferenceable")) = "dereferenceable". + +parameter_attr__dereferenceable_or_null(Attr) :- + attr(Attr), + substr(Attr, 0, strlen("dereferenceable_or_null")) = "dereferenceable_or_null". + +parameter_attr__align(Attr) :- + attr(Attr), + substr(Attr, 0, strlen("align ")) = "align ". + + +// Function Attributes +.decl func_attr__alwaysinline(attr:Attribute) +.decl func_attr__builtin(attr:Attribute) +.decl func_attr__cold(attr:Attribute) +.decl func_attr__convergent(attr:Attribute) +.decl func_attr__inaccessiblememonly(attr:Attribute) +.decl func_attr__inaccessiblemem_or_argmemonly(attr:Attribute) +.decl func_attr__inlinehint(attr:Attribute) +.decl func_attr__jumptable(attr:Attribute) +.decl func_attr__minsize(attr:Attribute) +.decl func_attr__naked(attr:Attribute) +.decl func_attr__nobuiltin(attr:Attribute) +.decl func_attr__noduplicate(attr:Attribute) +.decl func_attr__noimplicitfloat(attr:Attribute) +.decl func_attr__noinline(attr:Attribute) +.decl func_attr__nonlazybind(attr:Attribute) +.decl func_attr__noredzone(attr:Attribute) +.decl func_attr__noreturn(attr:Attribute) +.decl func_attr__norecurse(attr:Attribute) +.decl func_attr__nounwind(attr:Attribute) +.decl func_attr__optnone(attr:Attribute) +.decl func_attr__optsize(attr:Attribute) +.decl func_attr__readnone(attr:Attribute) +.decl func_attr__readonly(attr:Attribute) +.decl func_attr__argmemonly(attr:Attribute) +.decl func_attr__returns_twice(attr:Attribute) +.decl func_attr__safestack(attr:Attribute) +.decl func_attr__sanitize_address(attr:Attribute) +.decl func_attr__sanitize_memory(attr:Attribute) +.decl func_attr__sanitize_thread(attr:Attribute) +.decl func_attr__ssp(attr:Attribute) +.decl func_attr__sspreq(attr:Attribute) +.decl func_attr__sspstrong(attr:Attribute) +.decl func_attr__uwtable(attr:Attribute) +.decl func_attr__alignstack(attr:Attribute) + + +attr("alwaysinline"). func_attr__alwaysinline("alwaysinline"). +attr("builtin"). func_attr__builtin("builtin"). +attr("cold"). func_attr__cold("cold"). +attr("convergent"). func_attr__convergent("convergent"). +attr("inaccessiblememonly"). func_attr__inaccessiblememonly("inaccessiblememonly"). +attr("inaccessiblemem_or_argmemonly"). +func_attr__inaccessiblemem_or_argmemonly("inaccessiblemem_or_argmemonly"). +attr("inlinehint"). func_attr__inlinehint("inlinehint"). +attr("jumptable"). func_attr__jumptable("jumptable"). +attr("minsize"). func_attr__minsize("minsize"). +attr("naked"). func_attr__naked("naked"). +attr("nobuiltin"). func_attr__nobuiltin("nobuiltin"). +attr("noduplicate"). func_attr__noduplicate("noduplicate"). +attr("noimplicitfloat"). func_attr__noimplicitfloat("noimplicitfloat"). +attr("noinline"). func_attr__noinline("noinline"). +attr("nonlazybind"). func_attr__nonlazybind("nonlazybind"). +attr("noredzone"). func_attr__noredzone("noredzone"). +attr("noreturn"). func_attr__noreturn("noreturn"). +attr("norecurse"). func_attr__norecurse("norecurse"). +attr("nounwind"). func_attr__nounwind("nounwind"). +attr("optnone"). func_attr__optnone("optnone"). +attr("optsize"). func_attr__optsize("optsize"). +attr("readnone"). func_attr__readnone("readnone"). +attr("readonly"). func_attr__readonly("readonly"). +attr("argmemonly"). func_attr__argmemonly("argmemonly"). +attr("returns_twice"). func_attr__returns_twice("returns_twice"). +attr("safestack"). func_attr__safestack("safestack"). +attr("sanitize_address"). func_attr__sanitize_address("sanitize_address"). +attr("sanitize_memory"). func_attr__sanitize_memory("sanitize_memory"). +attr("sanitize_thread"). func_attr__sanitize_thread("sanitize_thread"). +attr("ssp"). func_attr__ssp("ssp"). +attr("sspreq"). func_attr__sspreq("sspreq"). +attr("sspstrong"). func_attr__sspstrong("sspstrong"). +attr("uwtable"). func_attr__uwtable("uwtable"). + +func_attr__alignstack(Attr) :- + attr(Attr), + substr(Attr, 0, strlen("alignstack")) = "alignstack". diff --git a/datalog/schema/attribute.dl b/datalog/schema/attribute.dl deleted file mode 100644 index 31c1c62..0000000 --- a/datalog/schema/attribute.dl +++ /dev/null @@ -1,124 +0,0 @@ -// Atribute -.type Attribute <: symbol -.decl attribute(attr:Attribute) -.decl target_dependent_attribute(attr:Attribute) - -attribute(attr) :- target_dependent_attribute(attr). - -// Parameter Attributes -.decl parameter_attribute__zeroext(attr:Attribute) -.decl parameter_attribute__signext(attr:Attribute) -.decl parameter_attribute__inreg(attr:Attribute) -.decl parameter_attribute__byval(attr:Attribute) -.decl parameter_attribute__inalloca(attr:Attribute) -.decl parameter_attribute__sret(attr:Attribute) -.decl parameter_attribute__noalias(attr:Attribute) -.decl parameter_attribute__nocapture(attr:Attribute) -.decl parameter_attribute__nest(attr:Attribute) -.decl parameter_attribute__returned(attr:Attribute) -.decl parameter_attribute__nonnull(attr:Attribute) -.decl parameter_attribute__dereferenceable(attr:Attribute) -.decl parameter_attribute__dereferenceable_or_null(attr:Attribute) -.decl parameter_attribute__align(attr:Attribute) - - -attribute("zeroext"). parameter_attribute__zeroext("zeroext"). -attribute("signext"). parameter_attribute__signext("signext"). -attribute("inreg"). parameter_attribute__inreg("inreg"). -attribute("byval"). parameter_attribute__byval("byval"). -attribute("inalloca"). parameter_attribute__inalloca("inalloca"). -attribute("sret"). parameter_attribute__sret("sret"). -attribute("noalias"). parameter_attribute__noalias("noalias"). -attribute("nocapture"). parameter_attribute__nocapture("nocapture"). -attribute("nest"). parameter_attribute__nest("nest"). -attribute("returned"). parameter_attribute__returned("returned"). -attribute("nonnull"). parameter_attribute__nonnull("nonnull"). - -parameter_attribute__dereferenceable(Attr) :- - attribute(Attr), - substr(Attr, 0, strlen("dereferenceable")) = "dereferenceable". - -parameter_attribute__dereferenceable_or_null(Attr) :- - attribute(Attr), - substr(Attr, 0, strlen("dereferenceable_or_null")) = "dereferenceable_or_null". - -parameter_attribute__align(Attr) :- - attribute(Attr), - substr(Attr, 0, strlen("align ")) = "align ". - - -// Function Attributes -.decl function_attribute__alwaysinline(attr:Attribute) -.decl function_attribute__builtin(attr:Attribute) -.decl function_attribute__cold(attr:Attribute) -.decl function_attribute__convergent(attr:Attribute) -.decl function_attribute__inaccessiblememonly(attr:Attribute) -.decl function_attribute__inaccessiblemem_or_argmemonly(attr:Attribute) -.decl function_attribute__inlinehint(attr:Attribute) -.decl function_attribute__jumptable(attr:Attribute) -.decl function_attribute__minsize(attr:Attribute) -.decl function_attribute__naked(attr:Attribute) -.decl function_attribute__nobuiltin(attr:Attribute) -.decl function_attribute__noduplicate(attr:Attribute) -.decl function_attribute__noimplicitfloat(attr:Attribute) -.decl function_attribute__noinline(attr:Attribute) -.decl function_attribute__nonlazybind(attr:Attribute) -.decl function_attribute__noredzone(attr:Attribute) -.decl function_attribute__noreturn(attr:Attribute) -.decl function_attribute__norecurse(attr:Attribute) -.decl function_attribute__nounwind(attr:Attribute) -.decl function_attribute__optnone(attr:Attribute) -.decl function_attribute__optsize(attr:Attribute) -.decl function_attribute__readnone(attr:Attribute) -.decl function_attribute__readonly(attr:Attribute) -.decl function_attribute__argmemonly(attr:Attribute) -.decl function_attribute__returns_twice(attr:Attribute) -.decl function_attribute__safestack(attr:Attribute) -.decl function_attribute__sanitize_address(attr:Attribute) -.decl function_attribute__sanitize_memory(attr:Attribute) -.decl function_attribute__sanitize_thread(attr:Attribute) -.decl function_attribute__ssp(attr:Attribute) -.decl function_attribute__sspreq(attr:Attribute) -.decl function_attribute__sspstrong(attr:Attribute) -.decl function_attribute__uwtable(attr:Attribute) -.decl function_attribute__alignstack(attr:Attribute) - - -attribute("alwaysinline"). function_attribute__alwaysinline("alwaysinline"). -attribute("builtin"). function_attribute__builtin("builtin"). -attribute("cold"). function_attribute__cold("cold"). -attribute("convergent"). function_attribute__convergent("convergent"). -attribute("inaccessiblememonly"). function_attribute__inaccessiblememonly("inaccessiblememonly"). -attribute("inaccessiblemem_or_argmemonly"). -function_attribute__inaccessiblemem_or_argmemonly("inaccessiblemem_or_argmemonly"). -attribute("inlinehint"). function_attribute__inlinehint("inlinehint"). -attribute("jumptable"). function_attribute__jumptable("jumptable"). -attribute("minsize"). function_attribute__minsize("minsize"). -attribute("naked"). function_attribute__naked("naked"). -attribute("nobuiltin"). function_attribute__nobuiltin("nobuiltin"). -attribute("noduplicate"). function_attribute__noduplicate("noduplicate"). -attribute("noimplicitfloat"). function_attribute__noimplicitfloat("noimplicitfloat"). -attribute("noinline"). function_attribute__noinline("noinline"). -attribute("nonlazybind"). function_attribute__nonlazybind("nonlazybind"). -attribute("noredzone"). function_attribute__noredzone("noredzone"). -attribute("noreturn"). function_attribute__noreturn("noreturn"). -attribute("norecurse"). function_attribute__norecurse("norecurse"). -attribute("nounwind"). function_attribute__nounwind("nounwind"). -attribute("optnone"). function_attribute__optnone("optnone"). -attribute("optsize"). function_attribute__optsize("optsize"). -attribute("readnone"). function_attribute__readnone("readnone"). -attribute("readonly"). function_attribute__readonly("readonly"). -attribute("argmemonly"). function_attribute__argmemonly("argmemonly"). -attribute("returns_twice"). function_attribute__returns_twice("returns_twice"). -attribute("safestack"). function_attribute__safestack("safestack"). -attribute("sanitize_address"). function_attribute__sanitize_address("sanitize_address"). -attribute("sanitize_memory"). function_attribute__sanitize_memory("sanitize_memory"). -attribute("sanitize_thread"). function_attribute__sanitize_thread("sanitize_thread"). -attribute("ssp"). function_attribute__ssp("ssp"). -attribute("sspreq"). function_attribute__sspreq("sspreq"). -attribute("sspstrong"). function_attribute__sspstrong("sspstrong"). -attribute("uwtable"). function_attribute__uwtable("uwtable"). - -function_attribute__alignstack(Attr) :- - attribute(Attr), - substr(Attr, 0, strlen("alignstack")) = "alignstack". diff --git a/datalog/schema/call-instruction.dl b/datalog/schema/call-instruction.dl index 14a80bd..3fceea1 100644 --- a/datalog/schema/call-instruction.dl +++ b/datalog/schema/call-instruction.dl @@ -9,7 +9,7 @@ instruction(v) :- call_instruction(v). // Function operand: can be either a constant or a variable .decl call_instruction_fn_operand(instr:CallInstruction, op:Operand) -// Resolved function of call instruction. Initially empty. +// Resolved func of call instruction. Initially empty. .decl call_instruction_fn_target(instr:CallInstruction, func:FunctionDecl) // Eligible for tail call optimizations @@ -26,8 +26,8 @@ calling_convention(cc) :- call_instruction_with_calling_convention(_, cc). // [Direct and Indirect Call Instructions] // // Call-instructions are divided into direct calls -// that provide a function name, and indirect calls -// through a function pointer variable. +// that provide a func name, and indirect calls +// through a func pointer variable. //--------------------------------------------------------------- .decl direct_call_instruction(instr:CallInstruction) @@ -52,17 +52,17 @@ asm_call_instruction(Instr) :- //-------------------------------------------------- .decl call_instruction_arg(instr:CallInstruction, i:ArgumentIndex, arg:Operand) -.decl call_instruction_with_return_attribute(instr:CallInstruction, attr:Attribute) -.decl call_instruction_with_param_attribute(instr:CallInstruction, i:ArgumentIndex, attr:Attribute) -.decl call_instruction_with_fn_attribute(instr:CallInstruction, attr:Attribute) +.decl call_instruction_with_return_attr(instr:CallInstruction, attr:Attribute) +.decl call_instruction_with_param_attr(instr:CallInstruction, i:ArgumentIndex, attr:Attribute) +.decl call_instruction_with_fn_attr(instr:CallInstruction, attr:Attribute) -attribute(Attr) :- call_instruction_with_fn_attribute(_, Attr). -attribute(Attr) :- call_instruction_with_return_attribute(_, Attr). -attribute(Attr) :- call_instruction_with_param_attribute(_, _, Attr). +attr(Attr) :- call_instruction_with_fn_attr(_, Attr). +attr(Attr) :- call_instruction_with_return_attr(_, Attr). +attr(Attr) :- call_instruction_with_param_attr(_, _, Attr). //----------------------------- -// Signature (function type) +// Signature (func type) //----------------------------- .decl call_instruction_fn_type(instr:CallInstruction, type:Type) @@ -72,29 +72,29 @@ call_instruction_fn_type(Instr, FnType) :- call_instruction_fn_operand(Instr, FnOp), operand_has_type(FnOp, PtrType), pointer_type_has_component(PtrType, FnType), - function_type(FnType). + func_type(FnType). call_instruction_return_type(Instr, Type) :- call_instruction_fn_type(Instr, FnType), - function_type_return(FnType, Type). + func_type_return(FnType, Type). //------------------------------------------------------------------------------ // [Constraints] // -// (1) Only ‘zeroext‘, ‘signext‘, and ‘inreg‘ attributes +// (1) Only ‘zeroext‘, ‘signext‘, and ‘inreg‘ attrs // are valid for return values. // (2) The calling convention of the call must match the -// calling convention of the target function. +// calling convention of the target func. // (3) The type of the call instruction is also the type of // the return value. Functions that return no value are // marked void. -// (4) The function type shall be the signature of the pointer -// to function value being invoked. The argument types must +// (4) The func type shall be the signature of the pointer +// to func value being invoked. The argument types must // match the types implied by this signature. // (5) All arguments must be of first class type. // (6) Only ‘noreturn‘, ‘nounwind‘, ‘readonly‘ and ‘readnone‘ -// attributes are valid as function attributes. +// attrs are valid as func attrs. //------------------------------------------------------------------------------ schema_invalid_instruction(Instr, __FILE__, __LINE__) :- @@ -107,27 +107,27 @@ schema_invalid_instruction(Instr, __FILE__, __LINE__) :- call_instruction(Instr), !call_instruction_fn_type(Instr, _). -// attribute compatibility +// attr compatibility schema_invalid_instruction(Instr, __FILE__, __LINE__) :- schema_sanity(), - call_instruction_with_return_attribute(Instr, Attr), - !parameter_attribute__zeroext(Attr), - !parameter_attribute__signext(Attr), - !parameter_attribute__inreg(Attr), - !parameter_attribute__noalias(Attr), - !parameter_attribute__dereferenceable(Attr). // c1 + call_instruction_with_return_attr(Instr, Attr), + !parameter_attr__zeroext(Attr), + !parameter_attr__signext(Attr), + !parameter_attr__inreg(Attr), + !parameter_attr__noalias(Attr), + !parameter_attr__dereferenceable(Attr). // c1 schema_invalid_instruction(Instr, __FILE__, __LINE__) :- schema_sanity(), - call_instruction_with_fn_attribute(Instr, Attr), - !function_attribute__noreturn(Attr), - !function_attribute__nounwind(Attr), - !function_attribute__readonly(Attr), - !function_attribute__readnone(Attr), - !function_attribute__cold(Attr), - !function_attribute__returns_twice(Attr), - !function_attribute__builtin(Attr), - !target_dependent_attribute(Attr). // c6 + call_instruction_with_fn_attr(Instr, Attr), + !func_attr__noreturn(Attr), + !func_attr__nounwind(Attr), + !func_attr__readonly(Attr), + !func_attr__readnone(Attr), + !func_attr__cold(Attr), + !func_attr__returns_twice(Attr), + !func_attr__builtin(Attr), + !target_dependent_attr(Attr). // c6 // cc compatibility @@ -139,28 +139,28 @@ schema_invalid_instruction(Instr, __FILE__, __LINE__) :- // schema_sanity(), // call_instruction_fn_target(Instr, Func), // call_instruction_with_calling_convention(Instr, CConv), -// !function_with_calling_convention(Func, CConv). // c2 +// !func_calling_convention(Func, CConv). // c2 // Signature conformance schema_invalid_instruction(Instr, __FILE__, __LINE__) :- schema_sanity(), call_instruction_arg(Instr, Index, _), call_instruction_fn_type(Instr, FnType), - !function_type_param(FnType, Index, _), - !function_type_has_varargs(FnType). + !func_type_param(FnType, Index, _), + !func_type_has_varargs(FnType). schema_invalid_instruction(Instr, __FILE__, __LINE__) :- schema_sanity(), call_instruction(Instr), !call_instruction_arg(Instr, Index, _), call_instruction_fn_type(Instr, FnType), - function_type_param(FnType, Index, _). + func_type_param(FnType, Index, _). schema_invalid_instruction(Instr, __FILE__, __LINE__) :- schema_sanity(), call_instruction_arg(Instr, Index, Arg), call_instruction_fn_type(Instr, FnType), - function_type_param(FnType, Index, ParamType), + func_type_param(FnType, Index, ParamType), !operand_has_type(Arg, ParamType). // c4 diff --git a/datalog/schema/calling-convention.dl b/datalog/schema/calling-convention.dl index 9aedc2d..831418c 100644 --- a/datalog/schema/calling-convention.dl +++ b/datalog/schema/calling-convention.dl @@ -1,5 +1,5 @@ // http://llvm.org/docs/LangRef.html#callingconv -// keywords: function_instruction; call_instruction; invoke_instruction +// keywords: funcstruction; call_instruction; invoke_instruction .type CallingConvention <: symbol .decl calling_convention(conv:CallingConvention) diff --git a/datalog/schema/constants.dl b/datalog/schema/constants.dl index b78ada9..ebcb722 100644 --- a/datalog/schema/constants.dl +++ b/datalog/schema/constants.dl @@ -36,7 +36,7 @@ .decl integer_constant(c:IntegerConstant) .decl fp_constant(c:FPConstant) .decl nullptr_constant(c:NullPtrConstant) -.decl function_constant(c:FunctionConstant) +.decl func_constant(c:FunctionConstant) .decl global_var_constant(c:GlobalVariableConstant) .decl constant_array(c:ConstantArray) .decl constant_struct(c:ConstantStruct) @@ -56,7 +56,7 @@ constant(c) :- ; integer_constant(c) ; fp_constant(c) ; nullptr_constant(c) - ; function_constant(c) + ; func_constant(c) ; undef_constant(c) ; poison_constant(c). // technically redundant - poison constants are also undef @@ -68,15 +68,15 @@ constant_expression(c) :- //-------------------------------------- -// Constant that references function +// Constant that references func //-------------------------------------- -.decl function_constant_fn_name(fc:FunctionConstant, name:symbol) +.decl func_constant_fn_name(fc:FunctionConstant, name:symbol) schema_invalid_constant(Constant, __FILE__, __LINE__) :- schema_sanity(), - function_constant(Constant), - !function_constant_fn_name(Constant, _). + func_constant(Constant), + !func_constant_fn_name(Constant, _). //--------------------------------------------- diff --git a/datalog/schema/func.dl b/datalog/schema/func.dl new file mode 100644 index 0000000..7f03c60 --- /dev/null +++ b/datalog/schema/func.dl @@ -0,0 +1,163 @@ +// http://llvm.org/docs/LangRef.html#funcs + +//----------------------------------------- +// Function definitions and declarations +//----------------------------------------- + +.type FunctionDecl <: symbol +.type Function = FunctionDecl + +.decl func_decl(func:FunctionDecl) +.decl func(func:Function) + +func_decl(Func) :- func(Func). + +// !! Note: A func definition is encoded as a subtype of func +// declaration, that adds a body of instructions. !! + +// For constraints +.decl schema_invalid_func(func:FunctionDecl, file:File, line:Line) + + +// TODO: how are varargs represented here? + + +//--------------------------------- +// Mandatory name and type info +//--------------------------------- + +.decl func_ty(func:FunctionDecl, type:FunctionType) +.decl func_name(func:FunctionDecl, name:FunctionName) + +// Unmangled name with type signature +.decl func_signature(func:FunctionDecl, signature:symbol) + +schema_invalid_func(Func, __FILE__, __LINE__) :- + schema_sanity(), + func_decl(Func), + !func_ty(Func, _). + +schema_invalid_func(Func, __FILE__, __LINE__) :- + schema_sanity(), + func_decl(Func), + !func_name(Func, _). + +.decl schema_multiple_func_names(Func: FunctionDecl, file:File, line:Line) +schema_multiple_func_names(Func, __FILE__, __LINE__) :- + schema_sanity(), + func_decl(Func), + func_name(Func,name1), + func_name(Func,name2), + name1!=name2. + +//---------------------------------------- +// Variables and Constants contained +//---------------------------------------- + +.decl constant_in_func(c:Constant, func:Function) +.decl variable_in_func(v:Variable, func:Function) + + +//----------------------------------------------------------------- +// Optional func attrs (common for both declarations and +// definitions) +//----------------------------------------------------------------- + +.decl func_alignment(func:FunctionDecl, alignment:number) +.decl func_linkage_type(func:FunctionDecl, link:LinkageType) +.decl func_visibility(func:FunctionDecl, vis:Visibility) +.decl func_calling_convention(func:FunctionDecl, cc:CallingConvention) +.decl func_unnamed_addr(func:FunctionDecl) +.decl func_gc(func:FunctionDecl, collector:symbol) +.decl func_pers_fn(func:FunctionDecl, persfn:Constant) + +calling_convention(cc) :- func_calling_convention(_, cc). +linkage_type(link) :- func_linkage_type(_, link). +visibility(vis) :- func_visibility(_, vis). + +//----------------------------------------------------------------- +// Optional func attrs (only for definitions) +//----------------------------------------------------------------- + +.decl func_section(func:Function, section:symbol) + + +//---------------------------------- +// Function (Formal) Parameters +//---------------------------------- + +.decl func_nparams(func:Function, total:number) + +func_nparams(Func, Total) :- + func(Func), + func_ty(Func, Type), + func_type_nparams(Type, Total). + + +.decl func_param(func:Function, index:ArgumentIndex, param:Variable) + + +//------------------------------------------------------------------------------ +// [Parameter Attributes] +// +// The return type and each parameter of a func type may have +// a set of parameter attrs associated with them. +// +// Parameter attrs are used to communicate additional information +// about the result or parameters of a func. +// +// Parameter attrs are considered to be part of the func, +// not of the func type, so funcs with different parameter +// attrs can have the same func type. +// +// Parameter attrs are simple keywords that follow the type specified. +// If multiple parameter attrs are needed, they are space separated. +//------------------------------------------------------------------------------ + +.decl func_attr(func:FunctionDecl, attr:Attribute) +.decl func_return_attr(func:FunctionDecl, attr:Attribute) +.decl func_param_attr(func:FunctionDecl, index:ArgumentIndex, attr:Attribute) + +attr(Attr) :- func_attr(_, Attr). +attr(Attr) :- func_return_attr(_, Attr). +attr(Attr) :- func_param_attr(_, _, Attr). + +// Parameter is passed by value +.decl func_param_by_value(func:Function, index:number) + +func_param_by_value(Func, Index) :- + func_param(Func, Index, _), + func_param_attr(Func, Index, ByValueAttr), + parameter_attr__byval(ByValueAttr). + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// Number and types of parameters must match those declared +// in the func type. +// +// The return type must also be compatible for the func +// to be well-formed, but this is checked in ret-instruction +// logic. +//------------------------------------------------------------------------------ + +schema_invalid_func(Func, __FILE__, __LINE__) :- + schema_sanity(), + func_ty(Func, Type), + func_param(Func, Index, Param), + func_type_param(Type, Index, ParamType), + !variable_has_type(Param, ParamType). + +schema_invalid_func(Func, __FILE__, __LINE__) :- + schema_sanity(), + func(Func), + func_ty(Func, Type), + func_type_param(Type, Index, _), + !func_param(Func, Index, _). + +schema_invalid_func(Func, __FILE__, __LINE__) :- + schema_sanity(), + func_ty(Func, Type), + func_param(Func, Index, _), + !func_type_param(Type, Index, _). diff --git a/datalog/schema/function.dl b/datalog/schema/function.dl deleted file mode 100644 index 18fdea9..0000000 --- a/datalog/schema/function.dl +++ /dev/null @@ -1,163 +0,0 @@ -// http://llvm.org/docs/LangRef.html#functions - -//----------------------------------------- -// Function definitions and declarations -//----------------------------------------- - -.type FunctionDecl <: symbol -.type Function = FunctionDecl - -.decl function_decl(func:FunctionDecl) -.decl function(func:Function) - -function_decl(Func) :- function(Func). - -// !! Note: A function definition is encoded as a subtype of function -// declaration, that adds a body of instructions. !! - -// For constraints -.decl schema_invalid_function(func:FunctionDecl, file:File, line:Line) - - -// TODO: how are varargs represented here? - - -//--------------------------------- -// Mandatory name and type info -//--------------------------------- - -.decl function_has_type(func:FunctionDecl, type:FunctionType) -.decl function_has_name(func:FunctionDecl, name:FunctionName) - -// Unmangled name with type signature -.decl function_has_signature(func:FunctionDecl, signature:symbol) - -schema_invalid_function(Func, __FILE__, __LINE__) :- - schema_sanity(), - function_decl(Func), - !function_has_type(Func, _). - -schema_invalid_function(Func, __FILE__, __LINE__) :- - schema_sanity(), - function_decl(Func), - !function_has_name(Func, _). - -.decl schema_multiple_function_names(Func: FunctionDecl, file:File, line:Line) -schema_multiple_function_names(Func, __FILE__, __LINE__) :- - schema_sanity(), - function_decl(Func), - function_has_name(Func,name1), - function_has_name(Func,name2), - name1!=name2. - -//---------------------------------------- -// Variables and Constants contained -//---------------------------------------- - -.decl constant_in_function(c:Constant, func:Function) -.decl variable_in_function(v:Variable, func:Function) - - -//----------------------------------------------------------------- -// Optional function attributes (common for both declarations and -// definitions) -//----------------------------------------------------------------- - -.decl function_alignment(func:FunctionDecl, alignment:number) -.decl function_has_linkage_type(func:FunctionDecl, link:LinkageType) -.decl function_has_visibility(func:FunctionDecl, vis:Visibility) -.decl function_with_calling_convention(func:FunctionDecl, cc:CallingConvention) -.decl function_with_unnamed_addr(func:FunctionDecl) -.decl function_with_gc(func:FunctionDecl, collector:symbol) -.decl function_with_pers_fn(func:FunctionDecl, persfn:Constant) - -calling_convention(cc) :- function_with_calling_convention(_, cc). -linkage_type(link) :- function_has_linkage_type(_, link). -visibility(vis) :- function_has_visibility(_, vis). - -//----------------------------------------------------------------- -// Optional function attributes (only for definitions) -//----------------------------------------------------------------- - -.decl function_in_section(func:Function, section:symbol) - - -//---------------------------------- -// Function (Formal) Parameters -//---------------------------------- - -.decl function_nparams(func:Function, total:number) - -function_nparams(Func, Total) :- - function(Func), - function_has_type(Func, Type), - function_type_nparams(Type, Total). - - -.decl function_param(func:Function, index:ArgumentIndex, param:Variable) - - -//------------------------------------------------------------------------------ -// [Parameter Attributes] -// -// The return type and each parameter of a function type may have -// a set of parameter attributes associated with them. -// -// Parameter attributes are used to communicate additional information -// about the result or parameters of a function. -// -// Parameter attributes are considered to be part of the function, -// not of the function type, so functions with different parameter -// attributes can have the same function type. -// -// Parameter attributes are simple keywords that follow the type specified. -// If multiple parameter attributes are needed, they are space separated. -//------------------------------------------------------------------------------ - -.decl function_with_attribute(func:FunctionDecl, attr:Attribute) -.decl function_with_return_attribute(func:FunctionDecl, attr:Attribute) -.decl function_with_param_attribute(func:FunctionDecl, index:ArgumentIndex, attr:Attribute) - -attribute(Attr) :- function_with_attribute(_, Attr). -attribute(Attr) :- function_with_return_attribute(_, Attr). -attribute(Attr) :- function_with_param_attribute(_, _, Attr). - -// Parameter is passed by value -.decl function_param_by_value(func:Function, index:number) - -function_param_by_value(Func, Index) :- - function_param(Func, Index, _), - function_with_param_attribute(Func, Index, ByValueAttr), - parameter_attribute__byval(ByValueAttr). - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// Number and types of parameters must match those declared -// in the function type. -// -// The return type must also be compatible for the function -// to be well-formed, but this is checked in ret-instruction -// logic. -//------------------------------------------------------------------------------ - -schema_invalid_function(Func, __FILE__, __LINE__) :- - schema_sanity(), - function_has_type(Func, Type), - function_param(Func, Index, Param), - function_type_param(Type, Index, ParamType), - !variable_has_type(Param, ParamType). - -schema_invalid_function(Func, __FILE__, __LINE__) :- - schema_sanity(), - function(Func), - function_has_type(Func, Type), - function_type_param(Type, Index, _), - !function_param(Func, Index, _). - -schema_invalid_function(Func, __FILE__, __LINE__) :- - schema_sanity(), - function_has_type(Func, Type), - function_param(Func, Index, _), - !function_type_param(Type, Index, _). diff --git a/datalog/schema/global.dl b/datalog/schema/global.dl index 02c5298..c271d9c 100644 --- a/datalog/schema/global.dl +++ b/datalog/schema/global.dl @@ -127,7 +127,7 @@ local_exec_threadlocal_mode("thread_local(localexec)"). // [Aliases] // // Aliases act as “second name” for the aliasee value -// (which can be either function, global variable, another +// (which can be either func, global variable, another // alias or bitcast of global value). //------------------------------------------------------------------------------ diff --git a/datalog/schema/indirectbr-instruction.dl b/datalog/schema/indirectbr-instruction.dl index 5bafde8..c829647 100644 --- a/datalog/schema/indirectbr-instruction.dl +++ b/datalog/schema/indirectbr-instruction.dl @@ -27,7 +27,7 @@ terminator_instruction(v) :- indirectbr_instruction(v). // (1) Address must be derived from a blockaddress constant. // // (2) The ‘blockaddress‘ constant computes the address of the -// specified basic block in the specified function, and always +// specified basic block in the specified func, and always // has an i8* type. //------------------------------------------------------------------------------ diff --git a/datalog/schema/instruction.dl b/datalog/schema/instruction.dl index 543c9e5..c07ed43 100644 --- a/datalog/schema/instruction.dl +++ b/datalog/schema/instruction.dl @@ -46,10 +46,10 @@ flag(Flag) :- instruction_has_flag(_, Flag). // The next instruction in the source file. .decl next_instruction(instr:Instruction, next:Instruction) -// The function that contains the instruction -.decl instruction_in_function(instr:Instruction, func:Function) +// The func that contains the instruction +.decl instruction_in_func(instr:Instruction, func:Function) schema_invalid_instruction(Instr, __FILE__, __LINE__) :- schema_sanity(), instruction(Instr), - !instruction_in_function(Instr, _). + !instruction_in_func(Instr, _). diff --git a/datalog/schema/invoke-instruction.dl b/datalog/schema/invoke-instruction.dl index 481ae98..5e2a6bd 100644 --- a/datalog/schema/invoke-instruction.dl +++ b/datalog/schema/invoke-instruction.dl @@ -10,7 +10,7 @@ terminator_instruction(v) :- invoke_instruction(v). // Function operand: can be either a constant or a variable .decl invoke_instruction_fn_operand(instr:InvokeInstruction, op:Operand) -// Resolved function of invoke instruction. Initially empty. +// Resolved func of invoke instruction. Initially empty. .decl invoke_instruction_fn_target(instr:InvokeInstruction, func:FunctionDecl) // If none is specified, the invoke defaults to using C @@ -23,8 +23,8 @@ calling_convention(cc) :- invoke_instruction_with_calling_convention(_, cc). // [Direct and Indirect Invoke Instructions] // // Invoke-instructions are divided into direct invocations -// that provide a function name, and indirect invocations -// through a function pointer variable. +// that provide a func name, and indirect invocations +// through a func pointer variable. //--------------------------------------------------------------- .decl direct_invoke_instruction(instr:InvokeInstruction) @@ -44,17 +44,17 @@ indirect_invoke_instruction(Instr) :- //-------------------------------------------------- .decl invoke_instruction_arg(instr:InvokeInstruction, i:ArgumentIndex, arg:Operand) -.decl invoke_instruction_with_return_attribute(instr:InvokeInstruction, attr:Attribute) -.decl invoke_instruction_with_param_attribute(instr:InvokeInstruction, i:ArgumentIndex, attr:Attribute) -.decl invoke_instruction_with_fn_attribute(instr:InvokeInstruction, attr:Attribute) +.decl invoke_instruction_with_return_attr(instr:InvokeInstruction, attr:Attribute) +.decl invoke_instruction_with_param_attr(instr:InvokeInstruction, i:ArgumentIndex, attr:Attribute) +.decl invoke_instruction_with_fn_attr(instr:InvokeInstruction, attr:Attribute) -attribute(Attr) :- invoke_instruction_with_fn_attribute(_, Attr). -attribute(Attr) :- invoke_instruction_with_return_attribute(_, Attr). -attribute(Attr) :- invoke_instruction_with_param_attribute(_, _, Attr). +attr(Attr) :- invoke_instruction_with_fn_attr(_, Attr). +attr(Attr) :- invoke_instruction_with_return_attr(_, Attr). +attr(Attr) :- invoke_instruction_with_param_attr(_, _, Attr). //----------------------------- -// Signature (function type) +// Signature (func type) //----------------------------- .decl invoke_instruction_fn_type(instr:InvokeInstruction, type:Type) @@ -64,18 +64,18 @@ invoke_instruction_fn_type(Instr, FnType) :- invoke_instruction_fn_operand(Instr, FnOp), operand_has_type(FnOp, PtrType), pointer_type_has_component(PtrType, FnType), - function_type(FnType). + func_type(FnType). invoke_instruction_return_type(Instr, Type) :- invoke_instruction_fn_type(Instr, FnType), - function_type_return(FnType, Type). + func_type_return(FnType, Type). //------------------------------------------------------------------------------ // [Labels] // // ‘normal label‘: -// the label reached when the called function executes a ‘ret‘ +// the label reached when the called func executes a ‘ret‘ // instruction. // // ‘exception label‘: @@ -90,17 +90,17 @@ invoke_instruction_return_type(Instr, Type) :- //------------------------------------------------------------------------------ // [Constraints] // -// (1) Only ‘zeroext‘, ‘signext‘, and ‘inreg‘ attributes +// (1) Only ‘zeroext‘, ‘signext‘, and ‘inreg‘ attrs // are valid for return values. // (2) The type of the invoke instruction is also the type of // the return value. Functions that return no value are // marked void. -// (3) The function type shall be the signature of the pointer -// to function value being invoked. The argument types must +// (3) The func type shall be the signature of the pointer +// to func value being invoked. The argument types must // match the types implied by this signature. // (4) All arguments must be of first class type. // (5) Only ‘noreturn‘, ‘nounwind‘, ‘readonly‘ and ‘readnone‘ -// attributes are valid as function attributes. +// attrs are valid as func attrs. // (6) The 'invoke' instruction' takes a 'normal label' and // (7) an 'exceptional label'. //------------------------------------------------------------------------------ @@ -120,27 +120,27 @@ schema_invalid_instruction(Instr, __FILE__, __LINE__) :- invoke_instruction(Instr), !invoke_instruction_exception_label(Instr, _). -// attribute compatibility +// attr compatibility schema_invalid_instruction(Instr, __FILE__, __LINE__) :- schema_sanity(), - invoke_instruction_with_return_attribute(Instr, Attr), - !parameter_attribute__zeroext(Attr), - !parameter_attribute__signext(Attr), - !parameter_attribute__inreg(Attr), - !parameter_attribute__noalias(Attr), - !parameter_attribute__dereferenceable(Attr). // c1 + invoke_instruction_with_return_attr(Instr, Attr), + !parameter_attr__zeroext(Attr), + !parameter_attr__signext(Attr), + !parameter_attr__inreg(Attr), + !parameter_attr__noalias(Attr), + !parameter_attr__dereferenceable(Attr). // c1 schema_invalid_instruction(Instr, __FILE__, __LINE__) :- schema_sanity(), - invoke_instruction_with_fn_attribute(Instr, Attr), - !function_attribute__noreturn(Attr), - !function_attribute__nounwind(Attr), - !function_attribute__readonly(Attr), - !function_attribute__readnone(Attr), - !function_attribute__cold(Attr), - !function_attribute__returns_twice(Attr), - !function_attribute__builtin(Attr), - !target_dependent_attribute(Attr). // c5 + invoke_instruction_with_fn_attr(Instr, Attr), + !func_attr__noreturn(Attr), + !func_attr__nounwind(Attr), + !func_attr__readonly(Attr), + !func_attr__readnone(Attr), + !func_attr__cold(Attr), + !func_attr__returns_twice(Attr), + !func_attr__builtin(Attr), + !target_dependent_attr(Attr). // c5 // Signature conformance @@ -148,21 +148,21 @@ schema_invalid_instruction(Instr, __FILE__, __LINE__) :- schema_sanity(), invoke_instruction_arg(Instr, Index, _), invoke_instruction_fn_type(Instr, FnType), - !function_type_param(FnType, Index, _), - !function_type_has_varargs(FnType). + !func_type_param(FnType, Index, _), + !func_type_has_varargs(FnType). schema_invalid_instruction(Instr, __FILE__, __LINE__) :- schema_sanity(), invoke_instruction(Instr), !invoke_instruction_arg(Instr, Index, _), invoke_instruction_fn_type(Instr, FnType), - function_type_param(FnType, Index, _). + func_type_param(FnType, Index, _). schema_invalid_instruction(Instr, __FILE__, __LINE__) :- schema_sanity(), invoke_instruction_arg(Instr, Index, Arg), invoke_instruction_fn_type(Instr, FnType), - function_type_param(FnType, Index, ParamType), + func_type_param(FnType, Index, ParamType), !operand_has_type(Arg, ParamType). // c3 schema_invalid_instruction(Instr, __FILE__, __LINE__) :- diff --git a/datalog/schema/landingpad-instruction.dl b/datalog/schema/landingpad-instruction.dl index c77154e..e0c35f8 100644 --- a/datalog/schema/landingpad-instruction.dl +++ b/datalog/schema/landingpad-instruction.dl @@ -10,25 +10,25 @@ instruction(v) :- landingpad_instruction(v). // result type .decl landingpad_instruction_type(instr:LandingPadInstruction, type:Type) -// personality function +// personality func .decl landingpad_instruction_pers_fn(instr:LandingPadInstruction, func:FunctionDecl) landingpad_instruction_pers_fn(Instr, PersFunction) :- landingpad_instruction(Instr), - instruction_in_function(Instr, EnclosingFunction), - function_with_pers_fn(EnclosingFunction, FnConstant), - function_constant(FnConstant), - function_constant_fn_name(FnConstant, PersFnName), - function_has_name(PersFunction, PersFnName). + instruction_in_func(Instr, EnclosingFunction), + func_pers_fn(EnclosingFunction, FnConstant), + func_constant(FnConstant), + func_constant_fn_name(FnConstant, PersFnName), + func_name(PersFunction, PersFnName). landingpad_instruction_pers_fn(Instr, PersFunction) :- landingpad_instruction(Instr), - instruction_in_function(Instr, EnclosingFunction), - function_with_pers_fn(EnclosingFunction, BitcastConstant), + instruction_in_func(Instr, EnclosingFunction), + func_pers_fn(EnclosingFunction, BitcastConstant), bitcast_constant_expression_from(BitcastConstant, FnConstant), - function_constant(FnConstant), - function_constant_fn_name(FnConstant, PersFnName), - function_has_name(PersFunction, PersFnName). + func_constant(FnConstant), + func_constant_fn_name(FnConstant, PersFnName), + func_name(PersFunction, PersFnName). //------------------------------------------------------------------------------ @@ -160,8 +160,8 @@ schema_invalid_instruction(Instr, __FILE__, __LINE__) :- // landing pad block. // (4) A basic block that is not a landing pad block may not include // a ‘landingpad‘ instruction. -// (5) All ‘landingpad‘ instructions in a function must have the same -// personality function. +// (5) All ‘landingpad‘ instructions in a func must have the same +// personality func. // (6) The ‘landingpad‘ instruction must contain at least one clause // or the cleanup flag. //------------------------------------------------------------------------- @@ -210,14 +210,14 @@ schema_invalid_instruction(Instr, __FILE__, __LINE__) :- !landingpad(BB). -// 5th Constraint: all ‘landingpad‘ instructions in a function must -// have the same personality function +// 5th Constraint: all ‘landingpad‘ instructions in a func must +// have the same personality func schema_invalid_instruction(Instr1, __FILE__, __LINE__) :- schema_sanity(), landingpad_instruction(Instr1), landingpad_instruction_pers_fn(Instr1, PersFunc), - instruction_in_function(Instr1, Func), - instruction_in_function(Instr2, Func), + instruction_in_func(Instr1, Func), + instruction_in_func(Instr2, Func), landingpad_instruction(Instr2), !landingpad_instruction_pers_fn(Instr2, PersFunc). diff --git a/datalog/schema/resume-instruction.dl b/datalog/schema/resume-instruction.dl index 34aca32..3678afd 100644 --- a/datalog/schema/resume-instruction.dl +++ b/datalog/schema/resume-instruction.dl @@ -15,7 +15,7 @@ terminator_instruction(v) :- resume_instruction(v). // // 1) The ‘resume‘ instruction requires one argument, which // must have the same type as the result of any ‘landingpad‘ -// instruction in the same function. +// instruction in the same func. //------------------------------------------------------------------------------ schema_invalid_instruction(Instr, __FILE__, __LINE__) :- @@ -27,8 +27,8 @@ schema_invalid_instruction(ResumeInstr, __FILE__, __LINE__) :- schema_sanity(), resume_instruction(ResumeInstr), resume_instruction_operand(ResumeInstr, Operand), - instruction_in_function(ResumeInstr, Func), - instruction_in_function(LPadInstr, Func), + instruction_in_func(ResumeInstr, Func), + instruction_in_func(LPadInstr, Func), landingpad_instruction(LPadInstr), instruction_returns_type(LPadInstr, Type), !operand_has_type(Operand, Type). diff --git a/datalog/schema/ret-instruction.dl b/datalog/schema/ret-instruction.dl index 078591e..73827e4 100644 --- a/datalog/schema/ret-instruction.dl +++ b/datalog/schema/ret-instruction.dl @@ -22,7 +22,7 @@ schema_invalid_instruction(Instr, __FILE__, __LINE__) :- //------------------------------------------------------------------------------ // [Well Formed Functions] // -// A function is not well formed if: +// A func is not well formed if: // (i) it it has a non-void return type and contains a ‘ret‘ // instruction with no return value or // @@ -32,34 +32,34 @@ schema_invalid_instruction(Instr, __FILE__, __LINE__) :- // instruction with a return value. //------------------------------------------------------------------------------ -.decl function_is_wellformed(func:Function) -.decl function_is_illformed(func:Function) +.decl func_is_wellformed(func:Function) +.decl func_is_illformed(func:Function) -function_is_wellformed(Func):- - function(Func), - !function_is_illformed(Func). +func_is_wellformed(Func):- + func(Func), + !func_is_illformed(Func). -function_is_illformed(Func) :- +func_is_illformed(Func) :- void_ret_instruction(Instr), - instruction_in_function(Instr, Func), - function_has_type(Func, FuncType), - function_type_return(FuncType, RetType), + instruction_in_func(Instr, Func), + func_ty(Func, FuncType), + func_type_return(FuncType, RetType), !void_type(RetType). -function_is_illformed(Func) :- +func_is_illformed(Func) :- ret_instruction_value(Instr, Value), - instruction_in_function(Instr, Func), - function_has_type(Func, FuncType), - function_type_return(FuncType, RetType), + instruction_in_func(Instr, Func), + func_ty(Func, FuncType), + func_type_return(FuncType, RetType), !void_type(RetType), !operand_has_type(Value, RetType). -function_is_illformed(Func) :- +func_is_illformed(Func) :- ret_instruction(Instr), !void_ret_instruction(Instr), - instruction_in_function(Instr, Func), - function_has_type(Func, FuncType), - function_type_return(FuncType, RetType), + instruction_in_func(Instr, Func), + func_ty(Func, FuncType), + func_type_return(FuncType, RetType), void_type(RetType). diff --git a/datalog/schema/schema.project b/datalog/schema/schema.project index d78e348..8a0d424 100644 --- a/datalog/schema/schema.project +++ b/datalog/schema/schema.project @@ -1,12 +1,12 @@ #include "debug.dl" -#include "attribute.dl" +#include "attr.dl" #include "calling-convention.dl" #include "ordering.dl" #include "type.dl" #include "operand.dl" #include "asm.dl" #include "global.dl" -#include "function.dl" +#include "func.dl" #include "constants.dl" #include "instruction.dl" diff --git a/datalog/schema/type.dl b/datalog/schema/type.dl index e3d5890..62d5d73 100644 --- a/datalog/schema/type.dl +++ b/datalog/schema/type.dl @@ -126,7 +126,7 @@ type_has_size(t, 16) :- ppc_fp128_type(t). // // keywords: derived; first class; aggregate // http://llvm.org/docs/LangRef.html#array-type -// http://llvm.org/docs/LangRef.html#function-type +// http://llvm.org/docs/LangRef.html#func-type // http://llvm.org/docs/LangRef.html#pointer-type // http://llvm.org/docs/LangRef.html#structure-type // http://llvm.org/docs/LangRef.html#vector-type @@ -158,7 +158,7 @@ type_has_size(t, 16) :- ppc_fp128_type(t). .type OpaqueStructType <: symbol .decl derived_type(type:DerivedType) -.decl function_type(type:FunctionType) +.decl func_type(type:FunctionType) .decl pointer_type(type:PointerType) .decl vector_type(type:VectorType) .decl aggregate_type(type:AggregateType) @@ -167,7 +167,7 @@ type_has_size(t, 16) :- ppc_fp128_type(t). .decl opaque_struct_type(type:OpaqueStructType) type(t) :- derived_type(t). -derived_type(t) :- function_type(t). +derived_type(t) :- func_type(t). derived_type(t) :- pointer_type(t). derived_type(t) :- vector_type(t). derived_type(t) :- aggregate_type(t). @@ -184,7 +184,7 @@ struct_type(t) :- opaque_struct_type(t). type_is_firstclass(Type) :- type(Type), - !function_type(Type), + !func_type(Type), !void_type(Type). @@ -217,20 +217,20 @@ int8_array_type(Type) :- // Function type //---------------------- -.decl function_type_has_varargs(type:FunctionType) -.decl function_type_return(type:FunctionType, ret:Type) -.decl function_type_param(type:FunctionType, index:ArgumentIndex, param:Type) -.decl function_type_nparams(type:FunctionType, total:number) +.decl func_type_has_varargs(type:FunctionType) +.decl func_type_return(type:FunctionType, ret:Type) +.decl func_type_param(type:FunctionType, index:ArgumentIndex, param:Type) +.decl func_type_nparams(type:FunctionType, total:number) schema_invalid_type(Type, __FILE__, __LINE__) :- schema_sanity(), - function_type(Type), - !function_type_nparams(Type, _). + func_type(Type), + !func_type_nparams(Type, _). schema_invalid_type(Type, __FILE__, __LINE__) :- schema_sanity(), - function_type(Type), - function_type_return(Type, RetType), + func_type(Type), + func_type_return(Type, RetType), (metadata_type(RetType) ; label_type(RetType)). diff --git a/datalog/symbol-lookup/resolve-function-calls.dl b/datalog/symbol-lookup/resolve-func-calls.dl similarity index 68% rename from datalog/symbol-lookup/resolve-function-calls.dl rename to datalog/symbol-lookup/resolve-func-calls.dl index 3588742..8d8019d 100644 --- a/datalog/symbol-lookup/resolve-function-calls.dl +++ b/datalog/symbol-lookup/resolve-func-calls.dl @@ -5,32 +5,32 @@ // // We assume the following, due to our whole-program analysis scheme: // -// 1. For any referenced function, there will exist at least one -// function declaration (that may also be a definition). +// 1. For any referenced func, there will exist at least one +// func declaration (that may also be a definition). // -// 2. If a function definition exists, then no declarations will be +// 2. If a func definition exists, then no declarations will be // visible. This means that we do not have to deal with any // indirections when creating the mapping from call instructions -// to functions being called. When a function definition exists, +// to funcs being called. When a func definition exists, // then the call instruction will be mapped to it. Otherwise, it -// will be mapped to a function declaration. +// will be mapped to a func declaration. // -// 3. In principle, not all function declarations will map directly -// to a function definition. For instance, function calls that +// 3. In principle, not all func declarations will map directly +// to a func definition. For instance, func calls that // belong to dynamically linked libraries cannot be resolved. -// Thus, they will be mapped to function declarations instead. +// Thus, they will be mapped to func declarations instead. // -// 4. There will exist at most one definition per function. +// 4. There will exist at most one definition per func. //---------------------------------------------------------------------- -.decl constant_references_function(c:Constant, f:FunctionDecl) +.decl constant_references_func(c:Constant, f:FunctionDecl) .decl constant_references_variable(c:Constant, v:GlobalVariable) -// Retrieve function names from constants -constant_references_function(FC, Func) :- - function_constant(FC), - function_constant_fn_name(FC, FuncName), - function_has_name(Func, FuncName). +// Retrieve func names from constants +constant_references_func(FC, Func) :- + func_constant(FC), + func_constant_fn_name(FC, FuncName), + func_name(Func, FuncName). // Retrieve variable names from constants constant_references_variable(GC, GVar) :- @@ -41,9 +41,9 @@ constant_references_variable(GC, GVar) :- // A constant may be enclosed by a bitcast constant // expression -constant_references_function(Outer, Func) :- +constant_references_func(Outer, Func) :- bitcast_constant_expression_from(Outer, Inner), - constant_references_function(Inner, Func). + constant_references_func(Inner, Func). constant_references_variable(Outer, GVar) :- bitcast_constant_expression_from(Outer, Inner), @@ -52,7 +52,7 @@ constant_references_variable(Outer, GVar) :- //------------------------------------------------------------- // [Aliases] // -// An alias may also be used as a function operand. +// An alias may also be used as a func operand. //------------------------------------------------------------- .decl aliased_constants(c1:Constant, c2:Constant) @@ -75,9 +75,9 @@ aliased_constants(OtherConstant, Constant) :- _alias(OtherConstant, Alias), _aliasee(Constant, Alias). -constant_references_function(OtherConstant, Func) :- +constant_references_func(OtherConstant, Func) :- aliased_constants(OtherConstant, Constant), - constant_references_function(Constant, Func). + constant_references_func(Constant, Func). constant_references_variable(OtherConstant, GVar) :- aliased_constants(OtherConstant, Constant), @@ -85,7 +85,7 @@ constant_references_variable(OtherConstant, GVar) :- //------------------------------------------------------------------------------ -// Mapping from call instructions to function declarations +// Mapping from call instructions to func declarations //------------------------------------------------------------------------------ .decl _instr_calls_func(instr:Instruction, target:FunctionDecl) @@ -94,13 +94,13 @@ _instr_calls_func(Instr, Func) :- direct_call_instruction(Instr), call_instruction_fn_operand(Instr, FunctionConstant), constant(FunctionConstant), - constant_references_function(FunctionConstant, Func). + constant_references_func(FunctionConstant, Func). _instr_calls_func(Instr, Func) :- direct_invoke_instruction(Instr), invoke_instruction_fn_operand(Instr, FunctionConstant), constant(FunctionConstant), - constant_references_function(FunctionConstant, Func). + constant_references_func(FunctionConstant, Func). // Is this always true for our tests? @@ -119,37 +119,37 @@ schema_invalid_instruction(Instr, __FILE__, __LINE__) :- // This is for future use (if we ever introduce multiple compilation // units as input). // -// * Each function declaration should be mapped to exactly one -// function definition. +// * Each func declaration should be mapped to exactly one +// func definition. // -// * Each function declaration, which also happens to be a definition, +// * Each func declaration, which also happens to be a definition, // maps to itself. //---------------------------------------------------------------------- -.decl function_decl_to_defn(fdecl:FunctionDecl, func:Function) +.decl func_decl_to_defn(fdecl:FunctionDecl, func:Function) -function_decl_to_defn(Func, Func) :- - function(Func). +func_decl_to_defn(Func, Func) :- + func(Func). -// Map call instructions to functions. If definition is obtainable, +// Map call instructions to funcs. If definition is obtainable, // map to it; else map to declaration call_instruction_fn_target(Instr, Func) :- call_instruction(Instr), _instr_calls_func(Instr, SomeFunc), - function_decl_to_defn(SomeFunc, Func). + func_decl_to_defn(SomeFunc, Func). call_instruction_fn_target(Instr, SomeFunc) :- call_instruction(Instr), _instr_calls_func(Instr, SomeFunc), - !function_decl_to_defn(SomeFunc, _). + !func_decl_to_defn(SomeFunc, _). invoke_instruction_fn_target(Instr, Func) :- invoke_instruction(Instr), _instr_calls_func(Instr, SomeFunc), - function_decl_to_defn(SomeFunc, Func). + func_decl_to_defn(SomeFunc, Func). invoke_instruction_fn_target(Instr, SomeFunc) :- invoke_instruction(Instr), _instr_calls_func(Instr, SomeFunc), - !function_decl_to_defn(SomeFunc, _). + !func_decl_to_defn(SomeFunc, _). diff --git a/datalog/symbol-lookup/symbol-lookup.project b/datalog/symbol-lookup/symbol-lookup.project index 3d1201f..ba60057 100644 --- a/datalog/symbol-lookup/symbol-lookup.project +++ b/datalog/symbol-lookup/symbol-lookup.project @@ -1 +1 @@ -#include "resolve-function-calls.dl" +#include "resolve-func-calls.dl" diff --git a/doc/dev.rst b/doc/dev.rst index b1be0f7..53fd2da 100644 --- a/doc/dev.rst +++ b/doc/dev.rst @@ -46,6 +46,7 @@ enumerates abbreviations that are considered reasonable trade-offs in this space. This judgment is highly subjective, but must be made somehow. - ``asm``: Assembly +- ``attr``: Attribute - ``block``: LLVM basic block - ``const``: Constant - ``global_var``: Global variable @@ -54,6 +55,7 @@ space. This judgment is highly subjective, but must be made somehow. - ``gep``: ``getelementptr`` - ``instr``: Instruction - ``int``: Integer +- ``param``: Parameter - ``ptr``: Pointer - ``var``: Variable - ``vec``: Vector @@ -62,7 +64,9 @@ Explicitly **not** further abbreviated: - ``array`` - ``struct`` -- ``type`` + +``type`` is for relations about types themselves, whereas ``ty`` is used for +relating an entity *to* its type. Performance Tuning ****************** diff --git a/test/pa_invariant_test.py b/test/pa_invariant_test.py index 942b4dc..0979597 100644 --- a/test/pa_invariant_test.py +++ b/test/pa_invariant_test.py @@ -45,13 +45,13 @@ def test_pointer_analysis_invariants(run, every_program, context_sensitivity): # with other function types with gzip.open(out_files / "type_compatible.csv.gz", "rt") as f: compatible_types = {tuple(row) for row in csv.reader(f, delimiter="\t")} - with gzip.open(out_files / "function_type.csv.gz", "rt") as f: - function_types = {row[0] for row in csv.reader(f, delimiter="\t")} + with gzip.open(out_files / "func_type.csv.gz", "rt") as f: + func_types = {row[0] for row in csv.reader(f, delimiter="\t")} assert len(compatible_types) > 0 - assert len(function_types) > 0 - for function_type in function_types: - for compatible_type in {ty for (fun_ty, ty) in compatible_types if fun_ty == function_type}: - assert compatible_type in function_types + assert len(func_types) > 0 + for func_type in func_types: + for compatible_type in {ty for (fun_ty, ty) in compatible_types if fun_ty == func_type}: + assert compatible_type in func_types @unique @@ -159,34 +159,34 @@ class RelationSpec(NamedTuple): properties=frozenset({(binary, frozenset({BinaryRelationProperty.FUNCTIONAL}))}), ), RelationSpec( - name="function_by_location", + name="func_by_location", types=(str, str), properties=frozenset({(binary, _ONE_TO_ONE)}), ), RelationSpec( - name="function_has_name", + name="func_name", types=(str, str), properties=frozenset({(binary, _ONE_TO_ONE)}), ), RelationSpec( - name="function_returns_value", + name="func_returns_value", types=(str, str), properties=frozenset({(binary, frozenset({BinaryRelationProperty.INJECTIVE}))}), ), RelationSpec( - name="function_type_nparams", + name="func_type_nparams", types=(str, int), properties=frozenset({(binary, frozenset({BinaryRelationProperty.FUNCTIONAL}))}), ), RelationSpec( - name="function_type_param", + name="func_type_param", types=(str, int, str), properties=frozenset( {(lambda t, i, p: ((t, i), (p,)), frozenset({BinaryRelationProperty.FUNCTIONAL}))} ), ), RelationSpec( - name="function_type_return", + name="func_type_return", types=(str, str), properties=frozenset({(binary, frozenset({BinaryRelationProperty.FUNCTIONAL}))}), ), From 077eb7bf23af3359ad42e77fa909323cdbf13cef Mon Sep 17 00:00:00 2001 From: Langston Barrett Date: Fri, 7 Oct 2022 12:51:45 -0400 Subject: [PATCH 05/11] Rename instruction relations Used this script to rename files in datalog/schema: import os for f in os.listdir("."): if "instruction" in f: os.rename(f, f.replace("instruction", "instr")) --- FactGenerator/include/InstructionVisitor.hpp | 2 +- FactGenerator/include/predicates.inc | 450 ++++++------- FactGenerator/src/FactGenerator.cpp | 10 +- FactGenerator/src/InstructionVisitor.cpp | 29 +- PAInterface.cpp | 6 +- PointerAnalysis.cpp | 8 +- datalog/CMakeLists.txt | 114 ++-- datalog/context/drop.dl | 24 +- datalog/context/interface.dl | 16 +- datalog/context/lift.dl | 10 +- datalog/debug.project | 4 +- datalog/export/auxiliary-records.dl | 18 +- datalog/export/debug-output-extended.dl | 608 +++++++++--------- datalog/export/debug-output.dl | 608 +++++++++--------- datalog/export/subset.dl | 2 +- datalog/export/unification.dl | 2 +- datalog/import/todo.dl | 44 +- datalog/options/user-options.dl | 2 +- datalog/points-to/allocations-decl.dl | 18 +- datalog/points-to/allocations-sizes.dl | 70 +- .../allocations-subobjects-aliases.dl | 2 +- datalog/points-to/allocations-subobjects.dl | 18 +- datalog/points-to/allocations-type.dl | 4 +- datalog/points-to/allocations.dl | 60 +- datalog/points-to/assertions.dl | 38 +- datalog/points-to/assignment.dl | 64 +- datalog/points-to/at-exit.dl | 6 +- datalog/points-to/constant-exprs.dl | 2 +- datalog/points-to/constant-init.dl | 2 +- datalog/points-to/constant-points-to.dl | 2 +- datalog/points-to/core.dl | 24 +- datalog/points-to/cplusplus-exceptions.dl | 92 +-- datalog/points-to/cplusplus.dl | 38 +- datalog/points-to/field-sensitivity.dl | 58 +- datalog/points-to/interprocedural.dl | 58 +- datalog/points-to/memcpy.dl | 6 +- datalog/points-to/points-to-options.dl | 2 +- datalog/points-to/points-to-statistics.dl | 2 +- datalog/points-to/signatures.dl | 40 +- datalog/points-to/subset.dl | 20 +- datalog/points-to/type-back-propagation.dl | 66 +- datalog/points-to/types.dl | 4 +- datalog/points-to/unification.dl | 26 +- datalog/schema/add-instr.dl | 53 ++ datalog/schema/add-instruction.dl | 53 -- datalog/schema/alloca-instr.dl | 30 + datalog/schema/alloca-instruction.dl | 30 - datalog/schema/and-instr.dl | 53 ++ datalog/schema/and-instruction.dl | 53 -- datalog/schema/ashr-instr.dl | 53 ++ datalog/schema/ashr-instruction.dl | 53 -- ...crmw-instruction.dl => atomicrmw-instr.dl} | 66 +- datalog/schema/basic-block.dl | 56 +- datalog/schema/bitcast-instr.dl | 79 +++ datalog/schema/bitcast-instruction.dl | 79 --- datalog/schema/br-instr.dl | 89 +++ datalog/schema/br-instruction.dl | 89 --- datalog/schema/call-instr.dl | 183 ++++++ datalog/schema/call-instruction.dl | 183 ------ datalog/schema/calling-convention.dl | 2 +- datalog/schema/cmpxchg-instr.dl | 135 ++++ datalog/schema/cmpxchg-instruction.dl | 135 ---- datalog/schema/extractelement-instr.dl | 58 ++ datalog/schema/extractelement-instruction.dl | 58 -- datalog/schema/extractvalue-instr.dl | 92 +++ datalog/schema/extractvalue-instruction.dl | 92 --- datalog/schema/fadd-instr.dl | 52 ++ datalog/schema/fadd-instruction.dl | 52 -- .../{fcmp-instruction.dl => fcmp-instr.dl} | 78 +-- datalog/schema/fdiv-instr.dl | 52 ++ datalog/schema/fdiv-instruction.dl | 52 -- datalog/schema/fence-instr.dl | 31 + datalog/schema/fence-instruction.dl | 31 - datalog/schema/fmul-instr.dl | 52 ++ datalog/schema/fmul-instruction.dl | 52 -- datalog/schema/fpext-instr.dl | 58 ++ datalog/schema/fpext-instruction.dl | 58 -- datalog/schema/fptosi-instr.dl | 71 ++ datalog/schema/fptosi-instruction.dl | 71 -- datalog/schema/fptoui-instr.dl | 71 ++ datalog/schema/fptoui-instruction.dl | 71 -- datalog/schema/fptrunc-instr.dl | 53 ++ datalog/schema/fptrunc-instruction.dl | 53 -- datalog/schema/frem-instr.dl | 52 ++ datalog/schema/frem-instruction.dl | 52 -- datalog/schema/fsub-instr.dl | 52 ++ datalog/schema/fsub-instruction.dl | 52 -- datalog/schema/func.dl | 4 +- ...-instruction.dl => getelementptr-instr.dl} | 124 ++-- .../{icmp-instruction.dl => icmp-instr.dl} | 76 +-- datalog/schema/indirectbr-instr.dl | 62 ++ datalog/schema/indirectbr-instruction.dl | 62 -- datalog/schema/insertelement-instr.dl | 73 +++ datalog/schema/insertelement-instruction.dl | 73 --- datalog/schema/insertvalue-instr.dl | 112 ++++ datalog/schema/insertvalue-instruction.dl | 112 ---- datalog/schema/instr.dl | 55 ++ datalog/schema/instruction.dl | 55 -- datalog/schema/inttoptr-instr.dl | 70 ++ datalog/schema/inttoptr-instruction.dl | 70 -- datalog/schema/invoke-instr.dl | 194 ++++++ datalog/schema/invoke-instruction.dl | 194 ------ datalog/schema/landingpad-instr.dl | 231 +++++++ datalog/schema/landingpad-instruction.dl | 231 ------- datalog/schema/load-instr.dl | 74 +++ datalog/schema/load-instruction.dl | 74 --- datalog/schema/lshr-instr.dl | 53 ++ datalog/schema/lshr-instruction.dl | 53 -- datalog/schema/mul-instr.dl | 52 ++ datalog/schema/mul-instruction.dl | 52 -- datalog/schema/operand.dl | 4 +- datalog/schema/or-instr.dl | 53 ++ datalog/schema/or-instruction.dl | 53 -- datalog/schema/phi-instr.dl | 69 ++ datalog/schema/phi-instruction.dl | 69 -- datalog/schema/ptrtoint-instr.dl | 70 ++ datalog/schema/ptrtoint-instruction.dl | 70 -- datalog/schema/resume-instr.dl | 34 + datalog/schema/resume-instruction.dl | 34 - .../{ret-instruction.dl => ret-instr.dl} | 44 +- datalog/schema/schema.project | 114 ++-- datalog/schema/sdiv-instr.dl | 52 ++ datalog/schema/sdiv-instruction.dl | 52 -- datalog/schema/select-instr.dl | 84 +++ datalog/schema/select-instruction.dl | 84 --- datalog/schema/sext-instr.dl | 71 ++ datalog/schema/sext-instruction.dl | 71 -- datalog/schema/shl-instr.dl | 53 ++ datalog/schema/shl-instruction.dl | 53 -- datalog/schema/shufflevector-instr.dl | 112 ++++ datalog/schema/shufflevector-instruction.dl | 112 ---- datalog/schema/sitofp-instr.dl | 69 ++ datalog/schema/sitofp-instruction.dl | 69 -- datalog/schema/srem-instr.dl | 52 ++ datalog/schema/srem-instruction.dl | 52 -- datalog/schema/store-instr.dl | 93 +++ datalog/schema/store-instruction.dl | 93 --- datalog/schema/sub-instr.dl | 52 ++ datalog/schema/sub-instruction.dl | 52 -- datalog/schema/switch-instr.dl | 90 +++ datalog/schema/switch-instruction.dl | 90 --- datalog/schema/trunc-instr.dl | 71 ++ datalog/schema/trunc-instruction.dl | 71 -- datalog/schema/udiv-instr.dl | 52 ++ datalog/schema/udiv-instruction.dl | 52 -- datalog/schema/uitofp-instr.dl | 69 ++ datalog/schema/uitofp-instruction.dl | 69 -- datalog/schema/unreachable-instr.dl | 10 + datalog/schema/unreachable-instruction.dl | 10 - datalog/schema/urem-instr.dl | 52 ++ datalog/schema/urem-instruction.dl | 52 -- datalog/schema/va-arg-instr.dl | 45 ++ datalog/schema/va-arg-instruction.dl | 45 -- datalog/schema/xor-instr.dl | 53 ++ datalog/schema/xor-instruction.dl | 53 -- datalog/schema/zext-instr.dl | 71 ++ datalog/schema/zext-instruction.dl | 71 -- datalog/symbol-lookup/resolve-func-calls.dl | 44 +- doc/dev.rst | 7 +- ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 4 - ....heap_allocation_by_instruction.golden.csv | 4 - ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 8 - ..._allocation_by_type_instruction.golden.csv | 8 - ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 12 - ...stack_allocation_by_instruction.golden.csv | 12 - ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 1 - ..._allocation_by_type_instruction.golden.csv | 1 - ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 4 - ....heap_allocation_by_instruction.golden.csv | 4 - ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 7 - ..._allocation_by_type_instruction.golden.csv | 7 - ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 3 - ...stack_allocation_by_instruction.golden.csv | 3 - ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 1 - ..._allocation_by_type_instruction.golden.csv | 1 - ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 12 - ...stack_allocation_by_instruction.golden.csv | 12 - ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 7 - ...stack_allocation_by_instruction.golden.csv | 7 - ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 6 - ...stack_allocation_by_instruction.golden.csv | 6 - ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 1 - ..._allocation_by_type_instruction.golden.csv | 1 - ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 4 - ...stack_allocation_by_instruction.golden.csv | 4 - ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 2 - ....heap_allocation_by_instruction.golden.csv | 2 - ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 2 - ..._allocation_by_type_instruction.golden.csv | 2 - ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 46 -- ...stack_allocation_by_instruction.golden.csv | 46 -- ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 2 - ....heap_allocation_by_instruction.golden.csv | 2 - ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 3 - ..._allocation_by_type_instruction.golden.csv | 3 - ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 4 - ...stack_allocation_by_instruction.golden.csv | 4 - ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 1 - ....heap_allocation_by_instruction.golden.csv | 1 - ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 6 - ..._allocation_by_type_instruction.golden.csv | 6 - ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 117 ---- ...stack_allocation_by_instruction.golden.csv | 117 ---- ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 1 - ....heap_allocation_by_instruction.golden.csv | 1 - ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 3 - ..._allocation_by_type_instruction.golden.csv | 3 - ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 9 - ...stack_allocation_by_instruction.golden.csv | 9 - ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 0 ....heap_allocation_by_instruction.golden.csv | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 0 ....heap_allocation_by_instruction.golden.csv | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 11 - ...stack_allocation_by_instruction.golden.csv | 11 - ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 0 ....heap_allocation_by_instruction.golden.csv | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 0 ....heap_allocation_by_instruction.golden.csv | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 4 - ...stack_allocation_by_instruction.golden.csv | 4 - ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 2 - ..._allocation_by_type_instruction.golden.csv | 2 - ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 6 - ...stack_allocation_by_instruction.golden.csv | 6 - ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 2 - ....heap_allocation_by_instruction.golden.csv | 2 - ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 2 - ..._allocation_by_type_instruction.golden.csv | 2 - ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 0 ...stack_allocation_by_instruction.golden.csv | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 2 - ....heap_allocation_by_instruction.golden.csv | 2 - ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 2 - ..._allocation_by_type_instruction.golden.csv | 2 - ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 0 ...stack_allocation_by_instruction.golden.csv | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 6 - ...stack_allocation_by_instruction.golden.csv | 6 - ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 2 - ....heap_allocation_by_instruction.golden.csv | 2 - ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 2 - ..._allocation_by_type_instruction.golden.csv | 2 - ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 0 ...stack_allocation_by_instruction.golden.csv | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 2 - ....heap_allocation_by_instruction.golden.csv | 2 - ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 2 - ..._allocation_by_type_instruction.golden.csv | 2 - ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 0 ...stack_allocation_by_instruction.golden.csv | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 0 ....heap_allocation_by_instruction.golden.csv | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 0 ....heap_allocation_by_instruction.golden.csv | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 4 - ...stack_allocation_by_instruction.golden.csv | 4 - ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 0 ....heap_allocation_by_instruction.golden.csv | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 0 ...stack_allocation_by_instruction.golden.csv | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 0 ....heap_allocation_by_instruction.golden.csv | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 0 ...stack_allocation_by_instruction.golden.csv | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 1 - ....heap_allocation_by_instruction.golden.csv | 1 - ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 2 - ..._allocation_by_type_instruction.golden.csv | 2 - ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 10 - ...stack_allocation_by_instruction.golden.csv | 10 - ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 1 - ....heap_allocation_by_instruction.golden.csv | 1 - ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 4 - ..._allocation_by_type_instruction.golden.csv | 4 - ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 2 - ...stack_allocation_by_instruction.golden.csv | 2 - ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 1 - ..._allocation_by_type_instruction.golden.csv | 1 - ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 1 - ....heap_allocation_by_instruction.golden.csv | 1 - ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 1 - ..._allocation_by_type_instruction.golden.csv | 1 - ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 15 - ...stack_allocation_by_instruction.golden.csv | 15 - ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_type_instr.golden.csv} | 0 ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 ...lsite.heap_allocation_by_instr.golden.csv} | 0 ....heap_allocation_by_instruction.actual.csv | 1 - ....heap_allocation_by_instruction.golden.csv | 1 - ....heap_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 1 - ..._allocation_by_type_instruction.golden.csv | 1 - ...site.stack_allocation_by_instr.golden.csv} | 0 ...stack_allocation_by_instruction.actual.csv | 3 - ...stack_allocation_by_instruction.golden.csv | 3 - ...stack_allocation_by_type_instr.golden.csv} | 0 ..._allocation_by_type_instruction.actual.csv | 0 ..._allocation_by_type_instruction.golden.csv | 0 test/pointer_analysis_test.py | 8 +- 544 files changed, 5375 insertions(+), 6091 deletions(-) create mode 100644 datalog/schema/add-instr.dl delete mode 100644 datalog/schema/add-instruction.dl create mode 100644 datalog/schema/alloca-instr.dl delete mode 100644 datalog/schema/alloca-instruction.dl create mode 100644 datalog/schema/and-instr.dl delete mode 100644 datalog/schema/and-instruction.dl create mode 100644 datalog/schema/ashr-instr.dl delete mode 100644 datalog/schema/ashr-instruction.dl rename datalog/schema/{atomicrmw-instruction.dl => atomicrmw-instr.dl} (63%) create mode 100644 datalog/schema/bitcast-instr.dl delete mode 100644 datalog/schema/bitcast-instruction.dl create mode 100644 datalog/schema/br-instr.dl delete mode 100644 datalog/schema/br-instruction.dl create mode 100644 datalog/schema/call-instr.dl delete mode 100644 datalog/schema/call-instruction.dl create mode 100644 datalog/schema/cmpxchg-instr.dl delete mode 100644 datalog/schema/cmpxchg-instruction.dl create mode 100644 datalog/schema/extractelement-instr.dl delete mode 100644 datalog/schema/extractelement-instruction.dl create mode 100644 datalog/schema/extractvalue-instr.dl delete mode 100644 datalog/schema/extractvalue-instruction.dl create mode 100644 datalog/schema/fadd-instr.dl delete mode 100644 datalog/schema/fadd-instruction.dl rename datalog/schema/{fcmp-instruction.dl => fcmp-instr.dl} (63%) create mode 100644 datalog/schema/fdiv-instr.dl delete mode 100644 datalog/schema/fdiv-instruction.dl create mode 100644 datalog/schema/fence-instr.dl delete mode 100644 datalog/schema/fence-instruction.dl create mode 100644 datalog/schema/fmul-instr.dl delete mode 100644 datalog/schema/fmul-instruction.dl create mode 100644 datalog/schema/fpext-instr.dl delete mode 100644 datalog/schema/fpext-instruction.dl create mode 100644 datalog/schema/fptosi-instr.dl delete mode 100644 datalog/schema/fptosi-instruction.dl create mode 100644 datalog/schema/fptoui-instr.dl delete mode 100644 datalog/schema/fptoui-instruction.dl create mode 100644 datalog/schema/fptrunc-instr.dl delete mode 100644 datalog/schema/fptrunc-instruction.dl create mode 100644 datalog/schema/frem-instr.dl delete mode 100644 datalog/schema/frem-instruction.dl create mode 100644 datalog/schema/fsub-instr.dl delete mode 100644 datalog/schema/fsub-instruction.dl rename datalog/schema/{getelementptr-instruction.dl => getelementptr-instr.dl} (51%) rename datalog/schema/{icmp-instruction.dl => icmp-instr.dl} (56%) create mode 100644 datalog/schema/indirectbr-instr.dl delete mode 100644 datalog/schema/indirectbr-instruction.dl create mode 100644 datalog/schema/insertelement-instr.dl delete mode 100644 datalog/schema/insertelement-instruction.dl create mode 100644 datalog/schema/insertvalue-instr.dl delete mode 100644 datalog/schema/insertvalue-instruction.dl create mode 100644 datalog/schema/instr.dl delete mode 100644 datalog/schema/instruction.dl create mode 100644 datalog/schema/inttoptr-instr.dl delete mode 100644 datalog/schema/inttoptr-instruction.dl create mode 100644 datalog/schema/invoke-instr.dl delete mode 100644 datalog/schema/invoke-instruction.dl create mode 100644 datalog/schema/landingpad-instr.dl delete mode 100644 datalog/schema/landingpad-instruction.dl create mode 100644 datalog/schema/load-instr.dl delete mode 100644 datalog/schema/load-instruction.dl create mode 100644 datalog/schema/lshr-instr.dl delete mode 100644 datalog/schema/lshr-instruction.dl create mode 100644 datalog/schema/mul-instr.dl delete mode 100644 datalog/schema/mul-instruction.dl create mode 100644 datalog/schema/or-instr.dl delete mode 100644 datalog/schema/or-instruction.dl create mode 100644 datalog/schema/phi-instr.dl delete mode 100644 datalog/schema/phi-instruction.dl create mode 100644 datalog/schema/ptrtoint-instr.dl delete mode 100644 datalog/schema/ptrtoint-instruction.dl create mode 100644 datalog/schema/resume-instr.dl delete mode 100644 datalog/schema/resume-instruction.dl rename datalog/schema/{ret-instruction.dl => ret-instr.dl} (59%) create mode 100644 datalog/schema/sdiv-instr.dl delete mode 100644 datalog/schema/sdiv-instruction.dl create mode 100644 datalog/schema/select-instr.dl delete mode 100644 datalog/schema/select-instruction.dl create mode 100644 datalog/schema/sext-instr.dl delete mode 100644 datalog/schema/sext-instruction.dl create mode 100644 datalog/schema/shl-instr.dl delete mode 100644 datalog/schema/shl-instruction.dl create mode 100644 datalog/schema/shufflevector-instr.dl delete mode 100644 datalog/schema/shufflevector-instruction.dl create mode 100644 datalog/schema/sitofp-instr.dl delete mode 100644 datalog/schema/sitofp-instruction.dl create mode 100644 datalog/schema/srem-instr.dl delete mode 100644 datalog/schema/srem-instruction.dl create mode 100644 datalog/schema/store-instr.dl delete mode 100644 datalog/schema/store-instruction.dl create mode 100644 datalog/schema/sub-instr.dl delete mode 100644 datalog/schema/sub-instruction.dl create mode 100644 datalog/schema/switch-instr.dl delete mode 100644 datalog/schema/switch-instruction.dl create mode 100644 datalog/schema/trunc-instr.dl delete mode 100644 datalog/schema/trunc-instruction.dl create mode 100644 datalog/schema/udiv-instr.dl delete mode 100644 datalog/schema/udiv-instruction.dl create mode 100644 datalog/schema/uitofp-instr.dl delete mode 100644 datalog/schema/uitofp-instruction.dl create mode 100644 datalog/schema/unreachable-instr.dl delete mode 100644 datalog/schema/unreachable-instruction.dl create mode 100644 datalog/schema/urem-instr.dl delete mode 100644 datalog/schema/urem-instruction.dl create mode 100644 datalog/schema/va-arg-instr.dl delete mode 100644 datalog/schema/va-arg-instruction.dl create mode 100644 datalog/schema/xor-instr.dl delete mode 100644 datalog/schema/xor-instruction.dl create mode 100644 datalog/schema/zext-instr.dl delete mode 100644 datalog/schema/zext-instruction.dl rename test/gold/{allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv => allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv => allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv => allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv => allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv => allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv => allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv => allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv => allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv => allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv => allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv => allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv => allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv => cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv => cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv => cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv => cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv => cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv => cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv => cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv => cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv => cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv => cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv => cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv => cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv => cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv => cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv => cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv => cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv => cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv => cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv => cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv => cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv => cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv => cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv => cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv => cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv => functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv => functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv => functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv => functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv => functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv => functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv => functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv => functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv => functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv => functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv => functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv => functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv => functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv => functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv => notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv => notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv => notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv => notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv => notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv => notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv => notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv => notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv => notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv => notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv => notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv => notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv => ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv => ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv => ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv => ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv => ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv => ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv => ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv => ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv => ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv => ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv => ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv => ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv => points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv => points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv => points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv => points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv => points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv => points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv => points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv => points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv => points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv => points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv => points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv => points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv => points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv => points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv => points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv => points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv => points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv => points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv => points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv => points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv => points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv => points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv => points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv => points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv => points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv => points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv => points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv => points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv => points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv => points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv => points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv => points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv => points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv => points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv => points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv => points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv => points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv => points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv => recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv => recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv => recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv => recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv => recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv => recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv => recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv => recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv => recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv => recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv => recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv => recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv => recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv => recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv => type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv => type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv => type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv => type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv => type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv => type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv => type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv => type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv => type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv => type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv => type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv => type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv => virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv => virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv => virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv => virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv => virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv => virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv => virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv} (100%) rename test/gold/{virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv => virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv} (100%) rename test/gold/{virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv => virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv} (100%) rename test/gold/{ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv => virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename test/gold/{virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv => virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv delete mode 100644 test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename test/gold/{virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv => virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename test/gold/{virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv => virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv} (100%) delete mode 100644 test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv delete mode 100644 test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename test/gold/{ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv => virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv} (100%) delete mode 100644 test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv delete mode 100644 test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv diff --git a/FactGenerator/include/InstructionVisitor.hpp b/FactGenerator/include/InstructionVisitor.hpp index bdf06aa..73d9a92 100644 --- a/FactGenerator/include/InstructionVisitor.hpp +++ b/FactGenerator/include/InstructionVisitor.hpp @@ -154,7 +154,7 @@ class cclyzer::InstructionVisitor // default synchScope: crossthread if (instr.getSyncScopeID() == SyncScope::SingleThread) { - gen.writeFact(predicates::instruction::flag, iref, "singlethread"); + gen.writeFact(predicates::instr::flag, iref, "singlethread"); } if (!atomic.empty()) gen.writeFact(P::ordering, iref, atomic); diff --git a/FactGenerator/include/predicates.inc b/FactGenerator/include/predicates.inc index d7866bd..4771cd5 100644 --- a/FactGenerator/include/predicates.inc +++ b/FactGenerator/include/predicates.inc @@ -57,407 +57,407 @@ PREDICATE(func, ret_attr, func_return_attr) PREDICATE(func, param_attr, func_param_attr) GROUP_END(function) -GROUP_BEGIN(instruction) -PREDICATE(instruction, to, instruction_assigns_to) -PREDICATE(instruction, flag, instruction_has_flag) -PREDICATE(instruction, next, next_instruction) -PREDICATE(instruction, bb_entry, _instruction_bb_entry) -PREDICATE(instruction, function, instruction_in_func) -PREDICATE(instruction, pos, instruction_pos) -PREDICATE(instruction, unreachable, unreachable_instruction) -GROUP_END(instruction) +GROUP_BEGIN(instr) +PREDICATE(instr, to, instr_assigns_to) +PREDICATE(instr, flag, instr_flag) +PREDICATE(instr, next, next_instr) +PREDICATE(instr, bb_entry, _instr_bb_entry) +PREDICATE(instr, func, instr_func) +PREDICATE(instr, pos, instr_pos) +PREDICATE(instr, unreachable, unreachable_instr) +GROUP_END(instr) GROUP_BEGIN(add) -PREDICATE(add, instr, add_instruction) -PREDICATE(add, first_operand, add_instruction_first_operand) -PREDICATE(add, second_operand, add_instruction_second_operand) +PREDICATE(add, instr, add_instr) +PREDICATE(add, first_operand, add_instr_first_operand) +PREDICATE(add, second_operand, add_instr_second_operand) GROUP_END(add) GROUP_BEGIN(fadd) -PREDICATE(fadd, instr, fadd_instruction) -PREDICATE(fadd, first_operand, fadd_instruction_first_operand) -PREDICATE(fadd, second_operand, fadd_instruction_second_operand) +PREDICATE(fadd, instr, fadd_instr) +PREDICATE(fadd, first_operand, fadd_instr_first_operand) +PREDICATE(fadd, second_operand, fadd_instr_second_operand) GROUP_END(fadd) GROUP_BEGIN(sub) -PREDICATE(sub, instr, sub_instruction) -PREDICATE(sub, first_operand, sub_instruction_first_operand) -PREDICATE(sub, second_operand, sub_instruction_second_operand) +PREDICATE(sub, instr, sub_instr) +PREDICATE(sub, first_operand, sub_instr_first_operand) +PREDICATE(sub, second_operand, sub_instr_second_operand) GROUP_END(sub) GROUP_BEGIN(fsub) -PREDICATE(fsub, instr, fsub_instruction) -PREDICATE(fsub, first_operand, fsub_instruction_first_operand) -PREDICATE(fsub, second_operand, fsub_instruction_second_operand) +PREDICATE(fsub, instr, fsub_instr) +PREDICATE(fsub, first_operand, fsub_instr_first_operand) +PREDICATE(fsub, second_operand, fsub_instr_second_operand) GROUP_END(fsub) GROUP_BEGIN(mul) -PREDICATE(mul, instr, mul_instruction) -PREDICATE(mul, first_operand, mul_instruction_first_operand) -PREDICATE(mul, second_operand, mul_instruction_second_operand) +PREDICATE(mul, instr, mul_instr) +PREDICATE(mul, first_operand, mul_instr_first_operand) +PREDICATE(mul, second_operand, mul_instr_second_operand) GROUP_END(mul) GROUP_BEGIN(fmul) -PREDICATE(fmul, instr, fmul_instruction) -PREDICATE(fmul, first_operand, fmul_instruction_first_operand) -PREDICATE(fmul, second_operand, fmul_instruction_second_operand) +PREDICATE(fmul, instr, fmul_instr) +PREDICATE(fmul, first_operand, fmul_instr_first_operand) +PREDICATE(fmul, second_operand, fmul_instr_second_operand) GROUP_END(fmul) GROUP_BEGIN(udiv) -PREDICATE(udiv, instr, udiv_instruction) -PREDICATE(udiv, first_operand, udiv_instruction_first_operand) -PREDICATE(udiv, second_operand, udiv_instruction_second_operand) +PREDICATE(udiv, instr, udiv_instr) +PREDICATE(udiv, first_operand, udiv_instr_first_operand) +PREDICATE(udiv, second_operand, udiv_instr_second_operand) GROUP_END(udiv) GROUP_BEGIN(fdiv) -PREDICATE(fdiv, instr, fdiv_instruction) -PREDICATE(fdiv, first_operand, fdiv_instruction_first_operand) -PREDICATE(fdiv, second_operand, fdiv_instruction_second_operand) +PREDICATE(fdiv, instr, fdiv_instr) +PREDICATE(fdiv, first_operand, fdiv_instr_first_operand) +PREDICATE(fdiv, second_operand, fdiv_instr_second_operand) GROUP_END(fdiv) GROUP_BEGIN(sdiv) -PREDICATE(sdiv, instr, sdiv_instruction) -PREDICATE(sdiv, first_operand, sdiv_instruction_first_operand) -PREDICATE(sdiv, second_operand, sdiv_instruction_second_operand) +PREDICATE(sdiv, instr, sdiv_instr) +PREDICATE(sdiv, first_operand, sdiv_instr_first_operand) +PREDICATE(sdiv, second_operand, sdiv_instr_second_operand) GROUP_END(sdiv) GROUP_BEGIN(urem) -PREDICATE(urem, instr, urem_instruction) -PREDICATE(urem, first_operand, urem_instruction_first_operand) -PREDICATE(urem, second_operand, urem_instruction_second_operand) +PREDICATE(urem, instr, urem_instr) +PREDICATE(urem, first_operand, urem_instr_first_operand) +PREDICATE(urem, second_operand, urem_instr_second_operand) GROUP_END(urem) GROUP_BEGIN(srem) -PREDICATE(srem, instr, srem_instruction) -PREDICATE(srem, first_operand, srem_instruction_first_operand) -PREDICATE(srem, second_operand, srem_instruction_second_operand) +PREDICATE(srem, instr, srem_instr) +PREDICATE(srem, first_operand, srem_instr_first_operand) +PREDICATE(srem, second_operand, srem_instr_second_operand) GROUP_END(srem) GROUP_BEGIN(frem) -PREDICATE(frem, instr, frem_instruction) -PREDICATE(frem, first_operand, frem_instruction_first_operand) -PREDICATE(frem, second_operand, frem_instruction_second_operand) +PREDICATE(frem, instr, frem_instr) +PREDICATE(frem, first_operand, frem_instr_first_operand) +PREDICATE(frem, second_operand, frem_instr_second_operand) GROUP_END(frem) -// Bitwise Binary Instructions +// Bitwise Binary Instrs GROUP_BEGIN(shl) -PREDICATE(shl, instr, shl_instruction) -PREDICATE(shl, first_operand, shl_instruction_first_operand) -PREDICATE(shl, second_operand, shl_instruction_second_operand) +PREDICATE(shl, instr, shl_instr) +PREDICATE(shl, first_operand, shl_instr_first_operand) +PREDICATE(shl, second_operand, shl_instr_second_operand) GROUP_END(shl) GROUP_BEGIN(lshr) -PREDICATE(lshr, instr, lshr_instruction) -PREDICATE(lshr, first_operand, lshr_instruction_first_operand) -PREDICATE(lshr, second_operand, lshr_instruction_second_operand) +PREDICATE(lshr, instr, lshr_instr) +PREDICATE(lshr, first_operand, lshr_instr_first_operand) +PREDICATE(lshr, second_operand, lshr_instr_second_operand) GROUP_END(lshr) GROUP_BEGIN(ashr) -PREDICATE(ashr, instr, ashr_instruction) -PREDICATE(ashr, first_operand, ashr_instruction_first_operand) -PREDICATE(ashr, second_operand, ashr_instruction_second_operand) +PREDICATE(ashr, instr, ashr_instr) +PREDICATE(ashr, first_operand, ashr_instr_first_operand) +PREDICATE(ashr, second_operand, ashr_instr_second_operand) GROUP_END(ashr) GROUP_BEGIN(and_) -PREDICATE(and_, instr, and_instruction) -PREDICATE(and_, first_operand, and_instruction_first_operand) -PREDICATE(and_, second_operand, and_instruction_second_operand) +PREDICATE(and_, instr, and_instr) +PREDICATE(and_, first_operand, and_instr_first_operand) +PREDICATE(and_, second_operand, and_instr_second_operand) GROUP_END(and_) GROUP_BEGIN(or_) -PREDICATE(or_, instr, or_instruction) -PREDICATE(or_, first_operand, or_instruction_first_operand) -PREDICATE(or_, second_operand, or_instruction_second_operand) +PREDICATE(or_, instr, or_instr) +PREDICATE(or_, first_operand, or_instr_first_operand) +PREDICATE(or_, second_operand, or_instr_second_operand) GROUP_END(or_) GROUP_BEGIN(xor_) -PREDICATE(xor_, instr, xor_instruction) -PREDICATE(xor_, first_operand, xor_instruction_first_operand) -PREDICATE(xor_, second_operand, xor_instruction_second_operand) +PREDICATE(xor_, instr, xor_instr) +PREDICATE(xor_, first_operand, xor_instr_first_operand) +PREDICATE(xor_, second_operand, xor_instr_second_operand) GROUP_END(xor_) -// Terminator Instructions +// Terminator Instrs GROUP_BEGIN(ret) -PREDICATE(ret, instr, ret_instruction) -PREDICATE(ret, instr_void, void_ret_instruction) -PREDICATE(ret, operand, ret_instruction_value) +PREDICATE(ret, instr, ret_instr) +PREDICATE(ret, instr_void, void_ret_instr) +PREDICATE(ret, operand, ret_instr_value) GROUP_END(ret) GROUP_BEGIN(br) -PREDICATE(br, instr, br_instruction) -PREDICATE(br, instr_cond, br_cond_instruction) -PREDICATE(br, condition, br_cond_instruction_condition) -PREDICATE(br, cond_iftrue, br_cond_instruction_iftrue_label) -PREDICATE(br, cond_iffalse, br_cond_instruction_iffalse_label) -PREDICATE(br, instr_uncond, br_uncond_instruction) -PREDICATE(br, uncond_dest, br_uncond_instruction_dest_label) +PREDICATE(br, instr, br_instr) +PREDICATE(br, instr_cond, br_cond_instr) +PREDICATE(br, condition, br_cond_instr_condition) +PREDICATE(br, cond_iftrue, br_cond_instr_iftrue_label) +PREDICATE(br, cond_iffalse, br_cond_instr_iffalse_label) +PREDICATE(br, instr_uncond, br_uncond_instr) +PREDICATE(br, uncond_dest, br_uncond_instr_dest_label) GROUP_END(br) GROUP_BEGIN(switch_) -PREDICATE(switch_, instr, switch_instruction) -PREDICATE(switch_, operand, switch_instruction_operand) -PREDICATE(switch_, default_label, switch_instruction_default_label) -PREDICATE(switch_, case_value, _switch_instruction_case_value) -PREDICATE(switch_, case_label, _switch_instruction_case_label) -PREDICATE(switch_, ncases, switch_instruction_ncases) +PREDICATE(switch_, instr, switch_instr) +PREDICATE(switch_, operand, switch_instr_operand) +PREDICATE(switch_, default_label, switch_instr_default_label) +PREDICATE(switch_, case_value, _switch_instr_case_value) +PREDICATE(switch_, case_label, _switch_instr_case_label) +PREDICATE(switch_, ncases, switch_instr_ncases) GROUP_END(switch_) GROUP_BEGIN(indirectbr) -PREDICATE(indirectbr, instr, indirectbr_instruction) -PREDICATE(indirectbr, address, indirectbr_instruction_address) -PREDICATE(indirectbr, label, indirectbr_instruction_label) -PREDICATE(indirectbr, nlabels, indirectbr_instruction_nlabels) +PREDICATE(indirectbr, instr, indirectbr_instr) +PREDICATE(indirectbr, address, indirectbr_instr_address) +PREDICATE(indirectbr, label, indirectbr_instr_label) +PREDICATE(indirectbr, nlabels, indirectbr_instr_nlabels) GROUP_END(indirectbr) GROUP_BEGIN(resume) -PREDICATE(resume, instr, resume_instruction) -PREDICATE(resume, operand, resume_instruction_operand) +PREDICATE(resume, instr, resume_instr) +PREDICATE(resume, operand, resume_instr_operand) GROUP_END(resume) GROUP_BEGIN(invoke) -PREDICATE(invoke, instr, invoke_instruction) -PREDICATE(invoke, instr_direct, direct_invoke_instruction) -PREDICATE(invoke, instr_indirect, indirect_invoke_instruction) -PREDICATE(invoke, function, invoke_instruction_fn_operand) -PREDICATE(invoke, arg, invoke_instruction_arg) -PREDICATE(invoke, calling_conv, invoke_instruction_with_calling_convention) -PREDICATE(invoke, ret_attr, invoke_instruction_with_return_attr) -PREDICATE(invoke, param_attr, invoke_instruction_with_param_attr) -PREDICATE(invoke, fn_attr, invoke_instruction_with_fn_attr) -PREDICATE(invoke, normal_label, invoke_instruction_normal_label) -PREDICATE(invoke, exc_label, invoke_instruction_exception_label) +PREDICATE(invoke, instr, invoke_instr) +PREDICATE(invoke, instr_direct, direct_invoke_instr) +PREDICATE(invoke, instr_indirect, indirect_invoke_instr) +PREDICATE(invoke, function, invoke_instr_fn_operand) +PREDICATE(invoke, arg, invoke_instr_arg) +PREDICATE(invoke, calling_conv, invoke_instr_with_calling_convention) +PREDICATE(invoke, ret_attr, invoke_instr_with_return_attr) +PREDICATE(invoke, param_attr, invoke_instr_with_param_attr) +PREDICATE(invoke, fn_attr, invoke_instr_with_fn_attr) +PREDICATE(invoke, normal_label, invoke_instr_normal_label) +PREDICATE(invoke, exc_label, invoke_instr_exception_label) GROUP_END(invoke) // Vector Operations GROUP_BEGIN(extract_element) -PREDICATE(extract_element, instr, extractelement_instruction) -PREDICATE(extract_element, base, extractelement_instruction_base) -PREDICATE(extract_element, index, extractelement_instruction_index) +PREDICATE(extract_element, instr, extractelement_instr) +PREDICATE(extract_element, base, extractelement_instr_base) +PREDICATE(extract_element, index, extractelement_instr_index) GROUP_END(extract_element) GROUP_BEGIN(insert_element) -PREDICATE(insert_element, instr, insertelement_instruction) -PREDICATE(insert_element, base, insertelement_instruction_base) -PREDICATE(insert_element, index, insertelement_instruction_index) -PREDICATE(insert_element, value, insertelement_instruction_value) +PREDICATE(insert_element, instr, insertelement_instr) +PREDICATE(insert_element, base, insertelement_instr_base) +PREDICATE(insert_element, index, insertelement_instr_index) +PREDICATE(insert_element, value, insertelement_instr_value) GROUP_END(insert_element) GROUP_BEGIN(shuffle_vector) -PREDICATE(shuffle_vector, instr, shufflevector_instruction) -PREDICATE(shuffle_vector, first_vector, shufflevector_instruction_first_vector) -PREDICATE(shuffle_vector, second_vector, shufflevector_instruction_second_vector) -PREDICATE(shuffle_vector, mask, shufflevector_instruction_mask) +PREDICATE(shuffle_vector, instr, shufflevector_instr) +PREDICATE(shuffle_vector, first_vector, shufflevector_instr_first_vector) +PREDICATE(shuffle_vector, second_vector, shufflevector_instr_second_vector) +PREDICATE(shuffle_vector, mask, shufflevector_instr_mask) GROUP_END(shuffle_vector) // Aggregate Operations GROUP_BEGIN(extract_value) -PREDICATE(extract_value, instr, extractvalue_instruction) -PREDICATE(extract_value, base, extractvalue_instruction_base) -PREDICATE(extract_value, index, extractvalue_instruction_index) -PREDICATE(extract_value, nindices, extractvalue_instruction_nindices) +PREDICATE(extract_value, instr, extractvalue_instr) +PREDICATE(extract_value, base, extractvalue_instr_base) +PREDICATE(extract_value, index, extractvalue_instr_index) +PREDICATE(extract_value, nindices, extractvalue_instr_nindices) GROUP_END(extract_value) GROUP_BEGIN(insert_value) -PREDICATE(insert_value, instr, insertvalue_instruction) -PREDICATE(insert_value, base, insertvalue_instruction_base) -PREDICATE(insert_value, value, insertvalue_instruction_value) -PREDICATE(insert_value, index, insertvalue_instruction_index) -PREDICATE(insert_value, nindices, insertvalue_instruction_nindices) +PREDICATE(insert_value, instr, insertvalue_instr) +PREDICATE(insert_value, base, insertvalue_instr_base) +PREDICATE(insert_value, value, insertvalue_instr_value) +PREDICATE(insert_value, index, insertvalue_instr_index) +PREDICATE(insert_value, nindices, insertvalue_instr_nindices) GROUP_END(insert_value) // Memory Operations GROUP_BEGIN(alloca) -PREDICATE(alloca, instr, alloca_instruction) -PREDICATE(alloca, size, alloca_instruction_size) -PREDICATE(alloca, alignment, alloca_instruction_alignment) -PREDICATE(alloca, type, alloca_instruction_type) +PREDICATE(alloca, instr, alloca_instr) +PREDICATE(alloca, size, alloca_instr_size) +PREDICATE(alloca, alignment, alloca_instr_alignment) +PREDICATE(alloca, type, alloca_instr_type) GROUP_END(alloca) GROUP_BEGIN(load) -PREDICATE(load, instr, load_instruction) -PREDICATE(load, alignment, load_instruction_alignment) -PREDICATE(load, ordering, load_instruction_ordering) -PREDICATE(load, address, load_instruction_address) -PREDICATE(load, isvolatile, load_instruction_is_volatile) +PREDICATE(load, instr, load_instr) +PREDICATE(load, alignment, load_instr_alignment) +PREDICATE(load, ordering, load_instr_ordering) +PREDICATE(load, address, load_instr_address) +PREDICATE(load, isvolatile, load_instr_is_volatile) GROUP_END(load) GROUP_BEGIN(store) -PREDICATE(store, instr, store_instruction) -PREDICATE(store, alignment, store_instruction_alignment) -PREDICATE(store, ordering, store_instruction_ordering) -PREDICATE(store, value, store_instruction_value) -PREDICATE(store, address, store_instruction_address) -PREDICATE(store, isvolatile, store_instruction_is_volatile) +PREDICATE(store, instr, store_instr) +PREDICATE(store, alignment, store_instr_alignment) +PREDICATE(store, ordering, store_instr_ordering) +PREDICATE(store, value, store_instr_value) +PREDICATE(store, address, store_instr_address) +PREDICATE(store, isvolatile, store_instr_is_volatile) GROUP_END(store) GROUP_BEGIN(fence) -PREDICATE(fence, instr, fence_instruction) -PREDICATE(fence, ordering, fence_instruction_ordering) +PREDICATE(fence, instr, fence_instr) +PREDICATE(fence, ordering, fence_instr_ordering) GROUP_END(fence) GROUP_BEGIN(atomicrmw) -PREDICATE(atomicrmw, instr, atomicrmw_instruction) -PREDICATE(atomicrmw, ordering, atomicrmw_instruction_ordering) -PREDICATE(atomicrmw, operation, atomicrmw_instruction_operation) -PREDICATE(atomicrmw, address, atomicrmw_instruction_address) -PREDICATE(atomicrmw, value, atomicrmw_instruction_value) -PREDICATE(atomicrmw, isvolatile, atomicrmw_instruction_is_volatile) +PREDICATE(atomicrmw, instr, atomicrmw_instr) +PREDICATE(atomicrmw, ordering, atomicrmw_instr_ordering) +PREDICATE(atomicrmw, operation, atomicrmw_instr_operation) +PREDICATE(atomicrmw, address, atomicrmw_instr_address) +PREDICATE(atomicrmw, value, atomicrmw_instr_value) +PREDICATE(atomicrmw, isvolatile, atomicrmw_instr_is_volatile) GROUP_END(atomicrmw) GROUP_BEGIN(cmpxchg) -PREDICATE(cmpxchg, instr, cmpxchg_instruction) -PREDICATE(cmpxchg, ordering, cmpxchg_instruction_ordering) -PREDICATE(cmpxchg, address, cmpxchg_instruction_address) -PREDICATE(cmpxchg, cmp_value, cmpxchg_instruction_cmp_value) -PREDICATE(cmpxchg, new_value, cmpxchg_instruction_new_value) -PREDICATE(cmpxchg, type, cmpxchg_instruction_type) -PREDICATE(cmpxchg, isvolatile, cmpxchg_instruction_is_volatile) +PREDICATE(cmpxchg, instr, cmpxchg_instr) +PREDICATE(cmpxchg, ordering, cmpxchg_instr_ordering) +PREDICATE(cmpxchg, address, cmpxchg_instr_address) +PREDICATE(cmpxchg, cmp_value, cmpxchg_instr_cmp_value) +PREDICATE(cmpxchg, new_value, cmpxchg_instr_new_value) +PREDICATE(cmpxchg, type, cmpxchg_instr_type) +PREDICATE(cmpxchg, isvolatile, cmpxchg_instr_is_volatile) GROUP_END(cmpxchg) GROUP_BEGIN(gep) -PREDICATE(gep, instr, getelementptr_instruction) -PREDICATE(gep, base, getelementptr_instruction_base) -PREDICATE(gep, index, getelementptr_instruction_index) -PREDICATE(gep, nindices, getelementptr_instruction_nindices) -PREDICATE(gep, inbounds, getelementptr_instruction_is_inbounds) +PREDICATE(gep, instr, getelementptr_instr) +PREDICATE(gep, base, getelementptr_instr_base) +PREDICATE(gep, index, getelementptr_instr_index) +PREDICATE(gep, nindices, getelementptr_instr_nindices) +PREDICATE(gep, inbounds, getelementptr_instr_is_inbounds) GROUP_END(gep) // Conversion Operations GROUP_BEGIN(trunc) -PREDICATE(trunc, instr, trunc_instruction) -PREDICATE(trunc, from_operand, trunc_instruction_from_operand) -PREDICATE(trunc, to_type, trunc_instruction_to_type) +PREDICATE(trunc, instr, trunc_instr) +PREDICATE(trunc, from_operand, trunc_instr_from_operand) +PREDICATE(trunc, to_type, trunc_instr_to_type) GROUP_END(trunc) GROUP_BEGIN(zext) -PREDICATE(zext, instr, zext_instruction) -PREDICATE(zext, from_operand, zext_instruction_from_operand) -PREDICATE(zext, to_type, zext_instruction_to_type) +PREDICATE(zext, instr, zext_instr) +PREDICATE(zext, from_operand, zext_instr_from_operand) +PREDICATE(zext, to_type, zext_instr_to_type) GROUP_END(zext) GROUP_BEGIN(sext) -PREDICATE(sext, instr, sext_instruction) -PREDICATE(sext, from_operand, sext_instruction_from_operand) -PREDICATE(sext, to_type, sext_instruction_to_type) +PREDICATE(sext, instr, sext_instr) +PREDICATE(sext, from_operand, sext_instr_from_operand) +PREDICATE(sext, to_type, sext_instr_to_type) GROUP_END(sext) GROUP_BEGIN(fptrunc) -PREDICATE(fptrunc, instr, fptrunc_instruction) -PREDICATE(fptrunc, from_operand, fptrunc_instruction_from_operand) -PREDICATE(fptrunc, to_type, fptrunc_instruction_to_type) +PREDICATE(fptrunc, instr, fptrunc_instr) +PREDICATE(fptrunc, from_operand, fptrunc_instr_from_operand) +PREDICATE(fptrunc, to_type, fptrunc_instr_to_type) GROUP_END(fptrunc) GROUP_BEGIN(fpext) -PREDICATE(fpext, instr, fpext_instruction) -PREDICATE(fpext, from_operand, fpext_instruction_from_operand) -PREDICATE(fpext, to_type, fpext_instruction_to_type) +PREDICATE(fpext, instr, fpext_instr) +PREDICATE(fpext, from_operand, fpext_instr_from_operand) +PREDICATE(fpext, to_type, fpext_instr_to_type) GROUP_END(fpext) GROUP_BEGIN(fptoui) -PREDICATE(fptoui, instr, fptoui_instruction) -PREDICATE(fptoui, from_operand, fptoui_instruction_from_operand) -PREDICATE(fptoui, to_type, fptoui_instruction_to_type) +PREDICATE(fptoui, instr, fptoui_instr) +PREDICATE(fptoui, from_operand, fptoui_instr_from_operand) +PREDICATE(fptoui, to_type, fptoui_instr_to_type) GROUP_END(fptoui) GROUP_BEGIN(fptosi) -PREDICATE(fptosi, instr, fptosi_instruction) -PREDICATE(fptosi, from_operand, fptosi_instruction_from_operand) -PREDICATE(fptosi, to_type, fptosi_instruction_to_type) +PREDICATE(fptosi, instr, fptosi_instr) +PREDICATE(fptosi, from_operand, fptosi_instr_from_operand) +PREDICATE(fptosi, to_type, fptosi_instr_to_type) GROUP_END(fptosi) GROUP_BEGIN(uitofp) -PREDICATE(uitofp, instr, uitofp_instruction) -PREDICATE(uitofp, from_operand, uitofp_instruction_from_operand) -PREDICATE(uitofp, to_type, uitofp_instruction_to_type) +PREDICATE(uitofp, instr, uitofp_instr) +PREDICATE(uitofp, from_operand, uitofp_instr_from_operand) +PREDICATE(uitofp, to_type, uitofp_instr_to_type) GROUP_END(uitofp) GROUP_BEGIN(sitofp) -PREDICATE(sitofp, instr, sitofp_instruction) -PREDICATE(sitofp, from_operand, sitofp_instruction_from_operand) -PREDICATE(sitofp, to_type, sitofp_instruction_to_type) +PREDICATE(sitofp, instr, sitofp_instr) +PREDICATE(sitofp, from_operand, sitofp_instr_from_operand) +PREDICATE(sitofp, to_type, sitofp_instr_to_type) GROUP_END(sitofp) GROUP_BEGIN(ptrtoint) -PREDICATE(ptrtoint, instr, ptrtoint_instruction) -PREDICATE(ptrtoint, from_operand, ptrtoint_instruction_from_operand) -PREDICATE(ptrtoint, to_type, ptrtoint_instruction_to_type) +PREDICATE(ptrtoint, instr, ptrtoint_instr) +PREDICATE(ptrtoint, from_operand, ptrtoint_instr_from_operand) +PREDICATE(ptrtoint, to_type, ptrtoint_instr_to_type) GROUP_END(ptrtoint) GROUP_BEGIN(inttoptr) -PREDICATE(inttoptr, instr, inttoptr_instruction) -PREDICATE(inttoptr, from_operand, inttoptr_instruction_from_operand) -PREDICATE(inttoptr, to_type, inttoptr_instruction_to_type) +PREDICATE(inttoptr, instr, inttoptr_instr) +PREDICATE(inttoptr, from_operand, inttoptr_instr_from_operand) +PREDICATE(inttoptr, to_type, inttoptr_instr_to_type) GROUP_END(inttoptr) GROUP_BEGIN(bitcast) -PREDICATE(bitcast, instr, bitcast_instruction) -PREDICATE(bitcast, from_operand, bitcast_instruction_from_operand) -PREDICATE(bitcast, to_type, bitcast_instruction_to_type) +PREDICATE(bitcast, instr, bitcast_instr) +PREDICATE(bitcast, from_operand, bitcast_instr_from_operand) +PREDICATE(bitcast, to_type, bitcast_instr_to_type) GROUP_END(bitcast) // Other Operations GROUP_BEGIN(icmp) -PREDICATE(icmp, instr, icmp_instruction) -PREDICATE(icmp, condition, icmp_instruction_condition) -PREDICATE(icmp, first_operand, icmp_instruction_first_operand) -PREDICATE(icmp, second_operand, icmp_instruction_second_operand) +PREDICATE(icmp, instr, icmp_instr) +PREDICATE(icmp, condition, icmp_instr_condition) +PREDICATE(icmp, first_operand, icmp_instr_first_operand) +PREDICATE(icmp, second_operand, icmp_instr_second_operand) GROUP_END(icmp) GROUP_BEGIN(fcmp) -PREDICATE(fcmp, instr, fcmp_instruction) -PREDICATE(fcmp, condition, fcmp_instruction_condition) -PREDICATE(fcmp, first_operand, fcmp_instruction_first_operand) -PREDICATE(fcmp, second_operand, fcmp_instruction_second_operand) +PREDICATE(fcmp, instr, fcmp_instr) +PREDICATE(fcmp, condition, fcmp_instr_condition) +PREDICATE(fcmp, first_operand, fcmp_instr_first_operand) +PREDICATE(fcmp, second_operand, fcmp_instr_second_operand) GROUP_END(fcmp) GROUP_BEGIN(phi) -PREDICATE(phi, instr, phi_instruction) -PREDICATE(phi, type, phi_instruction_type) -PREDICATE(phi, pair_value, _phi_instruction_pair_value) -PREDICATE(phi, pair_label, _phi_instruction_pair_label) -PREDICATE(phi, npairs, phi_instruction_npairs) +PREDICATE(phi, instr, phi_instr) +PREDICATE(phi, type, phi_instr_type) +PREDICATE(phi, pair_value, _phi_instr_pair_value) +PREDICATE(phi, pair_label, _phi_instr_pair_label) +PREDICATE(phi, npairs, phi_instr_npairs) GROUP_END(phi) GROUP_BEGIN(select) -PREDICATE(select, instr, select_instruction) -PREDICATE(select, condition, select_instruction_condition) -PREDICATE(select, first_operand, select_instruction_first_operand) -PREDICATE(select, second_operand, select_instruction_second_operand) +PREDICATE(select, instr, select_instr) +PREDICATE(select, condition, select_instr_condition) +PREDICATE(select, first_operand, select_instr_first_operand) +PREDICATE(select, second_operand, select_instr_second_operand) GROUP_END(select) GROUP_BEGIN(va_arg) -PREDICATE(va_arg, instr, va_arg_instruction) -PREDICATE(va_arg, va_list, va_arg_instruction_va_list) -PREDICATE(va_arg, type, va_arg_instruction_type) +PREDICATE(va_arg, instr, va_arg_instr) +PREDICATE(va_arg, va_list, va_arg_instr_va_list) +PREDICATE(va_arg, type, va_arg_instr_type) GROUP_END(va_arg) GROUP_BEGIN(call) -PREDICATE(call, instr, call_instruction) -PREDICATE(call, instr_direct, direct_call_instruction) -PREDICATE(call, instr_indirect, indirect_call_instruction) -PREDICATE(call, function, call_instruction_fn_operand) -PREDICATE(call, arg, call_instruction_arg) -PREDICATE(call, calling_conv, call_instruction_with_calling_convention) -PREDICATE(call, ret_attr, call_instruction_with_return_attr) -PREDICATE(call, param_attr, call_instruction_with_param_attr) -PREDICATE(call, fn_attr, call_instruction_with_fn_attr) -PREDICATE(call, tail, call_instruction_is_tail_opt) +PREDICATE(call, instr, call_instr) +PREDICATE(call, instr_direct, direct_call_instr) +PREDICATE(call, instr_indirect, indirect_call_instr) +PREDICATE(call, function, call_instr_fn_operand) +PREDICATE(call, arg, call_instr_arg) +PREDICATE(call, calling_conv, call_instr_with_calling_convention) +PREDICATE(call, ret_attr, call_instr_with_return_attr) +PREDICATE(call, param_attr, call_instr_with_param_attr) +PREDICATE(call, fn_attr, call_instr_with_fn_attr) +PREDICATE(call, tail, call_instr_is_tail_opt) GROUP_END(call) GROUP_BEGIN(landingpad) -PREDICATE(landingpad, instr, landingpad_instruction) -PREDICATE(landingpad, type, landingpad_instruction_type) -PREDICATE(landingpad, catch_clause, _landingpad_instruction_catch_clause) -PREDICATE(landingpad, filter_clause, _landingpad_instruction_filter_clause) -PREDICATE(landingpad, nclauses, landingpad_instruction_nclauses) -PREDICATE(landingpad, cleanup, landingpad_instruction_is_cleanup) +PREDICATE(landingpad, instr, landingpad_instr) +PREDICATE(landingpad, type, landingpad_instr_type) +PREDICATE(landingpad, catch_clause, _landingpad_instr_catch_clause) +PREDICATE(landingpad, filter_clause, _landingpad_instr_filter_clause) +PREDICATE(landingpad, nclauses, landingpad_instr_nclauses) +PREDICATE(landingpad, cleanup, landingpad_instr_is_cleanup) GROUP_END(landingpad) // Types diff --git a/FactGenerator/src/FactGenerator.cpp b/FactGenerator/src/FactGenerator.cpp index 395dc9b..6814cc3 100644 --- a/FactGenerator/src/FactGenerator.cpp +++ b/FactGenerator/src/FactGenerator.cpp @@ -157,7 +157,7 @@ auto FactGenerator::processModule( if (!instr.getType()->isVoidTy()) { refmode_t targetVar = refmode(instr); - writeFact(pred::instruction::to, iref, targetVar); + writeFact(pred::instr::to, iref, targetVar); recordVariable(targetVar, instr.getType()); // Save variables for the CPG @@ -166,19 +166,19 @@ auto FactGenerator::processModule( } // Record successor instruction - if (prev_instr) writeFact(pred::instruction::next, prev_iref, iref); + if (prev_instr) writeFact(pred::instr::next, prev_iref, iref); // Store the refmode of this instruction for next iteration prev_iref = iref; prev_instr = &instr; // Record instruction's container function - writeFact(pred::instruction::function, iref, funcref); + writeFact(pred::instr::func, iref, funcref); // Record instruction's basic block entry (label) const llvm::BasicBlock *bbEntry = instr.getParent(); refmode_t bbEntryId = refmode(*bbEntry); - writeFact(pred::instruction::bb_entry, iref, bbEntryId); + writeFact(pred::instr::bb_entry, iref, bbEntryId); // Visit instruction IV.visit(const_cast(instr)); @@ -193,7 +193,7 @@ auto FactGenerator::processModule( unsigned line = location.getLine(); unsigned column = location.getCol(); - writeFact(pred::instruction::pos, iref, line, column); + writeFact(pred::instr::pos, iref, line, column); } } diff --git a/FactGenerator/src/InstructionVisitor.cpp b/FactGenerator/src/InstructionVisitor.cpp index 7133c3e..583bd01 100644 --- a/FactGenerator/src/InstructionVisitor.cpp +++ b/FactGenerator/src/InstructionVisitor.cpp @@ -320,7 +320,7 @@ void InstructionVisitor::visitResumeInst(const llvm::ResumeInst &RI) { } void InstructionVisitor::visitUnreachableInst(const llvm::UnreachableInst &I) { - recordInstruction(pred::instruction::unreachable, I); + recordInstruction(pred::instr::unreachable, I); } void InstructionVisitor::visitAllocaInst(const llvm::AllocaInst &AI) { @@ -410,7 +410,7 @@ void InstructionVisitor::visitAtomicCmpXchgInst( #else if (AXI.getSyncScopeID() == llvm::SyncScope::SingleThread) { #endif - gen.writeFact(pred::instruction::flag, iref, "singlethread"); + gen.writeFact(pred::instr::flag, iref, "singlethread"); } if (!successOrdStr.empty()) @@ -786,39 +786,34 @@ void InstructionVisitor::writeOptimizationInfo( #else if (fpo->hasUnsafeAlgebra()) { #endif - gen.writeFact(pred::instruction::flag, iref, "fast"); + gen.writeFact(pred::instr::flag, iref, "fast"); } else { - if (fpo->hasNoNaNs()) - gen.writeFact(pred::instruction::flag, iref, "nnan"); + if (fpo->hasNoNaNs()) gen.writeFact(pred::instr::flag, iref, "nnan"); - if (fpo->hasNoInfs()) - gen.writeFact(pred::instruction::flag, iref, "ninf"); + if (fpo->hasNoInfs()) gen.writeFact(pred::instr::flag, iref, "ninf"); if (fpo->hasNoSignedZeros()) - gen.writeFact(pred::instruction::flag, iref, "nsz"); + gen.writeFact(pred::instr::flag, iref, "nsz"); if (fpo->hasAllowReciprocal()) - gen.writeFact(pred::instruction::flag, iref, "arcp"); + gen.writeFact(pred::instr::flag, iref, "arcp"); #if LLVM_VERSION_MAJOR > 4 // new FPO fields if (fpo->hasAllowContract()) - gen.writeFact(pred::instruction::flag, iref, "acon"); + gen.writeFact(pred::instr::flag, iref, "acon"); #endif #if LLVM_VERSION_MAJOR > 5 // new FPO fields - if (fpo->hasApproxFunc()) - gen.writeFact(pred::instruction::flag, iref, "apfn"); + if (fpo->hasApproxFunc()) gen.writeFact(pred::instr::flag, iref, "apfn"); #endif } } if (const auto *obo = dyn_cast(u)) { - if (obo->hasNoUnsignedWrap()) - gen.writeFact(pred::instruction::flag, iref, "nuw"); + if (obo->hasNoUnsignedWrap()) gen.writeFact(pred::instr::flag, iref, "nuw"); - if (obo->hasNoSignedWrap()) - gen.writeFact(pred::instruction::flag, iref, "nsw"); + if (obo->hasNoSignedWrap()) gen.writeFact(pred::instr::flag, iref, "nsw"); } else if (const auto *div = dyn_cast(u)) { - if (div->isExact()) gen.writeFact(pred::instruction::flag, iref, "exact"); + if (div->isExact()) gen.writeFact(pred::instr::flag, iref, "exact"); } } diff --git a/PAInterface.cpp b/PAInterface.cpp index c3c0f30..23c9b9a 100644 --- a/PAInterface.cpp +++ b/PAInterface.cpp @@ -83,9 +83,9 @@ constexpr static char const* assertion_relations[] = { "debuginfo_invalid_entry", "schema_invalid_alias", "schema_invalid_constant", - "schema_invalid_function", - "schema_invalid_global_variable", - "schema_invalid_instruction", + "schema_invalid_func", + "schema_invalid_global_var", + "schema_invalid_instr", "schema_invalid_type", "user_option_invalid"}; diff --git a/PointerAnalysis.cpp b/PointerAnalysis.cpp index 48bd16d..61b7592 100644 --- a/PointerAnalysis.cpp +++ b/PointerAnalysis.cpp @@ -256,16 +256,16 @@ static auto allocation_size(Analysis which) -> std::string { assert(false && "unreachable"); } -static auto allocation_by_instruction(Analysis which) -> std::string { +static auto allocation_by_instr(Analysis which) -> std::string { switch (which) { case Analysis::DEBUG: [[fallthrough]]; case Analysis::SUBSET_AND_UNIFICATION: [[fallthrough]]; case Analysis::SUBSET: - return "subset_lift.allocation_by_instruction_ctx"; + return "subset_lift.allocation_by_instr_ctx"; case Analysis::UNIFICATION: - return "unification_lift.allocation_by_instruction_ctx"; + return "unification_lift.allocation_by_instr_ctx"; } assert(false && "unreachable"); } @@ -373,7 +373,7 @@ auto LegacyPointerAnalysis::runOnModule(llvm::Module &mod) -> bool { const llvm::Value *, int, boost::flyweight>( - allocation_by_instruction(datalog_analysis), llvm_val_map), + allocation_by_instr(datalog_analysis), llvm_val_map), std::move(null_ptr_set), std::move(call_graph)); if (!datalog_debug_option) { diff --git a/datalog/CMakeLists.txt b/datalog/CMakeLists.txt index efde69d..3fbf113 100644 --- a/datalog/CMakeLists.txt +++ b/datalog/CMakeLists.txt @@ -34,75 +34,75 @@ set(DL_SOURCES ${CMAKE_CURRENT_LIST_DIR}/context/drop.dl ${CMAKE_CURRENT_LIST_DIR}/context/lift.dl ${CMAKE_CURRENT_LIST_DIR}/context/interface.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/sitofp-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/extractvalue-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/xor-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/udiv-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/va-arg-instruction.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/sitofp-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/extractvalue-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/xor-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/udiv-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/va-arg-instr.dl ${CMAKE_CURRENT_LIST_DIR}/schema/debug.dl ${CMAKE_CURRENT_LIST_DIR}/schema/func.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/fcmp-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/fdiv-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/select-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/indirectbr-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/srem-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/shufflevector-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/and-instruction.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/fcmp-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/fdiv-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/select-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/indirectbr-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/srem-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/shufflevector-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/and-instr.dl ${CMAKE_CURRENT_LIST_DIR}/schema/calling-convention.dl ${CMAKE_CURRENT_LIST_DIR}/schema/asm.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/sdiv-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/inttoptr-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/store-instruction.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/sdiv-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/inttoptr-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/store-instr.dl ${CMAKE_CURRENT_LIST_DIR}/schema/ordering.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/insertelement-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/icmp-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/shl-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/getelementptr-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/ashr-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/bitcast-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/uitofp-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/mul-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/fence-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/insertvalue-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/unreachable-instruction.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/insertelement-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/icmp-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/shl-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/getelementptr-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/ashr-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/bitcast-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/uitofp-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/mul-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/fence-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/insertvalue-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/unreachable-instr.dl ${CMAKE_CURRENT_LIST_DIR}/schema/activate-sanity.dl ${CMAKE_CURRENT_LIST_DIR}/schema/constants.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/sext-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/alloca-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/add-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/cmpxchg-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/br-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/invoke-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/ptrtoint-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/zext-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/fptoui-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/load-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/fsub-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/extractelement-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/fptosi-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/sub-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/fptrunc-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/phi-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/fmul-instruction.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/sext-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/alloca-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/add-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/cmpxchg-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/br-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/invoke-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/ptrtoint-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/zext-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/fptoui-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/load-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/fsub-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/extractelement-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/fptosi-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/sub-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/fptrunc-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/phi-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/fmul-instr.dl ${CMAKE_CURRENT_LIST_DIR}/schema/basic-block.dl ${CMAKE_CURRENT_LIST_DIR}/schema/global.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/call-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/ret-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/urem-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/fadd-instruction.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/call-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/ret-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/urem-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/fadd-instr.dl ${CMAKE_CURRENT_LIST_DIR}/schema/type.dl ${CMAKE_CURRENT_LIST_DIR}/schema/operand.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/resume-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/frem-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/atomicrmw-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/or-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/trunc-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/switch-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/lshr-instruction.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/fpext-instruction.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/resume-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/frem-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/atomicrmw-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/or-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/trunc-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/switch-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/lshr-instr.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/fpext-instr.dl ${CMAKE_CURRENT_LIST_DIR}/schema/attr.dl - ${CMAKE_CURRENT_LIST_DIR}/schema/landingpad-instruction.dl + ${CMAKE_CURRENT_LIST_DIR}/schema/landingpad-instr.dl ${CMAKE_CURRENT_LIST_DIR}/callgraph/entry-points.dl ${CMAKE_CURRENT_LIST_DIR}/export/auxiliary-records.dl ${CMAKE_CURRENT_LIST_DIR}/export/subset.dl diff --git a/datalog/context/drop.dl b/datalog/context/drop.dl index d60a83e..ac33984 100644 --- a/datalog/context/drop.dl +++ b/datalog/context/drop.dl @@ -28,23 +28,23 @@ num_direct_calls_to_func(?n, ?func) :- func_decl(?func), ?n = count : _instr_calls_func(_, ?func). -.decl call_or_invoke_instruction_fn_type(?instr: Instruction, ?type: Type) -call_or_invoke_instruction_fn_type(?instr, ?fnType) :- - ( call_instruction_fn_type(?instr, ?fnType) - ; invoke_instruction_fn_type(?instr, ?fnType) +.decl call_or_invoke_instr_fn_type(?instr: Instruction, ?type: Type) +call_or_invoke_instr_fn_type(?instr, ?fnType) :- + ( call_instr_fn_type(?instr, ?fnType) + ; invoke_instr_fn_type(?instr, ?fnType) ). -.decl indirect_call_or_invoke_instruction(?instr: Instruction) -indirect_call_or_invoke_instruction(?instr) :- - indirect_call_instruction(?instr); - indirect_invoke_instruction(?instr). +.decl indirect_call_or_invoke_instr(?instr: Instruction) +indirect_call_or_invoke_instr(?instr) :- + indirect_call_instr(?instr); + indirect_invoke_instr(?instr). .decl num_indirect_calls_to_compatible_func(?n: number, ?func: FunctionDecl) num_indirect_calls_to_compatible_func(?n, ?func) :- func_ty(?func, ?targetType), ?n = count : { - indirect_call_or_invoke_instruction(?instr), - call_or_invoke_instruction_fn_type(?instr, ?fnType), + indirect_call_or_invoke_instr(?instr), + call_or_invoke_instr_fn_type(?instr, ?fnType), type_compatible(?fnType, ?targetType) }. @@ -89,8 +89,8 @@ func_type_has_no_pointer_return(?funcType) :- drop_context_by_invoc(?invoc) :- user_option_value("drop_redundant_contexts", "on"), - ( call_instruction_fn_operand(?invoc, ?funcOp) - ; invoke_instruction_fn_operand(?invoc, ?funcOp) + ( call_instr_fn_operand(?invoc, ?funcOp) + ; invoke_instr_fn_operand(?invoc, ?funcOp) ), operand_has_type(?funcOp, ?funcOpType), pointer_type_has_component(?funcOpType, ?declaredType), diff --git a/datalog/context/interface.dl b/datalog/context/interface.dl index af1712b..5f07fdf 100644 --- a/datalog/context/interface.dl +++ b/datalog/context/interface.dl @@ -80,8 +80,8 @@ drop_last(?out, ?in), .decl _reachable_call(?ctx: Context, ?instr: Instruction) _reachable_call(?ctx, ?instr) :- - (call_instruction(?instr); invoke_instruction(?instr)), - instruction_in_func(?instr, ?func), + (call_instr(?instr); invoke_instr(?instr)), + instr_func(?instr, ?func), reachable_context(?ctx, ?func). // Merge is the constructor for new calling contexts. @@ -156,14 +156,14 @@ drop_last(?out, ?in), .decl count_context_items(?instr: Instruction, ?nContextItems: number) count_context_items(?instr, ?nContextItems) :- - (call_instruction(?instr); invoke_instruction(?instr)), + (call_instr(?instr); invoke_instr(?instr)), !drop_context_by_invoc(?instr), !drop_context_item_by_invoc(?instr), ?nContextItems = count : context_item_by_invoc(?instr, _). .decl count_contexts(?instr: Instruction, ?nContexts: number) count_contexts(?instr, ?nContexts) :- - (call_instruction(?instr); invoke_instruction(?instr)), + (call_instr(?instr); invoke_instr(?instr)), !drop_context_by_invoc(?instr), !drop_context_item_by_invoc(?instr), // Have to access internal relation due to inlining @@ -251,8 +251,8 @@ context_item_by_invoc_interim(?invoc, ?ctxItem) :- ; Config = "8-callsite" ; Config = "9-callsite" ), - (call_instruction(?invoc); - invoke_instruction(?invoc)), + (call_instr(?invoc); + invoke_instr(?invoc)), ?ctxItem = ?invoc. context_item_by_invoc_interim(?invoc, ?ctxItem) :- @@ -267,8 +267,8 @@ context_item_by_invoc_interim(?invoc, ?ctxItem) :- ; Config = "8-caller" ; Config = "9-caller" ), - (call_instruction(?invoc); invoke_instruction(?invoc)), - instruction_in_func(?invoc, ?func), + (call_instr(?invoc); invoke_instr(?invoc)), + instr_func(?invoc, ?func), func_name(?func, ?name), ?ctxItem = ?name. diff --git a/datalog/context/lift.dl b/datalog/context/lift.dl index 50768ae..28d2229 100644 --- a/datalog/context/lift.dl +++ b/datalog/context/lift.dl @@ -66,13 +66,13 @@ _allocation_with_context(?aCtx, ?alloc2), alloc_subregion_at_path(?alloc1, _, ?alloc2). - .decl allocation_by_instruction_ctx(?ctx: Context, ?insn: Instruction, ?aCtx: Context, ?alloc: Allocation) + .decl allocation_by_instr_ctx(?ctx: Context, ?insn: Instruction, ?aCtx: Context, ?alloc: Allocation) - allocation_by_instruction_ctx(ctx, insn, actx, alloc) :- + allocation_by_instr_ctx(ctx, insn, actx, alloc) :- reachable_context(ctx, fun), - instruction_in_func(insn, fun), - allocation_by_instruction(insn, alloc), - instruction_assigns_to(insn, var), + instr_func(insn, fun), + allocation_by_instr(insn, alloc), + instr_assigns_to(insn, var), var_points_to(actx, alloc, ctx, var). .decl allocation_size_ctx(?actx: Context, ?alloc: Allocation, ?size: number) diff --git a/datalog/debug.project b/datalog/debug.project index b586009..ab75327 100644 --- a/datalog/debug.project +++ b/datalog/debug.project @@ -31,7 +31,7 @@ .output subset_gep._gep_type_compatible (compress=true) .output subset_gep._gep_last_index_points_to (compress=true) .output subset.type_indication.assign_rebase_alloc (compress=true) -.output subset.type_indication.heap_allocation_by_type_instruction (compress=true) +.output subset.type_indication.heap_allocation_by_type_instr (compress=true) .output subset.type_indication.ty_indication (compress=true) .output subset.type_indication.ty_indication1 (compress=true) .output subset.type_indication.ty_indication2 (compress=true) @@ -56,7 +56,7 @@ .output unification._merge.assert_reachable_calls_have_contexts (compress=true) .output unification._merge.assert_reachable_calls_have_context_items (compress=true) .output unification.type_indication.assign_rebase_alloc (compress=true) -.output unification.type_indication.heap_allocation_by_type_instruction (compress=true) +.output unification.type_indication.heap_allocation_by_type_instr (compress=true) .output unification.type_indication.ty_indication (compress=true) .output unification.type_indication.ty_indication1 (compress=true) .output unification.type_indication.ty_indication2 (compress=true) diff --git a/datalog/export/auxiliary-records.dl b/datalog/export/auxiliary-records.dl index 2d059f9..5b00676 100644 --- a/datalog/export/auxiliary-records.dl +++ b/datalog/export/auxiliary-records.dl @@ -1,21 +1,21 @@ -.decl _phi_instruction_pair(instr:PhiInstruction, index:number, value:Operand, label:Variable) +.decl _phi_instr_pair(instr:PhiInstruction, index:number, value:Operand, label:Variable) -_phi_instruction_pair(Instr, Idx, Value, Label) :- - phi_instruction_pair(Instr, Idx, Pair), +_phi_instr_pair(Instr, Idx, Value, Label) :- + phi_instr_pair(Instr, Idx, Pair), Pair = [Value, Label]. .decl _clause(c:Constant) .decl _catch_clause(c:Constant) .decl _filter_clause(c:Constant) -.decl _landingpad_instruction_clause(instr:LandingPadInstruction, i:number, c:Constant) +.decl _landingpad_instr_clause(instr:LandingPadInstruction, i:number, c:Constant) _clause(Constant) :- clause(Clause), Clause = [Constant]. _catch_clause(Constant) :- catch_clause(Clause), Clause = [Constant]. _filter_clause(Constant) :- filter_clause(Clause), Clause = [Constant]. -_landingpad_instruction_clause(Instr, Idx, Constant) :- - landingpad_instruction_clause(Instr, Idx, Clause), Clause = [Constant]. +_landingpad_instr_clause(Instr, Idx, Constant) :- + landingpad_instr_clause(Instr, Idx, Clause), Clause = [Constant]. -.decl _switch_instruction_case(instr:SwitchInstruction, index:number, c:Constant, label:Variable) +.decl _switch_instr_case(instr:SwitchInstruction, index:number, c:Constant, label:Variable) -_switch_instruction_case(Instr, Idx, Constant, Label) :- - switch_instruction_case(Instr, Idx, Case), Case = [Constant, Label]. +_switch_instr_case(Instr, Idx, Constant, Label) :- + switch_instr_case(Instr, Idx, Case), Case = [Constant, Label]. diff --git a/datalog/export/debug-output-extended.dl b/datalog/export/debug-output-extended.dl index ca5f25d..4d8ee48 100644 --- a/datalog/export/debug-output-extended.dl +++ b/datalog/export/debug-output-extended.dl @@ -2,7 +2,7 @@ .output _aliasee (compress=true) .output _alloc_pt_size (compress=true) .output _alloc_region (compress=true) -.output _assert_every_gep_instruction_points_to_something (compress=true) +.output _assert_every_gep_instr_points_to_something (compress=true) .output _assert_type_compatible_ptr_points_to_alias (compress=true) .output _assert_type_compatible_relaxed (compress=true) .output _assert_type_compatible_relaxed_inner (compress=true) @@ -17,22 +17,22 @@ .output _getelementptr_constant_expression_index_type (compress=true) .output _getelementptr_constant_expression_interm_type (compress=true) .output _getelementptr_constant_expression_value_type (compress=true) +.output _instr_bb_entry (compress=true) .output _instr_calls_func (compress=true) -.output _instruction_bb_entry (compress=true) -.output _landingpad_contains_landingpad_instruction (compress=true) +.output _landingpad_contains_landingpad_instr (compress=true) .output _landingpad_first_nonphi (compress=true) -.output _landingpad_instruction_catch_clause (compress=true) -.output _landingpad_instruction_clause (compress=true) -.output _landingpad_instruction_filter_clause (compress=true) +.output _landingpad_instr_catch_clause (compress=true) +.output _landingpad_instr_clause (compress=true) +.output _landingpad_instr_filter_clause (compress=true) .output _landingpad_starting_phi (compress=true) .output _nvars_by_pt_total (compress=true) -.output _phi_instruction_pair (compress=true) -.output _phi_instruction_pair_label (compress=true) -.output _phi_instruction_pair_value (compress=true) +.output _phi_instr_pair (compress=true) +.output _phi_instr_pair_label (compress=true) +.output _phi_instr_pair_value (compress=true) .output _string_iteration_trick (compress=true) -.output _switch_instruction_case (compress=true) -.output _switch_instruction_case_label (compress=true) -.output _switch_instruction_case_value (compress=true) +.output _switch_instr_case (compress=true) +.output _switch_instr_case_label (compress=true) +.output _switch_instr_case_value (compress=true) .output _type_expands_base_type (compress=true) .output _type_info_by_alloc (compress=true) .output _typed_alloc (compress=true) @@ -47,9 +47,9 @@ .output acq_rel_ordering (compress=true) .output acquire_ordering (compress=true) .output actual_arg (compress=true) -.output add_instruction (compress=true) -.output add_instruction_first_operand (compress=true) -.output add_instruction_second_operand (compress=true) +.output add_instr (compress=true) +.output add_instr_first_operand (compress=true) +.output add_instr_second_operand (compress=true) .output aggregate_type (compress=true) .output alias (compress=true) .output alias_aliasee (compress=true) @@ -61,18 +61,18 @@ .output alloc_context (compress=true) .output alloc_points_to_sizes (compress=true) .output alloc_region (compress=true) -.output alloca_instruction (compress=true) -.output alloca_instruction_alignment (compress=true) -.output alloca_instruction_size (compress=true) -.output alloca_instruction_type (compress=true) +.output alloca_instr (compress=true) +.output alloca_instr_alignment (compress=true) +.output alloca_instr_size (compress=true) +.output alloca_instr_type (compress=true) .output allocation (compress=true) -.output allocation_by_instruction (compress=true) +.output allocation_by_instr (compress=true) .output allocation_pos (compress=true) .output allocation_size (compress=true) .output analyze_pointer_arithmetic (compress=true) -.output and_instruction (compress=true) -.output and_instruction_first_operand (compress=true) -.output and_instruction_second_operand (compress=true) +.output and_instr (compress=true) +.output and_instr_first_operand (compress=true) +.output and_instr_second_operand (compress=true) .output appending_linkage_type (compress=true) .output argv_alloc (compress=true) .output argv_ptr_points_to (compress=true) @@ -88,10 +88,10 @@ .output array_type (compress=true) .output array_type_has_component (compress=true) .output array_type_has_size (compress=true) -.output ashr_instruction (compress=true) -.output ashr_instruction_first_operand (compress=true) -.output ashr_instruction_second_operand (compress=true) -.output asm_call_instruction (compress=true) +.output ashr_instr (compress=true) +.output ashr_instr_first_operand (compress=true) +.output ashr_instr_second_operand (compress=true) +.output asm_call_instr (compress=true) .output assert_alloc_with_ctx_complete (compress=true) .output assert_array_type_size (compress=true) .output assert_basic_or_path (compress=true) @@ -120,7 +120,7 @@ .output assert_unification_var_points_to_unique (compress=true) .output assert_unique_repr (compress=true) .output assert_var_points_to_implies_reachable (compress=true) -.output assign_instruction (compress=true) +.output assign_instr (compress=true) .output atomic_operation (compress=true) .output atomic_operation_add (compress=true) .output atomic_operation_and (compress=true) @@ -134,49 +134,49 @@ .output atomic_operation_umin (compress=true) .output atomic_operation_xchg (compress=true) .output atomic_operation_xor (compress=true) -.output atomicrmw_instruction (compress=true) -.output atomicrmw_instruction_address (compress=true) -.output atomicrmw_instruction_is_volatile (compress=true) -.output atomicrmw_instruction_operation (compress=true) -.output atomicrmw_instruction_ordering (compress=true) -.output atomicrmw_instruction_value (compress=true) +.output atomicrmw_instr (compress=true) +.output atomicrmw_instr_address (compress=true) +.output atomicrmw_instr_is_volatile (compress=true) +.output atomicrmw_instr_operation (compress=true) +.output atomicrmw_instr_ordering (compress=true) +.output atomicrmw_instr_value (compress=true) .output attr (compress=true) .output available_externally_linkage_type (compress=true) .output basic_allocation (compress=true) .output bitcast_constant_expression (compress=true) .output bitcast_constant_expression_from (compress=true) .output bitcast_constant_expression_to_type (compress=true) -.output bitcast_instruction (compress=true) -.output bitcast_instruction_from_operand (compress=true) -.output bitcast_instruction_from_type (compress=true) -.output bitcast_instruction_to_type (compress=true) +.output bitcast_instr (compress=true) +.output bitcast_instr_from_operand (compress=true) +.output bitcast_instr_from_type (compress=true) +.output bitcast_instr_to_type (compress=true) .output block (compress=true) -.output block_first_instruction (compress=true) -.output block_last_instruction (compress=true) +.output block_first_instr (compress=true) +.output block_last_instr (compress=true) .output block_of_label (compress=true) .output block_predecessor (compress=true) .output block_predecessors (compress=true) .output boolean_type (compress=true) .output boolean_vector_type (compress=true) -.output br_cond_instruction (compress=true) -.output br_cond_instruction_condition (compress=true) -.output br_cond_instruction_iffalse_label (compress=true) -.output br_cond_instruction_iftrue_label (compress=true) -.output br_instruction (compress=true) -.output br_uncond_instruction (compress=true) -.output br_uncond_instruction_dest_label (compress=true) -.output call_instruction (compress=true) -.output call_instruction_arg (compress=true) -.output call_instruction_fn_operand (compress=true) -.output call_instruction_fn_target (compress=true) -.output call_instruction_fn_type (compress=true) -.output call_instruction_is_tail_opt (compress=true) -.output call_instruction_return_type (compress=true) -.output call_instruction_with_calling_convention (compress=true) -.output call_instruction_with_fn_attr (compress=true) -.output call_instruction_with_param_attr (compress=true) -.output call_instruction_with_return_attr (compress=true) -.output call_or_invoke_instruction_fn_type (compress=true) +.output br_cond_instr (compress=true) +.output br_cond_instr_condition (compress=true) +.output br_cond_instr_iffalse_label (compress=true) +.output br_cond_instr_iftrue_label (compress=true) +.output br_instr (compress=true) +.output br_uncond_instr (compress=true) +.output br_uncond_instr_dest_label (compress=true) +.output call_instr (compress=true) +.output call_instr_arg (compress=true) +.output call_instr_fn_operand (compress=true) +.output call_instr_fn_target (compress=true) +.output call_instr_fn_type (compress=true) +.output call_instr_is_tail_opt (compress=true) +.output call_instr_return_type (compress=true) +.output call_instr_with_calling_convention (compress=true) +.output call_instr_with_fn_attr (compress=true) +.output call_instr_with_param_attr (compress=true) +.output call_instr_with_return_attr (compress=true) +.output call_or_invoke_instr_fn_type (compress=true) .output called_at_startup (compress=true) .output calling_convention (compress=true) .output catch_clause (compress=true) @@ -187,14 +187,14 @@ .output class_type_typeinfo (compress=true) .output class_type_vtable (compress=true) .output clause (compress=true) -.output cmpxchg_instruction (compress=true) -.output cmpxchg_instruction_address (compress=true) -.output cmpxchg_instruction_cmp_value (compress=true) -.output cmpxchg_instruction_cmp_value_type (compress=true) -.output cmpxchg_instruction_is_volatile (compress=true) -.output cmpxchg_instruction_new_value (compress=true) -.output cmpxchg_instruction_ordering (compress=true) -.output cmpxchg_instruction_type (compress=true) +.output cmpxchg_instr (compress=true) +.output cmpxchg_instr_address (compress=true) +.output cmpxchg_instr_cmp_value (compress=true) +.output cmpxchg_instr_cmp_value_type (compress=true) +.output cmpxchg_instr_is_volatile (compress=true) +.output cmpxchg_instr_new_value (compress=true) +.output cmpxchg_instr_ordering (compress=true) +.output cmpxchg_instr_type (compress=true) .output cold_calling_convention (compress=true) .output common_linkage_type (compress=true) .output constant (compress=true) @@ -231,8 +231,8 @@ .output default_visibility (compress=true) .output derived_type (compress=true) .output destructor_class_type (compress=true) -.output direct_call_instruction (compress=true) -.output direct_invoke_instruction (compress=true) +.output direct_call_instr (compress=true) +.output direct_invoke_instr (compress=true) .output direct_subclass (compress=true) .output direct_superclass (compress=true) .output dllexport_linkage_type (compress=true) @@ -257,21 +257,21 @@ .output extern_weak_linkage_type (compress=true) .output external_linkage_type (compress=true) .output external_typeinfo (compress=true) -.output extractelement_instruction (compress=true) -.output extractelement_instruction_base (compress=true) -.output extractelement_instruction_index (compress=true) -.output extractelement_instruction_type (compress=true) -.output extractvalue_instruction (compress=true) -.output extractvalue_instruction_base (compress=true) -.output extractvalue_instruction_base_type (compress=true) -.output extractvalue_instruction_index (compress=true) -.output extractvalue_instruction_interm_type (compress=true) -.output extractvalue_instruction_nindices (compress=true) -.output extractvalue_instruction_value_type (compress=true) -.output fadd_instruction (compress=true) -.output fadd_instruction_first_operand (compress=true) -.output fadd_instruction_second_operand (compress=true) -.output failing_assert_every_gep_instruction_points_to_something (compress=true) +.output extractelement_instr (compress=true) +.output extractelement_instr_base (compress=true) +.output extractelement_instr_index (compress=true) +.output extractelement_instr_type (compress=true) +.output extractvalue_instr (compress=true) +.output extractvalue_instr_base (compress=true) +.output extractvalue_instr_base_type (compress=true) +.output extractvalue_instr_index (compress=true) +.output extractvalue_instr_nindices (compress=true) +.output extractvalue_instr_value_type (compress=true) +.output extractvalue_instrterm_type (compress=true) +.output fadd_instr (compress=true) +.output fadd_instr_first_operand (compress=true) +.output fadd_instr_second_operand (compress=true) +.output failing_assert_every_gep_instr_points_to_something (compress=true) .output failing_assert_global_allocations_have_sizes (compress=true) .output failing_assert_reachable_pointer_vars_point_to_something (compress=true) .output failing_assert_type_compatible_var_points_to (compress=true) @@ -293,52 +293,53 @@ .output fcmp_condition__ult (compress=true) .output fcmp_condition__une (compress=true) .output fcmp_condition__uno (compress=true) -.output fcmp_instruction (compress=true) -.output fcmp_instruction_condition (compress=true) -.output fcmp_instruction_first_operand (compress=true) -.output fcmp_instruction_from_type (compress=true) -.output fcmp_instruction_second_operand (compress=true) -.output fcmp_instruction_to_type (compress=true) -.output fdiv_instruction (compress=true) -.output fdiv_instruction_first_operand (compress=true) -.output fdiv_instruction_second_operand (compress=true) -.output fence_instruction (compress=true) -.output fence_instruction_ordering (compress=true) +.output fcmp_instr (compress=true) +.output fcmp_instr_condition (compress=true) +.output fcmp_instr_first_operand (compress=true) +.output fcmp_instr_from_type (compress=true) +.output fcmp_instr_second_operand (compress=true) +.output fcmp_instr_to_type (compress=true) +.output fdiv_instr (compress=true) +.output fdiv_instr_first_operand (compress=true) +.output fdiv_instr_second_operand (compress=true) +.output fence_instr (compress=true) +.output fence_instr_ordering (compress=true) .output filter_clause (compress=true) .output flag (compress=true) .output float_type (compress=true) -.output fmul_instruction (compress=true) -.output fmul_instruction_first_operand (compress=true) -.output fmul_instruction_second_operand (compress=true) +.output fmul_instr (compress=true) +.output fmul_instr_first_operand (compress=true) +.output fmul_instr_second_operand (compress=true) .output fp128_type (compress=true) .output fp_constant (compress=true) .output fp_pointer_type (compress=true) .output fp_type (compress=true) .output fp_vector_type (compress=true) -.output fpext_instruction (compress=true) -.output fpext_instruction_from_operand (compress=true) -.output fpext_instruction_from_type (compress=true) -.output fpext_instruction_to_type (compress=true) -.output fptosi_instruction (compress=true) -.output fptosi_instruction_from_operand (compress=true) -.output fptosi_instruction_from_type (compress=true) -.output fptosi_instruction_to_type (compress=true) -.output fptoui_instruction (compress=true) -.output fptoui_instruction_from_operand (compress=true) -.output fptoui_instruction_from_type (compress=true) -.output fptoui_instruction_to_type (compress=true) -.output fptrunc_instruction (compress=true) -.output fptrunc_instruction_from_operand (compress=true) -.output fptrunc_instruction_from_type (compress=true) -.output fptrunc_instruction_to_type (compress=true) -.output frem_instruction (compress=true) -.output frem_instruction_first_operand (compress=true) -.output frem_instruction_second_operand (compress=true) -.output fsub_instruction (compress=true) -.output fsub_instruction_first_operand (compress=true) -.output fsub_instruction_second_operand (compress=true) +.output fpext_instr (compress=true) +.output fpext_instr_from_operand (compress=true) +.output fpext_instr_from_type (compress=true) +.output fpext_instr_to_type (compress=true) +.output fptosi_instr (compress=true) +.output fptosi_instr_from_operand (compress=true) +.output fptosi_instr_from_type (compress=true) +.output fptosi_instr_to_type (compress=true) +.output fptoui_instr (compress=true) +.output fptoui_instr_from_operand (compress=true) +.output fptoui_instr_from_type (compress=true) +.output fptoui_instr_to_type (compress=true) +.output fptrunc_instr (compress=true) +.output fptrunc_instr_from_operand (compress=true) +.output fptrunc_instr_from_type (compress=true) +.output fptrunc_instr_to_type (compress=true) +.output frem_instr (compress=true) +.output frem_instr_first_operand (compress=true) +.output frem_instr_second_operand (compress=true) +.output fsub_instr (compress=true) +.output fsub_instr_first_operand (compress=true) +.output fsub_instr_second_operand (compress=true) .output func (compress=true) .output func_alignment (compress=true) +.output func_attr (compress=true) .output func_attr__alignstack (compress=true) .output func_attr__alwaysinline (compress=true) .output func_attr__argmemonly (compress=true) @@ -375,29 +376,33 @@ .output func_attr__uwtable (compress=true) .output func_by_location (compress=true) .output func_by_value_param (compress=true) +.output func_calling_convention (compress=true) .output func_calls_func (compress=true) .output func_constant (compress=true) .output func_constant_fn_name (compress=true) .output func_decl (compress=true) .output func_decl_to_defn (compress=true) -.output func_linkage_type (compress=true) -.output func_name (compress=true) -.output func_pts_signature (compress=true) -.output func_signature (compress=true) -.output func_type (compress=true) -.output func_visibility (compress=true) .output func_degree (compress=true) -.output func_section (compress=true) +.output func_gc (compress=true) .output func_is_illformed (compress=true) .output func_is_wellformed (compress=true) +.output func_linkage_type (compress=true) .output func_missing_pts_signature (compress=true) +.output func_name (compress=true) .output func_needs_pts_signature (compress=true) .output func_nparams (compress=true) .output func_out_degree (compress=true) .output func_param (compress=true) +.output func_param_attr (compress=true) .output func_param_by_value (compress=true) .output func_param_not_by_value (compress=true) +.output func_pers_fn (compress=true) +.output func_pts_signature (compress=true) +.output func_return_attr (compress=true) .output func_returns_value (compress=true) +.output func_section (compress=true) +.output func_signature (compress=true) +.output func_ty (compress=true) .output func_type (compress=true) .output func_type_has_no_pointer_args (compress=true) .output func_type_has_no_pointer_return (compress=true) @@ -407,13 +412,8 @@ .output func_type_nparams (compress=true) .output func_type_param (compress=true) .output func_type_return (compress=true) -.output func_attr (compress=true) -.output func_calling_convention (compress=true) -.output func_gc (compress=true) -.output func_param_attr (compress=true) -.output func_pers_fn (compress=true) -.output func_return_attr (compress=true) .output func_unnamed_addr (compress=true) +.output func_visibility (compress=true) .output funcs_by_in_degree (compress=true) .output funcs_by_out_degree (compress=true) .output gep_constant_expr_index_offset (compress=true) @@ -425,15 +425,15 @@ .output getelementptr_constant_expression_base (compress=true) .output getelementptr_constant_expression_index (compress=true) .output getelementptr_constant_expression_nindices (compress=true) -.output getelementptr_instruction (compress=true) -.output getelementptr_instruction_base (compress=true) -.output getelementptr_instruction_base_type (compress=true) -.output getelementptr_instruction_index (compress=true) -.output getelementptr_instruction_index_type (compress=true) -.output getelementptr_instruction_interm_type (compress=true) -.output getelementptr_instruction_is_inbounds (compress=true) -.output getelementptr_instruction_nindices (compress=true) -.output getelementptr_instruction_value_type (compress=true) +.output getelementptr_instr (compress=true) +.output getelementptr_instr_base (compress=true) +.output getelementptr_instr_base_type (compress=true) +.output getelementptr_instr_index (compress=true) +.output getelementptr_instr_index_type (compress=true) +.output getelementptr_instr_is_inbounds (compress=true) +.output getelementptr_instr_nindices (compress=true) +.output getelementptr_instr_value_type (compress=true) +.output getelementptr_instrterm_type (compress=true) .output global_allocation (compress=true) .output global_allocation_by_func (compress=true) .output global_allocation_by_name (compress=true) @@ -458,12 +458,12 @@ .output heap_alloc_func (compress=true) .output heap_allocation (compress=true) .output heap_allocation_by_calloc (compress=true) -.output heap_allocation_by_instruction (compress=true) +.output heap_allocation_by_instr (compress=true) .output heap_allocation_by_malloc (compress=true) .output heap_allocation_by_mmap (compress=true) .output heap_allocation_by_new (compress=true) .output heap_allocation_by_realloc (compress=true) -.output heap_allocation_by_type_instruction (compress=true) +.output heap_allocation_by_type_instr (compress=true) .output heap_region (compress=true) .output hidden_visibility (compress=true) .output icmp_condition (compress=true) @@ -477,19 +477,19 @@ .output icmp_condition__ugt (compress=true) .output icmp_condition__ule (compress=true) .output icmp_condition__ult (compress=true) -.output icmp_instruction (compress=true) -.output icmp_instruction_condition (compress=true) -.output icmp_instruction_first_operand (compress=true) -.output icmp_instruction_from_type (compress=true) -.output icmp_instruction_second_operand (compress=true) -.output icmp_instruction_to_type (compress=true) -.output indirect_call_instruction (compress=true) -.output indirect_call_or_invoke_instruction (compress=true) -.output indirect_invoke_instruction (compress=true) -.output indirectbr_instruction (compress=true) -.output indirectbr_instruction_address (compress=true) -.output indirectbr_instruction_label (compress=true) -.output indirectbr_instruction_nlabels (compress=true) +.output icmp_instr (compress=true) +.output icmp_instr_condition (compress=true) +.output icmp_instr_first_operand (compress=true) +.output icmp_instr_from_type (compress=true) +.output icmp_instr_second_operand (compress=true) +.output icmp_instr_to_type (compress=true) +.output indirect_call_instr (compress=true) +.output indirect_call_or_invoke_instr (compress=true) +.output indirect_invoke_instr (compress=true) +.output indirectbr_instr (compress=true) +.output indirectbr_instr_address (compress=true) +.output indirectbr_instr_label (compress=true) +.output indirectbr_instr_nlabels (compress=true) .output initial_exec_threadlocal_mode (compress=true) .output initialized_by_constant (compress=true) .output inline_asm (compress=true) @@ -497,26 +497,26 @@ .output inline_asm_text (compress=true) .output inlined_constructors (compress=true) .output insensitive (compress=true) -.output insertelement_instruction (compress=true) -.output insertelement_instruction_base (compress=true) -.output insertelement_instruction_index (compress=true) -.output insertelement_instruction_type (compress=true) -.output insertelement_instruction_value (compress=true) -.output insertvalue_instruction (compress=true) -.output insertvalue_instruction_base (compress=true) -.output insertvalue_instruction_base_type (compress=true) -.output insertvalue_instruction_index (compress=true) -.output insertvalue_instruction_interm_type (compress=true) -.output insertvalue_instruction_nindices (compress=true) -.output insertvalue_instruction_value (compress=true) -.output insertvalue_instruction_value_type (compress=true) -.output instruction (compress=true) -.output instruction_assigns_to (compress=true) -.output instruction_has_flag (compress=true) -.output instruction_in_block (compress=true) -.output instruction_in_func (compress=true) -.output instruction_pos (compress=true) -.output instruction_returns_type (compress=true) +.output insertelement_instr (compress=true) +.output insertelement_instr_base (compress=true) +.output insertelement_instr_index (compress=true) +.output insertelement_instr_type (compress=true) +.output insertelement_instr_value (compress=true) +.output insertvalue_instr (compress=true) +.output insertvalue_instr_base (compress=true) +.output insertvalue_instr_base_type (compress=true) +.output insertvalue_instr_index (compress=true) +.output insertvalue_instr_nindices (compress=true) +.output insertvalue_instr_value (compress=true) +.output insertvalue_instr_value_type (compress=true) +.output insertvalue_instrterm_type (compress=true) +.output instr (compress=true) +.output instr_assigns_to (compress=true) +.output instr_block (compress=true) +.output instr_flag (compress=true) +.output instr_func (compress=true) +.output instr_pos (compress=true) +.output instr_returns_type (compress=true) .output int1_type (compress=true) .output int32_type (compress=true) .output int32_vector_type (compress=true) @@ -531,47 +531,47 @@ .output internal_linkage_type (compress=true) .output inttoptr_constant_expression (compress=true) .output inttoptr_constant_expression_from (compress=true) -.output inttoptr_instruction (compress=true) -.output inttoptr_instruction_from_operand (compress=true) -.output inttoptr_instruction_from_type (compress=true) -.output inttoptr_instruction_to_type (compress=true) -.output invoke_instruction (compress=true) -.output invoke_instruction_arg (compress=true) -.output invoke_instruction_exception_label (compress=true) -.output invoke_instruction_fn_operand (compress=true) -.output invoke_instruction_fn_target (compress=true) -.output invoke_instruction_fn_type (compress=true) -.output invoke_instruction_normal_label (compress=true) -.output invoke_instruction_return_type (compress=true) -.output invoke_instruction_with_calling_convention (compress=true) -.output invoke_instruction_with_fn_attr (compress=true) -.output invoke_instruction_with_param_attr (compress=true) -.output invoke_instruction_with_return_attr (compress=true) +.output inttoptr_instr (compress=true) +.output inttoptr_instr_from_operand (compress=true) +.output inttoptr_instr_from_type (compress=true) +.output inttoptr_instr_to_type (compress=true) +.output invoke_instr (compress=true) +.output invoke_instr_arg (compress=true) +.output invoke_instr_exception_label (compress=true) +.output invoke_instr_fn_operand (compress=true) +.output invoke_instr_fn_target (compress=true) +.output invoke_instr_fn_type (compress=true) +.output invoke_instr_normal_label (compress=true) +.output invoke_instr_return_type (compress=true) +.output invoke_instr_with_calling_convention (compress=true) +.output invoke_instr_with_fn_attr (compress=true) +.output invoke_instr_with_param_attr (compress=true) +.output invoke_instr_with_return_attr (compress=true) .output label_type (compress=true) .output landingpad (compress=true) -.output landingpad_instruction (compress=true) -.output landingpad_instruction_clause (compress=true) -.output landingpad_instruction_is_cleanup (compress=true) -.output landingpad_instruction_nclauses (compress=true) -.output landingpad_instruction_pers_fn (compress=true) -.output landingpad_instruction_type (compress=true) +.output landingpad_instr (compress=true) +.output landingpad_instr_clause (compress=true) +.output landingpad_instr_is_cleanup (compress=true) +.output landingpad_instr_nclauses (compress=true) +.output landingpad_instr_pers_fn (compress=true) +.output landingpad_instr_type (compress=true) .output linkage_type (compress=true) .output linker_private_linkage_type (compress=true) .output linker_private_weak_linkage_type (compress=true) .output linkonce_linkage_type (compress=true) .output linkonce_odr_linkage_type (compress=true) -.output load_instruction (compress=true) -.output load_instruction_address (compress=true) -.output load_instruction_address_ptr_type (compress=true) -.output load_instruction_alignment (compress=true) -.output load_instruction_is_atomic (compress=true) -.output load_instruction_is_volatile (compress=true) -.output load_instruction_ordering (compress=true) +.output load_instr (compress=true) +.output load_instr_address (compress=true) +.output load_instr_address_ptr_type (compress=true) +.output load_instr_alignment (compress=true) +.output load_instr_is_atomic (compress=true) +.output load_instr_is_volatile (compress=true) +.output load_instr_ordering (compress=true) .output local_dynamic_threadlocal_mode (compress=true) .output local_exec_threadlocal_mode (compress=true) -.output lshr_instruction (compress=true) -.output lshr_instruction_first_operand (compress=true) -.output lshr_instruction_second_operand (compress=true) +.output lshr_instr (compress=true) +.output lshr_instr_first_operand (compress=true) +.output lshr_instr_second_operand (compress=true) .output main_context (compress=true) .output main_func (compress=true) .output max_context_depth (compress=true) @@ -582,12 +582,12 @@ .output minimal_suffix_len (compress=true) .output monotonic_ordering (compress=true) .output msp430_intr_calling_convention (compress=true) -.output mul_instruction (compress=true) -.output mul_instruction_first_operand (compress=true) -.output mul_instruction_second_operand (compress=true) +.output mul_instr (compress=true) +.output mul_instr_first_operand (compress=true) +.output mul_instr_second_operand (compress=true) .output nallocs_by_pt_size (compress=true) -.output next_instruction (compress=true) -.output next_instruction_index (compress=true) +.output next_instr (compress=true) +.output next_instr_index (compress=true) .output non_allocation (compress=true) .output nonempty_ptr (compress=true) .output nonempty_ptrs (compress=true) @@ -605,9 +605,9 @@ .output operand_is_firstclass (compress=true) .output operand_is_pointer (compress=true) .output operand_to_int (compress=true) -.output or_instruction (compress=true) -.output or_instruction_first_operand (compress=true) -.output or_instruction_second_operand (compress=true) +.output or_instr (compress=true) +.output or_instr_first_operand (compress=true) +.output or_instr_second_operand (compress=true) .output ordering (compress=true) .output parameter_attr__align (compress=true) .output parameter_attr__byval (compress=true) @@ -630,10 +630,10 @@ .output path_component_at_index (compress=true) .output path_ends_in (compress=true) .output path_ends_in_array_index (compress=true) -.output phi_instruction (compress=true) -.output phi_instruction_npairs (compress=true) -.output phi_instruction_pair (compress=true) -.output phi_instruction_type (compress=true) +.output phi_instr (compress=true) +.output phi_instr_npairs (compress=true) +.output phi_instr_pair (compress=true) +.output phi_instr_type (compress=true) .output pointer_index (compress=true) .output pointer_offset (compress=true) .output pointer_type (compress=true) @@ -651,10 +651,10 @@ .output ptr_compatible_allocation (compress=true) .output ptrtoint_constant_expression (compress=true) .output ptrtoint_constant_expression_from (compress=true) -.output ptrtoint_instruction (compress=true) -.output ptrtoint_instruction_from_operand (compress=true) -.output ptrtoint_instruction_from_type (compress=true) -.output ptrtoint_instruction_to_type (compress=true) +.output ptrtoint_instr (compress=true) +.output ptrtoint_instr_from_operand (compress=true) +.output ptrtoint_instr_from_type (compress=true) +.output ptrtoint_instr_to_type (compress=true) .output pts_signature_arg_alloc (compress=true) .output pts_signature_arg_alloc_once (compress=true) .output pts_signature_arg_memcpy_arg (compress=true) @@ -679,67 +679,67 @@ .output region (compress=true) .output release_ordering (compress=true) .output relevant_suffix_position (compress=true) -.output resume_instruction (compress=true) -.output resume_instruction_operand (compress=true) -.output ret_instruction (compress=true) -.output ret_instruction_value (compress=true) +.output resume_instr (compress=true) +.output resume_instr_operand (compress=true) +.output ret_instr (compress=true) +.output ret_instr_value (compress=true) .output schema_invalid_alias (compress=true) .output schema_invalid_constant (compress=true) .output schema_invalid_func (compress=true) .output schema_invalid_global_var (compress=true) -.output schema_invalid_instruction (compress=true) +.output schema_invalid_instr (compress=true) .output schema_invalid_type (compress=true) .output schema_multiple_func_names (compress=true) .output schema_sanity (compress=true) -.output sdiv_instruction (compress=true) -.output sdiv_instruction_first_operand (compress=true) -.output sdiv_instruction_second_operand (compress=true) +.output sdiv_instr (compress=true) +.output sdiv_instr_first_operand (compress=true) +.output sdiv_instr_second_operand (compress=true) .output secondary_superclass (compress=true) -.output select_instruction (compress=true) -.output select_instruction_condition (compress=true) -.output select_instruction_first_operand (compress=true) -.output select_instruction_second_operand (compress=true) +.output select_instr (compress=true) +.output select_instr_condition (compress=true) +.output select_instr_first_operand (compress=true) +.output select_instr_second_operand (compress=true) .output seq_cst_ordering (compress=true) -.output sext_instruction (compress=true) -.output sext_instruction_from_operand (compress=true) -.output sext_instruction_from_type (compress=true) -.output sext_instruction_to_type (compress=true) -.output shl_instruction (compress=true) -.output shl_instruction_first_operand (compress=true) -.output shl_instruction_second_operand (compress=true) -.output shufflevector_instruction (compress=true) -.output shufflevector_instruction_element_type (compress=true) -.output shufflevector_instruction_first_vector (compress=true) -.output shufflevector_instruction_input_type (compress=true) -.output shufflevector_instruction_mask (compress=true) -.output shufflevector_instruction_mask_type (compress=true) -.output shufflevector_instruction_second_vector (compress=true) +.output sext_instr (compress=true) +.output sext_instr_from_operand (compress=true) +.output sext_instr_from_type (compress=true) +.output sext_instr_to_type (compress=true) +.output shl_instr (compress=true) +.output shl_instr_first_operand (compress=true) +.output shl_instr_second_operand (compress=true) +.output shufflevector_instr (compress=true) +.output shufflevector_instr_element_type (compress=true) +.output shufflevector_instr_first_vector (compress=true) +.output shufflevector_instr_mask (compress=true) +.output shufflevector_instr_mask_type (compress=true) +.output shufflevector_instr_second_vector (compress=true) +.output shufflevector_instrput_type (compress=true) .output signature_allocation (compress=true) -.output sitofp_instruction (compress=true) -.output sitofp_instruction_from_operand (compress=true) -.output sitofp_instruction_from_type (compress=true) -.output sitofp_instruction_to_type (compress=true) +.output sitofp_instr (compress=true) +.output sitofp_instr_from_operand (compress=true) +.output sitofp_instr_from_type (compress=true) +.output sitofp_instr_to_type (compress=true) .output sized_alloc_instr (compress=true) .output split_path (compress=true) -.output srem_instruction (compress=true) -.output srem_instruction_first_operand (compress=true) -.output srem_instruction_second_operand (compress=true) +.output srem_instr (compress=true) +.output srem_instr_first_operand (compress=true) +.output srem_instr_second_operand (compress=true) .output stack_allocation (compress=true) -.output stack_allocation_by_instruction (compress=true) +.output stack_allocation_by_instr (compress=true) .output stack_allocation_by_parameter (compress=true) -.output stack_allocation_by_type_instruction (compress=true) +.output stack_allocation_by_type_instr (compress=true) .output stack_region (compress=true) .output startup_context (compress=true) .output static_allocation_type (compress=true) -.output store_instruction (compress=true) -.output store_instruction_address (compress=true) -.output store_instruction_address_ptr_type (compress=true) -.output store_instruction_alignment (compress=true) -.output store_instruction_is_atomic (compress=true) -.output store_instruction_is_volatile (compress=true) -.output store_instruction_ordering (compress=true) -.output store_instruction_value (compress=true) -.output store_instruction_value_type (compress=true) +.output store_instr (compress=true) +.output store_instr_address (compress=true) +.output store_instr_address_ptr_type (compress=true) +.output store_instr_alignment (compress=true) +.output store_instr_is_atomic (compress=true) +.output store_instr_is_volatile (compress=true) +.output store_instr_ordering (compress=true) +.output store_instr_value (compress=true) +.output store_instr_value_type (compress=true) .output stripctx_var_alias (compress=true) .output struct_pointer_type (compress=true) .output struct_type (compress=true) @@ -751,25 +751,25 @@ .output struct_type_has_name (compress=true) .output struct_type_inherits_at_offset (compress=true) .output struct_type_nfields (compress=true) -.output sub_instruction (compress=true) -.output sub_instruction_first_operand (compress=true) -.output sub_instruction_second_operand (compress=true) +.output sub_instr (compress=true) +.output sub_instr_first_operand (compress=true) +.output sub_instr_second_operand (compress=true) .output suffix (compress=true) .output superclass (compress=true) -.output switch_instruction (compress=true) -.output switch_instruction_case (compress=true) -.output switch_instruction_default_label (compress=true) -.output switch_instruction_ncases (compress=true) -.output switch_instruction_operand (compress=true) +.output switch_instr (compress=true) +.output switch_instr_case (compress=true) +.output switch_instr_default_label (compress=true) +.output switch_instr_ncases (compress=true) +.output switch_instr_operand (compress=true) .output target_dependent_attr (compress=true) .output template_type (compress=true) .output template_typeinfo (compress=true) -.output terminator_instruction (compress=true) +.output terminator_instr (compress=true) .output threadlocal_mode (compress=true) -.output trunc_instruction (compress=true) -.output trunc_instruction_from_operand (compress=true) -.output trunc_instruction_from_type (compress=true) -.output trunc_instruction_to_type (compress=true) +.output trunc_instr (compress=true) +.output trunc_instr_from_operand (compress=true) +.output trunc_instr_from_type (compress=true) +.output trunc_instr_to_type (compress=true) .output type (compress=true) .output type_compatible (compress=true) .output type_compatible_up_to_arg (compress=true) @@ -789,22 +789,22 @@ .output typeinfo_vtable_baseclass (compress=true) .output typeinfo_vtable_multiple_inheritance (compress=true) .output typeinfo_vtable_single_inheritance (compress=true) -.output udiv_instruction (compress=true) -.output udiv_instruction_first_operand (compress=true) -.output udiv_instruction_second_operand (compress=true) -.output uitofp_instruction (compress=true) -.output uitofp_instruction_from_operand (compress=true) -.output uitofp_instruction_from_type (compress=true) -.output uitofp_instruction_to_type (compress=true) +.output udiv_instr (compress=true) +.output udiv_instr_first_operand (compress=true) +.output udiv_instr_second_operand (compress=true) +.output uitofp_instr (compress=true) +.output uitofp_instr_from_operand (compress=true) +.output uitofp_instr_from_type (compress=true) +.output uitofp_instr_to_type (compress=true) .output undef_constant (compress=true) .output unify_allocation_size (compress=true) .output unknown_location (compress=true) .output unordered_ordering (compress=true) .output unpadded_struct_type (compress=true) -.output unreachable_instruction (compress=true) -.output urem_instruction (compress=true) -.output urem_instruction_first_operand (compress=true) -.output urem_instruction_second_operand (compress=true) +.output unreachable_instr (compress=true) +.output urem_instr (compress=true) +.output urem_instr_first_operand (compress=true) +.output urem_instr_second_operand (compress=true) .output user_option_default (compress=true) .output user_option_defaulted (compress=true) .output user_option_invalid (compress=true) @@ -812,9 +812,9 @@ .output user_option_valid_value (compress=true) .output user_option_value (compress=true) .output user_options (compress=true) -.output va_arg_instruction (compress=true) -.output va_arg_instruction_type (compress=true) -.output va_arg_instruction_va_list (compress=true) +.output va_arg_instr (compress=true) +.output va_arg_instr_type (compress=true) +.output va_arg_instr_va_list (compress=true) .output var_alias (compress=true) .output var_alias_sizes (compress=true) .output var_points_to_sizes (compress=true) @@ -832,7 +832,7 @@ .output vector_type_has_component (compress=true) .output vector_type_has_size (compress=true) .output visibility (compress=true) -.output void_ret_instruction (compress=true) +.output void_ret_instr (compress=true) .output void_type (compress=true) .output vtable (compress=true) .output vtable_func (compress=true) @@ -844,10 +844,10 @@ .output x86_stdcall_calling_convention (compress=true) .output x86_thiscall_calling_convention (compress=true) .output x86mmx_type (compress=true) -.output xor_instruction (compress=true) -.output xor_instruction_first_operand (compress=true) -.output xor_instruction_second_operand (compress=true) -.output zext_instruction (compress=true) -.output zext_instruction_from_operand (compress=true) -.output zext_instruction_from_type (compress=true) -.output zext_instruction_to_type (compress=true) +.output xor_instr (compress=true) +.output xor_instr_first_operand (compress=true) +.output xor_instr_second_operand (compress=true) +.output zext_instr (compress=true) +.output zext_instr_from_operand (compress=true) +.output zext_instr_from_type (compress=true) +.output zext_instr_to_type (compress=true) diff --git a/datalog/export/debug-output.dl b/datalog/export/debug-output.dl index ca5f25d..4d8ee48 100644 --- a/datalog/export/debug-output.dl +++ b/datalog/export/debug-output.dl @@ -2,7 +2,7 @@ .output _aliasee (compress=true) .output _alloc_pt_size (compress=true) .output _alloc_region (compress=true) -.output _assert_every_gep_instruction_points_to_something (compress=true) +.output _assert_every_gep_instr_points_to_something (compress=true) .output _assert_type_compatible_ptr_points_to_alias (compress=true) .output _assert_type_compatible_relaxed (compress=true) .output _assert_type_compatible_relaxed_inner (compress=true) @@ -17,22 +17,22 @@ .output _getelementptr_constant_expression_index_type (compress=true) .output _getelementptr_constant_expression_interm_type (compress=true) .output _getelementptr_constant_expression_value_type (compress=true) +.output _instr_bb_entry (compress=true) .output _instr_calls_func (compress=true) -.output _instruction_bb_entry (compress=true) -.output _landingpad_contains_landingpad_instruction (compress=true) +.output _landingpad_contains_landingpad_instr (compress=true) .output _landingpad_first_nonphi (compress=true) -.output _landingpad_instruction_catch_clause (compress=true) -.output _landingpad_instruction_clause (compress=true) -.output _landingpad_instruction_filter_clause (compress=true) +.output _landingpad_instr_catch_clause (compress=true) +.output _landingpad_instr_clause (compress=true) +.output _landingpad_instr_filter_clause (compress=true) .output _landingpad_starting_phi (compress=true) .output _nvars_by_pt_total (compress=true) -.output _phi_instruction_pair (compress=true) -.output _phi_instruction_pair_label (compress=true) -.output _phi_instruction_pair_value (compress=true) +.output _phi_instr_pair (compress=true) +.output _phi_instr_pair_label (compress=true) +.output _phi_instr_pair_value (compress=true) .output _string_iteration_trick (compress=true) -.output _switch_instruction_case (compress=true) -.output _switch_instruction_case_label (compress=true) -.output _switch_instruction_case_value (compress=true) +.output _switch_instr_case (compress=true) +.output _switch_instr_case_label (compress=true) +.output _switch_instr_case_value (compress=true) .output _type_expands_base_type (compress=true) .output _type_info_by_alloc (compress=true) .output _typed_alloc (compress=true) @@ -47,9 +47,9 @@ .output acq_rel_ordering (compress=true) .output acquire_ordering (compress=true) .output actual_arg (compress=true) -.output add_instruction (compress=true) -.output add_instruction_first_operand (compress=true) -.output add_instruction_second_operand (compress=true) +.output add_instr (compress=true) +.output add_instr_first_operand (compress=true) +.output add_instr_second_operand (compress=true) .output aggregate_type (compress=true) .output alias (compress=true) .output alias_aliasee (compress=true) @@ -61,18 +61,18 @@ .output alloc_context (compress=true) .output alloc_points_to_sizes (compress=true) .output alloc_region (compress=true) -.output alloca_instruction (compress=true) -.output alloca_instruction_alignment (compress=true) -.output alloca_instruction_size (compress=true) -.output alloca_instruction_type (compress=true) +.output alloca_instr (compress=true) +.output alloca_instr_alignment (compress=true) +.output alloca_instr_size (compress=true) +.output alloca_instr_type (compress=true) .output allocation (compress=true) -.output allocation_by_instruction (compress=true) +.output allocation_by_instr (compress=true) .output allocation_pos (compress=true) .output allocation_size (compress=true) .output analyze_pointer_arithmetic (compress=true) -.output and_instruction (compress=true) -.output and_instruction_first_operand (compress=true) -.output and_instruction_second_operand (compress=true) +.output and_instr (compress=true) +.output and_instr_first_operand (compress=true) +.output and_instr_second_operand (compress=true) .output appending_linkage_type (compress=true) .output argv_alloc (compress=true) .output argv_ptr_points_to (compress=true) @@ -88,10 +88,10 @@ .output array_type (compress=true) .output array_type_has_component (compress=true) .output array_type_has_size (compress=true) -.output ashr_instruction (compress=true) -.output ashr_instruction_first_operand (compress=true) -.output ashr_instruction_second_operand (compress=true) -.output asm_call_instruction (compress=true) +.output ashr_instr (compress=true) +.output ashr_instr_first_operand (compress=true) +.output ashr_instr_second_operand (compress=true) +.output asm_call_instr (compress=true) .output assert_alloc_with_ctx_complete (compress=true) .output assert_array_type_size (compress=true) .output assert_basic_or_path (compress=true) @@ -120,7 +120,7 @@ .output assert_unification_var_points_to_unique (compress=true) .output assert_unique_repr (compress=true) .output assert_var_points_to_implies_reachable (compress=true) -.output assign_instruction (compress=true) +.output assign_instr (compress=true) .output atomic_operation (compress=true) .output atomic_operation_add (compress=true) .output atomic_operation_and (compress=true) @@ -134,49 +134,49 @@ .output atomic_operation_umin (compress=true) .output atomic_operation_xchg (compress=true) .output atomic_operation_xor (compress=true) -.output atomicrmw_instruction (compress=true) -.output atomicrmw_instruction_address (compress=true) -.output atomicrmw_instruction_is_volatile (compress=true) -.output atomicrmw_instruction_operation (compress=true) -.output atomicrmw_instruction_ordering (compress=true) -.output atomicrmw_instruction_value (compress=true) +.output atomicrmw_instr (compress=true) +.output atomicrmw_instr_address (compress=true) +.output atomicrmw_instr_is_volatile (compress=true) +.output atomicrmw_instr_operation (compress=true) +.output atomicrmw_instr_ordering (compress=true) +.output atomicrmw_instr_value (compress=true) .output attr (compress=true) .output available_externally_linkage_type (compress=true) .output basic_allocation (compress=true) .output bitcast_constant_expression (compress=true) .output bitcast_constant_expression_from (compress=true) .output bitcast_constant_expression_to_type (compress=true) -.output bitcast_instruction (compress=true) -.output bitcast_instruction_from_operand (compress=true) -.output bitcast_instruction_from_type (compress=true) -.output bitcast_instruction_to_type (compress=true) +.output bitcast_instr (compress=true) +.output bitcast_instr_from_operand (compress=true) +.output bitcast_instr_from_type (compress=true) +.output bitcast_instr_to_type (compress=true) .output block (compress=true) -.output block_first_instruction (compress=true) -.output block_last_instruction (compress=true) +.output block_first_instr (compress=true) +.output block_last_instr (compress=true) .output block_of_label (compress=true) .output block_predecessor (compress=true) .output block_predecessors (compress=true) .output boolean_type (compress=true) .output boolean_vector_type (compress=true) -.output br_cond_instruction (compress=true) -.output br_cond_instruction_condition (compress=true) -.output br_cond_instruction_iffalse_label (compress=true) -.output br_cond_instruction_iftrue_label (compress=true) -.output br_instruction (compress=true) -.output br_uncond_instruction (compress=true) -.output br_uncond_instruction_dest_label (compress=true) -.output call_instruction (compress=true) -.output call_instruction_arg (compress=true) -.output call_instruction_fn_operand (compress=true) -.output call_instruction_fn_target (compress=true) -.output call_instruction_fn_type (compress=true) -.output call_instruction_is_tail_opt (compress=true) -.output call_instruction_return_type (compress=true) -.output call_instruction_with_calling_convention (compress=true) -.output call_instruction_with_fn_attr (compress=true) -.output call_instruction_with_param_attr (compress=true) -.output call_instruction_with_return_attr (compress=true) -.output call_or_invoke_instruction_fn_type (compress=true) +.output br_cond_instr (compress=true) +.output br_cond_instr_condition (compress=true) +.output br_cond_instr_iffalse_label (compress=true) +.output br_cond_instr_iftrue_label (compress=true) +.output br_instr (compress=true) +.output br_uncond_instr (compress=true) +.output br_uncond_instr_dest_label (compress=true) +.output call_instr (compress=true) +.output call_instr_arg (compress=true) +.output call_instr_fn_operand (compress=true) +.output call_instr_fn_target (compress=true) +.output call_instr_fn_type (compress=true) +.output call_instr_is_tail_opt (compress=true) +.output call_instr_return_type (compress=true) +.output call_instr_with_calling_convention (compress=true) +.output call_instr_with_fn_attr (compress=true) +.output call_instr_with_param_attr (compress=true) +.output call_instr_with_return_attr (compress=true) +.output call_or_invoke_instr_fn_type (compress=true) .output called_at_startup (compress=true) .output calling_convention (compress=true) .output catch_clause (compress=true) @@ -187,14 +187,14 @@ .output class_type_typeinfo (compress=true) .output class_type_vtable (compress=true) .output clause (compress=true) -.output cmpxchg_instruction (compress=true) -.output cmpxchg_instruction_address (compress=true) -.output cmpxchg_instruction_cmp_value (compress=true) -.output cmpxchg_instruction_cmp_value_type (compress=true) -.output cmpxchg_instruction_is_volatile (compress=true) -.output cmpxchg_instruction_new_value (compress=true) -.output cmpxchg_instruction_ordering (compress=true) -.output cmpxchg_instruction_type (compress=true) +.output cmpxchg_instr (compress=true) +.output cmpxchg_instr_address (compress=true) +.output cmpxchg_instr_cmp_value (compress=true) +.output cmpxchg_instr_cmp_value_type (compress=true) +.output cmpxchg_instr_is_volatile (compress=true) +.output cmpxchg_instr_new_value (compress=true) +.output cmpxchg_instr_ordering (compress=true) +.output cmpxchg_instr_type (compress=true) .output cold_calling_convention (compress=true) .output common_linkage_type (compress=true) .output constant (compress=true) @@ -231,8 +231,8 @@ .output default_visibility (compress=true) .output derived_type (compress=true) .output destructor_class_type (compress=true) -.output direct_call_instruction (compress=true) -.output direct_invoke_instruction (compress=true) +.output direct_call_instr (compress=true) +.output direct_invoke_instr (compress=true) .output direct_subclass (compress=true) .output direct_superclass (compress=true) .output dllexport_linkage_type (compress=true) @@ -257,21 +257,21 @@ .output extern_weak_linkage_type (compress=true) .output external_linkage_type (compress=true) .output external_typeinfo (compress=true) -.output extractelement_instruction (compress=true) -.output extractelement_instruction_base (compress=true) -.output extractelement_instruction_index (compress=true) -.output extractelement_instruction_type (compress=true) -.output extractvalue_instruction (compress=true) -.output extractvalue_instruction_base (compress=true) -.output extractvalue_instruction_base_type (compress=true) -.output extractvalue_instruction_index (compress=true) -.output extractvalue_instruction_interm_type (compress=true) -.output extractvalue_instruction_nindices (compress=true) -.output extractvalue_instruction_value_type (compress=true) -.output fadd_instruction (compress=true) -.output fadd_instruction_first_operand (compress=true) -.output fadd_instruction_second_operand (compress=true) -.output failing_assert_every_gep_instruction_points_to_something (compress=true) +.output extractelement_instr (compress=true) +.output extractelement_instr_base (compress=true) +.output extractelement_instr_index (compress=true) +.output extractelement_instr_type (compress=true) +.output extractvalue_instr (compress=true) +.output extractvalue_instr_base (compress=true) +.output extractvalue_instr_base_type (compress=true) +.output extractvalue_instr_index (compress=true) +.output extractvalue_instr_nindices (compress=true) +.output extractvalue_instr_value_type (compress=true) +.output extractvalue_instrterm_type (compress=true) +.output fadd_instr (compress=true) +.output fadd_instr_first_operand (compress=true) +.output fadd_instr_second_operand (compress=true) +.output failing_assert_every_gep_instr_points_to_something (compress=true) .output failing_assert_global_allocations_have_sizes (compress=true) .output failing_assert_reachable_pointer_vars_point_to_something (compress=true) .output failing_assert_type_compatible_var_points_to (compress=true) @@ -293,52 +293,53 @@ .output fcmp_condition__ult (compress=true) .output fcmp_condition__une (compress=true) .output fcmp_condition__uno (compress=true) -.output fcmp_instruction (compress=true) -.output fcmp_instruction_condition (compress=true) -.output fcmp_instruction_first_operand (compress=true) -.output fcmp_instruction_from_type (compress=true) -.output fcmp_instruction_second_operand (compress=true) -.output fcmp_instruction_to_type (compress=true) -.output fdiv_instruction (compress=true) -.output fdiv_instruction_first_operand (compress=true) -.output fdiv_instruction_second_operand (compress=true) -.output fence_instruction (compress=true) -.output fence_instruction_ordering (compress=true) +.output fcmp_instr (compress=true) +.output fcmp_instr_condition (compress=true) +.output fcmp_instr_first_operand (compress=true) +.output fcmp_instr_from_type (compress=true) +.output fcmp_instr_second_operand (compress=true) +.output fcmp_instr_to_type (compress=true) +.output fdiv_instr (compress=true) +.output fdiv_instr_first_operand (compress=true) +.output fdiv_instr_second_operand (compress=true) +.output fence_instr (compress=true) +.output fence_instr_ordering (compress=true) .output filter_clause (compress=true) .output flag (compress=true) .output float_type (compress=true) -.output fmul_instruction (compress=true) -.output fmul_instruction_first_operand (compress=true) -.output fmul_instruction_second_operand (compress=true) +.output fmul_instr (compress=true) +.output fmul_instr_first_operand (compress=true) +.output fmul_instr_second_operand (compress=true) .output fp128_type (compress=true) .output fp_constant (compress=true) .output fp_pointer_type (compress=true) .output fp_type (compress=true) .output fp_vector_type (compress=true) -.output fpext_instruction (compress=true) -.output fpext_instruction_from_operand (compress=true) -.output fpext_instruction_from_type (compress=true) -.output fpext_instruction_to_type (compress=true) -.output fptosi_instruction (compress=true) -.output fptosi_instruction_from_operand (compress=true) -.output fptosi_instruction_from_type (compress=true) -.output fptosi_instruction_to_type (compress=true) -.output fptoui_instruction (compress=true) -.output fptoui_instruction_from_operand (compress=true) -.output fptoui_instruction_from_type (compress=true) -.output fptoui_instruction_to_type (compress=true) -.output fptrunc_instruction (compress=true) -.output fptrunc_instruction_from_operand (compress=true) -.output fptrunc_instruction_from_type (compress=true) -.output fptrunc_instruction_to_type (compress=true) -.output frem_instruction (compress=true) -.output frem_instruction_first_operand (compress=true) -.output frem_instruction_second_operand (compress=true) -.output fsub_instruction (compress=true) -.output fsub_instruction_first_operand (compress=true) -.output fsub_instruction_second_operand (compress=true) +.output fpext_instr (compress=true) +.output fpext_instr_from_operand (compress=true) +.output fpext_instr_from_type (compress=true) +.output fpext_instr_to_type (compress=true) +.output fptosi_instr (compress=true) +.output fptosi_instr_from_operand (compress=true) +.output fptosi_instr_from_type (compress=true) +.output fptosi_instr_to_type (compress=true) +.output fptoui_instr (compress=true) +.output fptoui_instr_from_operand (compress=true) +.output fptoui_instr_from_type (compress=true) +.output fptoui_instr_to_type (compress=true) +.output fptrunc_instr (compress=true) +.output fptrunc_instr_from_operand (compress=true) +.output fptrunc_instr_from_type (compress=true) +.output fptrunc_instr_to_type (compress=true) +.output frem_instr (compress=true) +.output frem_instr_first_operand (compress=true) +.output frem_instr_second_operand (compress=true) +.output fsub_instr (compress=true) +.output fsub_instr_first_operand (compress=true) +.output fsub_instr_second_operand (compress=true) .output func (compress=true) .output func_alignment (compress=true) +.output func_attr (compress=true) .output func_attr__alignstack (compress=true) .output func_attr__alwaysinline (compress=true) .output func_attr__argmemonly (compress=true) @@ -375,29 +376,33 @@ .output func_attr__uwtable (compress=true) .output func_by_location (compress=true) .output func_by_value_param (compress=true) +.output func_calling_convention (compress=true) .output func_calls_func (compress=true) .output func_constant (compress=true) .output func_constant_fn_name (compress=true) .output func_decl (compress=true) .output func_decl_to_defn (compress=true) -.output func_linkage_type (compress=true) -.output func_name (compress=true) -.output func_pts_signature (compress=true) -.output func_signature (compress=true) -.output func_type (compress=true) -.output func_visibility (compress=true) .output func_degree (compress=true) -.output func_section (compress=true) +.output func_gc (compress=true) .output func_is_illformed (compress=true) .output func_is_wellformed (compress=true) +.output func_linkage_type (compress=true) .output func_missing_pts_signature (compress=true) +.output func_name (compress=true) .output func_needs_pts_signature (compress=true) .output func_nparams (compress=true) .output func_out_degree (compress=true) .output func_param (compress=true) +.output func_param_attr (compress=true) .output func_param_by_value (compress=true) .output func_param_not_by_value (compress=true) +.output func_pers_fn (compress=true) +.output func_pts_signature (compress=true) +.output func_return_attr (compress=true) .output func_returns_value (compress=true) +.output func_section (compress=true) +.output func_signature (compress=true) +.output func_ty (compress=true) .output func_type (compress=true) .output func_type_has_no_pointer_args (compress=true) .output func_type_has_no_pointer_return (compress=true) @@ -407,13 +412,8 @@ .output func_type_nparams (compress=true) .output func_type_param (compress=true) .output func_type_return (compress=true) -.output func_attr (compress=true) -.output func_calling_convention (compress=true) -.output func_gc (compress=true) -.output func_param_attr (compress=true) -.output func_pers_fn (compress=true) -.output func_return_attr (compress=true) .output func_unnamed_addr (compress=true) +.output func_visibility (compress=true) .output funcs_by_in_degree (compress=true) .output funcs_by_out_degree (compress=true) .output gep_constant_expr_index_offset (compress=true) @@ -425,15 +425,15 @@ .output getelementptr_constant_expression_base (compress=true) .output getelementptr_constant_expression_index (compress=true) .output getelementptr_constant_expression_nindices (compress=true) -.output getelementptr_instruction (compress=true) -.output getelementptr_instruction_base (compress=true) -.output getelementptr_instruction_base_type (compress=true) -.output getelementptr_instruction_index (compress=true) -.output getelementptr_instruction_index_type (compress=true) -.output getelementptr_instruction_interm_type (compress=true) -.output getelementptr_instruction_is_inbounds (compress=true) -.output getelementptr_instruction_nindices (compress=true) -.output getelementptr_instruction_value_type (compress=true) +.output getelementptr_instr (compress=true) +.output getelementptr_instr_base (compress=true) +.output getelementptr_instr_base_type (compress=true) +.output getelementptr_instr_index (compress=true) +.output getelementptr_instr_index_type (compress=true) +.output getelementptr_instr_is_inbounds (compress=true) +.output getelementptr_instr_nindices (compress=true) +.output getelementptr_instr_value_type (compress=true) +.output getelementptr_instrterm_type (compress=true) .output global_allocation (compress=true) .output global_allocation_by_func (compress=true) .output global_allocation_by_name (compress=true) @@ -458,12 +458,12 @@ .output heap_alloc_func (compress=true) .output heap_allocation (compress=true) .output heap_allocation_by_calloc (compress=true) -.output heap_allocation_by_instruction (compress=true) +.output heap_allocation_by_instr (compress=true) .output heap_allocation_by_malloc (compress=true) .output heap_allocation_by_mmap (compress=true) .output heap_allocation_by_new (compress=true) .output heap_allocation_by_realloc (compress=true) -.output heap_allocation_by_type_instruction (compress=true) +.output heap_allocation_by_type_instr (compress=true) .output heap_region (compress=true) .output hidden_visibility (compress=true) .output icmp_condition (compress=true) @@ -477,19 +477,19 @@ .output icmp_condition__ugt (compress=true) .output icmp_condition__ule (compress=true) .output icmp_condition__ult (compress=true) -.output icmp_instruction (compress=true) -.output icmp_instruction_condition (compress=true) -.output icmp_instruction_first_operand (compress=true) -.output icmp_instruction_from_type (compress=true) -.output icmp_instruction_second_operand (compress=true) -.output icmp_instruction_to_type (compress=true) -.output indirect_call_instruction (compress=true) -.output indirect_call_or_invoke_instruction (compress=true) -.output indirect_invoke_instruction (compress=true) -.output indirectbr_instruction (compress=true) -.output indirectbr_instruction_address (compress=true) -.output indirectbr_instruction_label (compress=true) -.output indirectbr_instruction_nlabels (compress=true) +.output icmp_instr (compress=true) +.output icmp_instr_condition (compress=true) +.output icmp_instr_first_operand (compress=true) +.output icmp_instr_from_type (compress=true) +.output icmp_instr_second_operand (compress=true) +.output icmp_instr_to_type (compress=true) +.output indirect_call_instr (compress=true) +.output indirect_call_or_invoke_instr (compress=true) +.output indirect_invoke_instr (compress=true) +.output indirectbr_instr (compress=true) +.output indirectbr_instr_address (compress=true) +.output indirectbr_instr_label (compress=true) +.output indirectbr_instr_nlabels (compress=true) .output initial_exec_threadlocal_mode (compress=true) .output initialized_by_constant (compress=true) .output inline_asm (compress=true) @@ -497,26 +497,26 @@ .output inline_asm_text (compress=true) .output inlined_constructors (compress=true) .output insensitive (compress=true) -.output insertelement_instruction (compress=true) -.output insertelement_instruction_base (compress=true) -.output insertelement_instruction_index (compress=true) -.output insertelement_instruction_type (compress=true) -.output insertelement_instruction_value (compress=true) -.output insertvalue_instruction (compress=true) -.output insertvalue_instruction_base (compress=true) -.output insertvalue_instruction_base_type (compress=true) -.output insertvalue_instruction_index (compress=true) -.output insertvalue_instruction_interm_type (compress=true) -.output insertvalue_instruction_nindices (compress=true) -.output insertvalue_instruction_value (compress=true) -.output insertvalue_instruction_value_type (compress=true) -.output instruction (compress=true) -.output instruction_assigns_to (compress=true) -.output instruction_has_flag (compress=true) -.output instruction_in_block (compress=true) -.output instruction_in_func (compress=true) -.output instruction_pos (compress=true) -.output instruction_returns_type (compress=true) +.output insertelement_instr (compress=true) +.output insertelement_instr_base (compress=true) +.output insertelement_instr_index (compress=true) +.output insertelement_instr_type (compress=true) +.output insertelement_instr_value (compress=true) +.output insertvalue_instr (compress=true) +.output insertvalue_instr_base (compress=true) +.output insertvalue_instr_base_type (compress=true) +.output insertvalue_instr_index (compress=true) +.output insertvalue_instr_nindices (compress=true) +.output insertvalue_instr_value (compress=true) +.output insertvalue_instr_value_type (compress=true) +.output insertvalue_instrterm_type (compress=true) +.output instr (compress=true) +.output instr_assigns_to (compress=true) +.output instr_block (compress=true) +.output instr_flag (compress=true) +.output instr_func (compress=true) +.output instr_pos (compress=true) +.output instr_returns_type (compress=true) .output int1_type (compress=true) .output int32_type (compress=true) .output int32_vector_type (compress=true) @@ -531,47 +531,47 @@ .output internal_linkage_type (compress=true) .output inttoptr_constant_expression (compress=true) .output inttoptr_constant_expression_from (compress=true) -.output inttoptr_instruction (compress=true) -.output inttoptr_instruction_from_operand (compress=true) -.output inttoptr_instruction_from_type (compress=true) -.output inttoptr_instruction_to_type (compress=true) -.output invoke_instruction (compress=true) -.output invoke_instruction_arg (compress=true) -.output invoke_instruction_exception_label (compress=true) -.output invoke_instruction_fn_operand (compress=true) -.output invoke_instruction_fn_target (compress=true) -.output invoke_instruction_fn_type (compress=true) -.output invoke_instruction_normal_label (compress=true) -.output invoke_instruction_return_type (compress=true) -.output invoke_instruction_with_calling_convention (compress=true) -.output invoke_instruction_with_fn_attr (compress=true) -.output invoke_instruction_with_param_attr (compress=true) -.output invoke_instruction_with_return_attr (compress=true) +.output inttoptr_instr (compress=true) +.output inttoptr_instr_from_operand (compress=true) +.output inttoptr_instr_from_type (compress=true) +.output inttoptr_instr_to_type (compress=true) +.output invoke_instr (compress=true) +.output invoke_instr_arg (compress=true) +.output invoke_instr_exception_label (compress=true) +.output invoke_instr_fn_operand (compress=true) +.output invoke_instr_fn_target (compress=true) +.output invoke_instr_fn_type (compress=true) +.output invoke_instr_normal_label (compress=true) +.output invoke_instr_return_type (compress=true) +.output invoke_instr_with_calling_convention (compress=true) +.output invoke_instr_with_fn_attr (compress=true) +.output invoke_instr_with_param_attr (compress=true) +.output invoke_instr_with_return_attr (compress=true) .output label_type (compress=true) .output landingpad (compress=true) -.output landingpad_instruction (compress=true) -.output landingpad_instruction_clause (compress=true) -.output landingpad_instruction_is_cleanup (compress=true) -.output landingpad_instruction_nclauses (compress=true) -.output landingpad_instruction_pers_fn (compress=true) -.output landingpad_instruction_type (compress=true) +.output landingpad_instr (compress=true) +.output landingpad_instr_clause (compress=true) +.output landingpad_instr_is_cleanup (compress=true) +.output landingpad_instr_nclauses (compress=true) +.output landingpad_instr_pers_fn (compress=true) +.output landingpad_instr_type (compress=true) .output linkage_type (compress=true) .output linker_private_linkage_type (compress=true) .output linker_private_weak_linkage_type (compress=true) .output linkonce_linkage_type (compress=true) .output linkonce_odr_linkage_type (compress=true) -.output load_instruction (compress=true) -.output load_instruction_address (compress=true) -.output load_instruction_address_ptr_type (compress=true) -.output load_instruction_alignment (compress=true) -.output load_instruction_is_atomic (compress=true) -.output load_instruction_is_volatile (compress=true) -.output load_instruction_ordering (compress=true) +.output load_instr (compress=true) +.output load_instr_address (compress=true) +.output load_instr_address_ptr_type (compress=true) +.output load_instr_alignment (compress=true) +.output load_instr_is_atomic (compress=true) +.output load_instr_is_volatile (compress=true) +.output load_instr_ordering (compress=true) .output local_dynamic_threadlocal_mode (compress=true) .output local_exec_threadlocal_mode (compress=true) -.output lshr_instruction (compress=true) -.output lshr_instruction_first_operand (compress=true) -.output lshr_instruction_second_operand (compress=true) +.output lshr_instr (compress=true) +.output lshr_instr_first_operand (compress=true) +.output lshr_instr_second_operand (compress=true) .output main_context (compress=true) .output main_func (compress=true) .output max_context_depth (compress=true) @@ -582,12 +582,12 @@ .output minimal_suffix_len (compress=true) .output monotonic_ordering (compress=true) .output msp430_intr_calling_convention (compress=true) -.output mul_instruction (compress=true) -.output mul_instruction_first_operand (compress=true) -.output mul_instruction_second_operand (compress=true) +.output mul_instr (compress=true) +.output mul_instr_first_operand (compress=true) +.output mul_instr_second_operand (compress=true) .output nallocs_by_pt_size (compress=true) -.output next_instruction (compress=true) -.output next_instruction_index (compress=true) +.output next_instr (compress=true) +.output next_instr_index (compress=true) .output non_allocation (compress=true) .output nonempty_ptr (compress=true) .output nonempty_ptrs (compress=true) @@ -605,9 +605,9 @@ .output operand_is_firstclass (compress=true) .output operand_is_pointer (compress=true) .output operand_to_int (compress=true) -.output or_instruction (compress=true) -.output or_instruction_first_operand (compress=true) -.output or_instruction_second_operand (compress=true) +.output or_instr (compress=true) +.output or_instr_first_operand (compress=true) +.output or_instr_second_operand (compress=true) .output ordering (compress=true) .output parameter_attr__align (compress=true) .output parameter_attr__byval (compress=true) @@ -630,10 +630,10 @@ .output path_component_at_index (compress=true) .output path_ends_in (compress=true) .output path_ends_in_array_index (compress=true) -.output phi_instruction (compress=true) -.output phi_instruction_npairs (compress=true) -.output phi_instruction_pair (compress=true) -.output phi_instruction_type (compress=true) +.output phi_instr (compress=true) +.output phi_instr_npairs (compress=true) +.output phi_instr_pair (compress=true) +.output phi_instr_type (compress=true) .output pointer_index (compress=true) .output pointer_offset (compress=true) .output pointer_type (compress=true) @@ -651,10 +651,10 @@ .output ptr_compatible_allocation (compress=true) .output ptrtoint_constant_expression (compress=true) .output ptrtoint_constant_expression_from (compress=true) -.output ptrtoint_instruction (compress=true) -.output ptrtoint_instruction_from_operand (compress=true) -.output ptrtoint_instruction_from_type (compress=true) -.output ptrtoint_instruction_to_type (compress=true) +.output ptrtoint_instr (compress=true) +.output ptrtoint_instr_from_operand (compress=true) +.output ptrtoint_instr_from_type (compress=true) +.output ptrtoint_instr_to_type (compress=true) .output pts_signature_arg_alloc (compress=true) .output pts_signature_arg_alloc_once (compress=true) .output pts_signature_arg_memcpy_arg (compress=true) @@ -679,67 +679,67 @@ .output region (compress=true) .output release_ordering (compress=true) .output relevant_suffix_position (compress=true) -.output resume_instruction (compress=true) -.output resume_instruction_operand (compress=true) -.output ret_instruction (compress=true) -.output ret_instruction_value (compress=true) +.output resume_instr (compress=true) +.output resume_instr_operand (compress=true) +.output ret_instr (compress=true) +.output ret_instr_value (compress=true) .output schema_invalid_alias (compress=true) .output schema_invalid_constant (compress=true) .output schema_invalid_func (compress=true) .output schema_invalid_global_var (compress=true) -.output schema_invalid_instruction (compress=true) +.output schema_invalid_instr (compress=true) .output schema_invalid_type (compress=true) .output schema_multiple_func_names (compress=true) .output schema_sanity (compress=true) -.output sdiv_instruction (compress=true) -.output sdiv_instruction_first_operand (compress=true) -.output sdiv_instruction_second_operand (compress=true) +.output sdiv_instr (compress=true) +.output sdiv_instr_first_operand (compress=true) +.output sdiv_instr_second_operand (compress=true) .output secondary_superclass (compress=true) -.output select_instruction (compress=true) -.output select_instruction_condition (compress=true) -.output select_instruction_first_operand (compress=true) -.output select_instruction_second_operand (compress=true) +.output select_instr (compress=true) +.output select_instr_condition (compress=true) +.output select_instr_first_operand (compress=true) +.output select_instr_second_operand (compress=true) .output seq_cst_ordering (compress=true) -.output sext_instruction (compress=true) -.output sext_instruction_from_operand (compress=true) -.output sext_instruction_from_type (compress=true) -.output sext_instruction_to_type (compress=true) -.output shl_instruction (compress=true) -.output shl_instruction_first_operand (compress=true) -.output shl_instruction_second_operand (compress=true) -.output shufflevector_instruction (compress=true) -.output shufflevector_instruction_element_type (compress=true) -.output shufflevector_instruction_first_vector (compress=true) -.output shufflevector_instruction_input_type (compress=true) -.output shufflevector_instruction_mask (compress=true) -.output shufflevector_instruction_mask_type (compress=true) -.output shufflevector_instruction_second_vector (compress=true) +.output sext_instr (compress=true) +.output sext_instr_from_operand (compress=true) +.output sext_instr_from_type (compress=true) +.output sext_instr_to_type (compress=true) +.output shl_instr (compress=true) +.output shl_instr_first_operand (compress=true) +.output shl_instr_second_operand (compress=true) +.output shufflevector_instr (compress=true) +.output shufflevector_instr_element_type (compress=true) +.output shufflevector_instr_first_vector (compress=true) +.output shufflevector_instr_mask (compress=true) +.output shufflevector_instr_mask_type (compress=true) +.output shufflevector_instr_second_vector (compress=true) +.output shufflevector_instrput_type (compress=true) .output signature_allocation (compress=true) -.output sitofp_instruction (compress=true) -.output sitofp_instruction_from_operand (compress=true) -.output sitofp_instruction_from_type (compress=true) -.output sitofp_instruction_to_type (compress=true) +.output sitofp_instr (compress=true) +.output sitofp_instr_from_operand (compress=true) +.output sitofp_instr_from_type (compress=true) +.output sitofp_instr_to_type (compress=true) .output sized_alloc_instr (compress=true) .output split_path (compress=true) -.output srem_instruction (compress=true) -.output srem_instruction_first_operand (compress=true) -.output srem_instruction_second_operand (compress=true) +.output srem_instr (compress=true) +.output srem_instr_first_operand (compress=true) +.output srem_instr_second_operand (compress=true) .output stack_allocation (compress=true) -.output stack_allocation_by_instruction (compress=true) +.output stack_allocation_by_instr (compress=true) .output stack_allocation_by_parameter (compress=true) -.output stack_allocation_by_type_instruction (compress=true) +.output stack_allocation_by_type_instr (compress=true) .output stack_region (compress=true) .output startup_context (compress=true) .output static_allocation_type (compress=true) -.output store_instruction (compress=true) -.output store_instruction_address (compress=true) -.output store_instruction_address_ptr_type (compress=true) -.output store_instruction_alignment (compress=true) -.output store_instruction_is_atomic (compress=true) -.output store_instruction_is_volatile (compress=true) -.output store_instruction_ordering (compress=true) -.output store_instruction_value (compress=true) -.output store_instruction_value_type (compress=true) +.output store_instr (compress=true) +.output store_instr_address (compress=true) +.output store_instr_address_ptr_type (compress=true) +.output store_instr_alignment (compress=true) +.output store_instr_is_atomic (compress=true) +.output store_instr_is_volatile (compress=true) +.output store_instr_ordering (compress=true) +.output store_instr_value (compress=true) +.output store_instr_value_type (compress=true) .output stripctx_var_alias (compress=true) .output struct_pointer_type (compress=true) .output struct_type (compress=true) @@ -751,25 +751,25 @@ .output struct_type_has_name (compress=true) .output struct_type_inherits_at_offset (compress=true) .output struct_type_nfields (compress=true) -.output sub_instruction (compress=true) -.output sub_instruction_first_operand (compress=true) -.output sub_instruction_second_operand (compress=true) +.output sub_instr (compress=true) +.output sub_instr_first_operand (compress=true) +.output sub_instr_second_operand (compress=true) .output suffix (compress=true) .output superclass (compress=true) -.output switch_instruction (compress=true) -.output switch_instruction_case (compress=true) -.output switch_instruction_default_label (compress=true) -.output switch_instruction_ncases (compress=true) -.output switch_instruction_operand (compress=true) +.output switch_instr (compress=true) +.output switch_instr_case (compress=true) +.output switch_instr_default_label (compress=true) +.output switch_instr_ncases (compress=true) +.output switch_instr_operand (compress=true) .output target_dependent_attr (compress=true) .output template_type (compress=true) .output template_typeinfo (compress=true) -.output terminator_instruction (compress=true) +.output terminator_instr (compress=true) .output threadlocal_mode (compress=true) -.output trunc_instruction (compress=true) -.output trunc_instruction_from_operand (compress=true) -.output trunc_instruction_from_type (compress=true) -.output trunc_instruction_to_type (compress=true) +.output trunc_instr (compress=true) +.output trunc_instr_from_operand (compress=true) +.output trunc_instr_from_type (compress=true) +.output trunc_instr_to_type (compress=true) .output type (compress=true) .output type_compatible (compress=true) .output type_compatible_up_to_arg (compress=true) @@ -789,22 +789,22 @@ .output typeinfo_vtable_baseclass (compress=true) .output typeinfo_vtable_multiple_inheritance (compress=true) .output typeinfo_vtable_single_inheritance (compress=true) -.output udiv_instruction (compress=true) -.output udiv_instruction_first_operand (compress=true) -.output udiv_instruction_second_operand (compress=true) -.output uitofp_instruction (compress=true) -.output uitofp_instruction_from_operand (compress=true) -.output uitofp_instruction_from_type (compress=true) -.output uitofp_instruction_to_type (compress=true) +.output udiv_instr (compress=true) +.output udiv_instr_first_operand (compress=true) +.output udiv_instr_second_operand (compress=true) +.output uitofp_instr (compress=true) +.output uitofp_instr_from_operand (compress=true) +.output uitofp_instr_from_type (compress=true) +.output uitofp_instr_to_type (compress=true) .output undef_constant (compress=true) .output unify_allocation_size (compress=true) .output unknown_location (compress=true) .output unordered_ordering (compress=true) .output unpadded_struct_type (compress=true) -.output unreachable_instruction (compress=true) -.output urem_instruction (compress=true) -.output urem_instruction_first_operand (compress=true) -.output urem_instruction_second_operand (compress=true) +.output unreachable_instr (compress=true) +.output urem_instr (compress=true) +.output urem_instr_first_operand (compress=true) +.output urem_instr_second_operand (compress=true) .output user_option_default (compress=true) .output user_option_defaulted (compress=true) .output user_option_invalid (compress=true) @@ -812,9 +812,9 @@ .output user_option_valid_value (compress=true) .output user_option_value (compress=true) .output user_options (compress=true) -.output va_arg_instruction (compress=true) -.output va_arg_instruction_type (compress=true) -.output va_arg_instruction_va_list (compress=true) +.output va_arg_instr (compress=true) +.output va_arg_instr_type (compress=true) +.output va_arg_instr_va_list (compress=true) .output var_alias (compress=true) .output var_alias_sizes (compress=true) .output var_points_to_sizes (compress=true) @@ -832,7 +832,7 @@ .output vector_type_has_component (compress=true) .output vector_type_has_size (compress=true) .output visibility (compress=true) -.output void_ret_instruction (compress=true) +.output void_ret_instr (compress=true) .output void_type (compress=true) .output vtable (compress=true) .output vtable_func (compress=true) @@ -844,10 +844,10 @@ .output x86_stdcall_calling_convention (compress=true) .output x86_thiscall_calling_convention (compress=true) .output x86mmx_type (compress=true) -.output xor_instruction (compress=true) -.output xor_instruction_first_operand (compress=true) -.output xor_instruction_second_operand (compress=true) -.output zext_instruction (compress=true) -.output zext_instruction_from_operand (compress=true) -.output zext_instruction_from_type (compress=true) -.output zext_instruction_to_type (compress=true) +.output xor_instr (compress=true) +.output xor_instr_first_operand (compress=true) +.output xor_instr_second_operand (compress=true) +.output zext_instr (compress=true) +.output zext_instr_from_operand (compress=true) +.output zext_instr_from_type (compress=true) +.output zext_instr_to_type (compress=true) diff --git a/datalog/export/subset.dl b/datalog/export/subset.dl index c5febc6..b3d5eea 100644 --- a/datalog/export/subset.dl +++ b/datalog/export/subset.dl @@ -7,6 +7,6 @@ .output subset_lift.alloc_may_alias_ctx (compress=true) .output subset_lift.alloc_subregion_ctx (compress=true) .output subset_lift.alloc_contains_ctx (compress=true) -.output subset_lift.allocation_by_instruction_ctx (compress=true) +.output subset_lift.allocation_by_instr_ctx (compress=true) .output global_allocation_by_variable (compress=true) .output context_to_string (compress=true) diff --git a/datalog/export/unification.dl b/datalog/export/unification.dl index 2b8991b..c10bd9a 100644 --- a/datalog/export/unification.dl +++ b/datalog/export/unification.dl @@ -7,6 +7,6 @@ .output unification_lift.alloc_may_alias_ctx (compress=true) .output unification_lift.alloc_subregion_ctx (compress=true) .output unification_lift.alloc_contains_ctx (compress=true) -.output unification_lift.allocation_by_instruction_ctx (compress=true) +.output unification_lift.allocation_by_instr_ctx (compress=true) .output global_allocation_by_variable (compress=true) .output context_to_string (compress=true) diff --git a/datalog/import/todo.dl b/datalog/import/todo.dl index a5950dc..7e694a0 100644 --- a/datalog/import/todo.dl +++ b/datalog/import/todo.dl @@ -9,39 +9,39 @@ block_predecessors(bb0, bb1) :- block_of_label(bb0, e0), block_of_label(bb1, e1). -.decl _instruction_bb_entry(v0:symbol, v1:symbol) -instruction_in_block(e0, bb) :- - _instruction_bb_entry(e0, e1), - instruction(e0), +.decl _instr_bb_entry(v0:symbol, v1:symbol) +instr_block(e0, bb) :- + _instr_bb_entry(e0, e1), + instr(e0), variable_is_label(e1), block_of_label(bb, e1). -.decl _phi_instruction_pair_label(v0:symbol, v1:number, v2:symbol) -.decl _phi_instruction_pair_value(v0:symbol, v1:number, v2:symbol) -phi_instruction_pair(v0, v1, [v2, v3]) :- - _phi_instruction_pair_value(v0, v1, v2), - phi_instruction(v0), +.decl _phi_instr_pair_label(v0:symbol, v1:number, v2:symbol) +.decl _phi_instr_pair_value(v0:symbol, v1:number, v2:symbol) +phi_instr_pair(v0, v1, [v2, v3]) :- + _phi_instr_pair_value(v0, v1, v2), + phi_instr(v0), operand(v2), - _phi_instruction_pair_label(v0, v1, v3), + _phi_instr_pair_label(v0, v1, v3), variable(v3). -.decl _switch_instruction_case_label(v0:symbol, v1:number, v2:symbol) -.decl _switch_instruction_case_value(v0:symbol, v1:number, v2:symbol) -switch_instruction_case(v0, v1, [v2, v3]) :- - _switch_instruction_case_value(v0, v1, v2), - switch_instruction(v0), +.decl _switch_instr_case_label(v0:symbol, v1:number, v2:symbol) +.decl _switch_instr_case_value(v0:symbol, v1:number, v2:symbol) +switch_instr_case(v0, v1, [v2, v3]) :- + _switch_instr_case_value(v0, v1, v2), + switch_instr(v0), constant(v2), - _switch_instruction_case_label(v0, v1, v3), + _switch_instr_case_label(v0, v1, v3), variable(v3). -.decl _landingpad_instruction_catch_clause(v0:Instruction, v1:number, v2:Constant) -.decl _landingpad_instruction_filter_clause(v0:Instruction, v1:number, v2:Constant) +.decl _landingpad_instr_catch_clause(v0:Instruction, v1:number, v2:Constant) +.decl _landingpad_instr_filter_clause(v0:Instruction, v1:number, v2:Constant) -catch_clause([v2]), landingpad_instruction_clause(v0, v1, [v2]) :- - _landingpad_instruction_catch_clause(v0, v1, v2). +catch_clause([v2]), landingpad_instr_clause(v0, v1, [v2]) :- + _landingpad_instr_catch_clause(v0, v1, v2). -filter_clause([v2]), landingpad_instruction_clause(v0, v1, [v2]) :- - _landingpad_instruction_filter_clause(v0, v1, v2). +filter_clause([v2]), landingpad_instr_clause(v0, v1, [v2]) :- + _landingpad_instr_filter_clause(v0, v1, v2). .decl _constant_in_func(v0:Constant, v1:FunctionName) .decl _variable_in_func(v0:Variable, v1:FunctionName) diff --git a/datalog/options/user-options.dl b/datalog/options/user-options.dl index 062f8f0..cfa15c6 100644 --- a/datalog/options/user-options.dl +++ b/datalog/options/user-options.dl @@ -114,7 +114,7 @@ user_option_default("pointer_arithmetic","on"). // // For instance, code optimizations may include inlined // constructors. In such a case, we cannot rely on the presence of a -// call to a constructor after a heap allocation instruction, to be +// call to a constructor after a heap allocation instr, to be // able to identify the type of the allocation. //------------------------------------------------------------------------------ diff --git a/datalog/points-to/allocations-decl.dl b/datalog/points-to/allocations-decl.dl index 577fded..c2330ec 100644 --- a/datalog/points-to/allocations-decl.dl +++ b/datalog/points-to/allocations-decl.dl @@ -31,12 +31,12 @@ basic_allocation(?alloc) :- // Constructors -.decl stack_allocation_by_instruction(?insn:AllocaInstruction, ?stackAlloc:StackAllocation) -.decl stack_allocation_by_type_instruction(?type:Type, ?insn:AllocaInstruction, ?stackAlloc:StackAllocation) +.decl stack_allocation_by_instr(?insn:AllocaInstruction, ?stackAlloc:StackAllocation) +.decl stack_allocation_by_type_instr(?type:Type, ?insn:AllocaInstruction, ?stackAlloc:StackAllocation) .decl stack_allocation_by_parameter(?func:FunctionDecl, ?index:number, ?stackAlloc:StackAllocation) -.decl heap_allocation_by_instruction(?insn:CallInstruction, ?heapAlloc:HeapAllocation) -.decl heap_allocation_by_type_instruction(?type:Type, ?insn:CallInstruction, ?heapAlloc:HeapAllocation) +.decl heap_allocation_by_instr(?insn:CallInstruction, ?heapAlloc:HeapAllocation) +.decl heap_allocation_by_type_instr(?type:Type, ?insn:CallInstruction, ?heapAlloc:HeapAllocation) .decl global_allocation_by_func(?func:FunctionDecl, ?globalAlloc:GlobalAllocation) .decl global_allocation_by_variable(?var:GlobalVariable, ?globalAlloc:GlobalAllocation) @@ -59,13 +59,13 @@ heap_alloc_func(?func) :- // // See subset-rules.dl and unification-rules.dl. .type AllocInstruction = CallInstruction | AllocaInstruction -.decl allocation_by_instruction(?insn:AllocInstruction, ?alloc:Allocation) +.decl allocation_by_instr(?insn:AllocInstruction, ?alloc:Allocation) -allocation_by_instruction(?insn, ?alloc) :- - heap_allocation_by_instruction(?insn, ?alloc). +allocation_by_instr(?insn, ?alloc) :- + heap_allocation_by_instr(?insn, ?alloc). -allocation_by_instruction(?insn, ?alloc) :- - stack_allocation_by_instruction(?insn, ?alloc). +allocation_by_instr(?insn, ?alloc) :- + stack_allocation_by_instr(?insn, ?alloc). //--------------------------------------------------------------------------- // [Pointer-compatible allocations] diff --git a/datalog/points-to/allocations-sizes.dl b/datalog/points-to/allocations-sizes.dl index 36f9c2b..7f6107d 100644 --- a/datalog/points-to/allocations-sizes.dl +++ b/datalog/points-to/allocations-sizes.dl @@ -31,33 +31,33 @@ dynamically_sized_alloc(?alloc) :- //----------------------- // An array of elements is allocated in stack, if a size argument is -// provided to the `alloca` instruction +// provided to the `alloca` instr array_allocation(?stackAlloc) :- - alloca_instruction_size(?insn, _), - stack_allocation_by_instruction(?insn, ?stackAlloc). + alloca_instr_size(?insn, _), + stack_allocation_by_instr(?insn, ?stackAlloc). // The size in bytes can be computed by the size of the allocation // types and the number of elements being allocated (if a constant // operand was provided). dynamically_sized_alloc(?stackAlloc) :- - alloca_instruction_size(?insn, ?operand), - stack_allocation_by_instruction(?insn, ?stackAlloc), + alloca_instr_size(?insn, ?operand), + stack_allocation_by_instr(?insn, ?stackAlloc), ! constant_to_int(?operand, _). allocation_size(?stackAlloc, ?n) :- - alloca_instruction_size(?insn, ?operand), + alloca_instr_size(?insn, ?operand), constant_to_int(?operand, numElements), - stack_allocation_by_instruction(?insn, ?stackAlloc), + stack_allocation_by_instr(?insn, ?stackAlloc), static_allocation_type(?stackAlloc, ?type), type_has_size(?type, size), ?n = (numElements)*(size). allocation_size(?stackAlloc, ?size) :- - alloca_instruction(?insn), - !alloca_instruction_size(?insn, _), - stack_allocation_by_instruction(?insn, ?stackAlloc), + alloca_instr(?insn), + !alloca_instr_size(?insn, _), + stack_allocation_by_instr(?insn, ?stackAlloc), static_allocation_type(?stackAlloc, ?type), type_has_size(?type, ?size). @@ -75,58 +75,58 @@ allocation_size(?stackAlloc, ?size) :- array_allocation(?heapAlloc), dynamically_sized_alloc(?heapAlloc) :- - heap_allocation_by_instruction(?insn, ?heapAlloc), + heap_allocation_by_instr(?insn, ?heapAlloc), ! sized_alloc_instr(?insn, _). // Compute sizes when available allocation_size(?heapAlloc, ?size) :- - heap_allocation_by_instruction(?insn, ?heapAlloc), + heap_allocation_by_instr(?insn, ?heapAlloc), sized_alloc_instr(?insn, ?size). -// First compute size of allocation instruction, if statically +// First compute size of allocation instr, if statically // available .decl sized_alloc_instr(?insn: Instruction, ?size: Bytes) sized_alloc_instr(?insn, as(?size, Bytes)) :- func_name(?func, "@malloc"), - call_instruction_fn_target(?insn, ?func), - call_instruction_arg(?insn, 0, ?operand), + call_instr_fn_target(?insn, ?func), + call_instr_arg(?insn, 0, ?operand), constant_to_int(?operand, ?size). sized_alloc_instr(?insn, as(?size, Bytes)) :- func_name(?func, "@malloc"), - invoke_instruction_fn_target(?insn, ?func), - invoke_instruction_arg(?insn, 0, ?operand), + invoke_instr_fn_target(?insn, ?func), + invoke_instr_arg(?insn, 0, ?operand), constant_to_int(?operand, ?size). sized_alloc_instr(?insn, as(?size, Bytes)) :- func_name(?func, "@realloc"), - invoke_instruction_fn_target(?insn, ?func), - invoke_instruction_arg(?insn, 1, ?operand), + invoke_instr_fn_target(?insn, ?func), + invoke_instr_arg(?insn, 1, ?operand), constant_to_int(?operand, ?size). sized_alloc_instr(?insn, as(?size, Bytes)) :- func_name(?func, "@realloc"), - call_instruction_fn_target(?insn, ?func), - call_instruction_arg(?insn, 1, ?operand), + call_instr_fn_target(?insn, ?func), + call_instr_arg(?insn, 1, ?operand), constant_to_int(?operand, ?size). sized_alloc_instr(?insn, as(n, Bytes)) :- func_name(?func, "@calloc"), - invoke_instruction_fn_target(?insn, ?func), - invoke_instruction_arg(?insn, 0, ?nmembOp), - invoke_instruction_arg(?insn, 1, ?sizeOp), + invoke_instr_fn_target(?insn, ?func), + invoke_instr_arg(?insn, 0, ?nmembOp), + invoke_instr_arg(?insn, 1, ?sizeOp), constant_to_int(?nmembOp, nmemb), constant_to_int(?sizeOp, size), n = size * nmemb. sized_alloc_instr(?insn, as(n, Bytes)) :- func_name(?func, "@calloc"), - call_instruction_fn_target(?insn, ?func), - call_instruction_arg(?insn, 0, ?nmembOp), - call_instruction_arg(?insn, 1, ?sizeOp), + call_instr_fn_target(?insn, ?func), + call_instr_arg(?insn, 0, ?nmembOp), + call_instr_arg(?insn, 1, ?sizeOp), constant_to_int(?nmembOp, nmemb), constant_to_int(?sizeOp, size), n = size * nmemb. @@ -136,21 +136,21 @@ sized_alloc_instr(?insn, as(n, Bytes)) :- //--------------------------------- allocation_size(?alloc, ?size) :- - stack_allocation_by_instruction(?insn, ?stackAlloc), + stack_allocation_by_instr(?insn, ?stackAlloc), allocation_size(?stackAlloc, ?size), - stack_allocation_by_type_instruction(_, ?insn, ?alloc). + stack_allocation_by_type_instr(_, ?insn, ?alloc). allocation_size(?alloc, ?size) :- - heap_allocation_by_instruction(?insn, ?heapAlloc), + heap_allocation_by_instr(?insn, ?heapAlloc), allocation_size(?heapAlloc, ?size), - heap_allocation_by_type_instruction(_, ?insn, ?alloc). + heap_allocation_by_type_instr(_, ?insn, ?alloc). dynamically_sized_alloc(?alloc) :- - stack_allocation_by_instruction(?insn, ?stackAlloc), + stack_allocation_by_instr(?insn, ?stackAlloc), dynamically_sized_alloc(?stackAlloc), - stack_allocation_by_type_instruction(_, ?insn, ?alloc). + stack_allocation_by_type_instr(_, ?insn, ?alloc). dynamically_sized_alloc(?alloc) :- - heap_allocation_by_instruction(?insn, ?heapAlloc), + heap_allocation_by_instr(?insn, ?heapAlloc), dynamically_sized_alloc(?heapAlloc), - heap_allocation_by_type_instruction(_, ?insn, ?alloc). + heap_allocation_by_type_instr(_, ?insn, ?alloc). diff --git a/datalog/points-to/allocations-subobjects-aliases.dl b/datalog/points-to/allocations-subobjects-aliases.dl index c1a6e77..5418cb9 100644 --- a/datalog/points-to/allocations-subobjects-aliases.dl +++ b/datalog/points-to/allocations-subobjects-aliases.dl @@ -2,7 +2,7 @@ // [Implicit Pointer Aliases] // // In C, the expression `ptr[0]` and `*ptr` is the same. The 0 index -// is often omitted from some instructions, but we must ensure that +// is often omitted from some instrs, but we must ensure that // such expressions are treated as aliases by the analysis and have // the same points-to sets. // diff --git a/datalog/points-to/allocations-subobjects.dl b/datalog/points-to/allocations-subobjects.dl index 122e4dc..32c14cc 100644 --- a/datalog/points-to/allocations-subobjects.dl +++ b/datalog/points-to/allocations-subobjects.dl @@ -17,11 +17,11 @@ // // As a final note, the need to create subregions stems from the fact // that in C, we can refer to field addresses, and at a later point -// dereference them. This translates to a `getelementptr` instruction +// dereference them. This translates to a `getelementptr` instr // that computes the offset from a base pointer variable and assigns // it to some other variable, which may then be supplied as the -// address operand to a `load`/`store` instruction. These two -// instructions may reside in different funcs, so an +// address operand to a `load`/`store` instr. These two +// instrs may reside in different funcs, so an // intraprocedural matching would not work. // // This is an important difference with the Java Bytecode IR, where no @@ -49,9 +49,9 @@ pointer_index(?region, ?type, 0) :- // TODO(lb): Use `gep_zero_index_offset` here. pointer_index(?region, ?type, ?finalIdx) :- - ( ( getelementptr_instruction_index(?insn, 0, ?indexOp) + ( ( getelementptr_instr_index(?insn, 0, ?indexOp) , constant_to_int(?indexOp, ?index) - , getelementptr_instruction_base_type(?insn, ?declaredType) + , getelementptr_instr_base_type(?insn, ?declaredType) , _alloc_region(?region) ) ; ( getelementptr_constant_expression_index(?expr, 0, ?indexOp) @@ -98,8 +98,8 @@ pointer_offset(?region, ?type, ?index * ?size) :- .decl array_indices__no_typecomp(?region: Region, ?type: ArrayType, ?index: ArrayIndex) array_indices__no_typecomp(?region, ?declaredType, as(?constantIndex, ArrayIndex)) :- - ( ( getelementptr_instruction_index(?insn, ?index, ?indexOp) - , getelementptr_instruction_interm_type(?insn, ?index, ?declaredType) + ( ( getelementptr_instr_index(?insn, ?index, ?indexOp) + , getelementptr_instrterm_type(?insn, ?index, ?declaredType) , _alloc_region(?region) ) ; ( getelementptr_constant_expression_index(?expr, ?index, ?indexOp) @@ -523,8 +523,8 @@ not_array_index(?component) :- path_component_at_any_index(?component). // // Note that pointer arithmetic and other C idioms may cause infinite // recursion and creation of new subobjects. For instance, the - // instruction: `ptr = ptr + 1` when translated to a `getelementptr` - // instruction, it will create a new subobject relative to the one + // instr: `ptr = ptr + 1` when translated to a `getelementptr` + // instr, it will create a new subobject relative to the one // that `ptr` points to with some offset. However, this subobject will // again flow to the base variable `ptr` triggering the creation of // yet a new subobject. This creation of new subobjects will continue diff --git a/datalog/points-to/allocations-type.dl b/datalog/points-to/allocations-type.dl index fcbf9b5..92e31e8 100644 --- a/datalog/points-to/allocations-type.dl +++ b/datalog/points-to/allocations-type.dl @@ -37,7 +37,7 @@ // constructor must be in the same func that allocates it. allocation_type(?heapAlloc, ?type) :- !inlined_constructors(), - instruction_in_func(?allocInsn, ?inFunction), + instr_func(?allocInsn, ?inFunction), heap_allocation_by_new(?allocInsn, ?heapAlloc), allocation_size(?heapAlloc, ?size), type_has_size(?type, ?size), @@ -45,7 +45,7 @@ allocation_type(?excObj, ?type) :- !inlined_constructors(), - instruction_in_func(?allocInsn, ?inFunction), + instr_func(?allocInsn, ?inFunction), heap_allocation_by_alloc_exc(?allocInsn, ?excObj), allocation_size(?excObj, ?size), type_has_size(?type, ?size), diff --git a/datalog/points-to/allocations.dl b/datalog/points-to/allocations.dl index bc6e988..a21b9e2 100644 --- a/datalog/points-to/allocations.dl +++ b/datalog/points-to/allocations.dl @@ -10,7 +10,7 @@ build_heap_allocation(heapAlloc, func, type, var) :- variable_has_name(var, varName), heapAlloc = cat("*heap_alloc", funcName, "[", type, " ", varName, "]"). -// This file builds allocations for instructions that are reachable via either +// This file builds allocations for instrs that are reachable via either // the subset-based or unification-based analyses. The points-to facts aren't // always shared between them, but the set of basic allocations is. // @@ -24,19 +24,19 @@ build_heap_allocation(heapAlloc, func, type, var) :- /// 1. Alloca Instructions stack_allocation(?stackAlloc), - stack_allocation_by_instruction(?instr, ?stackAlloc) + stack_allocation_by_instr(?instr, ?stackAlloc) :- - alloca_instruction(?instr), - instruction_assigns_to(?instr, ?var), - instruction_in_func(?instr, ?instrFunc), + alloca_instr(?instr), + instr_assigns_to(?instr, ?var), + instr_func(?instr, ?instrFunc), variable_has_type(?var,?type), any_reachable_func(?instrFunc), build_stack_allocation(?stackAlloc, ?instrFunc, ?type, ?var). static_allocation_type(?stackAlloc, ?type) :- - alloca_instruction(?instr), - alloca_instruction_type(?instr,?type), - stack_allocation_by_instruction(?instr, ?stackAlloc). + alloca_instr(?instr), + alloca_instr_type(?instr,?type), + stack_allocation_by_instr(?instr, ?stackAlloc). /// 2. Parameters with pass-by-value semantics @@ -63,14 +63,14 @@ static_allocation_type(?stackAlloc, ?type) :- //--------------------------------------------------------------------- heap_allocation(?heapAlloc), -heap_allocation_by_instruction(?instr, ?heapAlloc), +heap_allocation_by_instr(?instr, ?heapAlloc), static_allocation_type(?heapAlloc, ?elementType) :- heap_alloc_func(?func), - ( call_instruction_fn_target(?instr, ?func) - ; invoke_instruction_fn_target(?instr, ?func)), - instruction_assigns_to(?instr, ?var), - instruction_in_func(?instr, ?instrFunc), + ( call_instr_fn_target(?instr, ?func) + ; invoke_instr_fn_target(?instr, ?func)), + instr_assigns_to(?instr, ?var), + instr_func(?instr, ?instrFunc), variable_has_type(?var, ?type), pointer_type_has_component(?type, ?elementType), @@ -81,26 +81,26 @@ static_allocation_type(?heapAlloc, ?elementType) heap_allocation(?heapAlloc), heap_allocation_by_malloc(?insn, ?heapAlloc) :- func_name(?func, "@malloc"), - call_instruction_fn_target(?insn, ?func), - heap_allocation_by_instruction(?insn, ?heapAlloc). + call_instr_fn_target(?insn, ?func), + heap_allocation_by_instr(?insn, ?heapAlloc). heap_allocation(?heapAlloc), heap_allocation_by_calloc(?insn, ?heapAlloc) :- func_name(?func, "@calloc"), - call_instruction_fn_target(?insn, ?func), - heap_allocation_by_instruction(?insn, ?heapAlloc). + call_instr_fn_target(?insn, ?func), + heap_allocation_by_instr(?insn, ?heapAlloc). heap_allocation(?heapAlloc), heap_allocation_by_realloc(?insn, ?heapAlloc) :- func_name(?func, "@realloc"), - call_instruction_fn_target(?insn, ?func), - heap_allocation_by_instruction(?insn, ?heapAlloc). + call_instr_fn_target(?insn, ?func), + heap_allocation_by_instr(?insn, ?heapAlloc). heap_allocation(?heapAlloc), heap_allocation_by_mmap(?insn, ?heapAlloc) :- func_name(?func, "@mmap"), - call_instruction_fn_target(?insn, ?func), - heap_allocation_by_instruction(?insn, ?heapAlloc). + call_instr_fn_target(?insn, ?func), + heap_allocation_by_instr(?insn, ?heapAlloc). .comp Allocations { //---------------------------------------------------------------------------- @@ -144,9 +144,9 @@ heap_allocation_by_mmap(?insn, ?heapAlloc) :- allocated_at(?newCtx, ?stackAlloc, ?ctx, ?var) :- - stack_allocation_by_instruction(?instr, ?stackAlloc), - instruction_assigns_to(?instr, ?var), - instruction_in_func(?instr, ?instrFunc), + stack_allocation_by_instr(?instr, ?stackAlloc), + instr_assigns_to(?instr, ?var), + instr_func(?instr, ?instrFunc), reachable_context(?ctx, ?instrFunc), record(?newCtx, ?stackAlloc, ?ctx). @@ -160,9 +160,9 @@ heap_allocation_by_mmap(?insn, ?heapAlloc) :- allocated_at(?newCtx, ?heapAlloc, ?ctx, ?var) :- - heap_allocation_by_instruction(?instr, ?heapAlloc), - instruction_assigns_to(?instr, ?var), - instruction_in_func(?instr, ?instrFunc), + heap_allocation_by_instr(?instr, ?heapAlloc), + instr_assigns_to(?instr, ?var), + instr_func(?instr, ?instrFunc), reachable_context(?ctx, ?instrFunc), record(?newCtx, ?heapAlloc, ?ctx). } @@ -172,9 +172,9 @@ heap_allocation_by_mmap(?insn, ?heapAlloc) :- //------------------------------------------------ allocation_pos(?alloc, ?line, ?column) :- - (stack_allocation_by_instruction(?insn, ?alloc); - heap_allocation_by_instruction(?insn, ?alloc)), - instruction_pos(?insn, ?line, ?column). + (stack_allocation_by_instr(?insn, ?alloc); + heap_allocation_by_instr(?insn, ?alloc)), + instr_pos(?insn, ?line, ?column). allocation_pos(?alloc, ?line, ?column) :- stack_allocation_by_parameter(?func, ?index, ?alloc), diff --git a/datalog/points-to/assertions.dl b/datalog/points-to/assertions.dl index 98e4739..71cc06e 100644 --- a/datalog/points-to/assertions.dl +++ b/datalog/points-to/assertions.dl @@ -168,18 +168,18 @@ assert_alloc_with_ctx_complete(?aCtx, ?alloc) :- // Inhabitedness //------------------------------------------------------------------------------ -.decl _assert_every_gep_instruction_points_to_something(?ctx: Context, ?insn: GetElementPtrInstruction) -_assert_every_gep_instruction_points_to_something(?ctx, ?insn) :- +.decl _assert_every_gep_instr_points_to_something(?ctx: Context, ?insn: GetElementPtrInstruction) +_assert_every_gep_instr_points_to_something(?ctx, ?insn) :- subset_gep._gep_address_ctx_points_to(?ctx, _, ?alloc, ?insn), subset_gep._gep_last_index_points_to(_, ?alloc, ?insn). // TODO(sm): this seems to get tripped up by C++ programs with complicated uses // of allocations at different types without always using an explicit bitcast -// instruction. Could be solved by adding more aggresive type back-propagation? -.decl failing_assert_every_gep_instruction_points_to_something(?ctx: Context, ?insn: GetElementPtrInstruction) -failing_assert_every_gep_instruction_points_to_something(?ctx, ?insn) :- +// instr. Could be solved by adding more aggresive type back-propagation? +.decl failing_assert_every_gep_instr_points_to_something(?ctx: Context, ?insn: GetElementPtrInstruction) +failing_assert_every_gep_instr_points_to_something(?ctx, ?insn) :- subset_gep._gep_address_ctx_points_to(?ctx, _, _, ?insn), - ! _assert_every_gep_instruction_points_to_something(?ctx, ?insn). + ! _assert_every_gep_instr_points_to_something(?ctx, ?insn). .decl assert_every_gep_constant_expr_points_to_something(?cExpr: GetElementPtrConstantExpression) assert_every_gep_constant_expr_points_to_something(?cExpr) :- @@ -203,8 +203,8 @@ assert_every_pointer_constant_points_to_something(?constant) :- // .decl failing_assert_reachable_pointer_vars_point_to_something(?var: Variable) failing_assert_reachable_pointer_vars_point_to_something(?var) :- - instruction_assigns_to(?inst, ?var), - subset.callgraph.reachable_instruction(?inst), + instr_assigns_to(?inst, ?var), + subset.callgraph.reachable_instr(?inst), variable_has_type(?var, ?ty), pointer_type(?ty), ! subset.var_points_to(_, _, _, ?var). @@ -253,25 +253,25 @@ failing_assert_global_allocations_have_sizes(?alloc) :- .decl assert_var_points_to_implies_reachable(?aCtx: Context, ?alloc: Allocation, ?ctx: Context, ?var: Variable) assert_var_points_to_implies_reachable(?aCtx, ?alloc, ?ctx, ?toVar) :- subset.var_points_to(?aCtx, ?alloc, ?ctx, ?toVar), - instruction_assigns_to(?instr, ?toVar), - instruction_in_func(?instr, ?instrFunc), + instr_assigns_to(?instr, ?toVar), + instr_func(?instr, ?instrFunc), ! subset.callgraph.reachable_context(?ctx, ?instrFunc). // Instructions can't access variables defined outside their own func. .decl assert_bitcast_operand_in_same_func(?bitcastInstr: Instruction) assert_bitcast_operand_in_same_func(?bitcastInstr) :- - bitcast_instruction_from_operand(?bitcastInstr, ?fromOperand), - instruction_assigns_to(?instr, ?fromOperand), - instruction_in_func(?bitcastInstr, ?instrFunc), - ! instruction_in_func(?instr, ?instrFunc). + bitcast_instr_from_operand(?bitcastInstr, ?fromOperand), + instr_assigns_to(?instr, ?fromOperand), + instr_func(?bitcastInstr, ?instrFunc), + ! instr_func(?instr, ?instrFunc). .decl assert_reachable_direct_calls_have_callees(?ctx: Context, ?call : Instruction) assert_reachable_direct_calls_have_callees(?ctx, ?call) :- subset.callgraph.reachable_context(?ctx, ?instrFunc), - instruction_in_func(?call, ?instrFunc), - direct_call_instruction(?call), - call_instruction_fn_operand(?call, ?funcOp), + instr_func(?call, ?instrFunc), + direct_call_instr(?call), + call_instr_fn_operand(?call, ?funcOp), ! undef_constant(?funcOp), ! subset.callgraph.callgraph_edge(_, _, ?ctx, ?call). @@ -362,9 +362,9 @@ assert_unique_repr(?inpCtx, ?inpAlloc) :- .decl _typed_alloc(?alloc: Allocation) _typed_alloc(?alloc) :- - unification.type_indication.heap_allocation_by_type_instruction(_, _, ?alloc). + unification.type_indication.heap_allocation_by_type_instr(_, _, ?alloc). _typed_alloc(?alloc) :- - unification.type_indication.stack_allocation_by_type_instruction(_, _, ?alloc). + unification.type_indication.stack_allocation_by_type_instr(_, _, ?alloc). _typed_alloc(?subAlloc) :- _typed_alloc(?alloc), unification_subobjects.alloc_subregion_base(?alloc, ?subAlloc). diff --git a/datalog/points-to/assignment.dl b/datalog/points-to/assignment.dl index 4d4ad23..f5e7797 100644 --- a/datalog/points-to/assignment.dl +++ b/datalog/points-to/assignment.dl @@ -1,59 +1,59 @@ //---------------------------------------------------------------------- // [Assignment Instructions] // -// There are many types of instructions that essentially copy the +// There are many types of instrs that essentially copy the // points-to set of a variable to another. // -// Cast instructions such as `bitcast` fall to this category. Often +// Cast instrs such as `bitcast` fall to this category. Often // the returned type of a `@malloc` func call is different than // the declared type of the target variable. The LLVM IR adds a // temporary variable of type `i8*` to hold the result and then an -// intermediate `bitcast` instruction that casts this temporary +// intermediate `bitcast` instr that casts this temporary // variable to the right type. // -// Another class of assignment instructions are the interprocedural +// Another class of assignment instrs are the interprocedural // assignments. This way we can model the implicit flow from (i) the // actual arguments to the formal parameters, and from (ii) the return // value of the called func to the variable that is assigned the -// result of the `call instruction`. +// result of the `call instr`. // // A simple field-insensitive approach would also treat getelementptr as an -// assignment instruction. +// assignment instr. //---------------------------------------------------------------------- -.decl assign_instruction(?toVar: Variable, ?value: Operand) -// `bitcast` instructions -assign_instruction(?toVar, ?value) :- +.decl assign_instr(?toVar: Variable, ?value: Operand) +// `bitcast` instrs +assign_instr(?toVar, ?value) :- any_reachable_func(?instrFunc), - instruction_in_func(?instr, ?instrFunc), - bitcast_instruction_from_operand(?instr, ?value), // TODO: consider adding type check - instruction_assigns_to(?instr, ?toVar). + instr_func(?instr, ?instrFunc), + bitcast_instr_from_operand(?instr, ?value), // TODO: consider adding type check + instr_assigns_to(?instr, ?toVar). -// `ptrtoint` instructions -assign_instruction(?toVar, ?value) :- +// `ptrtoint` instrs +assign_instr(?toVar, ?value) :- any_reachable_func(?instrFunc), - instruction_in_func(?instr, ?instrFunc), - ptrtoint_instruction_from_operand(?instr, ?value), - instruction_assigns_to(?instr, ?toVar). + instr_func(?instr, ?instrFunc), + ptrtoint_instr_from_operand(?instr, ?value), + instr_assigns_to(?instr, ?toVar). -// `phi` instructions: treat every possible pair value as a potential +// `phi` instrs: treat every possible pair value as a potential // assignment to the target variable -assign_instruction(?toVar, ?value) :- +assign_instr(?toVar, ?value) :- any_reachable_func(?instrFunc), - instruction_in_func(?instr, ?instrFunc), - phi_instruction_pair(?instr, _, [?value, _]), - instruction_assigns_to(?instr, ?toVar). + instr_func(?instr, ?instrFunc), + phi_instr_pair(?instr, _, [?value, _]), + instr_assigns_to(?instr, ?toVar). -// `select` instructions; similar to `phi` instructions -assign_instruction(?toVar, ?value) :- +// `select` instrs; similar to `phi` instrs +assign_instr(?toVar, ?value) :- any_reachable_func(?instrFunc), - instruction_in_func(?instr, ?instrFunc), - select_instruction(?instr), - ( select_instruction_first_operand(?instr, ?value) - ; select_instruction_second_operand(?instr, ?value) ), - instruction_assigns_to(?instr, ?toVar), - instruction_returns_type(?instr, ?type), + instr_func(?instr, ?instrFunc), + select_instr(?instr), + ( select_instr_first_operand(?instr, ?value) + ; select_instr_second_operand(?instr, ?value) ), + instr_assigns_to(?instr, ?toVar), + instr_returns_type(?instr, ?type), !vector_type(?type). -// TODO: support `cmpxchg` and `atomicrmw` instructions -// TODO: support `invoke` and `landingpad` instructions +// TODO: support `cmpxchg` and `atomicrmw` instrs +// TODO: support `invoke` and `landingpad` instrs diff --git a/datalog/points-to/at-exit.dl b/datalog/points-to/at-exit.dl index 540c946..702ea8a 100644 --- a/datalog/points-to/at-exit.dl +++ b/datalog/points-to/at-exit.dl @@ -55,8 +55,8 @@ cxx_atexit_func(?func) :- _registers_dtor_atexit(?callCtx, ?dtorOperand, ?recvOperand) :- cxx_atexit_func(?atExit), callgraph_edge(_, ?atExit, ?callCtx, ?callInstr), - call_instruction_arg(?callInstr, 0, ?dtorOperand), - call_instruction_arg(?callInstr, 1, ?recvOperand). + call_instr_arg(?callInstr, 0, ?dtorOperand), + call_instr_arg(?callInstr, 1, ?recvOperand). // The following rule augments the logic about identifying funcs // registered to run at program exit, so that it also works with @@ -81,7 +81,7 @@ cxx_atexit_func(?func) :- called_at_exit(Callback) :- func_name(AtExit, "@atexit"), callgraph_edge(_, AtExit, _, CallerInstr), - call_instruction_arg(CallerInstr, 0, Constant), + call_instr_arg(CallerInstr, 0, Constant), // the following is a simplified version of logic that can only // work with direct func calls constant_references_func(Constant, Callback). diff --git a/datalog/points-to/constant-exprs.dl b/datalog/points-to/constant-exprs.dl index 7e4fbd9..8684ce5 100644 --- a/datalog/points-to/constant-exprs.dl +++ b/datalog/points-to/constant-exprs.dl @@ -39,7 +39,7 @@ constant_points_to(?outerConstant, ?alloc) :- //------------------------------------------------------------------------------ // [Field Sensitivity for `getelementptr` constant expressions] // -// This is equivalent to the treatment of GEP instructions, but with +// This is equivalent to the treatment of GEP instrs, but with // no support for variable indices, as they are not allowed in // constant expressions. //------------------------------------------------------------------------------ diff --git a/datalog/points-to/constant-init.dl b/datalog/points-to/constant-init.dl index 4fb51e1..5972154 100644 --- a/datalog/points-to/constant-init.dl +++ b/datalog/points-to/constant-init.dl @@ -42,7 +42,7 @@ array_indices__no_typecomp(?region, ?constantType, as(?index, ArrayIndex)) :- constant_array_index(?constant, ?index, _), array_type(?constantType), // Note that all arrays will have indices that look like they might be targets - // of GEP instructions - see allocations-subobjects.dl. However, there's no + // of GEP instrs - see allocations-subobjects.dl. However, there's no // need to create *all* possible suballocations for non-pointer array types - // it's expensive and they can't affect points-to facts. type_contains_pointer(?constantType), diff --git a/datalog/points-to/constant-points-to.dl b/datalog/points-to/constant-points-to.dl index 56ec793..2597a99 100644 --- a/datalog/points-to/constant-points-to.dl +++ b/datalog/points-to/constant-points-to.dl @@ -7,7 +7,7 @@ // It is essential to be able to track the flow of allocations through all these // types of constants, since an arbitrary complex constant expression may be used // as an operand to a `store` or `load` -// instruction. +// instr. .decl constant_points_to(?constant: Constant, ?alloc: Allocation) diff --git a/datalog/points-to/core.dl b/datalog/points-to/core.dl index fead62d..35b6355 100644 --- a/datalog/points-to/core.dl +++ b/datalog/points-to/core.dl @@ -47,20 +47,20 @@ //---------------------------------------------------------------------- var_points_to(?aCtx, ?alloc, ?ctx, ?toVar) :- - // assign_instruction only holds if the instruction is reachable. - assign_instruction(?toVar, ?value), + // assign_instr only holds if the instr is reachable. + assign_instr(?toVar, ?value), operand_points_to(?aCtx, ?alloc, ?ctx, ?value). // TODO: consider adding type check - // `inttoptr` instructions + // `inttoptr` instrs // // TODO(lb): Should this be an assignment? Should we merge allocations with // *unknown*? var_points_to(?aCtx, ?unknown, ?ctx, ?toVar) :- empty_alloc_context(?aCtx), unknown_location(?unknown), - inttoptr_instruction(?instr), - instruction_assigns_to(?instr, ?toVar), - instruction_in_func(?instr, ?instrFunc), + inttoptr_instr(?instr), + instr_assigns_to(?instr, ?toVar), + instr_func(?instr, ?instrFunc), callgraph.reachable_context(?ctx, ?instrFunc). //---------------------------- @@ -121,8 +121,8 @@ .init exception_object = ExceptionObjectComponent - exception_object.heap_allocation_by_type_instruction(?type, ?insn, ?heapAlloc) :- - type_indication.heap_allocation_by_type_instruction(?type, ?insn, ?heapAlloc). + exception_object.heap_allocation_by_type_instr(?type, ?insn, ?heapAlloc) :- + type_indication.heap_allocation_by_type_instr(?type, ?insn, ?heapAlloc). .init interp_assignment = InterpAssignment @@ -151,11 +151,11 @@ type_indication.var_points_to(?aCtx, ?alloc, ?ctx, ?var) :- var_points_to(?aCtx, ?alloc, ?ctx, ?var). - heap_allocation_by_type_instruction(?type, ?insn, ?alloc) :- - type_indication.heap_allocation_by_type_instruction(?type, ?insn, ?alloc). + heap_allocation_by_type_instr(?type, ?insn, ?alloc) :- + type_indication.heap_allocation_by_type_instr(?type, ?insn, ?alloc). - stack_allocation_by_type_instruction(?type, ?insn, ?alloc) :- - type_indication.stack_allocation_by_type_instruction(?type, ?insn, ?alloc). + stack_allocation_by_type_instr(?type, ?insn, ?alloc) :- + type_indication.stack_allocation_by_type_instr(?type, ?insn, ?alloc). // Components that don't appear here don't share setup code between the // subset-based and unification-based analyses - their input relations require diff --git a/datalog/points-to/cplusplus-exceptions.dl b/datalog/points-to/cplusplus-exceptions.dl index ef45cc0..892911c 100644 --- a/datalog/points-to/cplusplus-exceptions.dl +++ b/datalog/points-to/cplusplus-exceptions.dl @@ -35,14 +35,14 @@ cxx_alloc_exception(?func), // Compute allocation size sized_alloc_instr(?insn, as(?size, Bytes)) :- cxx_alloc_exception(?func), - call_instruction_fn_target(?insn, ?func), - call_instruction_arg(?insn, 0, ?sizeOp), + call_instr_fn_target(?insn, ?func), + call_instr_arg(?insn, 0, ?sizeOp), constant_to_int(?sizeOp, ?size). sized_alloc_instr(?insn, as(?size, Bytes)) :- cxx_alloc_exception(?func), - invoke_instruction_fn_target(?insn, ?func), - invoke_instruction_arg(?insn, 0, ?sizeOp), + invoke_instr_fn_target(?insn, ?func), + invoke_instr_arg(?insn, 0, ?sizeOp), constant_to_int(?sizeOp, ?size). .type ExceptionObject = Allocation @@ -53,7 +53,7 @@ sized_alloc_instr(?insn, as(?size, Bytes)) :- // https://souffle-lang.github.io/components#input-rules //---------------------------------------------------------------------------- - .decl heap_allocation_by_type_instruction(?type: Type, ?insn: Instruction, ?heapAlloc: HeapAllocation) inline + .decl heap_allocation_by_type_instr(?type: Type, ?insn: Instruction, ?heapAlloc: HeapAllocation) inline //---------------------------------------------------------------------------- // "Output"/defined rules @@ -77,15 +77,15 @@ sized_alloc_instr(?insn, as(?size, Bytes)) :- , _exception_object(?heapAlloc) :- cxx_alloc_exception(?func), - call_instruction_fn_target(?insn, ?func), - heap_allocation_by_instruction(?insn, ?heapAlloc). + call_instr_fn_target(?insn, ?func), + heap_allocation_by_instr(?insn, ?heapAlloc). heap_allocation_by_alloc_exc(?insn, ?heapAlloc) , _exception_object(?heapAlloc) :- cxx_alloc_exception(?func), - invoke_instruction_fn_target(?insn, ?func), - heap_allocation_by_instruction(?insn, ?heapAlloc). + invoke_instr_fn_target(?insn, ?func), + heap_allocation_by_instr(?insn, ?heapAlloc). // In the case of inlined constructors, we mark the exception object // as untyped and rely on the type back-propagation @@ -100,7 +100,7 @@ sized_alloc_instr(?insn, as(?size, Bytes)) :- :- inlined_constructors(), heap_allocation_by_alloc_exc(?insn, _), - heap_allocation_by_type_instruction(_, ?insn, ?typedExcObj). + heap_allocation_by_type_instr(_, ?insn, ?typedExcObj). } //------------------------------------------------------------------------- @@ -178,20 +178,20 @@ typeinfo(?var), // implementation details, and should not be accessed outside the component. //---------------------------------------------------------------------------- - .decl _cxx_throw_instruction(?throwInsn: Instruction) - _cxx_throw_instruction(?throwInsn) :- + .decl _cxx_throw_instr(?throwInsn: Instruction) + _cxx_throw_instr(?throwInsn) :- cxx_throw_func(?throwFunc), callgraph_edge(_, ?throwFunc, _, ?throwInsn). - .decl _cxx_throw_instruction_exception(?excObj: ExceptionObject, ?throwInsn: Instruction) - _cxx_throw_instruction_exception(?excObj, ?throwInsn) :- - _cxx_throw_instruction(?throwInsn), + .decl _cxx_throw_instr_exception(?excObj: ExceptionObject, ?throwInsn: Instruction) + _cxx_throw_instr_exception(?excObj, ?throwInsn) :- + _cxx_throw_instr(?throwInsn), actual_arg(?throwInsn, 0, ?exc), operand_points_to(_, ?excObj, _, ?exc). - .decl _cxx_throw_instruction_full_exception(?aCtx: Context, ?excObj: ExceptionObject, ?throwInsn: Instruction) - _cxx_throw_instruction_full_exception(?aCtx, ?excObj, ?throwInsn) :- - _cxx_throw_instruction(?throwInsn), + .decl _cxx_throw_instr_full_exception(?aCtx: Context, ?excObj: ExceptionObject, ?throwInsn: Instruction) + _cxx_throw_instr_full_exception(?aCtx, ?excObj, ?throwInsn) :- + _cxx_throw_instr(?throwInsn), actual_arg(?throwInsn, 0, ?exc), operand_points_to(?aCtx, ?excObj, _, ?exc). @@ -199,17 +199,17 @@ typeinfo(?var), // * Throw Instr registers destructor //------------------------------------------------ - .decl _cxx_throw_instruction_destructor(?dtor: FunctionDecl, ?throwInsn: Instruction) - _cxx_throw_instruction_destructor(?dtor, ?throwInsn) :- - _cxx_throw_instruction(?throwInsn), + .decl _cxx_throw_instr_destructor(?dtor: FunctionDecl, ?throwInsn: Instruction) + _cxx_throw_instr_destructor(?dtor, ?throwInsn) :- + _cxx_throw_instr(?throwInsn), actual_arg(?throwInsn, 2, ?dtorArg), stripctx_operand_points_to(?alloc, ?dtorArg), func_by_location(?alloc, ?dtor). - .decl _cxx_throw_instruction_no_dtor(?throwInsn: Instruction) - _cxx_throw_instruction_no_dtor(?throwInsn) :- + .decl _cxx_throw_instr_no_dtor(?throwInsn: Instruction) + _cxx_throw_instr_no_dtor(?throwInsn) :- null_location(?null), - _cxx_throw_instruction(?throwInsn), + _cxx_throw_instr(?throwInsn), actual_arg(?throwInsn, 2, ?dtorArg), stripctx_operand_points_to(?null, ?dtorArg). @@ -217,21 +217,21 @@ typeinfo(?var), // * Throw Instr associates typeinfo object //------------------------------------------------ - .decl _cxx_throw_instruction_typeinfo(?excTypeInfo: GlobalVariable, ?throwInsn: Instruction) - _cxx_throw_instruction_typeinfo(?excTypeInfo, ?throwInsn) :- - _cxx_throw_instruction(?throwInsn), + .decl _cxx_throw_instr_typeinfo(?excTypeInfo: GlobalVariable, ?throwInsn: Instruction) + _cxx_throw_instr_typeinfo(?excTypeInfo, ?throwInsn) :- + _cxx_throw_instr(?throwInsn), actual_arg(?throwInsn, 1, ?typeInfoArg), stripctx_operand_points_to(?typeInfoObj, ?typeInfoArg), _type_info_by_alloc(?typeInfoObj, ?excTypeInfo). //------------------------------------------------------------------------- // The following is a generic catch-all relation that associates with - // each throw instruction multiple destructor - typeinfo - exception + // each throw instr multiple destructor - typeinfo - exception // object triplets. Each triplet contains compatible elements. //------------------------------------------------------------------------- // We can use the destructor and the typeinfo object supplied to a - // throw instruction, as type indications for the exception object. + // throw instr, as type indications for the exception object. // TODO(lb): This should be named type_indication4, but a bug in Souffle // prevents it. Appears fixed in Souffle on master, so should be in the next @@ -242,19 +242,19 @@ typeinfo(?var), ty_indication4(?type, ?aCtx, ?excObj) :- untyped_allocation(_, ?excObj), - _cxx_throw_instruction_full_exception(?aCtx, ?excObj, ?throwInsn), - _cxx_throw_instruction_destructor(?dtor, ?throwInsn), + _cxx_throw_instr_full_exception(?aCtx, ?excObj, ?throwInsn), + _cxx_throw_instr_destructor(?dtor, ?throwInsn), destructor_class_type(?dtor, ?type). ty_indication5(?classType, ?aCtx, ?excObj) :- untyped_allocation(_, ?excObj), - _cxx_throw_instruction_full_exception(?aCtx, ?excObj, ?throwInsn), - _cxx_throw_instruction_typeinfo(?typeInfo, ?throwInsn), + _cxx_throw_instr_full_exception(?aCtx, ?excObj, ?throwInsn), + _cxx_throw_instr_typeinfo(?typeInfo, ?throwInsn), class_type_typeinfo(?classType, ?typeInfo). - // Note that the typeinfo registered in the throw instruction may be + // Note that the typeinfo registered in the throw instr may be // one of a non-existing LLVM type, that has been removed altogehter // due to some optimization. Hence, we can only rely on the type of // the destructor's receiver to obtain and verify the type of the @@ -271,18 +271,18 @@ typeinfo(?var), .decl _cxx_throws(?dtor: FunctionDecl, ?typeInfo: GlobalVariable, ?excObj: ExceptionObject, ?throwInsn: Instruction) _cxx_throws(?dtor, ?typeInfo, ?excObj, ?throwInsn) :- - _cxx_throw_instruction_exception(?excObj, ?throwInsn), - _cxx_throw_instruction_typeinfo(?typeInfo, ?throwInsn), - _cxx_throw_instruction_destructor(?dtor, ?throwInsn), + _cxx_throw_instr_exception(?excObj, ?throwInsn), + _cxx_throw_instr_typeinfo(?typeInfo, ?throwInsn), + _cxx_throw_instr_destructor(?dtor, ?throwInsn), allocation_type(?excObj, ?type), class_type_typeinfo(?type, ?typeInfo), class_type_destructor(?dtor, ?type). _cxx_throws(?dtor, ?typeInfo, ?excObj, ?throwInsn) :- - _cxx_throw_instruction_exception(?excObj, ?throwInsn), - _cxx_throw_instruction_typeinfo(?typeInfo, ?throwInsn), - _cxx_throw_instruction_destructor(?dtor, ?throwInsn), + _cxx_throw_instr_exception(?excObj, ?throwInsn), + _cxx_throw_instr_typeinfo(?typeInfo, ?throwInsn), + _cxx_throw_instr_destructor(?dtor, ?throwInsn), _typeinfo_no_class(?typeInfo), allocation_type(?excObj, ?type), class_type_destructor(?dtor, ?type). @@ -290,16 +290,16 @@ typeinfo(?var), .decl _cxx_throws_no_dtor(?typeInfo: GlobalVariable, ?excObj: ExceptionObject, ?throwInsn: Instruction) _cxx_throws_no_dtor(?typeInfo, ?excObj, ?throwInsn) :- - _cxx_throw_instruction_exception(?excObj, ?throwInsn), - _cxx_throw_instruction_typeinfo(?typeInfo, ?throwInsn), - _cxx_throw_instruction_no_dtor(?throwInsn), + _cxx_throw_instr_exception(?excObj, ?throwInsn), + _cxx_throw_instr_typeinfo(?typeInfo, ?throwInsn), + _cxx_throw_instr_no_dtor(?throwInsn), _typeinfo_no_class(?typeInfo). _cxx_throws_no_dtor(?typeInfo, ?excObj, ?throwInsn) :- - _cxx_throw_instruction_exception(?excObj, ?throwInsn), - _cxx_throw_instruction_typeinfo(?typeInfo, ?throwInsn), - _cxx_throw_instruction_no_dtor(?throwInsn), + _cxx_throw_instr_exception(?excObj, ?throwInsn), + _cxx_throw_instr_typeinfo(?typeInfo, ?throwInsn), + _cxx_throw_instr_no_dtor(?throwInsn), allocation_type(?excObj, ?type), class_type_typeinfo(?type, ?typeInfo). } diff --git a/datalog/points-to/cplusplus.dl b/datalog/points-to/cplusplus.dl index bb30e94..8caa472 100644 --- a/datalog/points-to/cplusplus.dl +++ b/datalog/points-to/cplusplus.dl @@ -26,22 +26,22 @@ cxx_new_func(?func), heap_allocation_by_new(?insn, ?heapAlloc) :- cxx_new_func(?func), - ( call_instruction_fn_target(?insn, ?func) - ; invoke_instruction_fn_target(?insn, ?func) ), - heap_allocation_by_instruction(?insn, ?heapAlloc). + ( call_instr_fn_target(?insn, ?func) + ; invoke_instr_fn_target(?insn, ?func) ), + heap_allocation_by_instr(?insn, ?heapAlloc). // Compute allocation size sized_alloc_instr(?insn, as(?size, Bytes)) :- cxx_new_func(?func), - call_instruction_fn_target(?insn, ?func), - call_instruction_arg(?insn, 0, ?operand), + call_instr_fn_target(?insn, ?func), + call_instr_arg(?insn, 0, ?operand), constant_to_int(?operand, ?size). sized_alloc_instr(?insn, as(?size, Bytes)) :- cxx_new_func(?func), - invoke_instruction_fn_target(?insn, ?func), - invoke_instruction_arg(?insn, 0, ?operand), + invoke_instr_fn_target(?insn, ?func), + invoke_instr_arg(?insn, 0, ?operand), constant_to_int(?operand, ?size). //------------------------------------------------------------------------------ @@ -87,10 +87,10 @@ destructor_class_type(?dtor, ?classType) :- .decl is_init_by_ctor(?type: ClassType, ?ctor: FunctionDecl, ?inFunction: Function, ?alloc: Allocation) is_init_by_ctor(?type, ?ctor, ?inFunction, ?alloc) :- - ( call_instruction_fn_target(?initInstr, ?ctor) - ; invoke_instruction_fn_target(?initInstr, ?ctor) ), + ( call_instr_fn_target(?initInstr, ?ctor) + ; invoke_instr_fn_target(?initInstr, ?ctor) ), constructor_class_type(?ctor, ?type), - instruction_in_func(?initInstr, ?inFunction), + instr_func(?initInstr, ?inFunction), actual_arg(?initInstr, 0, ?this), stripctx_operand_points_to(?alloc, ?this). @@ -178,9 +178,9 @@ destructor_class_type(?dtor, ?classType) :- class_instance_vtable(?alloc, ?vTable) :- class_instance_constructor(?alloc, ?ctor), - instruction_in_func(?storeInsn, ?ctor), - store_instruction_value(?storeInsn, ?value), - store_instruction_address(?storeInsn, ?pointer), + instr_func(?storeInsn, ?ctor), + store_instr_value(?storeInsn, ?value), + store_instr_address(?storeInsn, ?pointer), stripctx_operand_points_to(?alloc, ?pointer), constant(?value), constant_contains_vptr(?vTable, ?value). @@ -190,7 +190,7 @@ destructor_class_type(?dtor, ?classType) :- // Find class type associated with each vtable //---------------------------------------------------- - // We do that by identifying instructions that store a pointer to a + // We do that by identifying instrs that store a pointer to a // vtable to the vpointer of some class instance, inside some // constructor. We already now the class type associated with each // constructor func, hence we now have the association between the @@ -201,16 +201,16 @@ destructor_class_type(?dtor, ?classType) :- // vtable:class_type[VTable] = Type // <- // init_by_ctor(Type, Ctor, _, Alloc), - // instruction:func[StoreInsn] = Ctor, - // store_instruction:value[StoreInsn] = Value, - // store_instruction:address[StoreInsn] = Pointer, + // instr:func[StoreInsn] = Ctor, + // store_instr:value[StoreInsn] = Value, + // store_instr:address[StoreInsn] = Pointer, // operand_points_to(Alloc, Pointer), // operand:as_constant[Value] = Constant, // constant_contains_vptr(VTable, Constant). - // Note !!! Load instructions on class instances will return the - // object's vtable. The array-sensitive treatment of GEP instructions + // Note !!! Load instrs on class instances will return the + // object's vtable. The array-sensitive treatment of GEP instrs // will ensure that the indices are appropriately recorded, so that // any subsequent dynamic dispatch will be correctly resolved by the // normal dereference rules. However, in case of non-base class types, diff --git a/datalog/points-to/field-sensitivity.dl b/datalog/points-to/field-sensitivity.dl index a7023e1..f5eac1f 100644 --- a/datalog/points-to/field-sensitivity.dl +++ b/datalog/points-to/field-sensitivity.dl @@ -1,27 +1,27 @@ //------------------------------------------------------------------------------ -// [Field Sensitive treatment of `getelementptr` instructions] +// [Field Sensitive treatment of `getelementptr` instrs] // // We create subregions on the fly to act as destinations of -// instructions that may point to an allocation at some +// instrs that may point to an allocation at some // *offset*. Essentially, we create complex allocations paired with // access paths in a demand-driven way, according to the given indices -// of some GEP instruction where an existing allocation is used as the +// of some GEP instr where an existing allocation is used as the // base operand. The subregions are created in allocations-subobjects.dl. //------------------------------------------------------------------------------ -// getelementptr instruction `insn` indexes into its input allocation at offset +// getelementptr instr `insn` indexes into its input allocation at offset // `offset`. Note that `offset` is a byte offset, not an array offset. .decl gep_zero_index_offset(?insn: GetElementPtrInstruction, ?offset: SubregionOffset) // An index of '0' always indexes offset '0' regardless of the allocation's type. gep_zero_index_offset(?insn, 0) :- - getelementptr_instruction_index(?insn, 0, ?indexOp), + getelementptr_instr_index(?insn, 0, ?indexOp), constant_to_int(?indexOp, 0). gep_zero_index_offset(?insn, ?index * ?size) :- - getelementptr_instruction_index(?insn, 0, ?indexOp), + getelementptr_instr_index(?insn, 0, ?indexOp), constant_to_int(?indexOp, ?index), - getelementptr_instruction_base_type(?insn, ?ptrType), + getelementptr_instr_base_type(?insn, ?ptrType), pointer_type_has_component(?ptrType, ?type), type_has_size(?type, ?size). @@ -105,8 +105,8 @@ gep_zero_index_offset(?insn, ?index * ?size) :- //------------------------------------------------------------------------------ // [GEP points-to relations] // - // To simplify processing of getelementptr instructions, we treat each index - // of the getelementptr instruction stepwise. Relation `gep_indexes_from` + // To simplify processing of getelementptr instrs, we treat each index + // of the getelementptr instr stepwise. Relation `gep_indexes_from` // records which allocations each step is indexing with respect to, while // relation `gep_points_to` records which allocations are pointed to after // indexing. `gep_indexes_from` is used rather than `gep_points_to` for index @@ -124,21 +124,21 @@ gep_zero_index_offset(?insn, ?index * ?size) :- ?alloc: Allocation, ?type: Type) - // The first index of a getelementptr instruction indexes any allocation pointed + // The first index of a getelementptr instr indexes any allocation pointed // to by its base operand. gep_indexes_from(?insn, 0, ?alloc, ?alloc, ?type) :- !gep_is_vector_based(?insn), - getelementptr_instruction_base(?insn, ?base), + getelementptr_instr_base(?insn, ?base), operand_points_to(_, ?alloc, _, ?base), - getelementptr_instruction_base_type(?insn, ?type). + getelementptr_instr_base_type(?insn, ?type). - // The remaining indexes of a getelementptr instruction index from the allocations + // The remaining indexes of a getelementptr instr index from the allocations // pointed to by the previous index, filtered by GEP type compatibility, as // described above. gep_indexes_from(?insn, ?n, ?baseAlloc, ?alloc, ?type) :- - getelementptr_instruction_index(?insn, ?n, _), + getelementptr_instr_index(?insn, ?n, _), gep_points_to(?insn, ?n - 1, ?baseAlloc, ?alloc), - getelementptr_instruction_interm_type(?insn, ?n, ?type), + getelementptr_instrterm_type(?insn, ?n, ?type), _alloc_type_and_path(?alloc, ?allocType, ?component), _gep_type_compatible(?type, ?allocType, ?component). @@ -152,7 +152,7 @@ gep_zero_index_offset(?insn, ?index * ?size) :- //------------------------------------------------------------------------------ // Handling the first index // - // The first index operation in a getelementptr instruction is special because + // The first index operation in a getelementptr instr is special because // it is the only index operation that operates on a pointer. (See "The Often // Misunderstood GEP Instruction": https://llvm.org/docs/GetElementPtr.html) //------------------------------------------------------------------------------ @@ -233,7 +233,7 @@ gep_zero_index_offset(?insn, ?index * ?size) :- // // Note: you might expect this rule never to fire, but to avoid // creating an unbounded number of suballocations, we only create - // suballocations for pointer indices that appear in GEP instructions, + // suballocations for pointer indices that appear in GEP instrs, // not for constant offsets relative to those indices. gep_points_to(?insn, 0, ?baseAlloc, ?alloc) :- @@ -276,7 +276,7 @@ gep_zero_index_offset(?insn, ?index * ?size) :- gep_points_to(?insn, 0, ?baseAlloc, ?alloc) :- gep_indexes_from(?insn, 0, ?baseAlloc, ?baseAlloc, ?type), pointer_type(?type), - getelementptr_instruction_index(?insn, 0, ?indexOp), + getelementptr_instr_index(?insn, 0, ?indexOp), ! operand_to_int(?indexOp, _), alloc_subregion_at_any_array_index(?baseAlloc, ?alloc). @@ -291,7 +291,7 @@ gep_zero_index_offset(?insn, ?index * ?size) :- gep_points_to(?insn, 0, ?baseAlloc, ?alloc) :- gep_indexes_from(?insn, 0, ?baseAlloc, ?baseAlloc, ?type), array_type(?type), - getelementptr_instruction_index(?insn, 0, ?indexOp), + getelementptr_instr_index(?insn, 0, ?indexOp), ! operand_to_int(?indexOp, _), alloc_subregion_at_array_index(?grandparent, _, ?baseAlloc), alloc_subregion_at_any_array_index(?grandparent, ?alloc). @@ -309,7 +309,7 @@ gep_zero_index_offset(?insn, ?index * ?size) :- // `getelementptr i32, i32* %MyVar, i64 3, i64 0` points to the same // allocations as `getelemtptr i32, i32* %MyVar, i64 3`. gep_points_to(?insn, ?n, ?baseAlloc, ?alloc) :- - getelementptr_instruction_index(?insn, ?n, ?indexOp), + getelementptr_instr_index(?insn, ?n, ?indexOp), gep_points_to(?insn, ?n - 1, ?baseAlloc, ?alloc), constant_to_int(?indexOp, 0). @@ -328,7 +328,7 @@ gep_zero_index_offset(?insn, ?index * ?size) :- gep_points_to(?insn, ?n, ?baseAlloc, ?alloc) :- gep_indexes_from(?insn, ?n, ?baseAlloc, ?parent, ?type), struct_type(?type), - getelementptr_instruction_index(?insn, ?n, ?indexOp), + getelementptr_instr_index(?insn, ?n, ?indexOp), constant_to_int(?indexOp, ?field), alloc_subregion_at_field(?parent, ?field, ?alloc). @@ -344,7 +344,7 @@ gep_zero_index_offset(?insn, ?index * ?size) :- int8_type(?i8), allocation_type(?parent, ?parentType), struct_type(?parentType), - getelementptr_instruction_index(?insn, ?n, ?indexOp), + getelementptr_instr_index(?insn, ?n, ?indexOp), constant_to_int(?indexOp, ?offset), struct_type_field_offset(?parentType, ?field, ?offset), alloc_subregion_at_field(?parent, ?field, ?alloc). @@ -358,7 +358,7 @@ gep_zero_index_offset(?insn, ?index * ?size) :- int8_type(?i8), allocation_type(?parent, ?parentType), struct_type(?parentType), - getelementptr_instruction_index(?insn, ?n, ?indexOp), + getelementptr_instr_index(?insn, ?n, ?indexOp), ! operand_to_int(?indexOp, _), alloc_subregion_at_field(?parent, _, ?alloc). @@ -373,7 +373,7 @@ gep_zero_index_offset(?insn, ?index * ?size) :- gep_points_to(?insn, ?n, ?baseAlloc, ?alloc) :- gep_indexes_from(?insn, ?n, ?baseAlloc, ?parent, ?type), array_type(?type), - getelementptr_instruction_index(?insn, ?n, ?indexOp), + getelementptr_instr_index(?insn, ?n, ?indexOp), constant_to_int(?indexOp, ?offset), alloc_subregion_at_array_index(?parent, ?offset, ?alloc). @@ -385,7 +385,7 @@ gep_zero_index_offset(?insn, ?index * ?size) :- gep_points_to(?insn, ?n, ?baseAlloc, ?alloc) :- gep_indexes_from(?insn, ?n, ?baseAlloc, ?parent, ?type), array_type(?type), - getelementptr_instruction_index(?insn, ?n, ?indexOp), + getelementptr_instr_index(?insn, ?n, ?indexOp), constant_to_int(?indexOp, ?offset), allocation_type(?parent, ?allocType), alloc_region(?parent, ?region), @@ -405,7 +405,7 @@ gep_zero_index_offset(?insn, ?index * ?size) :- gep_points_to(?insn, ?n, ?baseAlloc, ?alloc) :- gep_indexes_from(?insn, ?n, ?baseAlloc, ?parent, ?type), array_type(?type), - getelementptr_instruction_index(?insn, ?n, ?indexOp), + getelementptr_instr_index(?insn, ?n, ?indexOp), ! operand_to_int(?indexOp, _), alloc_subregion_at_any_array_index(?parent, ?alloc). @@ -416,11 +416,11 @@ gep_zero_index_offset(?insn, ?index * ?size) :- .decl _gep_last_index_points_to(?alloc: Allocation, ?baseAlloc: Allocation, ?insn: GetElementPtrInstruction) _gep_last_index_points_to(?alloc, ?baseAlloc, ?insn) :- gep_points_to(?insn, ?n, ?baseAlloc, ?alloc), - getelementptr_instruction_nindices(?insn, ?n + 1). + getelementptr_instr_nindices(?insn, ?n + 1). .decl _gep_address_ctx_points_to(?ctx: Context, ?aCtx: Context, ?baseAlloc: Allocation, ?insn: GetElementPtrInstruction) _gep_address_ctx_points_to(?ctx, ?aCtx, ?baseAlloc, ?insn) :- - getelementptr_instruction_base(?insn, ?base), + getelementptr_instr_base(?insn, ?base), operand_points_to(?aCtx, ?baseAlloc, ?ctx, ?base). .decl gep_var_points_to(?aCtx: Context, ?alloc: Allocation, ?ctx: Context, ?var: Variable) inline @@ -428,5 +428,5 @@ gep_zero_index_offset(?insn, ?index * ?size) :- gep_var_points_to(?aCtx, ?alloc, ?ctx, ?toVar) :- _gep_last_index_points_to(?alloc, ?baseAlloc, ?insn), _gep_address_ctx_points_to(?ctx, ?aCtx, ?baseAlloc, ?insn), - instruction_assigns_to(?insn, ?toVar). + instr_assigns_to(?insn, ?toVar). } \ No newline at end of file diff --git a/datalog/points-to/interprocedural.dl b/datalog/points-to/interprocedural.dl index 50a80b9..93b8105 100644 --- a/datalog/points-to/interprocedural.dl +++ b/datalog/points-to/interprocedural.dl @@ -30,7 +30,7 @@ func_by_location(?alloc, ?callee) :- .decl reachable_context(?ctx: Context, ?func: FunctionDecl) .decl reachable_func(func: FunctionDecl) - .decl reachable_instruction(instr: Instruction) + .decl reachable_instr(instr: Instruction) reachable_context(?calleeCtx, ?callee) :- callgraph_edge(?calleeCtx, ?callee, _, _). @@ -38,9 +38,9 @@ func_by_location(?alloc, ?callee) :- reachable_func(?func) :- reachable_context(_, ?func). - reachable_instruction(Instr) :- + reachable_instr(Instr) :- reachable_func(Func), - instruction_in_func(Instr, Func). + instr_func(Instr, Func). // TODO: transition from startup to main? @@ -66,17 +66,17 @@ func_by_location(?alloc, ?callee) :- reachable_store(?ctx, ?toAddress, ?value) :- reachable_context(?ctx, ?instrFunc), - instruction_in_func(?instr, ?instrFunc), - store_instruction_value(?instr, ?value), - store_instruction_address(?instr, ?toAddress). + instr_func(?instr, ?instrFunc), + store_instr_value(?instr, ?value), + store_instr_address(?instr, ?toAddress). .decl reachable_load(?ctx: Context, ?toVar: Variable, ?fromAdress: Operand) reachable_load(?ctx, ?toVar, ?fromAddress) :- reachable_context(?ctx, ?instrFunc), - instruction_in_func(?instr, ?instrFunc), - load_instruction_address(?instr, ?fromAddress), - instruction_assigns_to(?instr, ?toVar). + instr_func(?instr, ?instrFunc), + load_instr_address(?instr, ?fromAddress), + instr_assigns_to(?instr, ?toVar). // Callgraph @@ -88,9 +88,9 @@ func_by_location(?alloc, ?callee) :- _callgraph_edge_interim_direct_call(?callee, ?callerCtx, ?callerInstr) :- - direct_call_instruction(?callerInstr), - call_instruction_fn_target(?callerInstr, ?callee), - instruction_in_func(?callerInstr, ?instrFunc), + direct_call_instr(?callerInstr), + call_instr_fn_target(?callerInstr, ?callee), + instr_func(?callerInstr, ?instrFunc), reachable_context(?callerCtx, ?instrFunc). callgraph_edge(?calleeCtx, ?callee, ?callerCtx, ?callerInstr) @@ -103,9 +103,9 @@ func_by_location(?alloc, ?callee) :- _callgraph_edge_interim_direct_invoke(?callee, ?callerCtx, ?callerInstr) :- - direct_call_instruction(?callerInstr), - invoke_instruction_fn_target(?callerInstr, ?callee), - instruction_in_func(?callerInstr, ?instrFunc), + direct_call_instr(?callerInstr), + invoke_instr_fn_target(?callerInstr, ?callee), + instr_func(?callerInstr, ?instrFunc), reachable_context(?callerCtx, ?instrFunc). callgraph_edge(?calleeCtx, ?callee, ?callerCtx, ?callerInstr) @@ -121,8 +121,8 @@ func_by_location(?alloc, ?callee) :- _callgraph_edge_interim_indirect_call(?callee, ?callerCtx, ?aCtx, ?callerInstr) :- - indirect_call_instruction(?callerInstr), - call_instruction_fn_operand(?callerInstr, ?funcOp), + indirect_call_instr(?callerInstr), + call_instr_fn_operand(?callerInstr, ?funcOp), func_pointer_operand_points_to(?aCtx, ?funcLoc, ?callerCtx, ?funcOp), func_by_location(?funcLoc, ?callee), func_ty(?callee, ?actualType), @@ -140,8 +140,8 @@ func_by_location(?alloc, ?callee) :- _callgraph_edge_interim_indirect_invoke(?callee, ?callerCtx, ?aCtx, ?callerInstr) :- - invoke_instruction(?callerInstr), - invoke_instruction_fn_operand(?callerInstr, ?funcOp), + invoke_instr(?callerInstr), + invoke_instr_fn_operand(?callerInstr, ?funcOp), func_pointer_operand_points_to(?aCtx, ?funcLoc, ?callerCtx, ?funcOp), func_by_location(?funcLoc, ?callee), func_ty(?callee, ?actualType), @@ -165,10 +165,10 @@ func_by_location(?alloc, ?callee) :- .decl actual_arg(?instr: Instruction, ?index: ArgumentIndex, ?argument: Operand) actual_arg(?invokeInstr, ?index, ?argument) :- - invoke_instruction_arg(?invokeInstr, ?index, ?argument). + invoke_instr_arg(?invokeInstr, ?index, ?argument). actual_arg(?callInstr, ?index, ?argument) :- - call_instruction_arg(?callInstr, ?index, ?argument). + call_instr_arg(?callInstr, ?index, ?argument). .decl func_param_not_by_value(?callee: Function, ?index: ArgumentIndex, ?param: Variable) @@ -179,8 +179,8 @@ func_param_not_by_value(?callee, ?index, ?param) :- .decl func_returns_value(?retValue: Operand, ?inFunction: Function) func_returns_value(?retValue, ?inFunction) :- - ret_instruction_value(?retInsn, ?retValue), - instruction_in_func(?retInsn, ?inFunction). + ret_instr_value(?retInsn, ?retValue), + instr_func(?retInsn, ?inFunction). .comp InterpAssignment { @@ -213,13 +213,13 @@ func_returns_value(?retValue, ?inFunction) :- interp_assignment(?callerCtx, ?toVar, ?calleeCtx, ?retValue) :- callgraph_edge(?calleeCtx, ?callee, ?callerCtx, ?callerInstr), func_returns_value(?retValue, ?callee), - instruction_assigns_to(?callerInstr, ?toVar). + instr_assigns_to(?callerInstr, ?toVar). //------------------------------------------------------------------------------ // Variadic Functions //------------------------------------------------------------------------------ - // `va_arg` instruction + // `va_arg` instr // // TODO: model target-specific value `va_list` and calls to related // LLVM intrinsic funcs. Right now this may produce nothing @@ -227,10 +227,10 @@ func_returns_value(?retValue, ?inFunction) :- .decl _va_arg_target(?toVar: Variable, ?argType: Type, ?callee: Function) _va_arg_target(?toVar, ?argType, ?callee) :- - va_arg_instruction(?vAArgInstr), - va_arg_instruction_type(?vAArgInstr, ?argType), - instruction_assigns_to(?vAArgInstr, ?toVar), - instruction_in_func(?vAArgInstr, ?callee). + va_arg_instr(?vAArgInstr), + va_arg_instr_type(?vAArgInstr, ?argType), + instr_assigns_to(?vAArgInstr, ?toVar), + instr_func(?vAArgInstr, ?callee). interp_assignment(?calleeCtx, ?toVar, ?callerCtx, ?argument) :- _va_arg_target(?toVar, ?argType, ?callee), diff --git a/datalog/points-to/memcpy.dl b/datalog/points-to/memcpy.dl index 0483757..77fbdf6 100644 --- a/datalog/points-to/memcpy.dl +++ b/datalog/points-to/memcpy.dl @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ -// [Memcpy instructions] +// [Memcpy instrs] // -// We must treat `memcpy` instructions in such a way as to ensure +// We must treat `memcpy` instrs in such a way as to ensure // that it may change the points-to set of any subregion of memory // that is being copied. //------------------------------------------------------------------------------ @@ -56,7 +56,7 @@ // Logic should handle syntactic aliases. For instance // `memcpy(to,from)` is equivalent to `memcpy(to, &from[0])`. We // consider all possible aliases of the base objects that flow to the - // operands of the @memcpy instruction, but only keep type compatible + // operands of the @memcpy instr, but only keep type compatible // pairs. // TODO(SM): Previously these rules explicitly accounted for this // using the alloc_aliases relation, but removing this had no effect diff --git a/datalog/points-to/points-to-options.dl b/datalog/points-to/points-to-options.dl index 1361450..1338d57 100644 --- a/datalog/points-to/points-to-options.dl +++ b/datalog/points-to/points-to-options.dl @@ -23,7 +23,7 @@ analyze_pointer_arithmetic() :- // // For instance, code optimizations may include inlined // constructors. In such a case, we cannot rely on the presence of a -// call to a constructor after a heap allocation instruction, to be +// call to a constructor after a heap allocation instr, to be // able to identify the type of the allocation. //------------------------------------------------------------------------------ diff --git a/datalog/points-to/points-to-statistics.dl b/datalog/points-to/points-to-statistics.dl index bae7d11..1ed890c 100644 --- a/datalog/points-to/points-to-statistics.dl +++ b/datalog/points-to/points-to-statistics.dl @@ -161,7 +161,7 @@ _nallocs_by_pt_total[] = NVars // Intermediate relationship .decl func_calls_func(?caller: Function, ?callee: Function) func_calls_func(?caller, ?callee) :- - instruction_in_func(?callerInstr, ?caller), + instr_func(?callerInstr, ?caller), subset.callgraph.callgraph_edge(_, ?callee, _, ?callerInstr). // How many funcs does this func call? diff --git a/datalog/points-to/signatures.dl b/datalog/points-to/signatures.dl index c02e8bc..caceb0e 100644 --- a/datalog/points-to/signatures.dl +++ b/datalog/points-to/signatures.dl @@ -160,10 +160,10 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- _sig_var_alloc(?newCtx, ?sigAlloc, ?ctx, ?var, ?type) :- func_name(?func, ?sname), pts_signature_return_alloc(?sname), - ( call_instruction_fn_target(?instr, ?func) - ; invoke_instruction_fn_target(?instr, ?func)), - instruction_assigns_to(?instr, ?var), - instruction_in_func(?instr, ?instrFunc), + ( call_instr_fn_target(?instr, ?func) + ; invoke_instr_fn_target(?instr, ?func)), + instr_assigns_to(?instr, ?var), + instr_func(?instr, ?instrFunc), variable_has_type(?var,?ptrType), pointer_type_has_component(?ptrType, ?type), @@ -175,10 +175,10 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- _sig_var_alloc(?newCtx, ?sigAlloc, ?ctx, ?var, ?type) :- func_name(?func, ?sname), pts_signature_return_alloc_once(?sname), - ( call_instruction_fn_target(?instr, ?func) - ; invoke_instruction_fn_target(?instr, ?func)), - instruction_assigns_to(?instr, ?var), - instruction_in_func(?instr, ?instrFunc), + ( call_instr_fn_target(?instr, ?func) + ; invoke_instr_fn_target(?instr, ?func)), + instr_assigns_to(?instr, ?var), + instr_func(?instr, ?instrFunc), variable_has_type(?var,?ptrType), pointer_type_has_component(?ptrType, ?type), @@ -190,9 +190,9 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- _sig_ptr_alloc(?newCtx, ?sigAlloc, ?ptrCtx, ?ptr, ?type) :- func_name(?func, ?sname), pts_signature_arg_alloc(?sname, ?index), - ( call_instruction_fn_target(?instr, ?func) - ; invoke_instruction_fn_target(?instr, ?func)), - instruction_in_func(?instr, ?instrFunc), + ( call_instr_fn_target(?instr, ?func) + ; invoke_instr_fn_target(?instr, ?func)), + instr_func(?instr, ?instrFunc), actual_arg(?instr, ?index, ?var), reachable_context(?ctx, ?instrFunc), @@ -208,9 +208,9 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- _sig_ptr_alloc(?newCtx, ?sigAlloc, ?ptrCtx, ?ptr, ?type) :- func_name(?func, ?sname), pts_signature_arg_alloc_once(?sname, ?index), - ( call_instruction_fn_target(?instr, ?func) - ; invoke_instruction_fn_target(?instr, ?func)), - instruction_in_func(?instr, ?instrFunc), + ( call_instr_fn_target(?instr, ?func) + ; invoke_instr_fn_target(?instr, ?func)), + instr_func(?instr, ?instrFunc), actual_arg(?instr, ?index, ?var), reachable_context(?ctx, ?instrFunc), @@ -252,7 +252,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), func_name(?callee, ?name), pts_signature_return_aliases_arg(?name, ?index), - instruction_assigns_to(?callerInstr, ?toVar), + instr_assigns_to(?callerInstr, ?toVar), actual_arg(?callerInstr, ?index, ?fromValue), operand_points_to(?aCtx, ?alloc, ?callerCtx, ?fromValue). @@ -267,7 +267,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), func_name(?callee, ?name), pts_signature_return_aliases_arg_reachable(?name, ?index), - instruction_assigns_to(?callerInstr, ?toVar), + instr_assigns_to(?callerInstr, ?toVar), actual_arg(?callerInstr, ?index, ?fromValue), operand_points_to(?ptrACtx, ?ptrAlloc, ?callerCtx, ?fromValue), _ptr_reaches_to(?aCtx, ?alloc, ?ptrACtx, ?ptrAlloc). @@ -278,7 +278,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- pts_signature_return_points_to_global(?name, ?globalName), global_allocation_by_name(?globalName, ?alloc), empty_context(?aCtx), - instruction_assigns_to(?callerInstr, ?toVar). + instr_assigns_to(?callerInstr, ?toVar). signature_var_points_to_base(?aCtx, ?alloc, ?callerCtx, ?toVar) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), @@ -286,7 +286,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- pts_signature_return_aliases_global(?name, ?globalName), global_allocation_by_name(?globalName, ?globalAlloc), empty_context(?globalCtx), - instruction_assigns_to(?callerInstr, ?toVar), + instr_assigns_to(?callerInstr, ?toVar), ptr_points_to(?aCtx, ?alloc, ?globalCtx, ?globalAlloc). _ptr_reaches_to_request(?globalCtx, ?globalAlloc) :- @@ -295,7 +295,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- pts_signature_return_aliases_global_reachable(?name, ?globalName), global_allocation_by_name(?globalName, ?globalAlloc), empty_context(?globalCtx), - instruction_assigns_to(?callerInstr, _). + instr_assigns_to(?callerInstr, _). signature_var_points_to_base(?aCtx, ?alloc, ?callerCtx, ?toVar) :- callgraph_edge(_, ?callee, ?callerCtx, ?callerInstr), @@ -303,7 +303,7 @@ build_signature_allocation_once(sigAlloc, func, type, pos) :- pts_signature_return_aliases_global_reachable(?name, ?globalName), global_allocation_by_name(?globalName, ?globalAlloc), empty_context(?globalCtx), - instruction_assigns_to(?callerInstr, ?toVar), + instr_assigns_to(?callerInstr, ?toVar), _ptr_reaches_to(?aCtx, ?alloc, ?globalCtx, ?globalAlloc). memcpy_sig(?toACtx, ?toAlloc, ?fromACtx, ?fromAlloc) :- diff --git a/datalog/points-to/subset.dl b/datalog/points-to/subset.dl index ddf6f52..c574871 100644 --- a/datalog/points-to/subset.dl +++ b/datalog/points-to/subset.dl @@ -175,27 +175,27 @@ subset_cplusplus.allocation_type(?alloc, ?type) :- subset_cplusplus.stripctx_operand_points_to(?to, ?op) :- subset.stripctx.stripctx_operand_points_to(?to, ?op). -.init subset_throw_instruction = ThrowInstruction +.init subset_throw_instr = ThrowInstruction -subset_throw_instruction.allocation_type(?alloc, ?type) :- +subset_throw_instr.allocation_type(?alloc, ?type) :- subset_allocation_type.allocation_type(?alloc, ?type). -subset_throw_instruction.callgraph_edge(?calleeCtx, ?callee, ?callerCtx, ?callerInstr) :- +subset_throw_instr.callgraph_edge(?calleeCtx, ?callee, ?callerCtx, ?callerInstr) :- subset.callgraph.callgraph_edge(?calleeCtx, ?callee, ?callerCtx, ?callerInstr). -subset_throw_instruction.operand_points_to(?aCtx, ?alloc, ?ctx, ?operand) :- +subset_throw_instr.operand_points_to(?aCtx, ?alloc, ?ctx, ?operand) :- subset.operand_points_to(?aCtx, ?alloc, ?ctx, ?operand). -subset_throw_instruction.stripctx_operand_points_to(?to, ?op) :- +subset_throw_instr.stripctx_operand_points_to(?to, ?op) :- subset.stripctx.stripctx_operand_points_to(?to, ?op). subset.type_indication.ty_indication(?type, ?aCtx, ?alloc) :- - subset_throw_instruction.ty_indication4(?type, ?aCtx, ?alloc). + subset_throw_instr.ty_indication4(?type, ?aCtx, ?alloc). subset.type_indication.ty_indication(?type, ?aCtx, ?alloc) :- - subset_throw_instruction.ty_indication5(?type, ?aCtx, ?alloc). + subset_throw_instr.ty_indication5(?type, ?aCtx, ?alloc). -subset_throw_instruction.untyped_allocation(?insn, ?alloc) :- +subset_throw_instr.untyped_allocation(?insn, ?alloc) :- subset.exception_object.untyped_allocation(?insn, ?alloc). .init subset_at_exit = AtExit @@ -313,8 +313,8 @@ alloc_region(?subAlloc, ?region) :- alloc_region(?alloc, "heap") :- subset.exception_object.heap_allocation_by_alloc_exc(_, ?alloc). alloc_region(?alloc, "heap") :- - subset.type_indication.heap_allocation_by_type_instruction(_, _, ?alloc). + subset.type_indication.heap_allocation_by_type_instr(_, _, ?alloc). alloc_region(?alloc, "heap") :- subset_signatures.sig_allocation_type(?alloc, _). alloc_region(?alloc, "stack") :- - subset.type_indication.stack_allocation_by_type_instruction(_, _, ?alloc). + subset.type_indication.stack_allocation_by_type_instr(_, _, ?alloc). diff --git a/datalog/points-to/type-back-propagation.dl b/datalog/points-to/type-back-propagation.dl index 2681833..5825350 100644 --- a/datalog/points-to/type-back-propagation.dl +++ b/datalog/points-to/type-back-propagation.dl @@ -29,30 +29,30 @@ .decl backpropagated_allocation_type(?alloc: Allocation, ?type: Type) inline - .decl _heap_allocation_by_instruction(?insn: Instruction, ?alloc: Allocation, ?untyped: Allocation) - _heap_allocation_by_instruction(?insn, ?alloc, ?alloc) :- - heap_allocation_by_instruction(?insn, ?alloc). + .decl _heap_allocation_by_instr(?insn: Instruction, ?alloc: Allocation, ?untyped: Allocation) + _heap_allocation_by_instr(?insn, ?alloc, ?alloc) :- + heap_allocation_by_instr(?insn, ?alloc). - _heap_allocation_by_instruction(?insn, ?alloc, ?untyped) :- - heap_allocation_by_type_instruction(_, ?insn, ?alloc), - heap_allocation_by_instruction(?insn, ?untyped). + _heap_allocation_by_instr(?insn, ?alloc, ?untyped) :- + heap_allocation_by_type_instr(_, ?insn, ?alloc), + heap_allocation_by_instr(?insn, ?untyped). - // Only bitcast instructions are considered type indications for now + // Only bitcast instrs are considered type indications for now ty_indication1(?type, ?aCtx, ?untyped), ty_indication(?type, ?aCtx, ?untyped) :- - bitcast_instruction_to_type(?instr,?ptrType), - bitcast_instruction_from_operand(?instr,?fromOperand), + bitcast_instr_to_type(?instr,?ptrType), + bitcast_instr_from_operand(?instr,?fromOperand), operand_points_to(?aCtx, ?alloc, _, ?fromOperand), - _heap_allocation_by_instruction(?allocInstr, ?alloc, ?untyped), + _heap_allocation_by_instr(?allocInstr, ?alloc, ?untyped), !sized_alloc_instr(?allocInstr,_), pointer_type_has_component(?ptrType,?type). ty_indication2(?type, ?aCtx, ?untyped), ty_indication(?type, ?aCtx, ?untyped) :- - bitcast_instruction_to_type(?instr,?ptrType), - bitcast_instruction_from_operand(?instr,?fromOperand), + bitcast_instr_to_type(?instr,?ptrType), + bitcast_instr_from_operand(?instr,?fromOperand), operand_points_to(?aCtx, ?alloc, _, ?fromOperand), - _heap_allocation_by_instruction(?allocInstr, ?alloc, ?untyped), + _heap_allocation_by_instr(?allocInstr, ?alloc, ?untyped), pointer_type_has_component(?ptrType,?type), sized_alloc_instr(?allocInstr,?size), type_has_size(?type,?size). @@ -61,10 +61,10 @@ // component may perfectly divide the known size of the allocation. ty_indication3(?type, ?aCtx, ?untyped), ty_indication(?type, ?aCtx, ?untyped) :- - bitcast_instruction_to_type(?instr,?ptrType), - bitcast_instruction_from_operand(?instr,?fromOperand), + bitcast_instr_to_type(?instr,?ptrType), + bitcast_instr_from_operand(?instr,?fromOperand), operand_points_to(?aCtx, ?alloc, _, ?fromOperand), - _heap_allocation_by_instruction(?allocInstr, ?alloc, ?untyped), + _heap_allocation_by_instr(?allocInstr, ?alloc, ?untyped), pointer_type_has_component(?ptrType,?type), pointer_type_base_component(?ptrType, ?baseType), sized_alloc_instr(?allocInstr, size), @@ -72,18 +72,18 @@ baseSize != 0, // TODO: Does anything else need to be done in this case? size = (size / baseSize) * baseSize. - .decl heap_allocation_by_type_instruction(?type: Type, ?insn: Instruction, ?heapAlloc: HeapAllocation) + .decl heap_allocation_by_type_instr(?type: Type, ?insn: Instruction, ?heapAlloc: HeapAllocation) .decl assign_rebase_alloc(?typedAlloc: Allocation, ?aCtx: Context, ?alloc: Allocation, ?var: Variable) - heap_allocation_by_type_instruction(?type, ?allocInstr, ?typedAlloc), + heap_allocation_by_type_instr(?type, ?allocInstr, ?typedAlloc), assign_rebase_alloc(?typedAlloc, ?aCtx, ?alloc, ?var), heap_allocation(?typedAlloc), backpropagated_allocation_type(?typedAlloc, ?type), alloc_with_ctx(?aCtx, ?typedAlloc) :- - heap_allocation_by_instruction(?allocInstr, ?alloc), + heap_allocation_by_instr(?allocInstr, ?alloc), ty_indication(?type, ?aCtx, ?alloc), - instruction_assigns_to(?allocInstr, ?var), + instr_assigns_to(?allocInstr, ?var), variable_in_func(?var, ?func), variable_has_name(?var, ?name), func_name(?func, ?funcName), @@ -91,8 +91,8 @@ ?typedAlloc= cat("*typed_heap_alloc", ?funcName, "[" , ?ptrType , " ", ?name, "]"). allocation_pos(?alloc, ?line, ?column) :- - heap_allocation_by_type_instruction(_, ?insn, ?alloc), - instruction_pos(?insn, ?line, ?column). + heap_allocation_by_type_instr(_, ?insn, ?alloc), + instr_pos(?insn, ?line, ?column). //----------------------------------------------------------------------- // [Type Back-propagation for Stack Allocations] @@ -124,7 +124,7 @@ // %4 = call i8 @func_foo_arg_passed_by_value(%struct.foo* %1) // ``` // - // Where this causes problems is that instructions like `%4 = + // Where this causes problems is that instrs like `%4 = // getelementptr inbounds %struct.foo, %struct.foo* %2, i64 0, i32 1,` do // not calculate the expected points-to information because the analysis // does not know how to interpret accessing %struct.foo fields from an @@ -137,27 +137,27 @@ // where the underlying alloca has an integer-type, but we might want to // change this if we see other examples in the wild. - .decl stack_allocation_by_type_instruction(?type: Type, ?insn: Instruction, ?stackAlloc: StackAllocation) + .decl stack_allocation_by_type_instr(?type: Type, ?insn: Instruction, ?stackAlloc: StackAllocation) .decl stack_type_indication(?type: Type, ?aCtx: Context, ?alloc: Allocation) stack_type_indication(?type, ?aCtx, ?alloc) :- - bitcast_instruction_to_type(?instr,?ptrType), - bitcast_instruction_from_operand(?instr,?fromOperand), + bitcast_instr_to_type(?instr,?ptrType), + bitcast_instr_from_operand(?instr,?fromOperand), operand_points_to(?aCtx, ?alloc, _, ?fromOperand), - stack_allocation_by_instruction(?allocInstr, ?alloc), - alloca_instruction_type(?allocInstr, ?allocaType), + stack_allocation_by_instr(?allocInstr, ?alloc), + alloca_instr_type(?allocInstr, ?allocaType), integer_type(?allocaType), pointer_type_has_component(?ptrType,?type). - stack_allocation_by_type_instruction(?type, ?allocInstr, ?typedAlloc), + stack_allocation_by_type_instr(?type, ?allocInstr, ?typedAlloc), assign_rebase_alloc(?typedAlloc, ?aCtx, ?alloc, ?var), stack_allocation(?typedAlloc), backpropagated_allocation_type(?typedAlloc, ?type), alloc_with_ctx(?aCtx, ?typedAlloc) :- - stack_allocation_by_instruction(?allocInstr, ?alloc), + stack_allocation_by_instr(?allocInstr, ?alloc), stack_type_indication(?type, ?aCtx, ?alloc), - instruction_assigns_to(?allocInstr, ?var), + instr_assigns_to(?allocInstr, ?var), variable_in_func(?var, ?func), variable_has_name(?var, ?name), func_name(?func, ?funcName), @@ -165,6 +165,6 @@ ?typedAlloc= cat("*typed_stack_alloc", ?funcName, "[", ?ptrType, " ", ?name, "]"). allocation_pos(?alloc, ?line, ?column) :- - stack_allocation_by_type_instruction(_, ?insn, ?alloc), - instruction_pos(?insn, ?line, ?column). + stack_allocation_by_type_instr(_, ?insn, ?alloc), + instr_pos(?insn, ?line, ?column). } diff --git a/datalog/points-to/types.dl b/datalog/points-to/types.dl index dbd7ae9..a98401a 100644 --- a/datalog/points-to/types.dl +++ b/datalog/points-to/types.dl @@ -20,10 +20,10 @@ // An index in a getelementptr .type GepIndex <: number -// An index into an array, e.g. in a getelementptr instruction +// An index into an array, e.g. in a getelementptr instr .type ArrayIndex <: number -// An index into a struct, e.g. in a getelementptr instruction +// An index into a struct, e.g. in a getelementptr instr .type FieldIndex <: number // An index of an argument to a func diff --git a/datalog/points-to/unification.dl b/datalog/points-to/unification.dl index 5560c58..a9aa6cf 100644 --- a/datalog/points-to/unification.dl +++ b/datalog/points-to/unification.dl @@ -354,13 +354,13 @@ // Unify typed and untyped variants of the same allocation unify0(?aCtx, ?subAlloc1, ?aCtx, ?subAlloc2) :- - heap_allocation_by_instruction(?instr, ?alloc1), - heap_allocation_by_instruction(?instr, ?alloc2), - instruction_assigns_to(?instr, ?var), + heap_allocation_by_instr(?instr, ?alloc1), + heap_allocation_by_instr(?instr, ?alloc2), + instr_assigns_to(?instr, ?var), var_points_to(?aCtx, ?alloc1, _, ?var), unification_subobjects.alloc_subregion_at_path(?alloc1, ?path, ?subAlloc1), unification_subobjects.alloc_subregion_at_path(?alloc2, ?path, ?subAlloc2). - // As an input rule, instruction_assigns_to doesn't get a delta, hence 5 query + // As an input rule, instr_assigns_to doesn't get a delta, hence 5 query // plans for 6 clauses .plan 0: (1, 2, 3, 4, 5, 6), 1: (2, 1, 3, 4, 5, 6), @@ -536,27 +536,27 @@ unification_cplusplus.allocation_type(?alloc, ?type) :- unification_cplusplus.stripctx_operand_points_to(?to, ?op) :- unification.stripctx.stripctx_operand_points_to(?to, ?op). -.init unification_throw_instruction = ThrowInstruction +.init unification_throw_instr = ThrowInstruction -unification_throw_instruction.allocation_type(?alloc, ?type) :- +unification_throw_instr.allocation_type(?alloc, ?type) :- unification_allocation_type.allocation_type(?alloc, ?type). -unification_throw_instruction.callgraph_edge(?calleeCtx, ?callee, ?callerCtx, ?callerInstr) :- +unification_throw_instr.callgraph_edge(?calleeCtx, ?callee, ?callerCtx, ?callerInstr) :- unification.callgraph.callgraph_edge(?calleeCtx, ?callee, ?callerCtx, ?callerInstr). -unification_throw_instruction.operand_points_to(?aCtx, ?alloc, ?ctx, ?operand) :- +unification_throw_instr.operand_points_to(?aCtx, ?alloc, ?ctx, ?operand) :- unification.operand_points_to(?aCtx, ?alloc, ?ctx, ?operand). -unification_throw_instruction.stripctx_operand_points_to(?to, ?op) :- +unification_throw_instr.stripctx_operand_points_to(?to, ?op) :- unification.stripctx.stripctx_operand_points_to(?to, ?op). unification.type_indication.ty_indication(?type, ?aCtx, ?alloc) :- - unification_throw_instruction.ty_indication4(?type, ?aCtx, ?alloc). + unification_throw_instr.ty_indication4(?type, ?aCtx, ?alloc). unification.type_indication.ty_indication(?type, ?aCtx, ?alloc) :- - unification_throw_instruction.ty_indication5(?type, ?aCtx, ?alloc). + unification_throw_instr.ty_indication5(?type, ?aCtx, ?alloc). -unification_throw_instruction.untyped_allocation(?insn, ?alloc) :- +unification_throw_instr.untyped_allocation(?insn, ?alloc) :- unification.exception_object.untyped_allocation(?insn, ?alloc). .init unification_at_exit = AtExit @@ -701,6 +701,6 @@ alloc_region(?subAlloc, ?region) :- alloc_region(?alloc, "heap") :- unification.exception_object.heap_allocation_by_alloc_exc(_, ?alloc). alloc_region(?alloc, "heap") :- - unification.type_indication.heap_allocation_by_type_instruction(_, _, ?alloc). + unification.type_indication.heap_allocation_by_type_instr(_, _, ?alloc). alloc_region(?alloc, "heap") :- unification_signatures.sig_allocation_type(?alloc, _). diff --git a/datalog/schema/add-instr.dl b/datalog/schema/add-instr.dl new file mode 100644 index 0000000..0e519ec --- /dev/null +++ b/datalog/schema/add-instr.dl @@ -0,0 +1,53 @@ +// http://llvm.org/docs/LangRef.html#add-instr +// keywords: arithmetic; binary; instr + +.type AddInstruction = Instruction +.decl add_instr(instr:AddInstruction) + +instr(v) :- + add_instr(v). + +.decl add_instr_first_operand(instr:AddInstruction, op:Operand) +.decl add_instr_second_operand(instr:AddInstruction, op:Operand) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// 1) The two arguments to the ‘add‘ instr must be: +// (i) integer or +// (ii) vector of integer values. +// +// 2) Both arguments must have identical types. +// +// 3) The resulting value is the same type as its operands. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + add_instr(Instr), + !add_instr_first_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + add_instr(Instr), + !add_instr_second_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + add_instr(Instr), + instr_returns_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + add_instr_first_operand(Instr, LeftOp), + !operand_has_type(LeftOp, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + add_instr_second_operand(Instr, RightOp), + !operand_has_type(RightOp, Type). diff --git a/datalog/schema/add-instruction.dl b/datalog/schema/add-instruction.dl deleted file mode 100644 index 45e2187..0000000 --- a/datalog/schema/add-instruction.dl +++ /dev/null @@ -1,53 +0,0 @@ -// http://llvm.org/docs/LangRef.html#add-instruction -// keywords: arithmetic; binary; instruction - -.type AddInstruction = Instruction -.decl add_instruction(instr:AddInstruction) - -instruction(v) :- - add_instruction(v). - -.decl add_instruction_first_operand(instr:AddInstruction, op:Operand) -.decl add_instruction_second_operand(instr:AddInstruction, op:Operand) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// 1) The two arguments to the ‘add‘ instruction must be: -// (i) integer or -// (ii) vector of integer values. -// -// 2) Both arguments must have identical types. -// -// 3) The resulting value is the same type as its operands. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - add_instruction(Instr), - !add_instruction_first_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - add_instruction(Instr), - !add_instruction_second_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - add_instruction(Instr), - instruction_returns_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - add_instruction_first_operand(Instr, LeftOp), - !operand_has_type(LeftOp, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - add_instruction_second_operand(Instr, RightOp), - !operand_has_type(RightOp, Type). diff --git a/datalog/schema/alloca-instr.dl b/datalog/schema/alloca-instr.dl new file mode 100644 index 0000000..1024fcd --- /dev/null +++ b/datalog/schema/alloca-instr.dl @@ -0,0 +1,30 @@ +// http://llvm.org/docs/LangRef.html#alloca-instr +// keywords: memory; unary; instr + +.type AllocaInstruction = Instruction +.decl alloca_instr(instr:AllocaInstruction) + +instr(v) :- alloca_instr(v). + +.decl alloca_instr_alignment(instr:AllocaInstruction, alignment:number) +.decl alloca_instr_size(instr:AllocaInstruction, size:Operand) +.decl alloca_instr_type(instr:AllocaInstruction, type:Type) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// The ‘alloca‘ instr returns a pointer. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + alloca_instr(Instr), + !alloca_instr_type(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + alloca_instr(Instr), + alloca_instr_type(Instr, Type), + instr_returns_type(Instr, PtrType), + !pointer_type_has_component(PtrType, Type). diff --git a/datalog/schema/alloca-instruction.dl b/datalog/schema/alloca-instruction.dl deleted file mode 100644 index 6b6e62a..0000000 --- a/datalog/schema/alloca-instruction.dl +++ /dev/null @@ -1,30 +0,0 @@ -// http://llvm.org/docs/LangRef.html#alloca-instruction -// keywords: memory; unary; instruction - -.type AllocaInstruction = Instruction -.decl alloca_instruction(instr:AllocaInstruction) - -instruction(v) :- alloca_instruction(v). - -.decl alloca_instruction_alignment(instr:AllocaInstruction, alignment:number) -.decl alloca_instruction_size(instr:AllocaInstruction, size:Operand) -.decl alloca_instruction_type(instr:AllocaInstruction, type:Type) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// The ‘alloca‘ instruction returns a pointer. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - alloca_instruction(Instr), - !alloca_instruction_type(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - alloca_instruction(Instr), - alloca_instruction_type(Instr, Type), - instruction_returns_type(Instr, PtrType), - !pointer_type_has_component(PtrType, Type). diff --git a/datalog/schema/and-instr.dl b/datalog/schema/and-instr.dl new file mode 100644 index 0000000..fea3b6d --- /dev/null +++ b/datalog/schema/and-instr.dl @@ -0,0 +1,53 @@ +// http://llvm.org/docs/LangRef.html#and-instr +// keywords: bitwise; binary; instr + +.type AndInstruction = Instruction +.decl and_instr(instr:AndInstruction) + +instr(v) :- + and_instr(v). + +.decl and_instr_first_operand(instr:AndInstruction, op:Operand) +.decl and_instr_second_operand(instr:AndInstruction, op:Operand) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// 1) The two arguments to the ‘and‘ instr must be: +// (i) integer or +// (ii) vector of integer values. +// +// 2) Both arguments must have identical types. +// +// 3) The resulting value is the same type as its operands. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + and_instr(Instr), + !and_instr_first_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + and_instr(Instr), + !and_instr_second_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + and_instr(Instr), + instr_returns_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + and_instr_first_operand(Instr, LeftOp), + !operand_has_type(LeftOp, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + and_instr_second_operand(Instr, RightOp), + !operand_has_type(RightOp, Type). diff --git a/datalog/schema/and-instruction.dl b/datalog/schema/and-instruction.dl deleted file mode 100644 index 7c2cb63..0000000 --- a/datalog/schema/and-instruction.dl +++ /dev/null @@ -1,53 +0,0 @@ -// http://llvm.org/docs/LangRef.html#and-instruction -// keywords: bitwise; binary; instruction - -.type AndInstruction = Instruction -.decl and_instruction(instr:AndInstruction) - -instruction(v) :- - and_instruction(v). - -.decl and_instruction_first_operand(instr:AndInstruction, op:Operand) -.decl and_instruction_second_operand(instr:AndInstruction, op:Operand) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// 1) The two arguments to the ‘and‘ instruction must be: -// (i) integer or -// (ii) vector of integer values. -// -// 2) Both arguments must have identical types. -// -// 3) The resulting value is the same type as its operands. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - and_instruction(Instr), - !and_instruction_first_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - and_instruction(Instr), - !and_instruction_second_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - and_instruction(Instr), - instruction_returns_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - and_instruction_first_operand(Instr, LeftOp), - !operand_has_type(LeftOp, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - and_instruction_second_operand(Instr, RightOp), - !operand_has_type(RightOp, Type). diff --git a/datalog/schema/ashr-instr.dl b/datalog/schema/ashr-instr.dl new file mode 100644 index 0000000..4a48a33 --- /dev/null +++ b/datalog/schema/ashr-instr.dl @@ -0,0 +1,53 @@ +// http://llvm.org/docs/LangRef.html#ashr-instr +// keywords: bitwise; binary; instr + +.type AShrInstruction = Instruction +.decl ashr_instr(instr:AShrInstruction) + +instr(v) :- + ashr_instr(v). + +.decl ashr_instr_first_operand(instr:AShrInstruction, op:Operand) +.decl ashr_instr_second_operand(instr:AShrInstruction, op:Operand) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// 1) The two arguments to the ‘ashr‘ instr must be: +// (i) integer or +// (ii) vector of integer values. +// +// 2) Both arguments must have identical types. +// +// 3) The resulting value is the same type as its operands. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + ashr_instr(Instr), + !ashr_instr_first_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + ashr_instr(Instr), + !ashr_instr_second_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + ashr_instr(Instr), + instr_returns_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + ashr_instr_first_operand(Instr, LeftOp), + !operand_has_type(LeftOp, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + ashr_instr_second_operand(Instr, RightOp), + !operand_has_type(RightOp, Type). diff --git a/datalog/schema/ashr-instruction.dl b/datalog/schema/ashr-instruction.dl deleted file mode 100644 index a9ae2e4..0000000 --- a/datalog/schema/ashr-instruction.dl +++ /dev/null @@ -1,53 +0,0 @@ -// http://llvm.org/docs/LangRef.html#ashr-instruction -// keywords: bitwise; binary; instruction - -.type AShrInstruction = Instruction -.decl ashr_instruction(instr:AShrInstruction) - -instruction(v) :- - ashr_instruction(v). - -.decl ashr_instruction_first_operand(instr:AShrInstruction, op:Operand) -.decl ashr_instruction_second_operand(instr:AShrInstruction, op:Operand) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// 1) The two arguments to the ‘ashr‘ instruction must be: -// (i) integer or -// (ii) vector of integer values. -// -// 2) Both arguments must have identical types. -// -// 3) The resulting value is the same type as its operands. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - ashr_instruction(Instr), - !ashr_instruction_first_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - ashr_instruction(Instr), - !ashr_instruction_second_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - ashr_instruction(Instr), - instruction_returns_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - ashr_instruction_first_operand(Instr, LeftOp), - !operand_has_type(LeftOp, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - ashr_instruction_second_operand(Instr, RightOp), - !operand_has_type(RightOp, Type). diff --git a/datalog/schema/atomicrmw-instruction.dl b/datalog/schema/atomicrmw-instr.dl similarity index 63% rename from datalog/schema/atomicrmw-instruction.dl rename to datalog/schema/atomicrmw-instr.dl index 414fb46..d92e2c9 100644 --- a/datalog/schema/atomicrmw-instruction.dl +++ b/datalog/schema/atomicrmw-instr.dl @@ -1,42 +1,42 @@ -// http://llvm.org/docs/LangRef.html#atomicrmw-instruction -// keywords: memory; instruction +// http://llvm.org/docs/LangRef.html#atomicrmw-instr +// keywords: memory; instr .type AtomicRMWInstruction = Instruction -.decl atomicrmw_instruction(instr:AtomicRMWInstruction) +.decl atomicrmw_instr(instr:AtomicRMWInstruction) -instruction(v) :- atomicrmw_instruction(v). +instr(v) :- atomicrmw_instr(v). -.decl atomicrmw_instruction_ordering(instr:AtomicRMWInstruction, ordering:Ordering) +.decl atomicrmw_instr_ordering(instr:AtomicRMWInstruction, ordering:Ordering) // If the atomicrmw is marked as volatile, then the optimizer is not allowed // to modify the number or order of execution of this atomirmw with other // volatile operations. -.decl atomicrmw_instruction_is_volatile(instr:AtomicRMWInstruction) +.decl atomicrmw_instr_is_volatile(instr:AtomicRMWInstruction) -// There are three arguments to the atomicrmw instruction: +// There are three arguments to the atomicrmw instr: // (i) an operation to apply, // (ii) an address whose value to modify, // (iii) an argument to the operation. -.decl atomicrmw_instruction_operation(instr:AtomicRMWInstruction, op:AtomicOperation) -.decl atomicrmw_instruction_address(instr:AtomicRMWInstruction, ptr:Operand) -.decl atomicrmw_instruction_value(instr:AtomicRMWInstruction, value:Operand) +.decl atomicrmw_instr_operation(instr:AtomicRMWInstruction, op:AtomicOperation) +.decl atomicrmw_instr_address(instr:AtomicRMWInstruction, ptr:Operand) +.decl atomicrmw_instr_value(instr:AtomicRMWInstruction, value:Operand) //------------------------------------------------------------------------------ // [Atomic Operation] // -// The operation to apply for the ‘atomicrmw‘ instruction +// The operation to apply for the ‘atomicrmw‘ instr // must be one of the following: //------------------------------------------------------------------------------ .type AtomicOperation <: symbol .decl atomic_operation(op:AtomicOperation) -atomic_operation(op) :- atomicrmw_instruction_operation(_, op). +atomic_operation(op) :- atomicrmw_instr_operation(_, op). .decl atomic_operation_xchg(op:AtomicOperation) .decl atomic_operation_add(op:AtomicOperation) @@ -64,9 +64,9 @@ atomic_operation("min"). atomic_operation_min("min"). atomic_operation("umax"). atomic_operation_umax("umax"). atomic_operation("umin"). atomic_operation_umin("umin"). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - atomicrmw_instruction_operation(Instr, Operation), + atomicrmw_instr_operation(Instr, Operation), !atomic_operation_add(Operation), !atomic_operation_sub(Operation), !atomic_operation_and(Operation), !atomic_operation_or(Operation), !atomic_operation_nand(Operation), !atomic_operation_nor(Operation), @@ -82,42 +82,42 @@ schema_invalid_instruction(Instr, __FILE__, __LINE__) :- // (ii) The type of the ‘‘ operand must be a pointer to that type. //------------------------------------------------------------------------------ -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - atomicrmw_instruction(Instr), - !atomicrmw_instruction_ordering(Instr, _). + atomicrmw_instr(Instr), + !atomicrmw_instr_ordering(Instr, _). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - atomicrmw_instruction(Instr), - !atomicrmw_instruction_operation(Instr, _). + atomicrmw_instr(Instr), + !atomicrmw_instr_operation(Instr, _). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - atomicrmw_instruction(Instr), - !atomicrmw_instruction_address(Instr, _). + atomicrmw_instr(Instr), + !atomicrmw_instr_address(Instr, _). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - atomicrmw_instruction(Instr), - !atomicrmw_instruction_value(Instr, _). + atomicrmw_instr(Instr), + !atomicrmw_instr_value(Instr, _). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - atomicrmw_instruction_value(Instr, Value), + atomicrmw_instr_value(Instr, Value), operand_has_type(Value, Type), !integer_type(Type). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - atomicrmw_instruction_address(Instr, AddressPtr), + atomicrmw_instr_address(Instr, AddressPtr), operand_has_type(AddressPtr, PtrType), !pointer_type(PtrType). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - atomicrmw_instruction_address(Instr, AddressPtr), - atomicrmw_instruction_value(Instr, Value), + atomicrmw_instr_address(Instr, AddressPtr), + atomicrmw_instr_value(Instr, Value), operand_has_type(AddressPtr, PtrType), operand_has_type(Value, ValueType), !pointer_type_has_component(PtrType, ValueType). diff --git a/datalog/schema/basic-block.dl b/datalog/schema/basic-block.dl index 5788b3e..1be6038 100644 --- a/datalog/schema/basic-block.dl +++ b/datalog/schema/basic-block.dl @@ -5,57 +5,57 @@ .type BasicBlock <: symbol .decl block(bb:BasicBlock) -// Every instruction must be inside a single basic block -.decl instruction_in_block(instr:Instruction, bb:BasicBlock) +// Every instr must be inside a single basic block +.decl instr_block(instr:Instruction, bb:BasicBlock) -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - instruction(Instr), - !instruction_in_block(Instr, _). + instr(Instr), + !instr_block(Instr, _). // Basic block predicates .decl block_of_label(bb:BasicBlock, label:Variable) .decl block_predecessors(bb:BasicBlock, bbpred:BasicBlock) -.decl block_first_instruction(bb:BasicBlock, instr:Instruction) -.decl block_last_instruction(bb:BasicBlock, instr:Instruction) +.decl block_first_instr(bb:BasicBlock, instr:Instruction) +.decl block_last_instr(bb:BasicBlock, instr:Instruction) block(BB) :- block_of_label(BB, _). block_of_label(cat("block:", Label), Label) :- variable_is_label(Label). -block_first_instruction(BB, First) :- - instruction_in_block(First, BB), - !next_instruction(_, First). +block_first_instr(BB, First) :- + instr_block(First, BB), + !next_instr(_, First). -block_first_instruction(BB2, First) :- - next_instruction(Last, First), - instruction_in_block(Last, BB1), - instruction_in_block(First, BB2), +block_first_instr(BB2, First) :- + next_instr(Last, First), + instr_block(Last, BB1), + instr_block(First, BB2), BB1 != BB2. -block_last_instruction(BB1, Last) :- - next_instruction(Last, First), - instruction_in_block(Last, BB1), - instruction_in_block(First, BB2), +block_last_instr(BB1, Last) :- + next_instr(Last, First), + instr_block(Last, BB1), + instr_block(First, BB2), BB1 != BB2. -block_last_instruction(BB, Last) :- - instruction_in_block(Last, BB), - !next_instruction(Last, _). +block_last_instr(BB, Last) :- + instr_block(Last, BB), + !next_instr(Last, _). //------------------------------------------------------------------------------ // [Constraints] // -// Two consecutive instructions must either belong to the same basic +// Two consecutive instrs must either belong to the same basic // block, or the first of the two should be classified as a terminator -// instruction. +// instr. //------------------------------------------------------------------------------ -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - next_instruction(Instr, NextInstr), - instruction_in_block(Instr, BB1), - instruction_in_block(NextInstr, BB2), - !terminator_instruction(Instr), + next_instr(Instr, NextInstr), + instr_block(Instr, BB1), + instr_block(NextInstr, BB2), + !terminator_instr(Instr), BB1 != BB2. diff --git a/datalog/schema/bitcast-instr.dl b/datalog/schema/bitcast-instr.dl new file mode 100644 index 0000000..7e1f759 --- /dev/null +++ b/datalog/schema/bitcast-instr.dl @@ -0,0 +1,79 @@ +// http://llvm.org/docs/LangRef.html#bitcast-to-instr +// keywords: conversion; unary; instr + +.type BitcastInstruction = Instruction +.decl bitcast_instr(instr:BitcastInstruction) + +instr(v) :- bitcast_instr(v). + +.decl bitcast_instr_from_operand(instr:BitcastInstruction, val:Operand) +.decl bitcast_instr_to_type(instr:BitcastInstruction, type:Type) + + +// Helper predicate + +.decl bitcast_instr_from_type(instr:BitcastInstruction, type:Type) + +bitcast_instr_from_type(Instr, Type) :- + bitcast_instr_from_operand(Instr, Operand), + operand_has_type(Operand, Type). + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// The ‘bitcast‘ instr takes: +// (i) a value to cast, which must be a non-aggregate first class value, +// (ii) and a type to cast it to, which must also be a non-aggregate +// first class type. +// +// If the value to be casted is of pointer type: +// (i) the type must also be a pointer +// (ii) of the same size. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + bitcast_instr(Instr), + !bitcast_instr_from_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + bitcast_instr(Instr), + !bitcast_instr_to_type(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + bitcast_instr(Instr), + bitcast_instr_to_type(Instr, Type), + !instr_returns_type(Instr, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + bitcast_instr(Instr), + bitcast_instr_from_type(Instr, Type), + ( !type_is_firstclass(Type) + ; aggregate_type(Type) ). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + bitcast_instr(Instr), + bitcast_instr_to_type(Instr, Type), + ( !type_is_firstclass(Type) + ; aggregate_type(Type) ). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + bitcast_instr(Instr), + bitcast_instr_from_type(Instr, FromType), + bitcast_instr_to_type(Instr, ToType), + pointer_type(FromType), + !pointer_type(ToType). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + bitcast_instr(Instr), + bitcast_instr_from_type(Instr, FromType), + bitcast_instr_to_type(Instr, ToType), + !pointer_type(FromType), + pointer_type(ToType). diff --git a/datalog/schema/bitcast-instruction.dl b/datalog/schema/bitcast-instruction.dl deleted file mode 100644 index 84a392a..0000000 --- a/datalog/schema/bitcast-instruction.dl +++ /dev/null @@ -1,79 +0,0 @@ -// http://llvm.org/docs/LangRef.html#bitcast-to-instruction -// keywords: conversion; unary; instruction - -.type BitcastInstruction = Instruction -.decl bitcast_instruction(instr:BitcastInstruction) - -instruction(v) :- bitcast_instruction(v). - -.decl bitcast_instruction_from_operand(instr:BitcastInstruction, val:Operand) -.decl bitcast_instruction_to_type(instr:BitcastInstruction, type:Type) - - -// Helper predicate - -.decl bitcast_instruction_from_type(instr:BitcastInstruction, type:Type) - -bitcast_instruction_from_type(Instr, Type) :- - bitcast_instruction_from_operand(Instr, Operand), - operand_has_type(Operand, Type). - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// The ‘bitcast‘ instruction takes: -// (i) a value to cast, which must be a non-aggregate first class value, -// (ii) and a type to cast it to, which must also be a non-aggregate -// first class type. -// -// If the value to be casted is of pointer type: -// (i) the type must also be a pointer -// (ii) of the same size. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - bitcast_instruction(Instr), - !bitcast_instruction_from_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - bitcast_instruction(Instr), - !bitcast_instruction_to_type(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - bitcast_instruction(Instr), - bitcast_instruction_to_type(Instr, Type), - !instruction_returns_type(Instr, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - bitcast_instruction(Instr), - bitcast_instruction_from_type(Instr, Type), - ( !type_is_firstclass(Type) - ; aggregate_type(Type) ). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - bitcast_instruction(Instr), - bitcast_instruction_to_type(Instr, Type), - ( !type_is_firstclass(Type) - ; aggregate_type(Type) ). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - bitcast_instruction(Instr), - bitcast_instruction_from_type(Instr, FromType), - bitcast_instruction_to_type(Instr, ToType), - pointer_type(FromType), - !pointer_type(ToType). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - bitcast_instruction(Instr), - bitcast_instruction_from_type(Instr, FromType), - bitcast_instruction_to_type(Instr, ToType), - !pointer_type(FromType), - pointer_type(ToType). diff --git a/datalog/schema/br-instr.dl b/datalog/schema/br-instr.dl new file mode 100644 index 0000000..af5cfc3 --- /dev/null +++ b/datalog/schema/br-instr.dl @@ -0,0 +1,89 @@ +// http://llvm.org/docs/LangRef.html#br-instr +// keywords: terminator; instr + +.type BrInstruction = Instruction +.type BrCondInstruction = BrInstruction +.type BrUncondInstruction = BrInstruction + +.decl br_instr(instr:BrInstruction) +.decl br_cond_instr(instr:BrCondInstruction) +.decl br_uncond_instr(instr:BrUncondInstruction) + + +instr(v) :- br_instr(v). +terminator_instr(v) :- br_instr(v). +br_instr(v) :- br_cond_instr(v). +br_instr(v) :- br_uncond_instr(v). + + +//----------------------------- +// Conditional branch +//----------------------------- + +.decl br_cond_instr_condition(instr:Instruction, cond:Operand) +.decl br_cond_instr_iftrue_label(instr:Instruction, label:Variable) +.decl br_cond_instr_iffalse_label(instr:Instruction, label:Variable) + + +//----------------------------- +// Unconditional branch +//----------------------------- + +.decl br_uncond_instr_dest_label(instr:Instruction, label:Variable) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// (1) The conditional branch form of the ‘br‘ instr takes: +// (i) a single ‘i1‘ value and +// (ii) two ‘label‘ values. +// +// (2) The unconditional form of the ‘br‘ instr takes: +// (i) a single ‘label‘ value as a target. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + br_cond_instr(Instr), + !br_cond_instr_condition(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + br_cond_instr(Instr), + br_cond_instr_condition(Instr, Cond), + operand_has_type(Cond, CondType), + !int1_type(CondType). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + br_cond_instr(Instr), + !br_cond_instr_iftrue_label(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + br_cond_instr(Instr), + !br_cond_instr_iffalse_label(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + br_cond_instr(Instr), + br_cond_instr_iftrue_label(Instr, Label), + !variable_is_label(Label). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + br_cond_instr(Instr), + br_cond_instr_iffalse_label(Instr, Label), + !variable_is_label(Label). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + br_uncond_instr(Instr), + !br_uncond_instr_dest_label(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + br_uncond_instr(Instr), + br_uncond_instr_dest_label(Instr, Label), + !variable_is_label(Label). diff --git a/datalog/schema/br-instruction.dl b/datalog/schema/br-instruction.dl deleted file mode 100644 index 167dd3a..0000000 --- a/datalog/schema/br-instruction.dl +++ /dev/null @@ -1,89 +0,0 @@ -// http://llvm.org/docs/LangRef.html#br-instruction -// keywords: terminator; instruction - -.type BrInstruction = Instruction -.type BrCondInstruction = BrInstruction -.type BrUncondInstruction = BrInstruction - -.decl br_instruction(instr:BrInstruction) -.decl br_cond_instruction(instr:BrCondInstruction) -.decl br_uncond_instruction(instr:BrUncondInstruction) - - -instruction(v) :- br_instruction(v). -terminator_instruction(v) :- br_instruction(v). -br_instruction(v) :- br_cond_instruction(v). -br_instruction(v) :- br_uncond_instruction(v). - - -//----------------------------- -// Conditional branch -//----------------------------- - -.decl br_cond_instruction_condition(instr:Instruction, cond:Operand) -.decl br_cond_instruction_iftrue_label(instr:Instruction, label:Variable) -.decl br_cond_instruction_iffalse_label(instr:Instruction, label:Variable) - - -//----------------------------- -// Unconditional branch -//----------------------------- - -.decl br_uncond_instruction_dest_label(instr:Instruction, label:Variable) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// (1) The conditional branch form of the ‘br‘ instruction takes: -// (i) a single ‘i1‘ value and -// (ii) two ‘label‘ values. -// -// (2) The unconditional form of the ‘br‘ instruction takes: -// (i) a single ‘label‘ value as a target. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - br_cond_instruction(Instr), - !br_cond_instruction_condition(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - br_cond_instruction(Instr), - br_cond_instruction_condition(Instr, Cond), - operand_has_type(Cond, CondType), - !int1_type(CondType). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - br_cond_instruction(Instr), - !br_cond_instruction_iftrue_label(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - br_cond_instruction(Instr), - !br_cond_instruction_iffalse_label(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - br_cond_instruction(Instr), - br_cond_instruction_iftrue_label(Instr, Label), - !variable_is_label(Label). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - br_cond_instruction(Instr), - br_cond_instruction_iffalse_label(Instr, Label), - !variable_is_label(Label). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - br_uncond_instruction(Instr), - !br_uncond_instruction_dest_label(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - br_uncond_instruction(Instr), - br_uncond_instruction_dest_label(Instr, Label), - !variable_is_label(Label). diff --git a/datalog/schema/call-instr.dl b/datalog/schema/call-instr.dl new file mode 100644 index 0000000..3f82691 --- /dev/null +++ b/datalog/schema/call-instr.dl @@ -0,0 +1,183 @@ +// http://llvm.org/docs/LangRef.html#call-instr +// keywords: instr + +.type CallInstruction = Instruction +.decl call_instr(instr:CallInstruction) + +instr(v) :- call_instr(v). + +// Function operand: can be either a constant or a variable +.decl call_instr_fn_operand(instr:CallInstruction, op:Operand) + +// Resolved func of call instr. Initially empty. +.decl call_instr_fn_target(instr:CallInstruction, func:FunctionDecl) + +// Eligible for tail call optimizations +.decl call_instr_is_tail_opt(instr:CallInstruction) + + +// If none is specified, the call defaults to using C +// calling conventions. +.decl call_instr_with_calling_convention(instr:CallInstruction, cc:CallingConvention) +calling_convention(cc) :- call_instr_with_calling_convention(_, cc). + + +//--------------------------------------------------------------- +// [Direct and Indirect Call Instructions] +// +// Call-instrs are divided into direct calls +// that provide a func name, and indirect calls +// through a func pointer variable. +//--------------------------------------------------------------- + +.decl direct_call_instr(instr:CallInstruction) +.decl indirect_call_instr(instr:CallInstruction) +.decl asm_call_instr(instr:CallInstruction) + +direct_call_instr(Instr) :- + call_instr_fn_operand(Instr, Constant), + constant(Constant), !inline_asm(Constant). + +indirect_call_instr(Instr) :- + call_instr_fn_operand(Instr, Variable), + variable(Variable). + +asm_call_instr(Instr) :- + call_instr_fn_operand(Instr, Constant), + inline_asm(Constant). + + +//-------------------------------------------------- +// Actual arguments and Parameter Attrs +//-------------------------------------------------- + +.decl call_instr_arg(instr:CallInstruction, i:ArgumentIndex, arg:Operand) +.decl call_instr_with_return_attr(instr:CallInstruction, attr:Attribute) +.decl call_instr_with_param_attr(instr:CallInstruction, i:ArgumentIndex, attr:Attribute) +.decl call_instr_with_fn_attr(instr:CallInstruction, attr:Attribute) + +attr(Attr) :- call_instr_with_fn_attr(_, Attr). +attr(Attr) :- call_instr_with_return_attr(_, Attr). +attr(Attr) :- call_instr_with_param_attr(_, _, Attr). + + +//----------------------------- +// Signature (func type) +//----------------------------- + +.decl call_instr_fn_type(instr:CallInstruction, type:Type) +.decl call_instr_return_type(instr:CallInstruction, type:Type) + +call_instr_fn_type(Instr, FnType) :- + call_instr_fn_operand(Instr, FnOp), + operand_has_type(FnOp, PtrType), + pointer_type_has_component(PtrType, FnType), + func_type(FnType). + +call_instr_return_type(Instr, Type) :- + call_instr_fn_type(Instr, FnType), + func_type_return(FnType, Type). + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// (1) Only ‘zeroext‘, ‘signext‘, and ‘inreg‘ attrs +// are valid for return values. +// (2) The calling convention of the call must match the +// calling convention of the target func. +// (3) The type of the call instr is also the type of +// the return value. Functions that return no value are +// marked void. +// (4) The func type shall be the signature of the pointer +// to func value being invoked. The argument types must +// match the types implied by this signature. +// (5) All arguments must be of first class type. +// (6) Only ‘noreturn‘, ‘nounwind‘, ‘readonly‘ and ‘readnone‘ +// attrs are valid as func attrs. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + call_instr(Instr), + !call_instr_fn_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + call_instr(Instr), + !call_instr_fn_type(Instr, _). + +// attr compatibility +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + call_instr_with_return_attr(Instr, Attr), + !parameter_attr__zeroext(Attr), + !parameter_attr__signext(Attr), + !parameter_attr__inreg(Attr), + !parameter_attr__noalias(Attr), + !parameter_attr__dereferenceable(Attr). // c1 + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + call_instr_with_fn_attr(Instr, Attr), + !func_attr__noreturn(Attr), + !func_attr__nounwind(Attr), + !func_attr__readonly(Attr), + !func_attr__readnone(Attr), + !func_attr__cold(Attr), + !func_attr__returns_twice(Attr), + !func_attr__builtin(Attr), + !target_dependent_attr(Attr). // c6 + + +// cc compatibility +// +// TODO: this should be used to limit imprecision instead, and not be +// a constraint +// +// schema_invalid_instr(Instr, __FILE__, __LINE__) :- +// schema_sanity(), +// call_instr_fn_target(Instr, Func), +// call_instr_with_calling_convention(Instr, CConv), +// !func_calling_convention(Func, CConv). // c2 + +// Signature conformance +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + call_instr_arg(Instr, Index, _), + call_instr_fn_type(Instr, FnType), + !func_type_param(FnType, Index, _), + !func_type_has_varargs(FnType). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + call_instr(Instr), + !call_instr_arg(Instr, Index, _), + call_instr_fn_type(Instr, FnType), + func_type_param(FnType, Index, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + call_instr_arg(Instr, Index, Arg), + call_instr_fn_type(Instr, FnType), + func_type_param(FnType, Index, ParamType), + !operand_has_type(Arg, ParamType). // c4 + + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + call_instr_return_type(Instr, Type), + !void_type(Type), + !instr_returns_type(Instr, Type). // c3 + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + call_instr_return_type(Instr, Type), + void_type(Type), + instr_returns_type(Instr, _). // c3 vice versa + +// only first class arguments allowed +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + call_instr_arg(Instr, _, Arg), + !operand_is_firstclass(Arg). // c5 diff --git a/datalog/schema/call-instruction.dl b/datalog/schema/call-instruction.dl deleted file mode 100644 index 3fceea1..0000000 --- a/datalog/schema/call-instruction.dl +++ /dev/null @@ -1,183 +0,0 @@ -// http://llvm.org/docs/LangRef.html#call-instruction -// keywords: instruction - -.type CallInstruction = Instruction -.decl call_instruction(instr:CallInstruction) - -instruction(v) :- call_instruction(v). - -// Function operand: can be either a constant or a variable -.decl call_instruction_fn_operand(instr:CallInstruction, op:Operand) - -// Resolved func of call instruction. Initially empty. -.decl call_instruction_fn_target(instr:CallInstruction, func:FunctionDecl) - -// Eligible for tail call optimizations -.decl call_instruction_is_tail_opt(instr:CallInstruction) - - -// If none is specified, the call defaults to using C -// calling conventions. -.decl call_instruction_with_calling_convention(instr:CallInstruction, cc:CallingConvention) -calling_convention(cc) :- call_instruction_with_calling_convention(_, cc). - - -//--------------------------------------------------------------- -// [Direct and Indirect Call Instructions] -// -// Call-instructions are divided into direct calls -// that provide a func name, and indirect calls -// through a func pointer variable. -//--------------------------------------------------------------- - -.decl direct_call_instruction(instr:CallInstruction) -.decl indirect_call_instruction(instr:CallInstruction) -.decl asm_call_instruction(instr:CallInstruction) - -direct_call_instruction(Instr) :- - call_instruction_fn_operand(Instr, Constant), - constant(Constant), !inline_asm(Constant). - -indirect_call_instruction(Instr) :- - call_instruction_fn_operand(Instr, Variable), - variable(Variable). - -asm_call_instruction(Instr) :- - call_instruction_fn_operand(Instr, Constant), - inline_asm(Constant). - - -//-------------------------------------------------- -// Actual arguments and Parameter Attributes -//-------------------------------------------------- - -.decl call_instruction_arg(instr:CallInstruction, i:ArgumentIndex, arg:Operand) -.decl call_instruction_with_return_attr(instr:CallInstruction, attr:Attribute) -.decl call_instruction_with_param_attr(instr:CallInstruction, i:ArgumentIndex, attr:Attribute) -.decl call_instruction_with_fn_attr(instr:CallInstruction, attr:Attribute) - -attr(Attr) :- call_instruction_with_fn_attr(_, Attr). -attr(Attr) :- call_instruction_with_return_attr(_, Attr). -attr(Attr) :- call_instruction_with_param_attr(_, _, Attr). - - -//----------------------------- -// Signature (func type) -//----------------------------- - -.decl call_instruction_fn_type(instr:CallInstruction, type:Type) -.decl call_instruction_return_type(instr:CallInstruction, type:Type) - -call_instruction_fn_type(Instr, FnType) :- - call_instruction_fn_operand(Instr, FnOp), - operand_has_type(FnOp, PtrType), - pointer_type_has_component(PtrType, FnType), - func_type(FnType). - -call_instruction_return_type(Instr, Type) :- - call_instruction_fn_type(Instr, FnType), - func_type_return(FnType, Type). - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// (1) Only ‘zeroext‘, ‘signext‘, and ‘inreg‘ attrs -// are valid for return values. -// (2) The calling convention of the call must match the -// calling convention of the target func. -// (3) The type of the call instruction is also the type of -// the return value. Functions that return no value are -// marked void. -// (4) The func type shall be the signature of the pointer -// to func value being invoked. The argument types must -// match the types implied by this signature. -// (5) All arguments must be of first class type. -// (6) Only ‘noreturn‘, ‘nounwind‘, ‘readonly‘ and ‘readnone‘ -// attrs are valid as func attrs. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - call_instruction(Instr), - !call_instruction_fn_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - call_instruction(Instr), - !call_instruction_fn_type(Instr, _). - -// attr compatibility -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - call_instruction_with_return_attr(Instr, Attr), - !parameter_attr__zeroext(Attr), - !parameter_attr__signext(Attr), - !parameter_attr__inreg(Attr), - !parameter_attr__noalias(Attr), - !parameter_attr__dereferenceable(Attr). // c1 - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - call_instruction_with_fn_attr(Instr, Attr), - !func_attr__noreturn(Attr), - !func_attr__nounwind(Attr), - !func_attr__readonly(Attr), - !func_attr__readnone(Attr), - !func_attr__cold(Attr), - !func_attr__returns_twice(Attr), - !func_attr__builtin(Attr), - !target_dependent_attr(Attr). // c6 - - -// cc compatibility -// -// TODO: this should be used to limit imprecision instead, and not be -// a constraint -// -// schema_invalid_instruction(Instr, __FILE__, __LINE__) :- -// schema_sanity(), -// call_instruction_fn_target(Instr, Func), -// call_instruction_with_calling_convention(Instr, CConv), -// !func_calling_convention(Func, CConv). // c2 - -// Signature conformance -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - call_instruction_arg(Instr, Index, _), - call_instruction_fn_type(Instr, FnType), - !func_type_param(FnType, Index, _), - !func_type_has_varargs(FnType). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - call_instruction(Instr), - !call_instruction_arg(Instr, Index, _), - call_instruction_fn_type(Instr, FnType), - func_type_param(FnType, Index, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - call_instruction_arg(Instr, Index, Arg), - call_instruction_fn_type(Instr, FnType), - func_type_param(FnType, Index, ParamType), - !operand_has_type(Arg, ParamType). // c4 - - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - call_instruction_return_type(Instr, Type), - !void_type(Type), - !instruction_returns_type(Instr, Type). // c3 - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - call_instruction_return_type(Instr, Type), - void_type(Type), - instruction_returns_type(Instr, _). // c3 vice versa - -// only first class arguments allowed -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - call_instruction_arg(Instr, _, Arg), - !operand_is_firstclass(Arg). // c5 diff --git a/datalog/schema/calling-convention.dl b/datalog/schema/calling-convention.dl index 831418c..c1e10ea 100644 --- a/datalog/schema/calling-convention.dl +++ b/datalog/schema/calling-convention.dl @@ -1,5 +1,5 @@ // http://llvm.org/docs/LangRef.html#callingconv -// keywords: funcstruction; call_instruction; invoke_instruction +// keywords: funcstruction; call_instr; invoke_instr .type CallingConvention <: symbol .decl calling_convention(conv:CallingConvention) diff --git a/datalog/schema/cmpxchg-instr.dl b/datalog/schema/cmpxchg-instr.dl new file mode 100644 index 0000000..6110dbb --- /dev/null +++ b/datalog/schema/cmpxchg-instr.dl @@ -0,0 +1,135 @@ +// http://llvm.org/docs/LangRef.html#cmpxchg-instr +// keywords: atomic; memory; instr +// +// [Syntax] +// +// cmpxchg [weak] [volatile] * , +// , +// +// [singlethread] +// ; yields { ty, i1 } +// + +.type CmpXchgInstruction = Instruction +.decl cmpxchg_instr(instr:CmpXchgInstruction) + +instr(v) :- cmpxchg_instr(v). + +.decl cmpxchg_instr_ordering(instr:CmpXchgInstruction, ordering:Ordering) + + +// If the cmpxchg is marked as volatile, then the optimizer is not allowed +// to modify the number or order of execution of this cmpxchg with other +// volatile operations. + +.decl cmpxchg_instr_is_volatile(instr:CmpXchgInstruction) + + +// There are three arguments to the cmpxchg instr: +// (i) an address to operate on, +// (ii) a value to compare to the value currently be at +// that address, and +// (iii) a new value to place at that address if the compared +// values are equal. + +.decl cmpxchg_instr_address(instr:CmpXchgInstruction, ptr:Operand) +.decl cmpxchg_instr_cmp_value(instr:CmpXchgInstruction, val:Operand) +.decl cmpxchg_instr_new_value(instr:CmpXchgInstruction, val:Operand) + + +// Auxiliary + +.decl cmpxchg_instr_type(instr:CmpXchgInstruction, type:Type) + +.decl cmpxchg_instr_cmp_value_type(instr:CmpXchgInstruction, type:Type) + +cmpxchg_instr_cmp_value_type(Instr, Type) :- + cmpxchg_instr_cmp_value(Instr, Value), + operand_has_type(Value, Type). + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// 1. the type of ‘’ must be an integer type or pointer type +// whose bit width is a power of two greater than or equal to +// eight and less than or equal to a target-specific size limit +// 2. ‘’ and ‘’ must have the same type +// 3. the type of ‘’ must be a pointer to that type +// 4. the original value at the location is returned, together with a +// flag indicating success (true) or failure (false). +//------------------------------------------------------------------------------ + +// Required arguments + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + cmpxchg_instr(Instr), + !cmpxchg_instr_ordering(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + cmpxchg_instr(Instr), + !cmpxchg_instr_address(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + cmpxchg_instr(Instr), + !cmpxchg_instr_cmp_value(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + cmpxchg_instr(Instr), + !cmpxchg_instr_new_value(Instr, _). + + +// 1. Constraint on value type + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + cmpxchg_instr_cmp_value_type(Instr, Type), + !integer_type(Type), + !pointer_type(Type). + + +// 2. Type equality constaint on ‘’ and ‘’ arguments + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + cmpxchg_instr_cmp_value(Instr, CmpValue), + cmpxchg_instr_new_value(Instr, NewValue), + operand_has_type(CmpValue, CmpType), + operand_has_type(NewValue, NewType), + CmpType != NewType. + + +// 3. Type constraint on ‘’ argument + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + cmpxchg_instr_address(Instr, AddressPtr), + cmpxchg_instr_cmp_value_type(Instr, Type), + operand_has_type(AddressPtr, PtrType), + !pointer_type_has_component(PtrType, Type). + + +// 4. Return value + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + cmpxchg_instr(Instr), + instr_returns_type(Instr, RetType), + !struct_type_nfields(RetType, 2). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + cmpxchg_instr_cmp_value_type(Instr, Type), + instr_returns_type(Instr, RetType), + !struct_type_field(RetType, 0, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + cmpxchg_instr(Instr), + instr_returns_type(Instr, RetType), + struct_type_field(RetType, 1, FlagType), + !int1_type(FlagType). diff --git a/datalog/schema/cmpxchg-instruction.dl b/datalog/schema/cmpxchg-instruction.dl deleted file mode 100644 index 74758d6..0000000 --- a/datalog/schema/cmpxchg-instruction.dl +++ /dev/null @@ -1,135 +0,0 @@ -// http://llvm.org/docs/LangRef.html#cmpxchg-instruction -// keywords: atomic; memory; instruction -// -// [Syntax] -// -// cmpxchg [weak] [volatile] * , -// , -// -// [singlethread] -// ; yields { ty, i1 } -// - -.type CmpXchgInstruction = Instruction -.decl cmpxchg_instruction(instr:CmpXchgInstruction) - -instruction(v) :- cmpxchg_instruction(v). - -.decl cmpxchg_instruction_ordering(instr:CmpXchgInstruction, ordering:Ordering) - - -// If the cmpxchg is marked as volatile, then the optimizer is not allowed -// to modify the number or order of execution of this cmpxchg with other -// volatile operations. - -.decl cmpxchg_instruction_is_volatile(instr:CmpXchgInstruction) - - -// There are three arguments to the cmpxchg instruction: -// (i) an address to operate on, -// (ii) a value to compare to the value currently be at -// that address, and -// (iii) a new value to place at that address if the compared -// values are equal. - -.decl cmpxchg_instruction_address(instr:CmpXchgInstruction, ptr:Operand) -.decl cmpxchg_instruction_cmp_value(instr:CmpXchgInstruction, val:Operand) -.decl cmpxchg_instruction_new_value(instr:CmpXchgInstruction, val:Operand) - - -// Auxiliary - -.decl cmpxchg_instruction_type(instr:CmpXchgInstruction, type:Type) - -.decl cmpxchg_instruction_cmp_value_type(instr:CmpXchgInstruction, type:Type) - -cmpxchg_instruction_cmp_value_type(Instr, Type) :- - cmpxchg_instruction_cmp_value(Instr, Value), - operand_has_type(Value, Type). - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// 1. the type of ‘’ must be an integer type or pointer type -// whose bit width is a power of two greater than or equal to -// eight and less than or equal to a target-specific size limit -// 2. ‘’ and ‘’ must have the same type -// 3. the type of ‘’ must be a pointer to that type -// 4. the original value at the location is returned, together with a -// flag indicating success (true) or failure (false). -//------------------------------------------------------------------------------ - -// Required arguments - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - cmpxchg_instruction(Instr), - !cmpxchg_instruction_ordering(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - cmpxchg_instruction(Instr), - !cmpxchg_instruction_address(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - cmpxchg_instruction(Instr), - !cmpxchg_instruction_cmp_value(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - cmpxchg_instruction(Instr), - !cmpxchg_instruction_new_value(Instr, _). - - -// 1. Constraint on value type - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - cmpxchg_instruction_cmp_value_type(Instr, Type), - !integer_type(Type), - !pointer_type(Type). - - -// 2. Type equality constaint on ‘’ and ‘’ arguments - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - cmpxchg_instruction_cmp_value(Instr, CmpValue), - cmpxchg_instruction_new_value(Instr, NewValue), - operand_has_type(CmpValue, CmpType), - operand_has_type(NewValue, NewType), - CmpType != NewType. - - -// 3. Type constraint on ‘’ argument - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - cmpxchg_instruction_address(Instr, AddressPtr), - cmpxchg_instruction_cmp_value_type(Instr, Type), - operand_has_type(AddressPtr, PtrType), - !pointer_type_has_component(PtrType, Type). - - -// 4. Return value - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - cmpxchg_instruction(Instr), - instruction_returns_type(Instr, RetType), - !struct_type_nfields(RetType, 2). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - cmpxchg_instruction_cmp_value_type(Instr, Type), - instruction_returns_type(Instr, RetType), - !struct_type_field(RetType, 0, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - cmpxchg_instruction(Instr), - instruction_returns_type(Instr, RetType), - struct_type_field(RetType, 1, FlagType), - !int1_type(FlagType). diff --git a/datalog/schema/extractelement-instr.dl b/datalog/schema/extractelement-instr.dl new file mode 100644 index 0000000..651d5b9 --- /dev/null +++ b/datalog/schema/extractelement-instr.dl @@ -0,0 +1,58 @@ +// http://llvm.org/docs/LangRef.html#extractelement-instr +// keywords: vector; instr + +.type ExtractElementInstruction = Instruction +.decl extractelement_instr(instr:ExtractElementInstruction) + +instr(v) :- extractelement_instr(v). + +.decl extractelement_instr_base(instr:ExtractElementInstruction, vector:Operand) +.decl extractelement_instr_index(instr:ExtractElementInstruction, index:Operand) +.decl extractelement_instr_type(instr:ExtractElementInstruction, type:Type) + +// The type of the elements that the vector comprises. +extractelement_instr_type(Instr, Type) :- + extractelement_instr_base(Instr, Vector), + operand_has_type(Vector, VectorType), + vector_type_has_component(VectorType, Type). + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// The ‘extractelement‘ instr takes two operands: +// (i) the first operand is a value of vector type +// (ii) and the second operand is an index of i32-integer type. +// +// The result is a scalar of the same type as the component type +// of the vector value. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + extractelement_instr(Instr), + !extractelement_instr_base(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + extractelement_instr(Instr), + !extractelement_instr_index(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + extractelement_instr(Instr), + extractelement_instr_base(Instr, Vector), + operand_has_type(Vector, Type), + !vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + extractelement_instr(Instr), + extractelement_instr_index(Instr, Index), + operand_has_type(Index, Type), + !int32_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + extractelement_instr_type(Instr, Type), + !instr_returns_type(Instr, Type). diff --git a/datalog/schema/extractelement-instruction.dl b/datalog/schema/extractelement-instruction.dl deleted file mode 100644 index 2f2cdd9..0000000 --- a/datalog/schema/extractelement-instruction.dl +++ /dev/null @@ -1,58 +0,0 @@ -// http://llvm.org/docs/LangRef.html#extractelement-instruction -// keywords: vector; instruction - -.type ExtractElementInstruction = Instruction -.decl extractelement_instruction(instr:ExtractElementInstruction) - -instruction(v) :- extractelement_instruction(v). - -.decl extractelement_instruction_base(instr:ExtractElementInstruction, vector:Operand) -.decl extractelement_instruction_index(instr:ExtractElementInstruction, index:Operand) -.decl extractelement_instruction_type(instr:ExtractElementInstruction, type:Type) - -// The type of the elements that the vector comprises. -extractelement_instruction_type(Instr, Type) :- - extractelement_instruction_base(Instr, Vector), - operand_has_type(Vector, VectorType), - vector_type_has_component(VectorType, Type). - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// The ‘extractelement‘ instruction takes two operands: -// (i) the first operand is a value of vector type -// (ii) and the second operand is an index of i32-integer type. -// -// The result is a scalar of the same type as the component type -// of the vector value. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - extractelement_instruction(Instr), - !extractelement_instruction_base(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - extractelement_instruction(Instr), - !extractelement_instruction_index(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - extractelement_instruction(Instr), - extractelement_instruction_base(Instr, Vector), - operand_has_type(Vector, Type), - !vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - extractelement_instruction(Instr), - extractelement_instruction_index(Instr, Index), - operand_has_type(Index, Type), - !int32_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - extractelement_instruction_type(Instr, Type), - !instruction_returns_type(Instr, Type). diff --git a/datalog/schema/extractvalue-instr.dl b/datalog/schema/extractvalue-instr.dl new file mode 100644 index 0000000..d36a7db --- /dev/null +++ b/datalog/schema/extractvalue-instr.dl @@ -0,0 +1,92 @@ +// http://llvm.org/docs/LangRef.html#extractvalue-instr +// keywords: aggregate; instr + +.type ExtractValueInstruction = Instruction +.decl extractvalue_instr(instr:ExtractValueInstruction) + +instr(v) :- extractvalue_instr(v). + +.decl extractvalue_instr_base(instr:ExtractValueInstruction, aggregate:Operand) + +//------------------------ +// Aggregate Indices +//------------------------ + +.decl extractvalue_instr_nindices(instr:ExtractValueInstruction, total:number) +.decl extractvalue_instr_index(instr:ExtractValueInstruction, i:number, idx:number) + +next_instr_index(Instr, Index, Index + 1) :- + extractvalue_instr_index(Instr, Index, _). + + +//------------------------------------------------ +// The resulting type for each dereference. +//------------------------------------------------ + +.decl extractvalue_instr_base_type(instr:ExtractValueInstruction, type:Type) +.decl extractvalue_instr_value_type(instr:ExtractValueInstruction, type:Type) +.decl extractvalue_instrterm_type(instr:ExtractValueInstruction, i:number, type:Type) + +extractvalue_instrterm_type(Instr, 0, Type) :- + extractvalue_instr_base(Instr, Aggregate), + operand_has_type(Aggregate, Type). + +extractvalue_instrterm_type(Instr, NextIndex, Type) :- + extractvalue_instrterm_type(Instr, Index, StructType), + extractvalue_instr_index(Instr, Index, IdxValue), + struct_type_field(StructType, IdxValue, Type), + next_instr_index(Instr, Index, NextIndex). + +extractvalue_instrterm_type(Instr, NextIndex, Type) :- + extractvalue_instrterm_type(Instr, Index, ArrayType), + array_type_has_component(ArrayType, Type), + next_instr_index(Instr, Index, NextIndex). + +extractvalue_instr_value_type(Instr, Type) :- + extractvalue_instr_nindices(Instr, Total), + extractvalue_instrterm_type(Instr, Total, Type). + +extractvalue_instr_base_type(Instr, Type) :- + extractvalue_instrterm_type(Instr, 0, Type). + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// (1) The first operand of an ‘extractvalue‘ instr is +// a value of struct or array type. +// (2) At least one index must be specified. +// +// The result is the value at the position in the aggregate specified +// by the index operands. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + extractvalue_instr(Instr), + !extractvalue_instr_base(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + extractvalue_instr(Instr), + !extractvalue_instr_nindices(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + extractvalue_instr(Instr), + !extractvalue_instr_index(Instr, 0, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + extractvalue_instr_base_type(Instr, BaseType), + !aggregate_type(BaseType). // c1 + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + extractvalue_instr_nindices(Instr, Total), + Total <= 0. // c2 + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + extractvalue_instr_value_type(Instr, Type), + !instr_returns_type(Instr, Type). // creturn diff --git a/datalog/schema/extractvalue-instruction.dl b/datalog/schema/extractvalue-instruction.dl deleted file mode 100644 index 161f976..0000000 --- a/datalog/schema/extractvalue-instruction.dl +++ /dev/null @@ -1,92 +0,0 @@ -// http://llvm.org/docs/LangRef.html#extractvalue-instruction -// keywords: aggregate; instruction - -.type ExtractValueInstruction = Instruction -.decl extractvalue_instruction(instr:ExtractValueInstruction) - -instruction(v) :- extractvalue_instruction(v). - -.decl extractvalue_instruction_base(instr:ExtractValueInstruction, aggregate:Operand) - -//------------------------ -// Aggregate Indices -//------------------------ - -.decl extractvalue_instruction_nindices(instr:ExtractValueInstruction, total:number) -.decl extractvalue_instruction_index(instr:ExtractValueInstruction, i:number, idx:number) - -next_instruction_index(Instr, Index, Index + 1) :- - extractvalue_instruction_index(Instr, Index, _). - - -//------------------------------------------------ -// The resulting type for each dereference. -//------------------------------------------------ - -.decl extractvalue_instruction_base_type(instr:ExtractValueInstruction, type:Type) -.decl extractvalue_instruction_value_type(instr:ExtractValueInstruction, type:Type) -.decl extractvalue_instruction_interm_type(instr:ExtractValueInstruction, i:number, type:Type) - -extractvalue_instruction_interm_type(Instr, 0, Type) :- - extractvalue_instruction_base(Instr, Aggregate), - operand_has_type(Aggregate, Type). - -extractvalue_instruction_interm_type(Instr, NextIndex, Type) :- - extractvalue_instruction_interm_type(Instr, Index, StructType), - extractvalue_instruction_index(Instr, Index, IdxValue), - struct_type_field(StructType, IdxValue, Type), - next_instruction_index(Instr, Index, NextIndex). - -extractvalue_instruction_interm_type(Instr, NextIndex, Type) :- - extractvalue_instruction_interm_type(Instr, Index, ArrayType), - array_type_has_component(ArrayType, Type), - next_instruction_index(Instr, Index, NextIndex). - -extractvalue_instruction_value_type(Instr, Type) :- - extractvalue_instruction_nindices(Instr, Total), - extractvalue_instruction_interm_type(Instr, Total, Type). - -extractvalue_instruction_base_type(Instr, Type) :- - extractvalue_instruction_interm_type(Instr, 0, Type). - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// (1) The first operand of an ‘extractvalue‘ instruction is -// a value of struct or array type. -// (2) At least one index must be specified. -// -// The result is the value at the position in the aggregate specified -// by the index operands. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - extractvalue_instruction(Instr), - !extractvalue_instruction_base(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - extractvalue_instruction(Instr), - !extractvalue_instruction_nindices(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - extractvalue_instruction(Instr), - !extractvalue_instruction_index(Instr, 0, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - extractvalue_instruction_base_type(Instr, BaseType), - !aggregate_type(BaseType). // c1 - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - extractvalue_instruction_nindices(Instr, Total), - Total <= 0. // c2 - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - extractvalue_instruction_value_type(Instr, Type), - !instruction_returns_type(Instr, Type). // creturn diff --git a/datalog/schema/fadd-instr.dl b/datalog/schema/fadd-instr.dl new file mode 100644 index 0000000..91c516e --- /dev/null +++ b/datalog/schema/fadd-instr.dl @@ -0,0 +1,52 @@ +// http://llvm.org/docs/LangRef.html#fadd-instr +// keywords: arithmetic; binary; instr + +.type FAddInstruction = Instruction +.decl fadd_instr(instr:FAddInstruction) + +instr(v) :- fadd_instr(v). + +.decl fadd_instr_first_operand(instr:FAddInstruction, op:Operand) +.decl fadd_instr_second_operand(instr:FAddInstruction, op:Operand) + + +//------------------------------------------------------------------- +// [Constraints] +// +// 1) The two arguments to the ‘fadd‘ instr must be: +// (i) floating point or +// (ii) vector of floating point values. +// +// 2) Both arguments must have identical types. +// +// 3) The resulting value is the same type as its operands. +//------------------------------------------------------------------- + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fadd_instr(Instr), + !fadd_instr_first_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fadd_instr(Instr), + !fadd_instr_second_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fadd_instr(Instr), + instr_returns_type(Instr, Type), + !fp_type(Type), + !fp_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + fadd_instr_first_operand(Instr, LeftOp), + !operand_has_type(LeftOp, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + fadd_instr_second_operand(Instr, RightOp), + !operand_has_type(RightOp, Type). diff --git a/datalog/schema/fadd-instruction.dl b/datalog/schema/fadd-instruction.dl deleted file mode 100644 index 629b1fd..0000000 --- a/datalog/schema/fadd-instruction.dl +++ /dev/null @@ -1,52 +0,0 @@ -// http://llvm.org/docs/LangRef.html#fadd-instruction -// keywords: arithmetic; binary; instruction - -.type FAddInstruction = Instruction -.decl fadd_instruction(instr:FAddInstruction) - -instruction(v) :- fadd_instruction(v). - -.decl fadd_instruction_first_operand(instr:FAddInstruction, op:Operand) -.decl fadd_instruction_second_operand(instr:FAddInstruction, op:Operand) - - -//------------------------------------------------------------------- -// [Constraints] -// -// 1) The two arguments to the ‘fadd‘ instruction must be: -// (i) floating point or -// (ii) vector of floating point values. -// -// 2) Both arguments must have identical types. -// -// 3) The resulting value is the same type as its operands. -//------------------------------------------------------------------- - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fadd_instruction(Instr), - !fadd_instruction_first_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fadd_instruction(Instr), - !fadd_instruction_second_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fadd_instruction(Instr), - instruction_returns_type(Instr, Type), - !fp_type(Type), - !fp_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - fadd_instruction_first_operand(Instr, LeftOp), - !operand_has_type(LeftOp, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - fadd_instruction_second_operand(Instr, RightOp), - !operand_has_type(RightOp, Type). diff --git a/datalog/schema/fcmp-instruction.dl b/datalog/schema/fcmp-instr.dl similarity index 63% rename from datalog/schema/fcmp-instruction.dl rename to datalog/schema/fcmp-instr.dl index 8e3b316..d99fa30 100644 --- a/datalog/schema/fcmp-instruction.dl +++ b/datalog/schema/fcmp-instr.dl @@ -1,27 +1,27 @@ -// http://llvm.org/docs/LangRef.html#fcmp-instruction -// keywords: comparison; binary; instruction +// http://llvm.org/docs/LangRef.html#fcmp-instr +// keywords: comparison; binary; instr .type FCmpInstruction = Instruction -.decl fcmp_instruction(instr:FCmpInstruction) +.decl fcmp_instr(instr:FCmpInstruction) -instruction(v) :- fcmp_instruction(v). +instr(v) :- fcmp_instr(v). .type FCmpCondition <: symbol -.decl fcmp_instruction_condition(instr:FCmpInstruction, cond:FCmpCondition) -.decl fcmp_instruction_first_operand(instr:FCmpInstruction, op:Operand) -.decl fcmp_instruction_second_operand(instr:FCmpInstruction, op:Operand) +.decl fcmp_instr_condition(instr:FCmpInstruction, cond:FCmpCondition) +.decl fcmp_instr_first_operand(instr:FCmpInstruction, op:Operand) +.decl fcmp_instr_second_operand(instr:FCmpInstruction, op:Operand) //------------------------------------------------------------------------------ // [Condition Codes] // -// Condition Code enum representation for the ‘fcmp‘ instruction, and +// Condition Code enum representation for the ‘fcmp‘ instr, and // its selectors. //------------------------------------------------------------------------------ .decl fcmp_condition(cond:FCmpCondition) -fcmp_condition(Cond) :- fcmp_instruction_condition(_, Cond). +fcmp_condition(Cond) :- fcmp_instr_condition(_, Cond). .decl fcmp_condition__false(cond:FCmpCondition) .decl fcmp_condition__true(cond:FCmpCondition) @@ -58,8 +58,8 @@ fcmp_condition__une("une") :- fcmp_condition("une"). fcmp_condition__uno("uno") :- fcmp_condition("uno"). // the enum enforcement by constraint -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), fcmp_instruction_condition(Instr, Cond), +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), fcmp_instr_condition(Instr, Cond), !fcmp_condition__false(Cond), !fcmp_condition__true(Cond), !fcmp_condition__oeq(Cond), !fcmp_condition__ogt(Cond), !fcmp_condition__oge(Cond), !fcmp_condition__olt(Cond), @@ -72,22 +72,22 @@ schema_invalid_instruction(Instr, __FILE__, __LINE__) :- // Helper predicates -.decl fcmp_instruction_from_type(instr:FCmpInstruction, type:Type) -.decl fcmp_instruction_to_type(instr:FCmpInstruction, type:Type) +.decl fcmp_instr_from_type(instr:FCmpInstruction, type:Type) +.decl fcmp_instr_to_type(instr:FCmpInstruction, type:Type) -fcmp_instruction_from_type(Instr, Type) :- - fcmp_instruction_first_operand(Instr, Operand), +fcmp_instr_from_type(Instr, Type) :- + fcmp_instr_first_operand(Instr, Operand), operand_has_type(Operand, Type). -fcmp_instruction_to_type(Instr, Type) :- - fcmp_instruction(Instr), - instruction_returns_type(Instr, Type). +fcmp_instr_to_type(Instr, Type) :- + fcmp_instr(Instr), + instr_returns_type(Instr, Type). //------------------------------------------------------------------- // [Constraints] // -// 1) The ‘fcmp‘ instruction returns: +// 1) The ‘fcmp‘ instr returns: // (i) a boolean value or // (ii) a vector of boolean values // @@ -102,44 +102,44 @@ fcmp_instruction_to_type(Instr, Type) :- // (ii) with the same number of elements. //------------------------------------------------------------------- -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - fcmp_instruction(Instr), - !fcmp_instruction_first_operand(Instr, _). + fcmp_instr(Instr), + !fcmp_instr_first_operand(Instr, _). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - fcmp_instruction(Instr), - !fcmp_instruction_second_operand(Instr, _). + fcmp_instr(Instr), + !fcmp_instr_second_operand(Instr, _). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - fcmp_instruction(Instr), - !fcmp_instruction_condition(Instr, _). + fcmp_instr(Instr), + !fcmp_instr_condition(Instr, _). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - fcmp_instruction_to_type(Instr, Type), + fcmp_instr_to_type(Instr, Type), !boolean_type(Type), !boolean_vector_type(Type). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - fcmp_instruction_from_type(Instr, Type), + fcmp_instr_from_type(Instr, Type), !fp_type(Type), !fp_vector_type(Type). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - fcmp_instruction(Instr), - fcmp_instruction_first_operand(Instr, LeftOp), - fcmp_instruction_second_operand(Instr, RightOp), + fcmp_instr(Instr), + fcmp_instr_first_operand(Instr, LeftOp), + fcmp_instr_second_operand(Instr, RightOp), operand_has_type(LeftOp, LeftType), operand_has_type(RightOp, RightType), LeftType != RightType. -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - fcmp_instruction_from_type(Instr, FromType), - fcmp_instruction_to_type(Instr, ToType), + fcmp_instr_from_type(Instr, FromType), + fcmp_instr_to_type(Instr, ToType), !vector_compatible_types(FromType, ToType). diff --git a/datalog/schema/fdiv-instr.dl b/datalog/schema/fdiv-instr.dl new file mode 100644 index 0000000..e3a7615 --- /dev/null +++ b/datalog/schema/fdiv-instr.dl @@ -0,0 +1,52 @@ +// http://llvm.org/docs/LangRef.html#fdiv-instr +// keywords: arithmetic; binary; instr + +.type FDivInstruction = Instruction +.decl fdiv_instr(instr:FDivInstruction) + +instr(v) :- fdiv_instr(v). + +.decl fdiv_instr_first_operand(instr:FDivInstruction, op:Operand) +.decl fdiv_instr_second_operand(instr:FDivInstruction, op:Operand) + + +//------------------------------------------------------------------- +// [Constraints] +// +// 1) The two arguments to the ‘fdiv‘ instr must be: +// (i) floating point or +// (ii) vector of floating point values. +// +// 2) Both arguments must have identical types. +// +// 3) The resulting value is the same type as its operands. +//------------------------------------------------------------------- + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fdiv_instr(Instr), + !fdiv_instr_first_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fdiv_instr(Instr), + !fdiv_instr_second_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fdiv_instr(Instr), + instr_returns_type(Instr, Type), + !fp_type(Type), + !fp_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + fdiv_instr_first_operand(Instr, LeftOp), + !operand_has_type(LeftOp, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + fdiv_instr_second_operand(Instr, RightOp), + !operand_has_type(RightOp, Type). diff --git a/datalog/schema/fdiv-instruction.dl b/datalog/schema/fdiv-instruction.dl deleted file mode 100644 index 313ae94..0000000 --- a/datalog/schema/fdiv-instruction.dl +++ /dev/null @@ -1,52 +0,0 @@ -// http://llvm.org/docs/LangRef.html#fdiv-instruction -// keywords: arithmetic; binary; instruction - -.type FDivInstruction = Instruction -.decl fdiv_instruction(instr:FDivInstruction) - -instruction(v) :- fdiv_instruction(v). - -.decl fdiv_instruction_first_operand(instr:FDivInstruction, op:Operand) -.decl fdiv_instruction_second_operand(instr:FDivInstruction, op:Operand) - - -//------------------------------------------------------------------- -// [Constraints] -// -// 1) The two arguments to the ‘fdiv‘ instruction must be: -// (i) floating point or -// (ii) vector of floating point values. -// -// 2) Both arguments must have identical types. -// -// 3) The resulting value is the same type as its operands. -//------------------------------------------------------------------- - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fdiv_instruction(Instr), - !fdiv_instruction_first_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fdiv_instruction(Instr), - !fdiv_instruction_second_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fdiv_instruction(Instr), - instruction_returns_type(Instr, Type), - !fp_type(Type), - !fp_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - fdiv_instruction_first_operand(Instr, LeftOp), - !operand_has_type(LeftOp, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - fdiv_instruction_second_operand(Instr, RightOp), - !operand_has_type(RightOp, Type). diff --git a/datalog/schema/fence-instr.dl b/datalog/schema/fence-instr.dl new file mode 100644 index 0000000..5e1909d --- /dev/null +++ b/datalog/schema/fence-instr.dl @@ -0,0 +1,31 @@ +// http://llvm.org/docs/LangRef.html#fence-instr +// keywords: memory; instr + +.type FenceInstruction = Instruction +.decl fence_instr(instr:FenceInstruction) + +instr(v) :- fence_instr(v). + +.decl fence_instr_ordering(instr:FenceInstruction, ordering:Ordering) + + +//------------------------------------------------------------------- +// [Constraints] +// +// They can only be given acquire, release, acq_rel, and seq_cst +// orderings. +//------------------------------------------------------------------- + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fence_instr(Instr), + !fence_instr_ordering(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fence_instr(Instr), + fence_instr_ordering(Instr, Ord), + !acquire_ordering(Ord), + !release_ordering(Ord), + !acq_rel_ordering(Ord), + !seq_cst_ordering(Ord). diff --git a/datalog/schema/fence-instruction.dl b/datalog/schema/fence-instruction.dl deleted file mode 100644 index f9f679a..0000000 --- a/datalog/schema/fence-instruction.dl +++ /dev/null @@ -1,31 +0,0 @@ -// http://llvm.org/docs/LangRef.html#fence-instruction -// keywords: memory; instruction - -.type FenceInstruction = Instruction -.decl fence_instruction(instr:FenceInstruction) - -instruction(v) :- fence_instruction(v). - -.decl fence_instruction_ordering(instr:FenceInstruction, ordering:Ordering) - - -//------------------------------------------------------------------- -// [Constraints] -// -// They can only be given acquire, release, acq_rel, and seq_cst -// orderings. -//------------------------------------------------------------------- - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fence_instruction(Instr), - !fence_instruction_ordering(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fence_instruction(Instr), - fence_instruction_ordering(Instr, Ord), - !acquire_ordering(Ord), - !release_ordering(Ord), - !acq_rel_ordering(Ord), - !seq_cst_ordering(Ord). diff --git a/datalog/schema/fmul-instr.dl b/datalog/schema/fmul-instr.dl new file mode 100644 index 0000000..61fb36b --- /dev/null +++ b/datalog/schema/fmul-instr.dl @@ -0,0 +1,52 @@ +// http://llvm.org/docs/LangRef.html#fmul-instr +// keywords: arithmetic; binary; instr + +.type FMulInstruction = Instruction +.decl fmul_instr(instr:FMulInstruction) + +instr(v) :- fmul_instr(v). + +.decl fmul_instr_first_operand(instr:FMulInstruction, op:Operand) +.decl fmul_instr_second_operand(instr:FMulInstruction, op:Operand) + + +//------------------------------------------------------------------- +// [Constraints] +// +// 1) The two arguments to the ‘fmul‘ instr must be: +// (i) floating point or +// (ii) vector of floating point values. +// +// 2) Both arguments must have identical types. +// +// 3) The resulting value is the same type as its operands. +//------------------------------------------------------------------- + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fmul_instr(Instr), + !fmul_instr_first_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fmul_instr(Instr), + !fmul_instr_second_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fmul_instr(Instr), + instr_returns_type(Instr, Type), + !fp_type(Type), + !fp_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + fmul_instr_first_operand(Instr, LeftOp), + !operand_has_type(LeftOp, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + fmul_instr_second_operand(Instr, RightOp), + !operand_has_type(RightOp, Type). diff --git a/datalog/schema/fmul-instruction.dl b/datalog/schema/fmul-instruction.dl deleted file mode 100644 index 545ea09..0000000 --- a/datalog/schema/fmul-instruction.dl +++ /dev/null @@ -1,52 +0,0 @@ -// http://llvm.org/docs/LangRef.html#fmul-instruction -// keywords: arithmetic; binary; instruction - -.type FMulInstruction = Instruction -.decl fmul_instruction(instr:FMulInstruction) - -instruction(v) :- fmul_instruction(v). - -.decl fmul_instruction_first_operand(instr:FMulInstruction, op:Operand) -.decl fmul_instruction_second_operand(instr:FMulInstruction, op:Operand) - - -//------------------------------------------------------------------- -// [Constraints] -// -// 1) The two arguments to the ‘fmul‘ instruction must be: -// (i) floating point or -// (ii) vector of floating point values. -// -// 2) Both arguments must have identical types. -// -// 3) The resulting value is the same type as its operands. -//------------------------------------------------------------------- - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fmul_instruction(Instr), - !fmul_instruction_first_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fmul_instruction(Instr), - !fmul_instruction_second_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fmul_instruction(Instr), - instruction_returns_type(Instr, Type), - !fp_type(Type), - !fp_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - fmul_instruction_first_operand(Instr, LeftOp), - !operand_has_type(LeftOp, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - fmul_instruction_second_operand(Instr, RightOp), - !operand_has_type(RightOp, Type). diff --git a/datalog/schema/fpext-instr.dl b/datalog/schema/fpext-instr.dl new file mode 100644 index 0000000..b5f86ea --- /dev/null +++ b/datalog/schema/fpext-instr.dl @@ -0,0 +1,58 @@ +// http://llvm.org/docs/LangRef.html#fpext-to-instr +// keywords: conversion; unary; instr + +.type FPExtInstruction = Instruction +.decl fpext_instr(instr:FPExtInstruction) + +instr(v) :- fpext_instr(v). + +.decl fpext_instr_from_operand(instr:FPExtInstruction, val:Operand) +.decl fpext_instr_to_type(instr:FPExtInstruction, type:Type) + + +// Helper predicate + +.decl fpext_instr_from_type(instr:FPExtInstruction, type:Type) + +fpext_instr_from_type(Instr, Type) :- + fpext_instr_from_operand(Instr, Operand), + operand_has_type(Operand, Type). + + +//------------------------------------------------------------------- +// [Constraints] +// +// 1) The ‘fpext‘ instr takes: +// (i) a floating point value to cast, +// (ii) and a floating point type to cast it to. +// +// 2) The source type must be smaller than the destination type. +//------------------------------------------------------------------- + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fpext_instr(Instr), + !fpext_instr_from_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fpext_instr(Instr), + !fpext_instr_to_type(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fpext_instr(Instr), + fpext_instr_to_type(Instr, Type), + !instr_returns_type(Instr, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fpext_instr(Instr), + fpext_instr_from_type(Instr, Type), + !fp_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fpext_instr(Instr), + fpext_instr_to_type(Instr, Type), + !fp_type(Type). diff --git a/datalog/schema/fpext-instruction.dl b/datalog/schema/fpext-instruction.dl deleted file mode 100644 index 6a9ea8c..0000000 --- a/datalog/schema/fpext-instruction.dl +++ /dev/null @@ -1,58 +0,0 @@ -// http://llvm.org/docs/LangRef.html#fpext-to-instruction -// keywords: conversion; unary; instruction - -.type FPExtInstruction = Instruction -.decl fpext_instruction(instr:FPExtInstruction) - -instruction(v) :- fpext_instruction(v). - -.decl fpext_instruction_from_operand(instr:FPExtInstruction, val:Operand) -.decl fpext_instruction_to_type(instr:FPExtInstruction, type:Type) - - -// Helper predicate - -.decl fpext_instruction_from_type(instr:FPExtInstruction, type:Type) - -fpext_instruction_from_type(Instr, Type) :- - fpext_instruction_from_operand(Instr, Operand), - operand_has_type(Operand, Type). - - -//------------------------------------------------------------------- -// [Constraints] -// -// 1) The ‘fpext‘ instruction takes: -// (i) a floating point value to cast, -// (ii) and a floating point type to cast it to. -// -// 2) The source type must be smaller than the destination type. -//------------------------------------------------------------------- - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fpext_instruction(Instr), - !fpext_instruction_from_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fpext_instruction(Instr), - !fpext_instruction_to_type(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fpext_instruction(Instr), - fpext_instruction_to_type(Instr, Type), - !instruction_returns_type(Instr, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fpext_instruction(Instr), - fpext_instruction_from_type(Instr, Type), - !fp_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fpext_instruction(Instr), - fpext_instruction_to_type(Instr, Type), - !fp_type(Type). diff --git a/datalog/schema/fptosi-instr.dl b/datalog/schema/fptosi-instr.dl new file mode 100644 index 0000000..54fa4b2 --- /dev/null +++ b/datalog/schema/fptosi-instr.dl @@ -0,0 +1,71 @@ +// http://llvm.org/docs/LangRef.html#fptosi-to-instr +// keywords: conversion; unary; instr + +.type FPToSIInstruction = Instruction +.decl fptosi_instr(instr:FPToSIInstruction) + +instr(v) :- fptosi_instr(v). + +.decl fptosi_instr_from_operand(instr:FPToSIInstruction, val:Operand) +.decl fptosi_instr_to_type(instr:FPToSIInstruction, type:Type) + + +// Helper predicate + +.decl fptosi_instr_from_type(instr:FPToSIInstruction, type:Type) + +fptosi_instr_from_type(Instr, Type) :- + fptosi_instr_from_operand(Instr, Operand), + operand_has_type(Operand, Type). + + +//------------------------------------------------------------------- +// [Constraints] +// +// 1) The ‘fptosi‘ instr takes: +// (i) a value to cast, which must be a scalar or vector +// floating point value, +// (ii) and a type to cast it to, which must be an integer +// type. +// +// 2) If the value to be casted is a vector floating point type: +// (i) the type must be a vector integer type, +// (ii) with the same number of elements. +//------------------------------------------------------------------- + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fptosi_instr(Instr), + !fptosi_instr_from_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fptosi_instr(Instr), + !fptosi_instr_to_type(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fptosi_instr(Instr), + fptosi_instr_to_type(Instr, Type), + !instr_returns_type(Instr, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fptosi_instr(Instr), + fptosi_instr_from_type(Instr, Type), + !fp_type(Type), + !fp_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fptosi_instr(Instr), + fptosi_instr_to_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fptosi_instr(Instr), + fptosi_instr_from_type(Instr, FromType), + fptosi_instr_to_type(Instr, ToType), + !vector_compatible_types(FromType, ToType). diff --git a/datalog/schema/fptosi-instruction.dl b/datalog/schema/fptosi-instruction.dl deleted file mode 100644 index 6211814..0000000 --- a/datalog/schema/fptosi-instruction.dl +++ /dev/null @@ -1,71 +0,0 @@ -// http://llvm.org/docs/LangRef.html#fptosi-to-instruction -// keywords: conversion; unary; instruction - -.type FPToSIInstruction = Instruction -.decl fptosi_instruction(instr:FPToSIInstruction) - -instruction(v) :- fptosi_instruction(v). - -.decl fptosi_instruction_from_operand(instr:FPToSIInstruction, val:Operand) -.decl fptosi_instruction_to_type(instr:FPToSIInstruction, type:Type) - - -// Helper predicate - -.decl fptosi_instruction_from_type(instr:FPToSIInstruction, type:Type) - -fptosi_instruction_from_type(Instr, Type) :- - fptosi_instruction_from_operand(Instr, Operand), - operand_has_type(Operand, Type). - - -//------------------------------------------------------------------- -// [Constraints] -// -// 1) The ‘fptosi‘ instruction takes: -// (i) a value to cast, which must be a scalar or vector -// floating point value, -// (ii) and a type to cast it to, which must be an integer -// type. -// -// 2) If the value to be casted is a vector floating point type: -// (i) the type must be a vector integer type, -// (ii) with the same number of elements. -//------------------------------------------------------------------- - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fptosi_instruction(Instr), - !fptosi_instruction_from_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fptosi_instruction(Instr), - !fptosi_instruction_to_type(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fptosi_instruction(Instr), - fptosi_instruction_to_type(Instr, Type), - !instruction_returns_type(Instr, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fptosi_instruction(Instr), - fptosi_instruction_from_type(Instr, Type), - !fp_type(Type), - !fp_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fptosi_instruction(Instr), - fptosi_instruction_to_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fptosi_instruction(Instr), - fptosi_instruction_from_type(Instr, FromType), - fptosi_instruction_to_type(Instr, ToType), - !vector_compatible_types(FromType, ToType). diff --git a/datalog/schema/fptoui-instr.dl b/datalog/schema/fptoui-instr.dl new file mode 100644 index 0000000..0590330 --- /dev/null +++ b/datalog/schema/fptoui-instr.dl @@ -0,0 +1,71 @@ +// http://llvm.org/docs/LangRef.html#fptoui-to-instr +// keywords: conversion; unary; instr + +.type FPToUIInstruction = Instruction +.decl fptoui_instr(instr:FPToUIInstruction) + +instr(v) :- fptoui_instr(v). + +.decl fptoui_instr_from_operand(instr:FPToUIInstruction, val:Operand) +.decl fptoui_instr_to_type(instr:FPToUIInstruction, type:Type) + + +// Helper predicate + +.decl fptoui_instr_from_type(instr:FPToUIInstruction, type:Type) + +fptoui_instr_from_type(Instr, Type) :- + fptoui_instr_from_operand(Instr, Operand), + operand_has_type(Operand, Type). + + +//------------------------------------------------------------------- +// [Constraints] +// +// 1) The ‘fptoui‘ instr takes: +// (i) a value to cast, which must be a scalar or vector +// floating point value, +// (ii) and a type to cast it to, which must be an integer +// type. +// +// 2) If the value to be casted is a vector floating point type: +// (i) the type must be a vector integer type, +// (ii) with the same number of elements. +//------------------------------------------------------------------- + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fptoui_instr(Instr), + !fptoui_instr_from_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fptoui_instr(Instr), + !fptoui_instr_to_type(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fptoui_instr(Instr), + fptoui_instr_to_type(Instr, Type), + !instr_returns_type(Instr, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fptoui_instr(Instr), + fptoui_instr_from_type(Instr, Type), + !fp_type(Type), + !fp_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fptoui_instr(Instr), + fptoui_instr_to_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fptoui_instr(Instr), + fptoui_instr_from_type(Instr, FromType), + fptoui_instr_to_type(Instr, ToType), + !vector_compatible_types(FromType, ToType). diff --git a/datalog/schema/fptoui-instruction.dl b/datalog/schema/fptoui-instruction.dl deleted file mode 100644 index 072d1e6..0000000 --- a/datalog/schema/fptoui-instruction.dl +++ /dev/null @@ -1,71 +0,0 @@ -// http://llvm.org/docs/LangRef.html#fptoui-to-instruction -// keywords: conversion; unary; instruction - -.type FPToUIInstruction = Instruction -.decl fptoui_instruction(instr:FPToUIInstruction) - -instruction(v) :- fptoui_instruction(v). - -.decl fptoui_instruction_from_operand(instr:FPToUIInstruction, val:Operand) -.decl fptoui_instruction_to_type(instr:FPToUIInstruction, type:Type) - - -// Helper predicate - -.decl fptoui_instruction_from_type(instr:FPToUIInstruction, type:Type) - -fptoui_instruction_from_type(Instr, Type) :- - fptoui_instruction_from_operand(Instr, Operand), - operand_has_type(Operand, Type). - - -//------------------------------------------------------------------- -// [Constraints] -// -// 1) The ‘fptoui‘ instruction takes: -// (i) a value to cast, which must be a scalar or vector -// floating point value, -// (ii) and a type to cast it to, which must be an integer -// type. -// -// 2) If the value to be casted is a vector floating point type: -// (i) the type must be a vector integer type, -// (ii) with the same number of elements. -//------------------------------------------------------------------- - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fptoui_instruction(Instr), - !fptoui_instruction_from_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fptoui_instruction(Instr), - !fptoui_instruction_to_type(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fptoui_instruction(Instr), - fptoui_instruction_to_type(Instr, Type), - !instruction_returns_type(Instr, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fptoui_instruction(Instr), - fptoui_instruction_from_type(Instr, Type), - !fp_type(Type), - !fp_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fptoui_instruction(Instr), - fptoui_instruction_to_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fptoui_instruction(Instr), - fptoui_instruction_from_type(Instr, FromType), - fptoui_instruction_to_type(Instr, ToType), - !vector_compatible_types(FromType, ToType). diff --git a/datalog/schema/fptrunc-instr.dl b/datalog/schema/fptrunc-instr.dl new file mode 100644 index 0000000..d73252c --- /dev/null +++ b/datalog/schema/fptrunc-instr.dl @@ -0,0 +1,53 @@ +// http://llvm.org/docs/LangRef.html#trunc-to-instr +// keywords: conversion; unary; instr + +.type FPTruncInstruction = Instruction +.decl fptrunc_instr(instr:FPTruncInstruction) + +instr(v) :- fptrunc_instr(v). + +.decl fptrunc_instr_from_operand(instr:FPTruncInstruction, val:Operand) +.decl fptrunc_instr_to_type(instr:FPTruncInstruction, type:FPType) + + +// Helper predicate + +.decl fptrunc_instr_from_type(instr:FPTruncInstruction, type:Type) + +fptrunc_instr_from_type(Instr, Type) :- + fptrunc_instr_from_operand(Instr, Operand), + operand_has_type(Operand, Type). + + +//------------------------------------------------------------------- +// [Constraints] +// +// 1) The ‘fptrunc‘ instr takes: +// (i) a floating point value to cast, +// (ii) and a floating point type to cast it to. +// +// 2) The source type must be larger than the destination type. +//------------------------------------------------------------------- + + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fptrunc_instr(Instr), + !fptrunc_instr_from_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fptrunc_instr(Instr), + !fptrunc_instr_to_type(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fptrunc_instr(Instr), + fptrunc_instr_to_type(Instr, Type), + !instr_returns_type(Instr, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fptrunc_instr(Instr), + fptrunc_instr_from_type(Instr, Type), + !fp_type(Type). diff --git a/datalog/schema/fptrunc-instruction.dl b/datalog/schema/fptrunc-instruction.dl deleted file mode 100644 index ebdcd8e..0000000 --- a/datalog/schema/fptrunc-instruction.dl +++ /dev/null @@ -1,53 +0,0 @@ -// http://llvm.org/docs/LangRef.html#trunc-to-instruction -// keywords: conversion; unary; instruction - -.type FPTruncInstruction = Instruction -.decl fptrunc_instruction(instr:FPTruncInstruction) - -instruction(v) :- fptrunc_instruction(v). - -.decl fptrunc_instruction_from_operand(instr:FPTruncInstruction, val:Operand) -.decl fptrunc_instruction_to_type(instr:FPTruncInstruction, type:FPType) - - -// Helper predicate - -.decl fptrunc_instruction_from_type(instr:FPTruncInstruction, type:Type) - -fptrunc_instruction_from_type(Instr, Type) :- - fptrunc_instruction_from_operand(Instr, Operand), - operand_has_type(Operand, Type). - - -//------------------------------------------------------------------- -// [Constraints] -// -// 1) The ‘fptrunc‘ instruction takes: -// (i) a floating point value to cast, -// (ii) and a floating point type to cast it to. -// -// 2) The source type must be larger than the destination type. -//------------------------------------------------------------------- - - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fptrunc_instruction(Instr), - !fptrunc_instruction_from_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fptrunc_instruction(Instr), - !fptrunc_instruction_to_type(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fptrunc_instruction(Instr), - fptrunc_instruction_to_type(Instr, Type), - !instruction_returns_type(Instr, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fptrunc_instruction(Instr), - fptrunc_instruction_from_type(Instr, Type), - !fp_type(Type). diff --git a/datalog/schema/frem-instr.dl b/datalog/schema/frem-instr.dl new file mode 100644 index 0000000..0c220e1 --- /dev/null +++ b/datalog/schema/frem-instr.dl @@ -0,0 +1,52 @@ +// http://llvm.org/docs/LangRef.html#frem-instr +// keywords: arithmetic; binary; instr + +.type FRemInstruction = Instruction +.decl frem_instr(instr:FRemInstruction) + +instr(v) :- frem_instr(v). + +.decl frem_instr_first_operand(instr:FRemInstruction, op:Operand) +.decl frem_instr_second_operand(instr:FRemInstruction, op:Operand) + + +//------------------------------------------------------------------- +// [Constraints] +// +// 1) The two arguments to the ‘frem‘ instr must be: +// (i) floating point or +// (ii) vector of floating point values. +// +// 2) Both arguments must have identical types. +// +// 3) The resulting value is the same type as its operands. +//------------------------------------------------------------------- + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + frem_instr(Instr), + !frem_instr_first_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + frem_instr(Instr), + !frem_instr_second_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + frem_instr(Instr), + instr_returns_type(Instr, Type), + !fp_type(Type), + !fp_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + frem_instr_first_operand(Instr, LeftOp), + !operand_has_type(LeftOp, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + frem_instr_second_operand(Instr, RightOp), + !operand_has_type(RightOp, Type). diff --git a/datalog/schema/frem-instruction.dl b/datalog/schema/frem-instruction.dl deleted file mode 100644 index 308928b..0000000 --- a/datalog/schema/frem-instruction.dl +++ /dev/null @@ -1,52 +0,0 @@ -// http://llvm.org/docs/LangRef.html#frem-instruction -// keywords: arithmetic; binary; instruction - -.type FRemInstruction = Instruction -.decl frem_instruction(instr:FRemInstruction) - -instruction(v) :- frem_instruction(v). - -.decl frem_instruction_first_operand(instr:FRemInstruction, op:Operand) -.decl frem_instruction_second_operand(instr:FRemInstruction, op:Operand) - - -//------------------------------------------------------------------- -// [Constraints] -// -// 1) The two arguments to the ‘frem‘ instruction must be: -// (i) floating point or -// (ii) vector of floating point values. -// -// 2) Both arguments must have identical types. -// -// 3) The resulting value is the same type as its operands. -//------------------------------------------------------------------- - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - frem_instruction(Instr), - !frem_instruction_first_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - frem_instruction(Instr), - !frem_instruction_second_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - frem_instruction(Instr), - instruction_returns_type(Instr, Type), - !fp_type(Type), - !fp_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - frem_instruction_first_operand(Instr, LeftOp), - !operand_has_type(LeftOp, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - frem_instruction_second_operand(Instr, RightOp), - !operand_has_type(RightOp, Type). diff --git a/datalog/schema/fsub-instr.dl b/datalog/schema/fsub-instr.dl new file mode 100644 index 0000000..41202c8 --- /dev/null +++ b/datalog/schema/fsub-instr.dl @@ -0,0 +1,52 @@ +// http://llvm.org/docs/LangRef.html#fsub-instr +// keywords: arithmetic; binary; instr + +.type FSubInstruction = Instruction +.decl fsub_instr(instr:FSubInstruction) + +instr(v) :- fsub_instr(v). + +.decl fsub_instr_first_operand(instr:FSubInstruction, op:Operand) +.decl fsub_instr_second_operand(instr:FSubInstruction, op:Operand) + + +//------------------------------------------------------------------- +// [Constraints] +// +// 1) The two arguments to the ‘fsub‘ instr must be: +// (i) floating point or +// (ii) vector of floating point values. +// +// 2) Both arguments must have identical types. +// +// 3) The resulting value is the same type as its operands. +//------------------------------------------------------------------- + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fsub_instr(Instr), + !fsub_instr_first_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fsub_instr(Instr), + !fsub_instr_second_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + fsub_instr(Instr), + instr_returns_type(Instr, Type), + !fp_type(Type), + !fp_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + fsub_instr_first_operand(Instr, LeftOp), + !operand_has_type(LeftOp, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + fsub_instr_second_operand(Instr, RightOp), + !operand_has_type(RightOp, Type). diff --git a/datalog/schema/fsub-instruction.dl b/datalog/schema/fsub-instruction.dl deleted file mode 100644 index 0f14a4b..0000000 --- a/datalog/schema/fsub-instruction.dl +++ /dev/null @@ -1,52 +0,0 @@ -// http://llvm.org/docs/LangRef.html#fsub-instruction -// keywords: arithmetic; binary; instruction - -.type FSubInstruction = Instruction -.decl fsub_instruction(instr:FSubInstruction) - -instruction(v) :- fsub_instruction(v). - -.decl fsub_instruction_first_operand(instr:FSubInstruction, op:Operand) -.decl fsub_instruction_second_operand(instr:FSubInstruction, op:Operand) - - -//------------------------------------------------------------------- -// [Constraints] -// -// 1) The two arguments to the ‘fsub‘ instruction must be: -// (i) floating point or -// (ii) vector of floating point values. -// -// 2) Both arguments must have identical types. -// -// 3) The resulting value is the same type as its operands. -//------------------------------------------------------------------- - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fsub_instruction(Instr), - !fsub_instruction_first_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fsub_instruction(Instr), - !fsub_instruction_second_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - fsub_instruction(Instr), - instruction_returns_type(Instr, Type), - !fp_type(Type), - !fp_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - fsub_instruction_first_operand(Instr, LeftOp), - !operand_has_type(LeftOp, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - fsub_instruction_second_operand(Instr, RightOp), - !operand_has_type(RightOp, Type). diff --git a/datalog/schema/func.dl b/datalog/schema/func.dl index 7f03c60..3872e8d 100644 --- a/datalog/schema/func.dl +++ b/datalog/schema/func.dl @@ -13,7 +13,7 @@ func_decl(Func) :- func(Func). // !! Note: A func definition is encoded as a subtype of func -// declaration, that adds a body of instructions. !! +// declaration, that adds a body of instrs. !! // For constraints .decl schema_invalid_func(func:FunctionDecl, file:File, line:Line) @@ -138,7 +138,7 @@ func_param_by_value(Func, Index) :- // in the func type. // // The return type must also be compatible for the func -// to be well-formed, but this is checked in ret-instruction +// to be well-formed, but this is checked in ret-instr // logic. //------------------------------------------------------------------------------ diff --git a/datalog/schema/getelementptr-instruction.dl b/datalog/schema/getelementptr-instr.dl similarity index 51% rename from datalog/schema/getelementptr-instruction.dl rename to datalog/schema/getelementptr-instr.dl index 653dd95..fef6c19 100644 --- a/datalog/schema/getelementptr-instruction.dl +++ b/datalog/schema/getelementptr-instr.dl @@ -1,14 +1,14 @@ -// http://llvm.org/docs/LangRef.html#getelementptr-instruction -// keywords: memory; instruction +// http://llvm.org/docs/LangRef.html#getelementptr-instr +// keywords: memory; instr .type GetElementPtrInstruction = Instruction -.decl getelementptr_instruction(instr:GetElementPtrInstruction) +.decl getelementptr_instr(instr:GetElementPtrInstruction) -instruction(v) :- getelementptr_instruction(v). +instr(v) :- getelementptr_instr(v). -.decl getelementptr_instruction_base(instr:GetElementPtrInstruction, ptr:Operand) -.decl getelementptr_instruction_is_inbounds(instr:GetElementPtrInstruction) +.decl getelementptr_instr_base(instr:GetElementPtrInstruction, ptr:Operand) +.decl getelementptr_instr_is_inbounds(instr:GetElementPtrInstruction) //------------------------------------------------------------------------------ @@ -29,28 +29,28 @@ instruction(v) :- getelementptr_instruction(v). //------------------------------------------------------------------------------ -.decl getelementptr_instruction_nindices(instr:GetElementPtrInstruction, total:number) -.decl getelementptr_instruction_index(instr:GetElementPtrInstruction, i:GepIndex, idx:Operand) +.decl getelementptr_instr_nindices(instr:GetElementPtrInstruction, total:number) +.decl getelementptr_instr_index(instr:GetElementPtrInstruction, i:GepIndex, idx:Operand) // Auxiliary type predicates -.decl getelementptr_instruction_base_type(instr:GetElementPtrInstruction, type:Type) -.decl getelementptr_instruction_index_type(instr:GetElementPtrInstruction, type:Type) +.decl getelementptr_instr_base_type(instr:GetElementPtrInstruction, type:Type) +.decl getelementptr_instr_index_type(instr:GetElementPtrInstruction, type:Type) -getelementptr_instruction_base_type(Instr, PtrType) :- - getelementptr_instruction_base(Instr, BasePtr), +getelementptr_instr_base_type(Instr, PtrType) :- + getelementptr_instr_base(Instr, BasePtr), operand_has_type(BasePtr, PtrType). -getelementptr_instruction_index_type(Instr, IdxType) :- - getelementptr_instruction_index(Instr, _, Idx), +getelementptr_instr_index_type(Instr, IdxType) :- + getelementptr_instr_index(Instr, _, Idx), operand_has_type(Idx, IdxType). .decl gep_is_vector_based(instr:GetElementPtrInstruction) gep_is_vector_based(Instr) :- - getelementptr_instruction_base_type(Instr, PtrType), + getelementptr_instr_base_type(Instr, PtrType), vector_type(PtrType). @@ -68,50 +68,50 @@ gep_is_vector_based(Instr) :- // complex constant index. //------------------------------------------------------------------------------ -.decl getelementptr_instruction_interm_type(instr:GetElementPtrInstruction, i:number, type:Type) -.decl getelementptr_instruction_value_type(instr:GetElementPtrInstruction, type:Type) +.decl getelementptr_instrterm_type(instr:GetElementPtrInstruction, i:number, type:Type) +.decl getelementptr_instr_value_type(instr:GetElementPtrInstruction, type:Type) -next_instruction_index(Instr, Index, Index + 1) :- - getelementptr_instruction_index(Instr, Index, _). +next_instr_index(Instr, Index, Index + 1) :- + getelementptr_instr_index(Instr, Index, _). -getelementptr_instruction_interm_type(Instr, 1, Type) :- - getelementptr_instruction_base_type(Instr, PtrType), +getelementptr_instrterm_type(Instr, 1, Type) :- + getelementptr_instr_base_type(Instr, PtrType), pointer_type_has_component(PtrType, Type). // no vector-based filter here is needed -getelementptr_instruction_interm_type(Instr, 1, Type) :- - getelementptr_instruction_base_type(Instr, VectorPtrType), +getelementptr_instrterm_type(Instr, 1, Type) :- + getelementptr_instr_base_type(Instr, VectorPtrType), vector_type_has_component(VectorPtrType, PtrType), pointer_type_has_component(PtrType, Type). // for vector-based GEPs -getelementptr_instruction_interm_type(Instr, NextIndex, Type) :- - getelementptr_instruction_interm_type(Instr, Index, ArrayType), +getelementptr_instrterm_type(Instr, NextIndex, Type) :- + getelementptr_instrterm_type(Instr, Index, ArrayType), array_type_has_component(ArrayType, Type), - next_instruction_index(Instr, Index, NextIndex). + next_instr_index(Instr, Index, NextIndex). -getelementptr_instruction_interm_type(Instr, NextIndex, Type) :- - getelementptr_instruction_interm_type(Instr, Index, VectorType), +getelementptr_instrterm_type(Instr, NextIndex, Type) :- + getelementptr_instrterm_type(Instr, Index, VectorType), vector_type_has_component(VectorType, Type), - next_instruction_index(Instr, Index, NextIndex). + next_instr_index(Instr, Index, NextIndex). -getelementptr_instruction_interm_type(Instr, NextIndex, Type) :- - getelementptr_instruction_interm_type(Instr, Index, StructType), - getelementptr_instruction_index(Instr, Index, FieldIdx), +getelementptr_instrterm_type(Instr, NextIndex, Type) :- + getelementptr_instrterm_type(Instr, Index, StructType), + getelementptr_instr_index(Instr, Index, FieldIdx), constant_has_type(FieldIdx, FieldIdxType), constant_to_int(FieldIdx, FieldIdxValue), int32_type(FieldIdxType), // c3 struct_type_field(StructType, FieldIdxValue, Type), - next_instruction_index(Instr, Index, NextIndex). + next_instr_index(Instr, Index, NextIndex). -getelementptr_instruction_value_type(Instr, Type) :- - getelementptr_instruction_nindices(Instr, Total), - getelementptr_instruction_interm_type(Instr, Total, Type). +getelementptr_instr_value_type(Instr, Type) :- + getelementptr_instr_nindices(Instr, Total), + getelementptr_instrterm_type(Instr, Total, Type). //------------------------------------------------------------------------------ // [Constraints] // -// (1) The first operand of a ‘getelementptr' instruction is +// (1) The first operand of a ‘getelementptr' instr is // always a pointer or a vector of pointers. // (2) The first type indexed into must be a pointer value, // subsequent types can be arrays, vectors, and structs. @@ -131,56 +131,56 @@ getelementptr_instruction_value_type(Instr, Type) :- // (5) In cases where the pointer argument is a vector of pointers, // each index must be a vector with the same number of elements. // -// The ‘getelementptr‘ instruction returns a pointer to the element +// The ‘getelementptr‘ instr returns a pointer to the element // specified by the indices. //------------------------------------------------------------------------------ -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - getelementptr_instruction(Instr), - !getelementptr_instruction_base(Instr, _). + getelementptr_instr(Instr), + !getelementptr_instr_base(Instr, _). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - getelementptr_instruction(Instr), - !getelementptr_instruction_nindices(Instr, _). + getelementptr_instr(Instr), + !getelementptr_instr_nindices(Instr, _). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - getelementptr_instruction_base_type(Instr, PtrType), + getelementptr_instr_base_type(Instr, PtrType), !pointer_type(PtrType), !pointer_vector_type(PtrType). // c1 -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - getelementptr_instruction(Instr), - !getelementptr_instruction_value_type(Instr, _). // c2 + getelementptr_instr(Instr), + !getelementptr_instr_value_type(Instr, _). // c2 -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - getelementptr_instruction_index_type(Instr, IdxType), + getelementptr_instr_index_type(Instr, IdxType), !integer_type(IdxType), !integer_vector_type(IdxType). // c4 -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - getelementptr_instruction_base_type(Instr, PtrType), - getelementptr_instruction_index_type(Instr, IdxType), + getelementptr_instr_base_type(Instr, PtrType), + getelementptr_instr_index_type(Instr, IdxType), !vector_compatible_types(PtrType, IdxType). // c5 -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - getelementptr_instruction(Instr), + getelementptr_instr(Instr), !gep_is_vector_based(Instr), - getelementptr_instruction_value_type(Instr, ValueType), - instruction_returns_type(Instr, PtrType), + getelementptr_instr_value_type(Instr, ValueType), + instr_returns_type(Instr, PtrType), !pointer_type_has_component(PtrType, ValueType). // creturn -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - getelementptr_instruction(Instr), + getelementptr_instr(Instr), gep_is_vector_based(Instr), - getelementptr_instruction_value_type(Instr, ValueType), - instruction_returns_type(Instr, VectorType), + getelementptr_instr_value_type(Instr, ValueType), + instr_returns_type(Instr, VectorType), vector_type_has_component(VectorType, PtrType), !pointer_type_has_component(PtrType, ValueType). // creturn diff --git a/datalog/schema/icmp-instruction.dl b/datalog/schema/icmp-instr.dl similarity index 56% rename from datalog/schema/icmp-instruction.dl rename to datalog/schema/icmp-instr.dl index c7bd560..69a6290 100644 --- a/datalog/schema/icmp-instruction.dl +++ b/datalog/schema/icmp-instr.dl @@ -1,21 +1,21 @@ -// http://llvm.org/docs/LangRef.html#icmp-instruction -// keywords: comparison; binary; instruction +// http://llvm.org/docs/LangRef.html#icmp-instr +// keywords: comparison; binary; instr .type ICmpInstruction = Instruction -.decl icmp_instruction(instr:ICmpInstruction) +.decl icmp_instr(instr:ICmpInstruction) -instruction(v) :- icmp_instruction(v). +instr(v) :- icmp_instr(v). .type ICmpCondition <: symbol -.decl icmp_instruction_condition(instr:ICmpInstruction, cond:ICmpCondition) -.decl icmp_instruction_first_operand(instr:ICmpInstruction, op:Operand) -.decl icmp_instruction_second_operand(instr:ICmpInstruction, op:Operand) +.decl icmp_instr_condition(instr:ICmpInstruction, cond:ICmpCondition) +.decl icmp_instr_first_operand(instr:ICmpInstruction, op:Operand) +.decl icmp_instr_second_operand(instr:ICmpInstruction, op:Operand) // Condition code and selectors for the ‘icmp‘ Instruction, as enum .decl icmp_condition(cond:ICmpCondition) -icmp_condition(Cond) :- icmp_instruction_condition(_, Cond). +icmp_condition(Cond) :- icmp_instr_condition(_, Cond). .decl icmp_condition__eq(cond:ICmpCondition) .decl icmp_condition__ne(cond:ICmpCondition) @@ -39,8 +39,8 @@ icmp_condition__ule("ule") :- icmp_condition("ule"). icmp_condition__uge("uge") :- icmp_condition("uge"). icmp_condition__ult("ult") :- icmp_condition("ult"). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), icmp_instruction_condition(Instr, Cond), +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), icmp_instr_condition(Instr, Cond), !icmp_condition__eq(Cond), !icmp_condition__ne(Cond), !icmp_condition__sgt(Cond), !icmp_condition__sge(Cond), !icmp_condition__slt(Cond), !icmp_condition__sle(Cond), @@ -50,22 +50,22 @@ schema_invalid_instruction(Instr, __FILE__, __LINE__) :- // Helper predicates -.decl icmp_instruction_from_type(instr:ICmpInstruction, type:Type) -.decl icmp_instruction_to_type(instr:ICmpInstruction, type:Type) +.decl icmp_instr_from_type(instr:ICmpInstruction, type:Type) +.decl icmp_instr_to_type(instr:ICmpInstruction, type:Type) -icmp_instruction_from_type(Instr, Type) :- - icmp_instruction_first_operand(Instr, Operand), +icmp_instr_from_type(Instr, Type) :- + icmp_instr_first_operand(Instr, Operand), operand_has_type(Operand, Type). -icmp_instruction_to_type(Instr, Type) :- - icmp_instruction(Instr), - instruction_returns_type(Instr, Type). +icmp_instr_to_type(Instr, Type) :- + icmp_instr(Instr), + instr_returns_type(Instr, Type). //------------------------------------------------------------------------------ // [Constraints] // -// The ‘icmp‘ instruction returns: +// The ‘icmp‘ instr returns: // (i) a boolean value or // (ii) a vector of boolean values // @@ -78,46 +78,46 @@ icmp_instruction_to_type(Instr, Type) :- // They must also be identical types. //------------------------------------------------------------------------------ -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - icmp_instruction(Instr), - !icmp_instruction_first_operand(Instr, _). + icmp_instr(Instr), + !icmp_instr_first_operand(Instr, _). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - icmp_instruction(Instr), - !icmp_instruction_second_operand(Instr, _). + icmp_instr(Instr), + !icmp_instr_second_operand(Instr, _). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - icmp_instruction(Instr), - !icmp_instruction_condition(Instr, _). + icmp_instr(Instr), + !icmp_instr_condition(Instr, _). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - icmp_instruction_to_type(Instr, Type), + icmp_instr_to_type(Instr, Type), !boolean_type(Type), !boolean_vector_type(Type). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - icmp_instruction_from_type(Instr, Type), + icmp_instr_from_type(Instr, Type), !integer_type(Type), !pointer_type(Type), !integer_vector_type(Type), !pointer_vector_type(Type). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - icmp_instruction(Instr), - icmp_instruction_first_operand(Instr, LeftOp), - icmp_instruction_second_operand(Instr, RightOp), + icmp_instr(Instr), + icmp_instr_first_operand(Instr, LeftOp), + icmp_instr_second_operand(Instr, RightOp), operand_has_type(LeftOp, LeftType), operand_has_type(RightOp, RightType), LeftType != RightType. -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - icmp_instruction_from_type(Instr, FromType), - icmp_instruction_to_type(Instr, ToType), + icmp_instr_from_type(Instr, FromType), + icmp_instr_to_type(Instr, ToType), !vector_compatible_types(FromType, ToType). diff --git a/datalog/schema/indirectbr-instr.dl b/datalog/schema/indirectbr-instr.dl new file mode 100644 index 0000000..49401d8 --- /dev/null +++ b/datalog/schema/indirectbr-instr.dl @@ -0,0 +1,62 @@ +// http://llvm.org/docs/LangRef.html#indirectbr-instr +// keywords: terminator; instr + +.type IndirectBrInstruction = Instruction +.decl indirectbr_instr(instr:IndirectBrInstruction) + +instr(v) :- indirectbr_instr(v). +terminator_instr(v) :- indirectbr_instr(v). + + +// The ‘address‘ argument is the address of the label to jump to. +.decl indirectbr_instr_address(instr:Instruction, address:Operand) + + +// The rest of the arguments indicate the full set +// of possible destinations that the address may point to. +// This destination list is required so that dataflow analysis +// has an accurate understanding of the CFG. + +.decl indirectbr_instr_label(instr:Instruction, index:number, label:Variable) +.decl indirectbr_instr_nlabels(instr:Instruction, total:number) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// (1) Address must be derived from a blockaddress constant. +// +// (2) The ‘blockaddress‘ constant computes the address of the +// specified basic block in the specified func, and always +// has an i8* type. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + indirectbr_instr(Instr), + !indirectbr_instr_address(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + indirectbr_instr(Instr), + !indirectbr_instr_nlabels(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + indirectbr_instr(Instr), + indirectbr_instr_label(Instr, _, Label), + !variable_is_label(Label). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + indirectbr_instr(Instr), + indirectbr_instr_label(Instr, Index, _), + indirectbr_instr_nlabels(Instr, Total), + (Index < 0 ; Index >= Total). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + indirectbr_instr(Instr), + indirectbr_instr_address(Instr, Address), + operand_has_type(Address, Type), + !int8_type(Type). diff --git a/datalog/schema/indirectbr-instruction.dl b/datalog/schema/indirectbr-instruction.dl deleted file mode 100644 index c829647..0000000 --- a/datalog/schema/indirectbr-instruction.dl +++ /dev/null @@ -1,62 +0,0 @@ -// http://llvm.org/docs/LangRef.html#indirectbr-instruction -// keywords: terminator; instruction - -.type IndirectBrInstruction = Instruction -.decl indirectbr_instruction(instr:IndirectBrInstruction) - -instruction(v) :- indirectbr_instruction(v). -terminator_instruction(v) :- indirectbr_instruction(v). - - -// The ‘address‘ argument is the address of the label to jump to. -.decl indirectbr_instruction_address(instr:Instruction, address:Operand) - - -// The rest of the arguments indicate the full set -// of possible destinations that the address may point to. -// This destination list is required so that dataflow analysis -// has an accurate understanding of the CFG. - -.decl indirectbr_instruction_label(instr:Instruction, index:number, label:Variable) -.decl indirectbr_instruction_nlabels(instr:Instruction, total:number) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// (1) Address must be derived from a blockaddress constant. -// -// (2) The ‘blockaddress‘ constant computes the address of the -// specified basic block in the specified func, and always -// has an i8* type. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - indirectbr_instruction(Instr), - !indirectbr_instruction_address(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - indirectbr_instruction(Instr), - !indirectbr_instruction_nlabels(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - indirectbr_instruction(Instr), - indirectbr_instruction_label(Instr, _, Label), - !variable_is_label(Label). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - indirectbr_instruction(Instr), - indirectbr_instruction_label(Instr, Index, _), - indirectbr_instruction_nlabels(Instr, Total), - (Index < 0 ; Index >= Total). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - indirectbr_instruction(Instr), - indirectbr_instruction_address(Instr, Address), - operand_has_type(Address, Type), - !int8_type(Type). diff --git a/datalog/schema/insertelement-instr.dl b/datalog/schema/insertelement-instr.dl new file mode 100644 index 0000000..8781a7e --- /dev/null +++ b/datalog/schema/insertelement-instr.dl @@ -0,0 +1,73 @@ +// http://llvm.org/docs/LangRef.html#insertelement-instr +// keywords: vector; instr + +.type InsertElementInstruction = Instruction +.decl insertelement_instr(instr:InsertElementInstruction) + +instr(v) :- insertelement_instr(v). + +.decl insertelement_instr_base(instr:InsertElementInstruction, vector:Operand) +.decl insertelement_instr_index(instr:InsertElementInstruction, index:Operand) +.decl insertelement_instr_value(instr:InsertElementInstruction, value:Operand) +.decl insertelement_instr_type(instr:InsertElementInstruction, type:Type) + +// The type of the elements that the vector holds. +insertelement_instr_type(Instr, Type) :- + insertelement_instr_base(Instr, Vector), + operand_has_type(Vector, VectorType), + vector_type_has_component(VectorType, Type). + + +//------------------------------------------------------------------------------ +// Constraints: +// +// The ‘insertelement‘ instr takes three operands: +// (i) the first operand is a value of vector type +// (ii) the second operand is a scalar value whose type must equal +// the element type of the first operand, and +// (iii) the third operand is an index of i32-integer type. +// +// The result is a vector of the same type as the first operand. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + insertelement_instr(Instr), + !insertelement_instr_base(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + insertelement_instr(Instr), + !insertelement_instr_index(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + insertelement_instr(Instr), + !insertelement_instr_value(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + insertelement_instr(Instr), + insertelement_instr_base(Instr, Vector), + operand_has_type(Vector, Type), + !vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + insertelement_instr(Instr), + insertelement_instr_index(Instr, Index), + operand_has_type(Index, Type), + !int32_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + insertelement_instr(Instr), + insertelement_instr_value(Instr, Value), + insertelement_instr_type(Instr, Type), + !operand_has_type(Value, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + insertelement_instr_base(Instr, Vector), + operand_has_type(Vector, Type), + !instr_returns_type(Instr, Type). diff --git a/datalog/schema/insertelement-instruction.dl b/datalog/schema/insertelement-instruction.dl deleted file mode 100644 index 65ce784..0000000 --- a/datalog/schema/insertelement-instruction.dl +++ /dev/null @@ -1,73 +0,0 @@ -// http://llvm.org/docs/LangRef.html#insertelement-instruction -// keywords: vector; instruction - -.type InsertElementInstruction = Instruction -.decl insertelement_instruction(instr:InsertElementInstruction) - -instruction(v) :- insertelement_instruction(v). - -.decl insertelement_instruction_base(instr:InsertElementInstruction, vector:Operand) -.decl insertelement_instruction_index(instr:InsertElementInstruction, index:Operand) -.decl insertelement_instruction_value(instr:InsertElementInstruction, value:Operand) -.decl insertelement_instruction_type(instr:InsertElementInstruction, type:Type) - -// The type of the elements that the vector holds. -insertelement_instruction_type(Instr, Type) :- - insertelement_instruction_base(Instr, Vector), - operand_has_type(Vector, VectorType), - vector_type_has_component(VectorType, Type). - - -//------------------------------------------------------------------------------ -// Constraints: -// -// The ‘insertelement‘ instruction takes three operands: -// (i) the first operand is a value of vector type -// (ii) the second operand is a scalar value whose type must equal -// the element type of the first operand, and -// (iii) the third operand is an index of i32-integer type. -// -// The result is a vector of the same type as the first operand. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - insertelement_instruction(Instr), - !insertelement_instruction_base(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - insertelement_instruction(Instr), - !insertelement_instruction_index(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - insertelement_instruction(Instr), - !insertelement_instruction_value(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - insertelement_instruction(Instr), - insertelement_instruction_base(Instr, Vector), - operand_has_type(Vector, Type), - !vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - insertelement_instruction(Instr), - insertelement_instruction_index(Instr, Index), - operand_has_type(Index, Type), - !int32_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - insertelement_instruction(Instr), - insertelement_instruction_value(Instr, Value), - insertelement_instruction_type(Instr, Type), - !operand_has_type(Value, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - insertelement_instruction_base(Instr, Vector), - operand_has_type(Vector, Type), - !instruction_returns_type(Instr, Type). diff --git a/datalog/schema/insertvalue-instr.dl b/datalog/schema/insertvalue-instr.dl new file mode 100644 index 0000000..b9ce2be --- /dev/null +++ b/datalog/schema/insertvalue-instr.dl @@ -0,0 +1,112 @@ +// http://llvm.org/docs/LangRef.html#insertvalue-instr +// keywords: aggregate; instr + +.type InsertValueInstruction = Instruction +.decl insertvalue_instr(instr:InsertValueInstruction) + +instr(v) :- insertvalue_instr(v). + +.decl insertvalue_instr_base(instr:InsertValueInstruction, aggregate:Operand) +.decl insertvalue_instr_value(instr:InsertValueInstruction, value:Operand) + +//------------------------ +// Aggregate Indices +//------------------------ + +.decl insertvalue_instr_nindices(instr:InsertValueInstruction, total:number) +.decl insertvalue_instr_index(instr:InsertValueInstruction, i:number, idx:number) + +next_instr_index(Instr, Index, Index + 1) :- + insertvalue_instr_index(Instr, Index, _). + + +//------------------------------------------------ +// The resulting type for each dereference. +//------------------------------------------------ + +.decl insertvalue_instr_base_type(instr:InsertValueInstruction, type:Type) +.decl insertvalue_instr_value_type(instr:InsertValueInstruction, type:Type) +.decl insertvalue_instrterm_type(instr:InsertValueInstruction, i:number, type:Type) + +insertvalue_instrterm_type(Instr, 0, Type) :- + insertvalue_instr_base(Instr, Aggregate), + operand_has_type(Aggregate, Type). + +insertvalue_instrterm_type(Instr, NextIndex, Type) :- + insertvalue_instrterm_type(Instr, Index, StructType), + insertvalue_instr_index(Instr, Index, IdxValue), + struct_type_field(StructType, IdxValue, Type), + next_instr_index(Instr, Index, NextIndex). + +insertvalue_instrterm_type(Instr, NextIndex, Type) :- + insertvalue_instrterm_type(Instr, Index, ArrayType), + array_type_has_component(ArrayType, Type), + next_instr_index(Instr, Index, NextIndex). + +insertvalue_instr_value_type(Instr, Type) :- + insertvalue_instr_nindices(Instr, Total), + insertvalue_instrterm_type(Instr, Total, Type). + +insertvalue_instr_base_type(Instr, Type) :- + insertvalue_instrterm_type(Instr, 0, Type). + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// (1) The first operand of an ‘insertvalue‘ instr is +// a value of struct or array type. +// (2) The second operand is a first-class value to insert. +// (3) The value to insert must have the same type as the value +// identified by the indices. +// (4) At least one index must be specified. +// +// The result is an aggregate of the same type as the first +// operand type. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + insertvalue_instr(Instr), + !insertvalue_instr_base(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + insertvalue_instr(Instr), + !insertvalue_instr_value(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + insertvalue_instr(Instr), + !insertvalue_instr_nindices(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + insertvalue_instr(Instr), + !insertvalue_instr_index(Instr, 0, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + insertvalue_instr_base_type(Instr, BaseType), + !aggregate_type(BaseType). // c1 + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + insertvalue_instr_value_type(Instr, Type), + !type_is_firstclass(Type). // c2 + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + insertvalue_instr_value(Instr, Value), + insertvalue_instr_value_type(Instr, Type), + !operand_has_type(Value, Type). // c3 + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + insertvalue_instr_nindices(Instr, Total), + Total <= 0. // c4 + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + insertvalue_instr_base_type(Instr, BaseType), + !instr_returns_type(Instr, BaseType). // creturn diff --git a/datalog/schema/insertvalue-instruction.dl b/datalog/schema/insertvalue-instruction.dl deleted file mode 100644 index feb1236..0000000 --- a/datalog/schema/insertvalue-instruction.dl +++ /dev/null @@ -1,112 +0,0 @@ -// http://llvm.org/docs/LangRef.html#insertvalue-instruction -// keywords: aggregate; instruction - -.type InsertValueInstruction = Instruction -.decl insertvalue_instruction(instr:InsertValueInstruction) - -instruction(v) :- insertvalue_instruction(v). - -.decl insertvalue_instruction_base(instr:InsertValueInstruction, aggregate:Operand) -.decl insertvalue_instruction_value(instr:InsertValueInstruction, value:Operand) - -//------------------------ -// Aggregate Indices -//------------------------ - -.decl insertvalue_instruction_nindices(instr:InsertValueInstruction, total:number) -.decl insertvalue_instruction_index(instr:InsertValueInstruction, i:number, idx:number) - -next_instruction_index(Instr, Index, Index + 1) :- - insertvalue_instruction_index(Instr, Index, _). - - -//------------------------------------------------ -// The resulting type for each dereference. -//------------------------------------------------ - -.decl insertvalue_instruction_base_type(instr:InsertValueInstruction, type:Type) -.decl insertvalue_instruction_value_type(instr:InsertValueInstruction, type:Type) -.decl insertvalue_instruction_interm_type(instr:InsertValueInstruction, i:number, type:Type) - -insertvalue_instruction_interm_type(Instr, 0, Type) :- - insertvalue_instruction_base(Instr, Aggregate), - operand_has_type(Aggregate, Type). - -insertvalue_instruction_interm_type(Instr, NextIndex, Type) :- - insertvalue_instruction_interm_type(Instr, Index, StructType), - insertvalue_instruction_index(Instr, Index, IdxValue), - struct_type_field(StructType, IdxValue, Type), - next_instruction_index(Instr, Index, NextIndex). - -insertvalue_instruction_interm_type(Instr, NextIndex, Type) :- - insertvalue_instruction_interm_type(Instr, Index, ArrayType), - array_type_has_component(ArrayType, Type), - next_instruction_index(Instr, Index, NextIndex). - -insertvalue_instruction_value_type(Instr, Type) :- - insertvalue_instruction_nindices(Instr, Total), - insertvalue_instruction_interm_type(Instr, Total, Type). - -insertvalue_instruction_base_type(Instr, Type) :- - insertvalue_instruction_interm_type(Instr, 0, Type). - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// (1) The first operand of an ‘insertvalue‘ instruction is -// a value of struct or array type. -// (2) The second operand is a first-class value to insert. -// (3) The value to insert must have the same type as the value -// identified by the indices. -// (4) At least one index must be specified. -// -// The result is an aggregate of the same type as the first -// operand type. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - insertvalue_instruction(Instr), - !insertvalue_instruction_base(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - insertvalue_instruction(Instr), - !insertvalue_instruction_value(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - insertvalue_instruction(Instr), - !insertvalue_instruction_nindices(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - insertvalue_instruction(Instr), - !insertvalue_instruction_index(Instr, 0, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - insertvalue_instruction_base_type(Instr, BaseType), - !aggregate_type(BaseType). // c1 - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - insertvalue_instruction_value_type(Instr, Type), - !type_is_firstclass(Type). // c2 - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - insertvalue_instruction_value(Instr, Value), - insertvalue_instruction_value_type(Instr, Type), - !operand_has_type(Value, Type). // c3 - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - insertvalue_instruction_nindices(Instr, Total), - Total <= 0. // c4 - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - insertvalue_instruction_base_type(Instr, BaseType), - !instruction_returns_type(Instr, BaseType). // creturn diff --git a/datalog/schema/instr.dl b/datalog/schema/instr.dl new file mode 100644 index 0000000..2470c06 --- /dev/null +++ b/datalog/schema/instr.dl @@ -0,0 +1,55 @@ +//------------------------------------ +// Instruction (EDB) Entities +//------------------------------------ + +.type Instruction <: symbol +.decl instr(instr:Instruction) + +// For constraints +.decl schema_invalid_instr(instr:Instruction, file:File, line:Line) + + +// Apart from the instrs with 'void' type, +// every instr assigns its result to a variable. +.decl instr_assigns_to(instr:Instruction, var:Variable) + +// Auxiliary predicate that stores the instr's return type +.decl instr_returns_type(instr:Instruction, type:Type) + +instr_returns_type(Instr, Type) :- + instr_assigns_to(Instr, Var), + variable_has_type(Var, Type). + +// Terminator Instruction Subset +.decl terminator_instr(instr:Instruction) + + +// Instruction Flags +.type Flag <: symbol +.decl flag(flag:Flag) +.decl instr_flag(instr:Instruction, flag:Flag) + +flag(Flag) :- instr_flag(_, Flag). + + +// helpful in avoiding non-termination warnings +.decl next_instr_index(instr:Instruction, index:number, next_index:number) + +// Position of instr on source code (if debug info is available) +.decl instr_pos(instr:Instruction, line:LineNumber, column:ColumnNumber) + + +//------------------------------------ +// Sequence of instrs +//------------------------------------ + +// The next instr in the source file. +.decl next_instr(instr:Instruction, next:Instruction) + +// The func that contains the instr +.decl instr_func(instr:Instruction, func:Function) + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr(Instr), + !instr_func(Instr, _). diff --git a/datalog/schema/instruction.dl b/datalog/schema/instruction.dl deleted file mode 100644 index c07ed43..0000000 --- a/datalog/schema/instruction.dl +++ /dev/null @@ -1,55 +0,0 @@ -//------------------------------------ -// Instruction (EDB) Entities -//------------------------------------ - -.type Instruction <: symbol -.decl instruction(instr:Instruction) - -// For constraints -.decl schema_invalid_instruction(instr:Instruction, file:File, line:Line) - - -// Apart from the instructions with 'void' type, -// every instruction assigns its result to a variable. -.decl instruction_assigns_to(instr:Instruction, var:Variable) - -// Auxiliary predicate that stores the instruction's return type -.decl instruction_returns_type(instr:Instruction, type:Type) - -instruction_returns_type(Instr, Type) :- - instruction_assigns_to(Instr, Var), - variable_has_type(Var, Type). - -// Terminator Instruction Subset -.decl terminator_instruction(instr:Instruction) - - -// Instruction Flags -.type Flag <: symbol -.decl flag(flag:Flag) -.decl instruction_has_flag(instr:Instruction, flag:Flag) - -flag(Flag) :- instruction_has_flag(_, Flag). - - -// helpful in avoiding non-termination warnings -.decl next_instruction_index(instr:Instruction, index:number, next_index:number) - -// Position of instruction on source code (if debug info is available) -.decl instruction_pos(instr:Instruction, line:LineNumber, column:ColumnNumber) - - -//------------------------------------ -// Sequence of instructions -//------------------------------------ - -// The next instruction in the source file. -.decl next_instruction(instr:Instruction, next:Instruction) - -// The func that contains the instruction -.decl instruction_in_func(instr:Instruction, func:Function) - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction(Instr), - !instruction_in_func(Instr, _). diff --git a/datalog/schema/inttoptr-instr.dl b/datalog/schema/inttoptr-instr.dl new file mode 100644 index 0000000..99f3dbc --- /dev/null +++ b/datalog/schema/inttoptr-instr.dl @@ -0,0 +1,70 @@ +// http://llvm.org/docs/LangRef.html#inttoptr-to-instr +// keywords: conversion; unary; instr + +.type IntToPtrInstruction = Instruction +.decl inttoptr_instr(instr:IntToPtrInstruction) + +instr(v) :- inttoptr_instr(v). + +.decl inttoptr_instr_from_operand(instr:IntToPtrInstruction, val:Operand) +.decl inttoptr_instr_to_type(instr:IntToPtrInstruction, type:Type) + + +// Helper predicate + +.decl inttoptr_instr_from_type(instr:IntToPtrInstruction, type:Type) + +inttoptr_instr_from_type(Instr, Type) :- + inttoptr_instr_from_operand(Instr, Operand), + operand_has_type(Operand, Type). + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// The ‘inttoptr‘ instr takes: +// (i) a value to cast, which must be integer or vector of integer values, +// (ii) and a type to cast it to, which must be a pointer or a vector of +// pointers type. +// +// If the value to be casted is a vector integer type: +// (i) the type must be a vector pointer type, +// (ii) with the same number of elements. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + inttoptr_instr(Instr), + !inttoptr_instr_from_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + inttoptr_instr(Instr), + !inttoptr_instr_to_type(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + inttoptr_instr(Instr), + inttoptr_instr_to_type(Instr, Type), + !instr_returns_type(Instr, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + inttoptr_instr(Instr), + inttoptr_instr_from_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + inttoptr_instr(Instr), + inttoptr_instr_to_type(Instr, Type), + !pointer_type(Type), + !pointer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + inttoptr_instr(Instr), + inttoptr_instr_from_type(Instr, FromType), + inttoptr_instr_to_type(Instr, ToType), + !vector_compatible_types(FromType, ToType). diff --git a/datalog/schema/inttoptr-instruction.dl b/datalog/schema/inttoptr-instruction.dl deleted file mode 100644 index 4705411..0000000 --- a/datalog/schema/inttoptr-instruction.dl +++ /dev/null @@ -1,70 +0,0 @@ -// http://llvm.org/docs/LangRef.html#inttoptr-to-instruction -// keywords: conversion; unary; instruction - -.type IntToPtrInstruction = Instruction -.decl inttoptr_instruction(instr:IntToPtrInstruction) - -instruction(v) :- inttoptr_instruction(v). - -.decl inttoptr_instruction_from_operand(instr:IntToPtrInstruction, val:Operand) -.decl inttoptr_instruction_to_type(instr:IntToPtrInstruction, type:Type) - - -// Helper predicate - -.decl inttoptr_instruction_from_type(instr:IntToPtrInstruction, type:Type) - -inttoptr_instruction_from_type(Instr, Type) :- - inttoptr_instruction_from_operand(Instr, Operand), - operand_has_type(Operand, Type). - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// The ‘inttoptr‘ instruction takes: -// (i) a value to cast, which must be integer or vector of integer values, -// (ii) and a type to cast it to, which must be a pointer or a vector of -// pointers type. -// -// If the value to be casted is a vector integer type: -// (i) the type must be a vector pointer type, -// (ii) with the same number of elements. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - inttoptr_instruction(Instr), - !inttoptr_instruction_from_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - inttoptr_instruction(Instr), - !inttoptr_instruction_to_type(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - inttoptr_instruction(Instr), - inttoptr_instruction_to_type(Instr, Type), - !instruction_returns_type(Instr, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - inttoptr_instruction(Instr), - inttoptr_instruction_from_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - inttoptr_instruction(Instr), - inttoptr_instruction_to_type(Instr, Type), - !pointer_type(Type), - !pointer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - inttoptr_instruction(Instr), - inttoptr_instruction_from_type(Instr, FromType), - inttoptr_instruction_to_type(Instr, ToType), - !vector_compatible_types(FromType, ToType). diff --git a/datalog/schema/invoke-instr.dl b/datalog/schema/invoke-instr.dl new file mode 100644 index 0000000..54b0560 --- /dev/null +++ b/datalog/schema/invoke-instr.dl @@ -0,0 +1,194 @@ +// http://llvm.org/docs/LangRef.html#invoke-instr +// keywords: terminator; instr + +.type InvokeInstruction = Instruction +.decl invoke_instr(instr:InvokeInstruction) + +instr(v) :- invoke_instr(v). +terminator_instr(v) :- invoke_instr(v). + +// Function operand: can be either a constant or a variable +.decl invoke_instr_fn_operand(instr:InvokeInstruction, op:Operand) + +// Resolved func of invoke instr. Initially empty. +.decl invoke_instr_fn_target(instr:InvokeInstruction, func:FunctionDecl) + +// If none is specified, the invoke defaults to using C +// calling conventions. +.decl invoke_instr_with_calling_convention(instr:InvokeInstruction, cc:CallingConvention) +calling_convention(cc) :- invoke_instr_with_calling_convention(_, cc). + + +//--------------------------------------------------------------- +// [Direct and Indirect Invoke Instructions] +// +// Invoke-instrs are divided into direct invocations +// that provide a func name, and indirect invocations +// through a func pointer variable. +//--------------------------------------------------------------- + +.decl direct_invoke_instr(instr:InvokeInstruction) +.decl indirect_invoke_instr(instr:InvokeInstruction) + +direct_invoke_instr(Instr) :- + invoke_instr_fn_operand(Instr, Constant), + constant(Constant). + +indirect_invoke_instr(Instr) :- + invoke_instr_fn_operand(Instr, Variable), + variable(Variable). + + +//-------------------------------------------------- +// Actual arguments and Parameter Attrs +//-------------------------------------------------- + +.decl invoke_instr_arg(instr:InvokeInstruction, i:ArgumentIndex, arg:Operand) +.decl invoke_instr_with_return_attr(instr:InvokeInstruction, attr:Attribute) +.decl invoke_instr_with_param_attr(instr:InvokeInstruction, i:ArgumentIndex, attr:Attribute) +.decl invoke_instr_with_fn_attr(instr:InvokeInstruction, attr:Attribute) + +attr(Attr) :- invoke_instr_with_fn_attr(_, Attr). +attr(Attr) :- invoke_instr_with_return_attr(_, Attr). +attr(Attr) :- invoke_instr_with_param_attr(_, _, Attr). + + +//----------------------------- +// Signature (func type) +//----------------------------- + +.decl invoke_instr_fn_type(instr:InvokeInstruction, type:Type) +.decl invoke_instr_return_type(instr:InvokeInstruction, type:Type) + +invoke_instr_fn_type(Instr, FnType) :- + invoke_instr_fn_operand(Instr, FnOp), + operand_has_type(FnOp, PtrType), + pointer_type_has_component(PtrType, FnType), + func_type(FnType). + +invoke_instr_return_type(Instr, Type) :- + invoke_instr_fn_type(Instr, FnType), + func_type_return(FnType, Type). + + +//------------------------------------------------------------------------------ +// [Labels] +// +// ‘normal label‘: +// the label reached when the called func executes a ‘ret‘ +// instr. +// +// ‘exception label‘: +// the label reached when a callee returns via the resume +// instr or other exception handling mechanism. +//------------------------------------------------------------------------------ + +.decl invoke_instr_normal_label(instr:InvokeInstruction, label:Variable) +.decl invoke_instr_exception_label(instr:InvokeInstruction, label:Variable) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// (1) Only ‘zeroext‘, ‘signext‘, and ‘inreg‘ attrs +// are valid for return values. +// (2) The type of the invoke instr is also the type of +// the return value. Functions that return no value are +// marked void. +// (3) The func type shall be the signature of the pointer +// to func value being invoked. The argument types must +// match the types implied by this signature. +// (4) All arguments must be of first class type. +// (5) Only ‘noreturn‘, ‘nounwind‘, ‘readonly‘ and ‘readnone‘ +// attrs are valid as func attrs. +// (6) The 'invoke' instr' takes a 'normal label' and +// (7) an 'exceptional label'. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + invoke_instr(Instr), + !invoke_instr_fn_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + invoke_instr(Instr), + !invoke_instr_normal_label(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + invoke_instr(Instr), + !invoke_instr_exception_label(Instr, _). + +// attr compatibility +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + invoke_instr_with_return_attr(Instr, Attr), + !parameter_attr__zeroext(Attr), + !parameter_attr__signext(Attr), + !parameter_attr__inreg(Attr), + !parameter_attr__noalias(Attr), + !parameter_attr__dereferenceable(Attr). // c1 + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + invoke_instr_with_fn_attr(Instr, Attr), + !func_attr__noreturn(Attr), + !func_attr__nounwind(Attr), + !func_attr__readonly(Attr), + !func_attr__readnone(Attr), + !func_attr__cold(Attr), + !func_attr__returns_twice(Attr), + !func_attr__builtin(Attr), + !target_dependent_attr(Attr). // c5 + + +// Signature conformance +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + invoke_instr_arg(Instr, Index, _), + invoke_instr_fn_type(Instr, FnType), + !func_type_param(FnType, Index, _), + !func_type_has_varargs(FnType). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + invoke_instr(Instr), + !invoke_instr_arg(Instr, Index, _), + invoke_instr_fn_type(Instr, FnType), + func_type_param(FnType, Index, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + invoke_instr_arg(Instr, Index, Arg), + invoke_instr_fn_type(Instr, FnType), + func_type_param(FnType, Index, ParamType), + !operand_has_type(Arg, ParamType). // c3 + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + invoke_instr_return_type(Instr, Type), + !void_type(Type), + !instr_returns_type(Instr, Type). // c2 + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + invoke_instr_return_type(Instr, Type), + void_type(Type), + instr_returns_type(Instr, _). // c2 vice versa + +// only first class arguments allowed +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + invoke_instr_arg(Instr, _, Arg), + !operand_is_firstclass(Arg). // c4 + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + invoke_instr_normal_label(Instr, Label), + !variable_is_label(Label). // c6 + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + invoke_instr_exception_label(Instr, Label), + !variable_is_label(Label). // c7 diff --git a/datalog/schema/invoke-instruction.dl b/datalog/schema/invoke-instruction.dl deleted file mode 100644 index 5e2a6bd..0000000 --- a/datalog/schema/invoke-instruction.dl +++ /dev/null @@ -1,194 +0,0 @@ -// http://llvm.org/docs/LangRef.html#invoke-instruction -// keywords: terminator; instruction - -.type InvokeInstruction = Instruction -.decl invoke_instruction(instr:InvokeInstruction) - -instruction(v) :- invoke_instruction(v). -terminator_instruction(v) :- invoke_instruction(v). - -// Function operand: can be either a constant or a variable -.decl invoke_instruction_fn_operand(instr:InvokeInstruction, op:Operand) - -// Resolved func of invoke instruction. Initially empty. -.decl invoke_instruction_fn_target(instr:InvokeInstruction, func:FunctionDecl) - -// If none is specified, the invoke defaults to using C -// calling conventions. -.decl invoke_instruction_with_calling_convention(instr:InvokeInstruction, cc:CallingConvention) -calling_convention(cc) :- invoke_instruction_with_calling_convention(_, cc). - - -//--------------------------------------------------------------- -// [Direct and Indirect Invoke Instructions] -// -// Invoke-instructions are divided into direct invocations -// that provide a func name, and indirect invocations -// through a func pointer variable. -//--------------------------------------------------------------- - -.decl direct_invoke_instruction(instr:InvokeInstruction) -.decl indirect_invoke_instruction(instr:InvokeInstruction) - -direct_invoke_instruction(Instr) :- - invoke_instruction_fn_operand(Instr, Constant), - constant(Constant). - -indirect_invoke_instruction(Instr) :- - invoke_instruction_fn_operand(Instr, Variable), - variable(Variable). - - -//-------------------------------------------------- -// Actual arguments and Parameter Attributes -//-------------------------------------------------- - -.decl invoke_instruction_arg(instr:InvokeInstruction, i:ArgumentIndex, arg:Operand) -.decl invoke_instruction_with_return_attr(instr:InvokeInstruction, attr:Attribute) -.decl invoke_instruction_with_param_attr(instr:InvokeInstruction, i:ArgumentIndex, attr:Attribute) -.decl invoke_instruction_with_fn_attr(instr:InvokeInstruction, attr:Attribute) - -attr(Attr) :- invoke_instruction_with_fn_attr(_, Attr). -attr(Attr) :- invoke_instruction_with_return_attr(_, Attr). -attr(Attr) :- invoke_instruction_with_param_attr(_, _, Attr). - - -//----------------------------- -// Signature (func type) -//----------------------------- - -.decl invoke_instruction_fn_type(instr:InvokeInstruction, type:Type) -.decl invoke_instruction_return_type(instr:InvokeInstruction, type:Type) - -invoke_instruction_fn_type(Instr, FnType) :- - invoke_instruction_fn_operand(Instr, FnOp), - operand_has_type(FnOp, PtrType), - pointer_type_has_component(PtrType, FnType), - func_type(FnType). - -invoke_instruction_return_type(Instr, Type) :- - invoke_instruction_fn_type(Instr, FnType), - func_type_return(FnType, Type). - - -//------------------------------------------------------------------------------ -// [Labels] -// -// ‘normal label‘: -// the label reached when the called func executes a ‘ret‘ -// instruction. -// -// ‘exception label‘: -// the label reached when a callee returns via the resume -// instruction or other exception handling mechanism. -//------------------------------------------------------------------------------ - -.decl invoke_instruction_normal_label(instr:InvokeInstruction, label:Variable) -.decl invoke_instruction_exception_label(instr:InvokeInstruction, label:Variable) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// (1) Only ‘zeroext‘, ‘signext‘, and ‘inreg‘ attrs -// are valid for return values. -// (2) The type of the invoke instruction is also the type of -// the return value. Functions that return no value are -// marked void. -// (3) The func type shall be the signature of the pointer -// to func value being invoked. The argument types must -// match the types implied by this signature. -// (4) All arguments must be of first class type. -// (5) Only ‘noreturn‘, ‘nounwind‘, ‘readonly‘ and ‘readnone‘ -// attrs are valid as func attrs. -// (6) The 'invoke' instruction' takes a 'normal label' and -// (7) an 'exceptional label'. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - invoke_instruction(Instr), - !invoke_instruction_fn_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - invoke_instruction(Instr), - !invoke_instruction_normal_label(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - invoke_instruction(Instr), - !invoke_instruction_exception_label(Instr, _). - -// attr compatibility -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - invoke_instruction_with_return_attr(Instr, Attr), - !parameter_attr__zeroext(Attr), - !parameter_attr__signext(Attr), - !parameter_attr__inreg(Attr), - !parameter_attr__noalias(Attr), - !parameter_attr__dereferenceable(Attr). // c1 - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - invoke_instruction_with_fn_attr(Instr, Attr), - !func_attr__noreturn(Attr), - !func_attr__nounwind(Attr), - !func_attr__readonly(Attr), - !func_attr__readnone(Attr), - !func_attr__cold(Attr), - !func_attr__returns_twice(Attr), - !func_attr__builtin(Attr), - !target_dependent_attr(Attr). // c5 - - -// Signature conformance -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - invoke_instruction_arg(Instr, Index, _), - invoke_instruction_fn_type(Instr, FnType), - !func_type_param(FnType, Index, _), - !func_type_has_varargs(FnType). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - invoke_instruction(Instr), - !invoke_instruction_arg(Instr, Index, _), - invoke_instruction_fn_type(Instr, FnType), - func_type_param(FnType, Index, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - invoke_instruction_arg(Instr, Index, Arg), - invoke_instruction_fn_type(Instr, FnType), - func_type_param(FnType, Index, ParamType), - !operand_has_type(Arg, ParamType). // c3 - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - invoke_instruction_return_type(Instr, Type), - !void_type(Type), - !instruction_returns_type(Instr, Type). // c2 - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - invoke_instruction_return_type(Instr, Type), - void_type(Type), - instruction_returns_type(Instr, _). // c2 vice versa - -// only first class arguments allowed -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - invoke_instruction_arg(Instr, _, Arg), - !operand_is_firstclass(Arg). // c4 - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - invoke_instruction_normal_label(Instr, Label), - !variable_is_label(Label). // c6 - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - invoke_instruction_exception_label(Instr, Label), - !variable_is_label(Label). // c7 diff --git a/datalog/schema/landingpad-instr.dl b/datalog/schema/landingpad-instr.dl new file mode 100644 index 0000000..403791e --- /dev/null +++ b/datalog/schema/landingpad-instr.dl @@ -0,0 +1,231 @@ +// http://llvm.org/docs/LangRef.html#landingpad-instr +// keywords: exception; instr + +.type LandingPadInstruction = Instruction +.decl landingpad_instr(instr:LandingPadInstruction) +.decl landingpad_instr_is_cleanup(instr:LandingPadInstruction) + +instr(v) :- landingpad_instr(v). + +// result type +.decl landingpad_instr_type(instr:LandingPadInstruction, type:Type) + +// personality func +.decl landingpad_instr_pers_fn(instr:LandingPadInstruction, func:FunctionDecl) + +landingpad_instr_pers_fn(Instr, PersFunction) :- + landingpad_instr(Instr), + instr_func(Instr, EnclosingFunction), + func_pers_fn(EnclosingFunction, FnConstant), + func_constant(FnConstant), + func_constant_fn_name(FnConstant, PersFnName), + func_name(PersFunction, PersFnName). + +landingpad_instr_pers_fn(Instr, PersFunction) :- + landingpad_instr(Instr), + instr_func(Instr, EnclosingFunction), + func_pers_fn(EnclosingFunction, BitcastConstant), + bitcast_constant_expression_from(BitcastConstant, FnConstant), + func_constant(FnConstant), + func_constant_fn_name(FnConstant, PersFnName), + func_name(PersFunction, PersFnName). + + +//------------------------------------------------------------------------------ +// [Landing Pad] +// +// A landing pad block is a basic block which is the unwind +// destination of an ‘invoke‘ instr. +// +// A landing pad block must have a ‘landingpad‘ instr as its +// first non-PHI instr. +// +// +// In order to compute the first non-phi instr per landing pad, +// we first have to record its segment of consecutive phi-instrs +// from its starting point, encoded in predicate `landingpad:phi'. +// +// The first *non-phi* instr of a landing pad may be either +// (i) its first instr, or (ii) the first non-phi instr +// that follows the segment described above. +// +// The landing pad block cannot contain any other landing pad +// instrs, except this one. +//------------------------------------------------------------------------------ + +// Landing Pad Definition +.decl landingpad(bb:BasicBlock) + +landingpad(BB) :- + invoke_instr_exception_label(_, Label), + block_of_label(BB, Label). + + +// Compute the segment of consecutive phi-instrs from starting +// point, per landing pad. + +.decl _landingpad_starting_phi(bb:BasicBlock, instr:PhiInstruction) + +_landingpad_starting_phi(BB, Instr) :- + landingpad(BB), + block_first_instr(BB, Instr), + phi_instr(Instr). + +_landingpad_starting_phi(BB, NextInstr) :- + _landingpad_starting_phi(BB, Instr), + next_instr(Instr, NextInstr), + phi_instr(NextInstr), + instr_block(NextInstr, BB). + + +// Compute the first non-phi instr, per landing pad. + +.decl _landingpad_first_nonphi(bb:BasicBlock, instr:Instruction) + +_landingpad_first_nonphi(BB, Instr) :- + landingpad(BB), + block_first_instr(BB, Instr), + !phi_instr(Instr). + +_landingpad_first_nonphi(BB, NextInstr) :- + _landingpad_starting_phi(BB, Instr), + next_instr(Instr, NextInstr), + !phi_instr(NextInstr), + instr_block(NextInstr, BB). + + +// Same as above, via different computation. +.decl _landingpad_contains_landingpad_instr(bb:BasicBlock, instr:Instruction) + +_landingpad_contains_landingpad_instr(BB, Instr) :- + landingpad_instr(Instr), + instr_block(Instr, BB), + landingpad(BB). + + +// Sanity Check: the two instrs must coincide. +.decl _valid_landingpad(bb:BasicBlock) + +_valid_landingpad(BB) :- + landingpad(BB), + _landingpad_first_nonphi(BB, Instr), + _landingpad_contains_landingpad_instr(BB, Instr). + + +//------------------------------------------------------------------------------ +// [Clauses] +// +// A clause begins with the clause type — catch or filter — and +// contains the global variable representing the “type” that may be +// caught or filtered respectively. +// +// Unlike the catch clause, the filter clause takes an array +// constant as its argument. +//------------------------------------------------------------------------------ + +// Clauses as records + +.type Clause = [ + arg : Constant +] + +.decl clause(c:Clause) +.decl catch_clause(c:Clause) +.decl filter_clause(c:Clause) + +clause(c) :- catch_clause(c) ; filter_clause(c). + +// Clause Predicates +.decl landingpad_instr_clause(instr:LandingPadInstruction, i:number, clause:Clause) +.decl landingpad_instr_nclauses(instr:LandingPadInstruction, total:number) + +// Enforce that clause is either catch or filter +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + landingpad_instr_clause(Instr, _, Clause), + !catch_clause(Clause), + !filter_clause(Clause). + + +//------------------------------------------------------------------------- +// [Constraints] +// +// The landingpad instr has several restrictions: +// (1) A landing pad block is a basic block which is the unwind +// destination of an ‘invoke‘ instr. (See +// invoke-instr.) +// (2) A landing pad block must have a ‘landingpad‘ instr +// as its first non-PHI instr. +// (3) There can be only one ‘landingpad‘ instr within the +// landing pad block. +// (4) A basic block that is not a landing pad block may not include +// a ‘landingpad‘ instr. +// (5) All ‘landingpad‘ instrs in a func must have the same +// personality func. +// (6) The ‘landingpad‘ instr must contain at least one clause +// or the cleanup flag. +//------------------------------------------------------------------------- + + +// Additional type constraints not mentioned above +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + landingpad_instr_clause(Instr, _, Clause), + filter_clause(Clause), + Clause = [ Constant ], + constant_has_type(Constant, Type), + !array_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + landingpad_instr_type(Instr, Type), + !instr_returns_type(Instr, Type). + + +// 1st Constraint is omitted, since it is not really a constraint, +// rather than a definition of a landing pad (already encoded in the +// relevant section) + + +// 2nd Constraint: first non-phi instr must be a landing pad +// instr (i.e., its only landing pad instr) +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + landingpad(BB), !_valid_landingpad(BB), + block_first_instr(BB, Instr). + + +// 3rd Constraint: in case of multiple landing pad instrs in a +// basic block, the basic block will be marked invalid, since at least +// one of these landing pad instr will not match its first +// non-phi. + + +// 4th Constraint: only landing pad blocks may contain landing pad +// instrs +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + landingpad_instr(Instr), + instr_block(Instr, BB), + !landingpad(BB). + + +// 5th Constraint: all ‘landingpad‘ instrs in a func must +// have the same personality func +schema_invalid_instr(Instr1, __FILE__, __LINE__) :- + schema_sanity(), + landingpad_instr(Instr1), + landingpad_instr_pers_fn(Instr1, PersFunc), + instr_func(Instr1, Func), + instr_func(Instr2, Func), + landingpad_instr(Instr2), + !landingpad_instr_pers_fn(Instr2, PersFunc). + + +// 6th Constraint: the ‘landingpad‘ instr must contain at least +// one clause or the cleanup flag +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + landingpad_instr(Instr), + !landingpad_instr_is_cleanup(Instr), + !landingpad_instr_clause(Instr, 0, _). diff --git a/datalog/schema/landingpad-instruction.dl b/datalog/schema/landingpad-instruction.dl deleted file mode 100644 index e0c35f8..0000000 --- a/datalog/schema/landingpad-instruction.dl +++ /dev/null @@ -1,231 +0,0 @@ -// http://llvm.org/docs/LangRef.html#landingpad-instruction -// keywords: exception; instruction - -.type LandingPadInstruction = Instruction -.decl landingpad_instruction(instr:LandingPadInstruction) -.decl landingpad_instruction_is_cleanup(instr:LandingPadInstruction) - -instruction(v) :- landingpad_instruction(v). - -// result type -.decl landingpad_instruction_type(instr:LandingPadInstruction, type:Type) - -// personality func -.decl landingpad_instruction_pers_fn(instr:LandingPadInstruction, func:FunctionDecl) - -landingpad_instruction_pers_fn(Instr, PersFunction) :- - landingpad_instruction(Instr), - instruction_in_func(Instr, EnclosingFunction), - func_pers_fn(EnclosingFunction, FnConstant), - func_constant(FnConstant), - func_constant_fn_name(FnConstant, PersFnName), - func_name(PersFunction, PersFnName). - -landingpad_instruction_pers_fn(Instr, PersFunction) :- - landingpad_instruction(Instr), - instruction_in_func(Instr, EnclosingFunction), - func_pers_fn(EnclosingFunction, BitcastConstant), - bitcast_constant_expression_from(BitcastConstant, FnConstant), - func_constant(FnConstant), - func_constant_fn_name(FnConstant, PersFnName), - func_name(PersFunction, PersFnName). - - -//------------------------------------------------------------------------------ -// [Landing Pad] -// -// A landing pad block is a basic block which is the unwind -// destination of an ‘invoke‘ instruction. -// -// A landing pad block must have a ‘landingpad‘ instruction as its -// first non-PHI instruction. -// -// -// In order to compute the first non-phi instruction per landing pad, -// we first have to record its segment of consecutive phi-instructions -// from its starting point, encoded in predicate `landingpad:phi'. -// -// The first *non-phi* instruction of a landing pad may be either -// (i) its first instruction, or (ii) the first non-phi instruction -// that follows the segment described above. -// -// The landing pad block cannot contain any other landing pad -// instructions, except this one. -//------------------------------------------------------------------------------ - -// Landing Pad Definition -.decl landingpad(bb:BasicBlock) - -landingpad(BB) :- - invoke_instruction_exception_label(_, Label), - block_of_label(BB, Label). - - -// Compute the segment of consecutive phi-instructions from starting -// point, per landing pad. - -.decl _landingpad_starting_phi(bb:BasicBlock, instr:PhiInstruction) - -_landingpad_starting_phi(BB, Instr) :- - landingpad(BB), - block_first_instruction(BB, Instr), - phi_instruction(Instr). - -_landingpad_starting_phi(BB, NextInstr) :- - _landingpad_starting_phi(BB, Instr), - next_instruction(Instr, NextInstr), - phi_instruction(NextInstr), - instruction_in_block(NextInstr, BB). - - -// Compute the first non-phi instruction, per landing pad. - -.decl _landingpad_first_nonphi(bb:BasicBlock, instr:Instruction) - -_landingpad_first_nonphi(BB, Instr) :- - landingpad(BB), - block_first_instruction(BB, Instr), - !phi_instruction(Instr). - -_landingpad_first_nonphi(BB, NextInstr) :- - _landingpad_starting_phi(BB, Instr), - next_instruction(Instr, NextInstr), - !phi_instruction(NextInstr), - instruction_in_block(NextInstr, BB). - - -// Same as above, via different computation. -.decl _landingpad_contains_landingpad_instruction(bb:BasicBlock, instr:Instruction) - -_landingpad_contains_landingpad_instruction(BB, Instr) :- - landingpad_instruction(Instr), - instruction_in_block(Instr, BB), - landingpad(BB). - - -// Sanity Check: the two instructions must coincide. -.decl _valid_landingpad(bb:BasicBlock) - -_valid_landingpad(BB) :- - landingpad(BB), - _landingpad_first_nonphi(BB, Instr), - _landingpad_contains_landingpad_instruction(BB, Instr). - - -//------------------------------------------------------------------------------ -// [Clauses] -// -// A clause begins with the clause type — catch or filter — and -// contains the global variable representing the “type” that may be -// caught or filtered respectively. -// -// Unlike the catch clause, the filter clause takes an array -// constant as its argument. -//------------------------------------------------------------------------------ - -// Clauses as records - -.type Clause = [ - arg : Constant -] - -.decl clause(c:Clause) -.decl catch_clause(c:Clause) -.decl filter_clause(c:Clause) - -clause(c) :- catch_clause(c) ; filter_clause(c). - -// Clause Predicates -.decl landingpad_instruction_clause(instr:LandingPadInstruction, i:number, clause:Clause) -.decl landingpad_instruction_nclauses(instr:LandingPadInstruction, total:number) - -// Enforce that clause is either catch or filter -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - landingpad_instruction_clause(Instr, _, Clause), - !catch_clause(Clause), - !filter_clause(Clause). - - -//------------------------------------------------------------------------- -// [Constraints] -// -// The landingpad instruction has several restrictions: -// (1) A landing pad block is a basic block which is the unwind -// destination of an ‘invoke‘ instruction. (See -// invoke-instruction.) -// (2) A landing pad block must have a ‘landingpad‘ instruction -// as its first non-PHI instruction. -// (3) There can be only one ‘landingpad‘ instruction within the -// landing pad block. -// (4) A basic block that is not a landing pad block may not include -// a ‘landingpad‘ instruction. -// (5) All ‘landingpad‘ instructions in a func must have the same -// personality func. -// (6) The ‘landingpad‘ instruction must contain at least one clause -// or the cleanup flag. -//------------------------------------------------------------------------- - - -// Additional type constraints not mentioned above -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - landingpad_instruction_clause(Instr, _, Clause), - filter_clause(Clause), - Clause = [ Constant ], - constant_has_type(Constant, Type), - !array_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - landingpad_instruction_type(Instr, Type), - !instruction_returns_type(Instr, Type). - - -// 1st Constraint is omitted, since it is not really a constraint, -// rather than a definition of a landing pad (already encoded in the -// relevant section) - - -// 2nd Constraint: first non-phi instruction must be a landing pad -// instruction (i.e., its only landing pad instruction) -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - landingpad(BB), !_valid_landingpad(BB), - block_first_instruction(BB, Instr). - - -// 3rd Constraint: in case of multiple landing pad instructions in a -// basic block, the basic block will be marked invalid, since at least -// one of these landing pad instruction will not match its first -// non-phi. - - -// 4th Constraint: only landing pad blocks may contain landing pad -// instructions -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - landingpad_instruction(Instr), - instruction_in_block(Instr, BB), - !landingpad(BB). - - -// 5th Constraint: all ‘landingpad‘ instructions in a func must -// have the same personality func -schema_invalid_instruction(Instr1, __FILE__, __LINE__) :- - schema_sanity(), - landingpad_instruction(Instr1), - landingpad_instruction_pers_fn(Instr1, PersFunc), - instruction_in_func(Instr1, Func), - instruction_in_func(Instr2, Func), - landingpad_instruction(Instr2), - !landingpad_instruction_pers_fn(Instr2, PersFunc). - - -// 6th Constraint: the ‘landingpad‘ instruction must contain at least -// one clause or the cleanup flag -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - landingpad_instruction(Instr), - !landingpad_instruction_is_cleanup(Instr), - !landingpad_instruction_clause(Instr, 0, _). diff --git a/datalog/schema/load-instr.dl b/datalog/schema/load-instr.dl new file mode 100644 index 0000000..71863bb --- /dev/null +++ b/datalog/schema/load-instr.dl @@ -0,0 +1,74 @@ +// http://llvm.org/docs/LangRef.html#load-instr +// keywords: memory; instr + +.type LoadInstruction = Instruction +.decl load_instr(instr:LoadInstruction) + +instr(v) :- load_instr(v). + +.decl load_instr_alignment(instr:LoadInstruction, alignment:number) +.decl load_instr_ordering(instr:LoadInstruction, ordering:Ordering) + +// If the load is marked as volatile, then the optimizer is not allowed +// to modify the number or order of execution of this load with other +// volatile operations. + +.decl load_instr_is_volatile(instr:LoadInstruction) + + +// If the load is marked as atomic, it takes an extra ordering +// and optional singlethread argument. + +.decl load_instr_is_atomic(instr:LoadInstruction) + +load_instr_is_atomic(Instr) :- + load_instr_ordering(Instr, _). + + +// The argument to the load instr specifies the memory address +// from which to load. + +.decl load_instr_address(instr:LoadInstruction, pointer:Operand) + + +// Helper predicates + +.decl load_instr_address_ptr_type(instr:LoadInstruction, type:Type) + +load_instr_address_ptr_type(Instr, PtrType) :- + load_instr_address(Instr, PtrAddress), + operand_has_type(PtrAddress, PtrType). + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// (i) The pointer must point to a first class type. +// +// (ii) The release and acq_rel orderings are not valid on load instrs. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + load_instr(Instr), + !load_instr_address(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + load_instr(Instr), + load_instr_address_ptr_type(Instr, PtrType), + !pointer_type_to_firstclass(PtrType). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + load_instr(Instr), + load_instr_address_ptr_type(Instr, PtrType), + pointer_type_has_component(PtrType, CompType), + !instr_returns_type(Instr, CompType). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + load_instr(Instr), + load_instr_ordering(Instr, Ord), + ( release_ordering(Ord) + ; acq_rel_ordering(Ord) ). diff --git a/datalog/schema/load-instruction.dl b/datalog/schema/load-instruction.dl deleted file mode 100644 index ed507cb..0000000 --- a/datalog/schema/load-instruction.dl +++ /dev/null @@ -1,74 +0,0 @@ -// http://llvm.org/docs/LangRef.html#load-instruction -// keywords: memory; instruction - -.type LoadInstruction = Instruction -.decl load_instruction(instr:LoadInstruction) - -instruction(v) :- load_instruction(v). - -.decl load_instruction_alignment(instr:LoadInstruction, alignment:number) -.decl load_instruction_ordering(instr:LoadInstruction, ordering:Ordering) - -// If the load is marked as volatile, then the optimizer is not allowed -// to modify the number or order of execution of this load with other -// volatile operations. - -.decl load_instruction_is_volatile(instr:LoadInstruction) - - -// If the load is marked as atomic, it takes an extra ordering -// and optional singlethread argument. - -.decl load_instruction_is_atomic(instr:LoadInstruction) - -load_instruction_is_atomic(Instr) :- - load_instruction_ordering(Instr, _). - - -// The argument to the load instruction specifies the memory address -// from which to load. - -.decl load_instruction_address(instr:LoadInstruction, pointer:Operand) - - -// Helper predicates - -.decl load_instruction_address_ptr_type(instr:LoadInstruction, type:Type) - -load_instruction_address_ptr_type(Instr, PtrType) :- - load_instruction_address(Instr, PtrAddress), - operand_has_type(PtrAddress, PtrType). - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// (i) The pointer must point to a first class type. -// -// (ii) The release and acq_rel orderings are not valid on load instructions. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - load_instruction(Instr), - !load_instruction_address(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - load_instruction(Instr), - load_instruction_address_ptr_type(Instr, PtrType), - !pointer_type_to_firstclass(PtrType). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - load_instruction(Instr), - load_instruction_address_ptr_type(Instr, PtrType), - pointer_type_has_component(PtrType, CompType), - !instruction_returns_type(Instr, CompType). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - load_instruction(Instr), - load_instruction_ordering(Instr, Ord), - ( release_ordering(Ord) - ; acq_rel_ordering(Ord) ). diff --git a/datalog/schema/lshr-instr.dl b/datalog/schema/lshr-instr.dl new file mode 100644 index 0000000..91ef01f --- /dev/null +++ b/datalog/schema/lshr-instr.dl @@ -0,0 +1,53 @@ +// http://llvm.org/docs/LangRef.html#lshr-instr +// keywords: bitwise; binary; instr + +.type LShrInstruction = Instruction +.decl lshr_instr(instr:LShrInstruction) + +instr(v) :- + lshr_instr(v). + +.decl lshr_instr_first_operand(instr:LShrInstruction, op:Operand) +.decl lshr_instr_second_operand(instr:LShrInstruction, op:Operand) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// 1) The two arguments to the ‘lshr‘ instr must be: +// (i) integer or +// (ii) vector of integer values. +// +// 2) Both arguments must have identical types. +// +// 3) The resulting value is the same type as its operands. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + lshr_instr(Instr), + !lshr_instr_first_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + lshr_instr(Instr), + !lshr_instr_second_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + lshr_instr(Instr), + instr_returns_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + lshr_instr_first_operand(Instr, LeftOp), + !operand_has_type(LeftOp, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + lshr_instr_second_operand(Instr, RightOp), + !operand_has_type(RightOp, Type). diff --git a/datalog/schema/lshr-instruction.dl b/datalog/schema/lshr-instruction.dl deleted file mode 100644 index 142f88f..0000000 --- a/datalog/schema/lshr-instruction.dl +++ /dev/null @@ -1,53 +0,0 @@ -// http://llvm.org/docs/LangRef.html#lshr-instruction -// keywords: bitwise; binary; instruction - -.type LShrInstruction = Instruction -.decl lshr_instruction(instr:LShrInstruction) - -instruction(v) :- - lshr_instruction(v). - -.decl lshr_instruction_first_operand(instr:LShrInstruction, op:Operand) -.decl lshr_instruction_second_operand(instr:LShrInstruction, op:Operand) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// 1) The two arguments to the ‘lshr‘ instruction must be: -// (i) integer or -// (ii) vector of integer values. -// -// 2) Both arguments must have identical types. -// -// 3) The resulting value is the same type as its operands. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - lshr_instruction(Instr), - !lshr_instruction_first_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - lshr_instruction(Instr), - !lshr_instruction_second_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - lshr_instruction(Instr), - instruction_returns_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - lshr_instruction_first_operand(Instr, LeftOp), - !operand_has_type(LeftOp, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - lshr_instruction_second_operand(Instr, RightOp), - !operand_has_type(RightOp, Type). diff --git a/datalog/schema/mul-instr.dl b/datalog/schema/mul-instr.dl new file mode 100644 index 0000000..d8be4da --- /dev/null +++ b/datalog/schema/mul-instr.dl @@ -0,0 +1,52 @@ +// http://llvm.org/docs/LangRef.html#mul-instr +// keywords: arithmetic; binary; instr + +.type MulInstruction = Instruction +.decl mul_instr(instr:MulInstruction) + +instr(v) :- mul_instr(v). + +.decl mul_instr_first_operand(instr:MulInstruction, op:Operand) +.decl mul_instr_second_operand(instr:MulInstruction, op:Operand) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// 1) The two arguments to the ‘mul‘ instr must be: +// (i) integer or +// (ii) vector of integer values. +// +// 2) Both arguments must have identical types. +// +// 3) The resulting value is the same type as its operands. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + mul_instr(Instr), + !mul_instr_first_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + mul_instr(Instr), + !mul_instr_second_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + mul_instr(Instr), + instr_returns_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + mul_instr_first_operand(Instr, LeftOp), + !operand_has_type(LeftOp, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + mul_instr_second_operand(Instr, RightOp), + !operand_has_type(RightOp, Type). diff --git a/datalog/schema/mul-instruction.dl b/datalog/schema/mul-instruction.dl deleted file mode 100644 index 6005c7d..0000000 --- a/datalog/schema/mul-instruction.dl +++ /dev/null @@ -1,52 +0,0 @@ -// http://llvm.org/docs/LangRef.html#mul-instruction -// keywords: arithmetic; binary; instruction - -.type MulInstruction = Instruction -.decl mul_instruction(instr:MulInstruction) - -instruction(v) :- mul_instruction(v). - -.decl mul_instruction_first_operand(instr:MulInstruction, op:Operand) -.decl mul_instruction_second_operand(instr:MulInstruction, op:Operand) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// 1) The two arguments to the ‘mul‘ instruction must be: -// (i) integer or -// (ii) vector of integer values. -// -// 2) Both arguments must have identical types. -// -// 3) The resulting value is the same type as its operands. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - mul_instruction(Instr), - !mul_instruction_first_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - mul_instruction(Instr), - !mul_instruction_second_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - mul_instruction(Instr), - instruction_returns_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - mul_instruction_first_operand(Instr, LeftOp), - !operand_has_type(LeftOp, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - mul_instruction_second_operand(Instr, RightOp), - !operand_has_type(RightOp, Type). diff --git a/datalog/schema/operand.dl b/datalog/schema/operand.dl index c9b7fdc..61d3de4 100644 --- a/datalog/schema/operand.dl +++ b/datalog/schema/operand.dl @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // [Variables] // -// The first type of instruction operands are variables. In this +// The first type of instr operands are variables. In this // representation, variables correspond to LLVM virtual // registers. They are either source-level variables with valid names // or temporaries introduced by LLVM that hold intermediate expressions. @@ -37,7 +37,7 @@ variable_is_firstclass(Var) :- //------------------------------------------------------------------------------ // [Constants] // -// The second type of instruction operands are constants. Constants +// The second type of instr operands are constants. Constants // may be quite complex (see constant expressions). //------------------------------------------------------------------------------ diff --git a/datalog/schema/or-instr.dl b/datalog/schema/or-instr.dl new file mode 100644 index 0000000..bc96079 --- /dev/null +++ b/datalog/schema/or-instr.dl @@ -0,0 +1,53 @@ +// http://llvm.org/docs/LangRef.html#or-instr +// keywords: bitwise; binary; instr + +.type OrInstruction = Instruction +.decl or_instr(instr:OrInstruction) + +instr(v) :- + or_instr(v). + +.decl or_instr_first_operand(instr:OrInstruction, op:Operand) +.decl or_instr_second_operand(instr:OrInstruction, op:Operand) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// 1) The two arguments to the ‘or‘ instr must be: +// (i) integer or +// (ii) vector of integer values. +// +// 2) Both arguments must have identical types. +// +// 3) The resulting value is the same type as its operands. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + or_instr(Instr), + !or_instr_first_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + or_instr(Instr), + !or_instr_second_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + or_instr(Instr), + instr_returns_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + or_instr_first_operand(Instr, LeftOp), + !operand_has_type(LeftOp, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + or_instr_second_operand(Instr, RightOp), + !operand_has_type(RightOp, Type). diff --git a/datalog/schema/or-instruction.dl b/datalog/schema/or-instruction.dl deleted file mode 100644 index 7530944..0000000 --- a/datalog/schema/or-instruction.dl +++ /dev/null @@ -1,53 +0,0 @@ -// http://llvm.org/docs/LangRef.html#or-instruction -// keywords: bitwise; binary; instruction - -.type OrInstruction = Instruction -.decl or_instruction(instr:OrInstruction) - -instruction(v) :- - or_instruction(v). - -.decl or_instruction_first_operand(instr:OrInstruction, op:Operand) -.decl or_instruction_second_operand(instr:OrInstruction, op:Operand) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// 1) The two arguments to the ‘or‘ instruction must be: -// (i) integer or -// (ii) vector of integer values. -// -// 2) Both arguments must have identical types. -// -// 3) The resulting value is the same type as its operands. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - or_instruction(Instr), - !or_instruction_first_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - or_instruction(Instr), - !or_instruction_second_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - or_instruction(Instr), - instruction_returns_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - or_instruction_first_operand(Instr, LeftOp), - !operand_has_type(LeftOp, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - or_instruction_second_operand(Instr, RightOp), - !operand_has_type(RightOp, Type). diff --git a/datalog/schema/phi-instr.dl b/datalog/schema/phi-instr.dl new file mode 100644 index 0000000..7b5b4c0 --- /dev/null +++ b/datalog/schema/phi-instr.dl @@ -0,0 +1,69 @@ +// http://llvm.org/docs/LangRef.html#phi-instr +// keywords: index; instr + +.type PhiInstruction = Instruction +.decl phi_instr(instr:PhiInstruction) + +instr(v) :- phi_instr(v). + +.type PhiInstructionPair = [ + value : Operand, + label : Variable +] + +.decl phi_instr_type(instr:PhiInstruction, type:Type) +.decl phi_instr_npairs(instr:PhiInstruction, total:number) +.decl phi_instr_pair(instr:PhiInstruction, index:number, pair:PhiInstructionPair) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// The ‘phi‘ instr takes a list of pairs as arguments, +// with one pair for each predecessor basic block of the current block. +// (i) Only values of first class type may be used as the value arguments +// to the PHI node. +// (ii) Only labels may be used as the label arguments. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + phi_instr(Instr), + !phi_instr_npairs(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + phi_instr(Instr), + phi_instr_type(Instr, Type), + !instr_returns_type(Instr, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + phi_instr(Instr), + phi_instr_pair(Instr, _, Pair), + Pair = [Value, Label], + operand(Value), + !variable_is_label(Label). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + phi_instr(Instr), + phi_instr_pair(Instr, _, Pair), + Pair = [Value, Label], + variable(Label), + !operand_is_firstclass(Value). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + phi_instr_type(Instr, Type), + phi_instr_pair(Instr, _, Pair), + Pair = [Value, Label], + operand(Value), + variable(Label), + !operand_has_type(Value, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + phi_instr_npairs(Instr, Total), + phi_instr_pair(Instr, Index, _), + (Index < 0 ; Index >= Total). diff --git a/datalog/schema/phi-instruction.dl b/datalog/schema/phi-instruction.dl deleted file mode 100644 index 4258eac..0000000 --- a/datalog/schema/phi-instruction.dl +++ /dev/null @@ -1,69 +0,0 @@ -// http://llvm.org/docs/LangRef.html#phi-instruction -// keywords: index; instruction - -.type PhiInstruction = Instruction -.decl phi_instruction(instr:PhiInstruction) - -instruction(v) :- phi_instruction(v). - -.type PhiInstructionPair = [ - value : Operand, - label : Variable -] - -.decl phi_instruction_type(instr:PhiInstruction, type:Type) -.decl phi_instruction_npairs(instr:PhiInstruction, total:number) -.decl phi_instruction_pair(instr:PhiInstruction, index:number, pair:PhiInstructionPair) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// The ‘phi‘ instruction takes a list of pairs as arguments, -// with one pair for each predecessor basic block of the current block. -// (i) Only values of first class type may be used as the value arguments -// to the PHI node. -// (ii) Only labels may be used as the label arguments. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - phi_instruction(Instr), - !phi_instruction_npairs(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - phi_instruction(Instr), - phi_instruction_type(Instr, Type), - !instruction_returns_type(Instr, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - phi_instruction(Instr), - phi_instruction_pair(Instr, _, Pair), - Pair = [Value, Label], - operand(Value), - !variable_is_label(Label). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - phi_instruction(Instr), - phi_instruction_pair(Instr, _, Pair), - Pair = [Value, Label], - variable(Label), - !operand_is_firstclass(Value). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - phi_instruction_type(Instr, Type), - phi_instruction_pair(Instr, _, Pair), - Pair = [Value, Label], - operand(Value), - variable(Label), - !operand_has_type(Value, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - phi_instruction_npairs(Instr, Total), - phi_instruction_pair(Instr, Index, _), - (Index < 0 ; Index >= Total). diff --git a/datalog/schema/ptrtoint-instr.dl b/datalog/schema/ptrtoint-instr.dl new file mode 100644 index 0000000..cf29d87 --- /dev/null +++ b/datalog/schema/ptrtoint-instr.dl @@ -0,0 +1,70 @@ +// http://llvm.org/docs/LangRef.html#ptrtoint-to-instr +// keywords: conversion; unary; instr + +.type PtrToIntInstruction = Instruction +.decl ptrtoint_instr(instr:PtrToIntInstruction) + +instr(v) :- ptrtoint_instr(v). + +.decl ptrtoint_instr_from_operand(instr:PtrToIntInstruction, val:Operand) +.decl ptrtoint_instr_to_type(instr:PtrToIntInstruction, type:Type) + + +// Helper predicate + +.decl ptrtoint_instr_from_type(instr:PtrToIntInstruction, type:Type) + +ptrtoint_instr_from_type(Instr, Type) :- + ptrtoint_instr_from_operand(Instr, Operand), + operand_has_type(Operand, Type). + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// The ‘ptrtoint‘ instr takes: +// (i) a value to cast, which must be pointer or vector of pointer values, +// (ii) and a type to cast it to, which must be an integer or a vector of +// integers type. +// +// If the value to be casted is a vector pointer type: +// (i) the type must be a vector integer type, +// (ii) with the same number of elements. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + ptrtoint_instr(Instr), + !ptrtoint_instr_from_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + ptrtoint_instr(Instr), + !ptrtoint_instr_to_type(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + ptrtoint_instr(Instr), + ptrtoint_instr_to_type(Instr, Type), + !instr_returns_type(Instr, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + ptrtoint_instr(Instr), + ptrtoint_instr_from_type(Instr, Type), + !pointer_type(Type), + !pointer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + ptrtoint_instr(Instr), + ptrtoint_instr_to_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + ptrtoint_instr(Instr), + ptrtoint_instr_from_type(Instr, FromType), + ptrtoint_instr_to_type(Instr, ToType), + !vector_compatible_types(FromType, ToType). diff --git a/datalog/schema/ptrtoint-instruction.dl b/datalog/schema/ptrtoint-instruction.dl deleted file mode 100644 index b88d1bf..0000000 --- a/datalog/schema/ptrtoint-instruction.dl +++ /dev/null @@ -1,70 +0,0 @@ -// http://llvm.org/docs/LangRef.html#ptrtoint-to-instruction -// keywords: conversion; unary; instruction - -.type PtrToIntInstruction = Instruction -.decl ptrtoint_instruction(instr:PtrToIntInstruction) - -instruction(v) :- ptrtoint_instruction(v). - -.decl ptrtoint_instruction_from_operand(instr:PtrToIntInstruction, val:Operand) -.decl ptrtoint_instruction_to_type(instr:PtrToIntInstruction, type:Type) - - -// Helper predicate - -.decl ptrtoint_instruction_from_type(instr:PtrToIntInstruction, type:Type) - -ptrtoint_instruction_from_type(Instr, Type) :- - ptrtoint_instruction_from_operand(Instr, Operand), - operand_has_type(Operand, Type). - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// The ‘ptrtoint‘ instruction takes: -// (i) a value to cast, which must be pointer or vector of pointer values, -// (ii) and a type to cast it to, which must be an integer or a vector of -// integers type. -// -// If the value to be casted is a vector pointer type: -// (i) the type must be a vector integer type, -// (ii) with the same number of elements. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - ptrtoint_instruction(Instr), - !ptrtoint_instruction_from_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - ptrtoint_instruction(Instr), - !ptrtoint_instruction_to_type(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - ptrtoint_instruction(Instr), - ptrtoint_instruction_to_type(Instr, Type), - !instruction_returns_type(Instr, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - ptrtoint_instruction(Instr), - ptrtoint_instruction_from_type(Instr, Type), - !pointer_type(Type), - !pointer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - ptrtoint_instruction(Instr), - ptrtoint_instruction_to_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - ptrtoint_instruction(Instr), - ptrtoint_instruction_from_type(Instr, FromType), - ptrtoint_instruction_to_type(Instr, ToType), - !vector_compatible_types(FromType, ToType). diff --git a/datalog/schema/resume-instr.dl b/datalog/schema/resume-instr.dl new file mode 100644 index 0000000..4fc0577 --- /dev/null +++ b/datalog/schema/resume-instr.dl @@ -0,0 +1,34 @@ +// http://llvm.org/docs/LangRef.html#resume-instr +// keywords: terminator; instr + +.type ResumeInstruction = Instruction +.decl resume_instr(instr:ResumeInstruction) + +instr(v) :- resume_instr(v). +terminator_instr(v) :- resume_instr(v). + +.decl resume_instr_operand(instr:ResumeInstruction, op:Operand) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// 1) The ‘resume‘ instr requires one argument, which +// must have the same type as the result of any ‘landingpad‘ +// instr in the same func. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + resume_instr(Instr), + !resume_instr_operand(Instr, _). + +schema_invalid_instr(ResumeInstr, __FILE__, __LINE__) :- + schema_sanity(), + resume_instr(ResumeInstr), + resume_instr_operand(ResumeInstr, Operand), + instr_func(ResumeInstr, Func), + instr_func(LPadInstr, Func), + landingpad_instr(LPadInstr), + instr_returns_type(LPadInstr, Type), + !operand_has_type(Operand, Type). diff --git a/datalog/schema/resume-instruction.dl b/datalog/schema/resume-instruction.dl deleted file mode 100644 index 3678afd..0000000 --- a/datalog/schema/resume-instruction.dl +++ /dev/null @@ -1,34 +0,0 @@ -// http://llvm.org/docs/LangRef.html#resume-instruction -// keywords: terminator; instruction - -.type ResumeInstruction = Instruction -.decl resume_instruction(instr:ResumeInstruction) - -instruction(v) :- resume_instruction(v). -terminator_instruction(v) :- resume_instruction(v). - -.decl resume_instruction_operand(instr:ResumeInstruction, op:Operand) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// 1) The ‘resume‘ instruction requires one argument, which -// must have the same type as the result of any ‘landingpad‘ -// instruction in the same func. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - resume_instruction(Instr), - !resume_instruction_operand(Instr, _). - -schema_invalid_instruction(ResumeInstr, __FILE__, __LINE__) :- - schema_sanity(), - resume_instruction(ResumeInstr), - resume_instruction_operand(ResumeInstr, Operand), - instruction_in_func(ResumeInstr, Func), - instruction_in_func(LPadInstr, Func), - landingpad_instruction(LPadInstr), - instruction_returns_type(LPadInstr, Type), - !operand_has_type(Operand, Type). diff --git a/datalog/schema/ret-instruction.dl b/datalog/schema/ret-instr.dl similarity index 59% rename from datalog/schema/ret-instruction.dl rename to datalog/schema/ret-instr.dl index 73827e4..f722044 100644 --- a/datalog/schema/ret-instruction.dl +++ b/datalog/schema/ret-instr.dl @@ -1,22 +1,22 @@ -// http://llvm.org/docs/LangRef.html#ret-instruction -// keywords: terminator; instruction +// http://llvm.org/docs/LangRef.html#ret-instr +// keywords: terminator; instr .type RetInstruction = Instruction -.decl ret_instruction(instr:RetInstruction) +.decl ret_instr(instr:RetInstruction) -instruction(v) :- ret_instruction(v). -terminator_instruction(v) :- ret_instruction(v). +instr(v) :- ret_instr(v). +terminator_instr(v) :- ret_instr(v). -// The ‘ret‘ instruction optionally accepts a single +// The ‘ret‘ instr optionally accepts a single // argument, the return value. -.decl ret_instruction_value(instr:RetInstruction, val:Operand) -.decl void_ret_instruction(instr:RetInstruction) +.decl ret_instr_value(instr:RetInstruction, val:Operand) +.decl void_ret_instr(instr:RetInstruction) -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - void_ret_instruction(Instr), - ret_instruction_value(Instr, _). + void_ret_instr(Instr), + ret_instr_value(Instr, _). //------------------------------------------------------------------------------ @@ -24,12 +24,12 @@ schema_invalid_instruction(Instr, __FILE__, __LINE__) :- // // A func is not well formed if: // (i) it it has a non-void return type and contains a ‘ret‘ -// instruction with no return value or +// instr with no return value or // // (ii) a return value with a type that does not match its type, or // // (iii) if it has a void return type and contains a ‘ret‘ -// instruction with a return value. +// instr with a return value. //------------------------------------------------------------------------------ .decl func_is_wellformed(func:Function) @@ -40,24 +40,24 @@ func_is_wellformed(Func):- !func_is_illformed(Func). func_is_illformed(Func) :- - void_ret_instruction(Instr), - instruction_in_func(Instr, Func), + void_ret_instr(Instr), + instr_func(Instr, Func), func_ty(Func, FuncType), func_type_return(FuncType, RetType), !void_type(RetType). func_is_illformed(Func) :- - ret_instruction_value(Instr, Value), - instruction_in_func(Instr, Func), + ret_instr_value(Instr, Value), + instr_func(Instr, Func), func_ty(Func, FuncType), func_type_return(FuncType, RetType), !void_type(RetType), !operand_has_type(Value, RetType). func_is_illformed(Func) :- - ret_instruction(Instr), - !void_ret_instruction(Instr), - instruction_in_func(Instr, Func), + ret_instr(Instr), + !void_ret_instr(Instr), + instr_func(Instr, Func), func_ty(Func, FuncType), func_type_return(FuncType, RetType), void_type(RetType). @@ -69,7 +69,7 @@ func_is_illformed(Func) :- // (i) The type of the return value must be a ‘first class‘ type. //------------------------------------------------------------------------------ -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - ret_instruction_value(Instr, Value), + ret_instr_value(Instr, Value), !operand_is_firstclass(Value). diff --git a/datalog/schema/schema.project b/datalog/schema/schema.project index 8a0d424..c4281c3 100644 --- a/datalog/schema/schema.project +++ b/datalog/schema/schema.project @@ -9,63 +9,63 @@ #include "func.dl" #include "constants.dl" -#include "instruction.dl" +#include "instr.dl" #include "basic-block.dl" -#include "add-instruction.dl" -#include "sub-instruction.dl" -#include "mul-instruction.dl" -#include "sdiv-instruction.dl" -#include "srem-instruction.dl" -#include "udiv-instruction.dl" -#include "urem-instruction.dl" -#include "fadd-instruction.dl" -#include "fsub-instruction.dl" -#include "fmul-instruction.dl" -#include "fdiv-instruction.dl" -#include "frem-instruction.dl" -#include "and-instruction.dl" -#include "or-instruction.dl" -#include "xor-instruction.dl" -#include "ashr-instruction.dl" -#include "lshr-instruction.dl" -#include "shl-instruction.dl" -#include "icmp-instruction.dl" -#include "fcmp-instruction.dl" -#include "bitcast-instruction.dl" -#include "inttoptr-instruction.dl" -#include "ptrtoint-instruction.dl" -#include "fpext-instruction.dl" -#include "sext-instruction.dl" -#include "zext-instruction.dl" -#include "fptosi-instruction.dl" -#include "fptoui-instruction.dl" -#include "sitofp-instruction.dl" -#include "uitofp-instruction.dl" -#include "trunc-instruction.dl" -#include "fptrunc-instruction.dl" -#include "br-instruction.dl" -#include "indirectbr-instruction.dl" -#include "phi-instruction.dl" -#include "switch-instruction.dl" -#include "select-instruction.dl" -#include "alloca-instruction.dl" -#include "load-instruction.dl" -#include "store-instruction.dl" -#include "atomicrmw-instruction.dl" -#include "cmpxchg-instruction.dl" -#include "ret-instruction.dl" -#include "call-instruction.dl" -#include "invoke-instruction.dl" -#include "fence-instruction.dl" -#include "landingpad-instruction.dl" -#include "resume-instruction.dl" -#include "extractelement-instruction.dl" -#include "insertelement-instruction.dl" -#include "shufflevector-instruction.dl" -#include "getelementptr-instruction.dl" -#include "extractvalue-instruction.dl" -#include "insertvalue-instruction.dl" -#include "unreachable-instruction.dl" -#include "va-arg-instruction.dl" +#include "add-instr.dl" +#include "sub-instr.dl" +#include "mul-instr.dl" +#include "sdiv-instr.dl" +#include "srem-instr.dl" +#include "udiv-instr.dl" +#include "urem-instr.dl" +#include "fadd-instr.dl" +#include "fsub-instr.dl" +#include "fmul-instr.dl" +#include "fdiv-instr.dl" +#include "frem-instr.dl" +#include "and-instr.dl" +#include "or-instr.dl" +#include "xor-instr.dl" +#include "ashr-instr.dl" +#include "lshr-instr.dl" +#include "shl-instr.dl" +#include "icmp-instr.dl" +#include "fcmp-instr.dl" +#include "bitcast-instr.dl" +#include "inttoptr-instr.dl" +#include "ptrtoint-instr.dl" +#include "fpext-instr.dl" +#include "sext-instr.dl" +#include "zext-instr.dl" +#include "fptosi-instr.dl" +#include "fptoui-instr.dl" +#include "sitofp-instr.dl" +#include "uitofp-instr.dl" +#include "trunc-instr.dl" +#include "fptrunc-instr.dl" +#include "br-instr.dl" +#include "indirectbr-instr.dl" +#include "phi-instr.dl" +#include "switch-instr.dl" +#include "select-instr.dl" +#include "alloca-instr.dl" +#include "load-instr.dl" +#include "store-instr.dl" +#include "atomicrmw-instr.dl" +#include "cmpxchg-instr.dl" +#include "ret-instr.dl" +#include "call-instr.dl" +#include "invoke-instr.dl" +#include "fence-instr.dl" +#include "landingpad-instr.dl" +#include "resume-instr.dl" +#include "extractelement-instr.dl" +#include "insertelement-instr.dl" +#include "shufflevector-instr.dl" +#include "getelementptr-instr.dl" +#include "extractvalue-instr.dl" +#include "insertvalue-instr.dl" +#include "unreachable-instr.dl" +#include "va-arg-instr.dl" #include "activate-sanity.dl" \ No newline at end of file diff --git a/datalog/schema/sdiv-instr.dl b/datalog/schema/sdiv-instr.dl new file mode 100644 index 0000000..c3de8b7 --- /dev/null +++ b/datalog/schema/sdiv-instr.dl @@ -0,0 +1,52 @@ +// http://llvm.org/docs/LangRef.html#sdiv-instr +// keywords: arithmetic; binary; instr + +.type SDivInstruction = Instruction +.decl sdiv_instr(instr:SDivInstruction) + +instr(v) :- sdiv_instr(v). + +.decl sdiv_instr_first_operand(instr:SDivInstruction, op:Operand) +.decl sdiv_instr_second_operand(instr:SDivInstruction, op:Operand) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// 1) The two arguments to the ‘sdiv‘ instr must be: +// (i) integer or +// (ii) vector of integer values. +// +// 2) Both arguments must have identical types. +// +// 3) The resulting value is the same type as its operands. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + sdiv_instr(Instr), + !sdiv_instr_first_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + sdiv_instr(Instr), + !sdiv_instr_second_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + sdiv_instr(Instr), + instr_returns_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + sdiv_instr_first_operand(Instr, LeftOp), + !operand_has_type(LeftOp, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + sdiv_instr_second_operand(Instr, RightOp), + !operand_has_type(RightOp, Type). diff --git a/datalog/schema/sdiv-instruction.dl b/datalog/schema/sdiv-instruction.dl deleted file mode 100644 index 89196d3..0000000 --- a/datalog/schema/sdiv-instruction.dl +++ /dev/null @@ -1,52 +0,0 @@ -// http://llvm.org/docs/LangRef.html#sdiv-instruction -// keywords: arithmetic; binary; instruction - -.type SDivInstruction = Instruction -.decl sdiv_instruction(instr:SDivInstruction) - -instruction(v) :- sdiv_instruction(v). - -.decl sdiv_instruction_first_operand(instr:SDivInstruction, op:Operand) -.decl sdiv_instruction_second_operand(instr:SDivInstruction, op:Operand) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// 1) The two arguments to the ‘sdiv‘ instruction must be: -// (i) integer or -// (ii) vector of integer values. -// -// 2) Both arguments must have identical types. -// -// 3) The resulting value is the same type as its operands. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - sdiv_instruction(Instr), - !sdiv_instruction_first_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - sdiv_instruction(Instr), - !sdiv_instruction_second_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - sdiv_instruction(Instr), - instruction_returns_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - sdiv_instruction_first_operand(Instr, LeftOp), - !operand_has_type(LeftOp, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - sdiv_instruction_second_operand(Instr, RightOp), - !operand_has_type(RightOp, Type). diff --git a/datalog/schema/select-instr.dl b/datalog/schema/select-instr.dl new file mode 100644 index 0000000..0a2d876 --- /dev/null +++ b/datalog/schema/select-instr.dl @@ -0,0 +1,84 @@ +// http://llvm.org/docs/LangRef.html#select-instr +// keywords: instr + +.type SelectInstruction = Instruction +.decl select_instr(instr:SelectInstruction) + +instr(v) :- select_instr(v). + + +// The ‘select‘ instr is used to choose one value +// based on a condition, without branching. + +.decl select_instr_condition(instr:SelectInstruction, condition:Operand) +.decl select_instr_first_operand(instr:SelectInstruction, op:Operand) +.decl select_instr_second_operand(instr:SelectInstruction, op:Operand) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// The ‘select‘ instr requires: +// (i) an ‘i1’ value or a vector of ‘i1’ values +// indicating the condition, and +// (ii) two values of the same first class type. +// +// If the condition is a vector of i1, then: +// (i) the value arguments must be vectors of the same size, and +// (ii) the selection is done element by element. +// +// If the condition is a scalar, the value arguments can still be +// vectors, in which case the entire vectors are selected, instead +// of individual elements. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + select_instr(Instr), + !select_instr_condition(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + select_instr(Instr), + !select_instr_first_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + select_instr(Instr), + !select_instr_second_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + select_instr_condition(Instr, Cond), + operand_has_type(Cond, CondType), + !boolean_type(CondType), + !boolean_vector_type(CondType). + +// The two operands must be of the same first-class type. +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + select_instr(Instr), + instr_returns_type(Instr, Type), + !type_is_firstclass(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + select_instr_first_operand(Instr, LeftOp), + instr_returns_type(Instr, Type), + !operand_has_type(LeftOp, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + select_instr_second_operand(Instr, RightOp), + instr_returns_type(Instr, Type), + !operand_has_type(RightOp, Type). + +// If the condition is of type vector, then all operands +// must have the same size. +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + select_instr(Instr), + select_instr_condition(Instr, Cond), + instr_returns_type(Instr, Type), + operand_has_type(Cond, CondType), + !vector_compatible_types(CondType, Type). diff --git a/datalog/schema/select-instruction.dl b/datalog/schema/select-instruction.dl deleted file mode 100644 index 2e0fca6..0000000 --- a/datalog/schema/select-instruction.dl +++ /dev/null @@ -1,84 +0,0 @@ -// http://llvm.org/docs/LangRef.html#select-instruction -// keywords: instruction - -.type SelectInstruction = Instruction -.decl select_instruction(instr:SelectInstruction) - -instruction(v) :- select_instruction(v). - - -// The ‘select‘ instruction is used to choose one value -// based on a condition, without branching. - -.decl select_instruction_condition(instr:SelectInstruction, condition:Operand) -.decl select_instruction_first_operand(instr:SelectInstruction, op:Operand) -.decl select_instruction_second_operand(instr:SelectInstruction, op:Operand) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// The ‘select‘ instruction requires: -// (i) an ‘i1’ value or a vector of ‘i1’ values -// indicating the condition, and -// (ii) two values of the same first class type. -// -// If the condition is a vector of i1, then: -// (i) the value arguments must be vectors of the same size, and -// (ii) the selection is done element by element. -// -// If the condition is a scalar, the value arguments can still be -// vectors, in which case the entire vectors are selected, instead -// of individual elements. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - select_instruction(Instr), - !select_instruction_condition(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - select_instruction(Instr), - !select_instruction_first_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - select_instruction(Instr), - !select_instruction_second_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - select_instruction_condition(Instr, Cond), - operand_has_type(Cond, CondType), - !boolean_type(CondType), - !boolean_vector_type(CondType). - -// The two operands must be of the same first-class type. -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - select_instruction(Instr), - instruction_returns_type(Instr, Type), - !type_is_firstclass(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - select_instruction_first_operand(Instr, LeftOp), - instruction_returns_type(Instr, Type), - !operand_has_type(LeftOp, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - select_instruction_second_operand(Instr, RightOp), - instruction_returns_type(Instr, Type), - !operand_has_type(RightOp, Type). - -// If the condition is of type vector, then all operands -// must have the same size. -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - select_instruction(Instr), - select_instruction_condition(Instr, Cond), - instruction_returns_type(Instr, Type), - operand_has_type(Cond, CondType), - !vector_compatible_types(CondType, Type). diff --git a/datalog/schema/sext-instr.dl b/datalog/schema/sext-instr.dl new file mode 100644 index 0000000..921c264 --- /dev/null +++ b/datalog/schema/sext-instr.dl @@ -0,0 +1,71 @@ +// http://llvm.org/docs/LangRef.html#sext-to-instr +// keywords: conversion; unary; instr + +.type SExtInstruction = Instruction +.decl sext_instr(instr:SExtInstruction) + +instr(v) :- sext_instr(v). + +.decl sext_instr_from_operand(instr:SExtInstruction, val:Operand) +.decl sext_instr_to_type(instr:SExtInstruction, type:Type) + + +// Helper predicate + +.decl sext_instr_from_type(instr:SExtInstruction, type:Type) + +sext_instr_from_type(Instr, Type) :- + sext_instr_from_operand(Instr, Operand), + operand_has_type(Operand, Type). + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// 1) The ‘sext‘ instr takes: +// (i) a value to cast, +// (ii) and a type to cast it to. +// +// 2) Both source and destination types must be: +// (i) integers or +// (ii) vectors of the same number of integers. +// +// 3) The source type must be smaller than the destination type. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + sext_instr(Instr), + !sext_instr_from_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + sext_instr(Instr), + !sext_instr_to_type(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + sext_instr(Instr), + sext_instr_to_type(Instr, Type), + !instr_returns_type(Instr, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + sext_instr(Instr), + sext_instr_from_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + sext_instr(Instr), + sext_instr_to_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + sext_instr(Instr), + sext_instr_from_type(Instr, FromType), + sext_instr_to_type(Instr, ToType), + !vector_compatible_types(FromType, ToType). diff --git a/datalog/schema/sext-instruction.dl b/datalog/schema/sext-instruction.dl deleted file mode 100644 index 13df31d..0000000 --- a/datalog/schema/sext-instruction.dl +++ /dev/null @@ -1,71 +0,0 @@ -// http://llvm.org/docs/LangRef.html#sext-to-instruction -// keywords: conversion; unary; instruction - -.type SExtInstruction = Instruction -.decl sext_instruction(instr:SExtInstruction) - -instruction(v) :- sext_instruction(v). - -.decl sext_instruction_from_operand(instr:SExtInstruction, val:Operand) -.decl sext_instruction_to_type(instr:SExtInstruction, type:Type) - - -// Helper predicate - -.decl sext_instruction_from_type(instr:SExtInstruction, type:Type) - -sext_instruction_from_type(Instr, Type) :- - sext_instruction_from_operand(Instr, Operand), - operand_has_type(Operand, Type). - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// 1) The ‘sext‘ instruction takes: -// (i) a value to cast, -// (ii) and a type to cast it to. -// -// 2) Both source and destination types must be: -// (i) integers or -// (ii) vectors of the same number of integers. -// -// 3) The source type must be smaller than the destination type. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - sext_instruction(Instr), - !sext_instruction_from_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - sext_instruction(Instr), - !sext_instruction_to_type(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - sext_instruction(Instr), - sext_instruction_to_type(Instr, Type), - !instruction_returns_type(Instr, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - sext_instruction(Instr), - sext_instruction_from_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - sext_instruction(Instr), - sext_instruction_to_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - sext_instruction(Instr), - sext_instruction_from_type(Instr, FromType), - sext_instruction_to_type(Instr, ToType), - !vector_compatible_types(FromType, ToType). diff --git a/datalog/schema/shl-instr.dl b/datalog/schema/shl-instr.dl new file mode 100644 index 0000000..4ef73b1 --- /dev/null +++ b/datalog/schema/shl-instr.dl @@ -0,0 +1,53 @@ +// http://llvm.org/docs/LangRef.html#shl-instr +// keywords: bitwise; binary; instr + +.type ShlInstruction = Instruction +.decl shl_instr(instr:ShlInstruction) + +instr(v) :- + shl_instr(v). + +.decl shl_instr_first_operand(instr:ShlInstruction, op:Operand) +.decl shl_instr_second_operand(instr:ShlInstruction, op:Operand) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// 1) The two arguments to the ‘shl‘ instr must be: +// (i) integer or +// (ii) vector of integer values. +// +// 2) Both arguments must have identical types. +// +// 3) The resulting value is the same type as its operands. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + shl_instr(Instr), + !shl_instr_first_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + shl_instr(Instr), + !shl_instr_second_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + shl_instr(Instr), + instr_returns_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + shl_instr_first_operand(Instr, LeftOp), + !operand_has_type(LeftOp, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + shl_instr_second_operand(Instr, RightOp), + !operand_has_type(RightOp, Type). diff --git a/datalog/schema/shl-instruction.dl b/datalog/schema/shl-instruction.dl deleted file mode 100644 index b934cac..0000000 --- a/datalog/schema/shl-instruction.dl +++ /dev/null @@ -1,53 +0,0 @@ -// http://llvm.org/docs/LangRef.html#shl-instruction -// keywords: bitwise; binary; instruction - -.type ShlInstruction = Instruction -.decl shl_instruction(instr:ShlInstruction) - -instruction(v) :- - shl_instruction(v). - -.decl shl_instruction_first_operand(instr:ShlInstruction, op:Operand) -.decl shl_instruction_second_operand(instr:ShlInstruction, op:Operand) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// 1) The two arguments to the ‘shl‘ instruction must be: -// (i) integer or -// (ii) vector of integer values. -// -// 2) Both arguments must have identical types. -// -// 3) The resulting value is the same type as its operands. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - shl_instruction(Instr), - !shl_instruction_first_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - shl_instruction(Instr), - !shl_instruction_second_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - shl_instruction(Instr), - instruction_returns_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - shl_instruction_first_operand(Instr, LeftOp), - !operand_has_type(LeftOp, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - shl_instruction_second_operand(Instr, RightOp), - !operand_has_type(RightOp, Type). diff --git a/datalog/schema/shufflevector-instr.dl b/datalog/schema/shufflevector-instr.dl new file mode 100644 index 0000000..6d6256b --- /dev/null +++ b/datalog/schema/shufflevector-instr.dl @@ -0,0 +1,112 @@ +// http://llvm.org/docs/LangRef.html#shufflevector-instr +// keywords: vector; instr + +.type ShuffleVectorInstruction = Instruction +.decl shufflevector_instr(instr:ShuffleVectorInstruction) + +instr(v) :- shufflevector_instr(v). + +.decl shufflevector_instr_first_vector(instr:ShuffleVectorInstruction, vector:Operand) +.decl shufflevector_instr_second_vector(instr:ShuffleVectorInstruction, vector:Operand) +.decl shufflevector_instr_mask(instr:ShuffleVectorInstruction, mask:Constant) + + +// Helper Predicates + +.decl shufflevector_instrput_type(instr:ShuffleVectorInstruction, type:Type) +.decl shufflevector_instr_element_type(instr:ShuffleVectorInstruction, type:Type) +.decl shufflevector_instr_mask_type(instr:ShuffleVectorInstruction, type:Type) + +// The type of the two input vectors. +shufflevector_instrput_type(Instr, Type) :- + shufflevector_instr_first_vector(Instr, Vector), + operand_has_type(Vector, Type). + +// The element type of the two input vectors +shufflevector_instr_element_type(Instr, ElementType) :- + shufflevector_instrput_type(Instr, VectorType), + vector_type_has_component(VectorType, ElementType). + +// The type of the shuffle mask. +shufflevector_instr_mask_type(Instr, MaskType) :- + shufflevector_instr_mask(Instr, Mask), + constant_has_type(Mask, MaskType). + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// 1. The 'shufflevector' instr takes three arguments: +// (i) two vectors of the same type, and +// (ii) a shuffle mask argument. +// +// 2. The shuffle mask is required to be: +// (i) a constant vector +// (ii) with i32-integer component type. +// +// 3. The result is a vector +// (i) whose length is the same as the shuffle mask and +// (ii) whose element type is the same as the element type of the first +// two operands. +//------------------------------------------------------------------------------ + + +// 1a. Required arguments + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + shufflevector_instr(Instr), + !shufflevector_instr_first_vector(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + shufflevector_instr(Instr), + !shufflevector_instr_second_vector(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + shufflevector_instr(Instr), + !shufflevector_instr_mask(Instr, _). + + +// 1b. Constraints on the two input vectors + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + shufflevector_instr(Instr), + shufflevector_instrput_type(Instr, InputType), + shufflevector_instr_first_vector(Instr, FirstVector), + shufflevector_instr_second_vector(Instr, SecondVector), + operand_has_type(FirstVector, FirstVectorType), + operand_has_type(SecondVector, SecondVectorType), + ( FirstVectorType != InputType + ; SecondVectorType != InputType). + + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + shufflevector_instrput_type(Instr, InputType), + !vector_type(InputType). + + +// 2. Constraints on the suffle mask + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + shufflevector_instr_mask_type(Instr, MaskType), + !int32_vector_type(MaskType). + + +// 3. Constraints on the result + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + shufflevector_instr_mask_type(Instr, MaskType), + instr_returns_type(Instr, OutputType), + !vector_compatible_types(OutputType, MaskType). // constraint 3.i + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + shufflevector_instr_element_type(Instr, ElementType), + instr_returns_type(Instr, OutputType), + !vector_type_has_component(OutputType, ElementType). // constraint 3.ii diff --git a/datalog/schema/shufflevector-instruction.dl b/datalog/schema/shufflevector-instruction.dl deleted file mode 100644 index c6e4f9b..0000000 --- a/datalog/schema/shufflevector-instruction.dl +++ /dev/null @@ -1,112 +0,0 @@ -// http://llvm.org/docs/LangRef.html#shufflevector-instruction -// keywords: vector; instruction - -.type ShuffleVectorInstruction = Instruction -.decl shufflevector_instruction(instr:ShuffleVectorInstruction) - -instruction(v) :- shufflevector_instruction(v). - -.decl shufflevector_instruction_first_vector(instr:ShuffleVectorInstruction, vector:Operand) -.decl shufflevector_instruction_second_vector(instr:ShuffleVectorInstruction, vector:Operand) -.decl shufflevector_instruction_mask(instr:ShuffleVectorInstruction, mask:Constant) - - -// Helper Predicates - -.decl shufflevector_instruction_input_type(instr:ShuffleVectorInstruction, type:Type) -.decl shufflevector_instruction_element_type(instr:ShuffleVectorInstruction, type:Type) -.decl shufflevector_instruction_mask_type(instr:ShuffleVectorInstruction, type:Type) - -// The type of the two input vectors. -shufflevector_instruction_input_type(Instr, Type) :- - shufflevector_instruction_first_vector(Instr, Vector), - operand_has_type(Vector, Type). - -// The element type of the two input vectors -shufflevector_instruction_element_type(Instr, ElementType) :- - shufflevector_instruction_input_type(Instr, VectorType), - vector_type_has_component(VectorType, ElementType). - -// The type of the shuffle mask. -shufflevector_instruction_mask_type(Instr, MaskType) :- - shufflevector_instruction_mask(Instr, Mask), - constant_has_type(Mask, MaskType). - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// 1. The 'shufflevector' instruction takes three arguments: -// (i) two vectors of the same type, and -// (ii) a shuffle mask argument. -// -// 2. The shuffle mask is required to be: -// (i) a constant vector -// (ii) with i32-integer component type. -// -// 3. The result is a vector -// (i) whose length is the same as the shuffle mask and -// (ii) whose element type is the same as the element type of the first -// two operands. -//------------------------------------------------------------------------------ - - -// 1a. Required arguments - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - shufflevector_instruction(Instr), - !shufflevector_instruction_first_vector(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - shufflevector_instruction(Instr), - !shufflevector_instruction_second_vector(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - shufflevector_instruction(Instr), - !shufflevector_instruction_mask(Instr, _). - - -// 1b. Constraints on the two input vectors - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - shufflevector_instruction(Instr), - shufflevector_instruction_input_type(Instr, InputType), - shufflevector_instruction_first_vector(Instr, FirstVector), - shufflevector_instruction_second_vector(Instr, SecondVector), - operand_has_type(FirstVector, FirstVectorType), - operand_has_type(SecondVector, SecondVectorType), - ( FirstVectorType != InputType - ; SecondVectorType != InputType). - - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - shufflevector_instruction_input_type(Instr, InputType), - !vector_type(InputType). - - -// 2. Constraints on the suffle mask - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - shufflevector_instruction_mask_type(Instr, MaskType), - !int32_vector_type(MaskType). - - -// 3. Constraints on the result - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - shufflevector_instruction_mask_type(Instr, MaskType), - instruction_returns_type(Instr, OutputType), - !vector_compatible_types(OutputType, MaskType). // constraint 3.i - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - shufflevector_instruction_element_type(Instr, ElementType), - instruction_returns_type(Instr, OutputType), - !vector_type_has_component(OutputType, ElementType). // constraint 3.ii diff --git a/datalog/schema/sitofp-instr.dl b/datalog/schema/sitofp-instr.dl new file mode 100644 index 0000000..4981c5e --- /dev/null +++ b/datalog/schema/sitofp-instr.dl @@ -0,0 +1,69 @@ +// http://llvm.org/docs/LangRef.html#sitofp-to-instr +// keywords: conversion; unary; instr + +.type SIToFPInstruction = Instruction +.decl sitofp_instr(instr:SIToFPInstruction) + +instr(v) :- sitofp_instr(v). + +.decl sitofp_instr_from_operand(instr:SIToFPInstruction, val:Operand) +.decl sitofp_instr_to_type(instr:SIToFPInstruction, type:Type) + + +// Helper predicate + +.decl sitofp_instr_from_type(instr:SIToFPInstruction, type:Type) + +sitofp_instr_from_type(Instr, Type) :- + sitofp_instr_from_operand(Instr, Operand), + operand_has_type(Operand, Type). + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// The ‘sitofp‘ instr takes: +// (i) a value to cast, which must be a scalar or vector integer value, +// (ii) and a type to cast it to, which must be a floating point type. +// +// If the value to be casted is a vector integer type: +// (i) the type must be a vector floating point type, +// (ii) with the same number of elements. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + sitofp_instr(Instr), + !sitofp_instr_from_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + sitofp_instr(Instr), + !sitofp_instr_to_type(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + sitofp_instr(Instr), + sitofp_instr_to_type(Instr, Type), + !instr_returns_type(Instr, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + sitofp_instr(Instr), + sitofp_instr_from_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + sitofp_instr(Instr), + sitofp_instr_to_type(Instr, Type), + !fp_type(Type), + !fp_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + sitofp_instr(Instr), + sitofp_instr_from_type(Instr, FromType), + sitofp_instr_to_type(Instr, ToType), + !vector_compatible_types(FromType, ToType). diff --git a/datalog/schema/sitofp-instruction.dl b/datalog/schema/sitofp-instruction.dl deleted file mode 100644 index 5e84e61..0000000 --- a/datalog/schema/sitofp-instruction.dl +++ /dev/null @@ -1,69 +0,0 @@ -// http://llvm.org/docs/LangRef.html#sitofp-to-instruction -// keywords: conversion; unary; instruction - -.type SIToFPInstruction = Instruction -.decl sitofp_instruction(instr:SIToFPInstruction) - -instruction(v) :- sitofp_instruction(v). - -.decl sitofp_instruction_from_operand(instr:SIToFPInstruction, val:Operand) -.decl sitofp_instruction_to_type(instr:SIToFPInstruction, type:Type) - - -// Helper predicate - -.decl sitofp_instruction_from_type(instr:SIToFPInstruction, type:Type) - -sitofp_instruction_from_type(Instr, Type) :- - sitofp_instruction_from_operand(Instr, Operand), - operand_has_type(Operand, Type). - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// The ‘sitofp‘ instruction takes: -// (i) a value to cast, which must be a scalar or vector integer value, -// (ii) and a type to cast it to, which must be a floating point type. -// -// If the value to be casted is a vector integer type: -// (i) the type must be a vector floating point type, -// (ii) with the same number of elements. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - sitofp_instruction(Instr), - !sitofp_instruction_from_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - sitofp_instruction(Instr), - !sitofp_instruction_to_type(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - sitofp_instruction(Instr), - sitofp_instruction_to_type(Instr, Type), - !instruction_returns_type(Instr, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - sitofp_instruction(Instr), - sitofp_instruction_from_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - sitofp_instruction(Instr), - sitofp_instruction_to_type(Instr, Type), - !fp_type(Type), - !fp_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - sitofp_instruction(Instr), - sitofp_instruction_from_type(Instr, FromType), - sitofp_instruction_to_type(Instr, ToType), - !vector_compatible_types(FromType, ToType). diff --git a/datalog/schema/srem-instr.dl b/datalog/schema/srem-instr.dl new file mode 100644 index 0000000..577a870 --- /dev/null +++ b/datalog/schema/srem-instr.dl @@ -0,0 +1,52 @@ +// http://llvm.org/docs/LangRef.html#srem-instr +// keywords: arithmetic; binary; instr + +.type SRemInstruction = Instruction +.decl srem_instr(instr:SRemInstruction) + +instr(v) :- srem_instr(v). + +.decl srem_instr_first_operand(instr:SRemInstruction, op:Operand) +.decl srem_instr_second_operand(instr:SRemInstruction, op:Operand) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// 1) The two arguments to the ‘srem‘ instr must be: +// (i) integer or +// (ii) vector of integer values. +// +// 2) Both arguments must have identical types. +// +// 3) The resulting value is the same type as its operands. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + srem_instr(Instr), + !srem_instr_first_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + srem_instr(Instr), + !srem_instr_second_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + srem_instr(Instr), + instr_returns_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + srem_instr_first_operand(Instr, LeftOp), + !operand_has_type(LeftOp, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + srem_instr_second_operand(Instr, RightOp), + !operand_has_type(RightOp, Type). diff --git a/datalog/schema/srem-instruction.dl b/datalog/schema/srem-instruction.dl deleted file mode 100644 index 384e759..0000000 --- a/datalog/schema/srem-instruction.dl +++ /dev/null @@ -1,52 +0,0 @@ -// http://llvm.org/docs/LangRef.html#srem-instruction -// keywords: arithmetic; binary; instruction - -.type SRemInstruction = Instruction -.decl srem_instruction(instr:SRemInstruction) - -instruction(v) :- srem_instruction(v). - -.decl srem_instruction_first_operand(instr:SRemInstruction, op:Operand) -.decl srem_instruction_second_operand(instr:SRemInstruction, op:Operand) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// 1) The two arguments to the ‘srem‘ instruction must be: -// (i) integer or -// (ii) vector of integer values. -// -// 2) Both arguments must have identical types. -// -// 3) The resulting value is the same type as its operands. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - srem_instruction(Instr), - !srem_instruction_first_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - srem_instruction(Instr), - !srem_instruction_second_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - srem_instruction(Instr), - instruction_returns_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - srem_instruction_first_operand(Instr, LeftOp), - !operand_has_type(LeftOp, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - srem_instruction_second_operand(Instr, RightOp), - !operand_has_type(RightOp, Type). diff --git a/datalog/schema/store-instr.dl b/datalog/schema/store-instr.dl new file mode 100644 index 0000000..31b4c92 --- /dev/null +++ b/datalog/schema/store-instr.dl @@ -0,0 +1,93 @@ +// http://llvm.org/docs/LangRef.html#store-instr +// keywords: memory; instr + +.type StoreInstruction = Instruction +.decl store_instr(instr:StoreInstruction) + +instr(v) :- store_instr(v). + +.decl store_instr_alignment(instr:StoreInstruction, alignment:number) +.decl store_instr_ordering(instr:StoreInstruction, ordering:Ordering) + +// If the store is marked as volatile, then the optimizer is not allowed +// to modify the number or order of execution of this store with other +// volatile operations. + +.decl store_instr_is_volatile(instr:StoreInstruction) + + +// If the store is marked as atomic, it takes an extra ordering +// and optional singlethread argument. + +.decl store_instr_is_atomic(instr:StoreInstruction) + +store_instr_is_atomic(Instr) :- + store_instr_ordering(Instr, _). + + +// There are two arguments to the store instr: +// (i) a value to store and +// (ii) an address at which to store it. + +.decl store_instr_value(instr:StoreInstruction, value:Operand) +.decl store_instr_address(instr:StoreInstruction, pointer:Operand) + + +// Helper predicates + +.decl store_instr_address_ptr_type(instr:StoreInstruction, type:Type) +.decl store_instr_value_type(instr:StoreInstruction, type:Type) + +store_instr_address_ptr_type(Instr, PtrType) :- + store_instr_address(Instr, PtrAddress), + operand_has_type(PtrAddress, PtrType). + +store_instr_value_type(Instr, PtrType) :- + store_instr_value(Instr, PtrAddress), + operand_has_type(PtrAddress, PtrType). + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// (i) The type of the operand must be a pointer to +// the first class type of the operand. +// +// (ii) The acquire and acq_rel orderings aren’t valid on store +// instrs. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + store_instr(Instr), + !store_instr_address(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + store_instr(Instr), + !store_instr_value(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + store_instr(Instr), + instr_assigns_to(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + store_instr(Instr), + store_instr_address_ptr_type(Instr, PtrType), + !pointer_type_to_firstclass(PtrType). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + store_instr(Instr), + store_instr_address_ptr_type(Instr, PtrType), + store_instr_value_type(Instr, Type), + !pointer_type_has_component(PtrType, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + store_instr(Instr), + store_instr_ordering(Instr, Ord), + ( acquire_ordering(Ord) + ; acq_rel_ordering(Ord) ). diff --git a/datalog/schema/store-instruction.dl b/datalog/schema/store-instruction.dl deleted file mode 100644 index 697fece..0000000 --- a/datalog/schema/store-instruction.dl +++ /dev/null @@ -1,93 +0,0 @@ -// http://llvm.org/docs/LangRef.html#store-instruction -// keywords: memory; instruction - -.type StoreInstruction = Instruction -.decl store_instruction(instr:StoreInstruction) - -instruction(v) :- store_instruction(v). - -.decl store_instruction_alignment(instr:StoreInstruction, alignment:number) -.decl store_instruction_ordering(instr:StoreInstruction, ordering:Ordering) - -// If the store is marked as volatile, then the optimizer is not allowed -// to modify the number or order of execution of this store with other -// volatile operations. - -.decl store_instruction_is_volatile(instr:StoreInstruction) - - -// If the store is marked as atomic, it takes an extra ordering -// and optional singlethread argument. - -.decl store_instruction_is_atomic(instr:StoreInstruction) - -store_instruction_is_atomic(Instr) :- - store_instruction_ordering(Instr, _). - - -// There are two arguments to the store instruction: -// (i) a value to store and -// (ii) an address at which to store it. - -.decl store_instruction_value(instr:StoreInstruction, value:Operand) -.decl store_instruction_address(instr:StoreInstruction, pointer:Operand) - - -// Helper predicates - -.decl store_instruction_address_ptr_type(instr:StoreInstruction, type:Type) -.decl store_instruction_value_type(instr:StoreInstruction, type:Type) - -store_instruction_address_ptr_type(Instr, PtrType) :- - store_instruction_address(Instr, PtrAddress), - operand_has_type(PtrAddress, PtrType). - -store_instruction_value_type(Instr, PtrType) :- - store_instruction_value(Instr, PtrAddress), - operand_has_type(PtrAddress, PtrType). - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// (i) The type of the operand must be a pointer to -// the first class type of the operand. -// -// (ii) The acquire and acq_rel orderings aren’t valid on store -// instructions. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - store_instruction(Instr), - !store_instruction_address(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - store_instruction(Instr), - !store_instruction_value(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - store_instruction(Instr), - instruction_assigns_to(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - store_instruction(Instr), - store_instruction_address_ptr_type(Instr, PtrType), - !pointer_type_to_firstclass(PtrType). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - store_instruction(Instr), - store_instruction_address_ptr_type(Instr, PtrType), - store_instruction_value_type(Instr, Type), - !pointer_type_has_component(PtrType, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - store_instruction(Instr), - store_instruction_ordering(Instr, Ord), - ( acquire_ordering(Ord) - ; acq_rel_ordering(Ord) ). diff --git a/datalog/schema/sub-instr.dl b/datalog/schema/sub-instr.dl new file mode 100644 index 0000000..6907edd --- /dev/null +++ b/datalog/schema/sub-instr.dl @@ -0,0 +1,52 @@ +// http://llvm.org/docs/LangRef.html#sub-instr +// keywords: arithmetic; binary; instr + +.type SubInstruction = Instruction +.decl sub_instr(instr:SubInstruction) + +instr(v) :- sub_instr(v). + +.decl sub_instr_first_operand(instr:SubInstruction, op:Operand) +.decl sub_instr_second_operand(instr:SubInstruction, op:Operand) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// 1) The two arguments to the ‘sub‘ instr must be: +// (i) integer or +// (ii) vector of integer values. +// +// 2) Both arguments must have identical types. +// +// 3) The resulting value is the same type as its operands. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + sub_instr(Instr), + !sub_instr_first_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + sub_instr(Instr), + !sub_instr_second_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + sub_instr(Instr), + instr_returns_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + sub_instr_first_operand(Instr, LeftOp), + !operand_has_type(LeftOp, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + sub_instr_second_operand(Instr, RightOp), + !operand_has_type(RightOp, Type). diff --git a/datalog/schema/sub-instruction.dl b/datalog/schema/sub-instruction.dl deleted file mode 100644 index 8d31d5b..0000000 --- a/datalog/schema/sub-instruction.dl +++ /dev/null @@ -1,52 +0,0 @@ -// http://llvm.org/docs/LangRef.html#sub-instruction -// keywords: arithmetic; binary; instruction - -.type SubInstruction = Instruction -.decl sub_instruction(instr:SubInstruction) - -instruction(v) :- sub_instruction(v). - -.decl sub_instruction_first_operand(instr:SubInstruction, op:Operand) -.decl sub_instruction_second_operand(instr:SubInstruction, op:Operand) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// 1) The two arguments to the ‘sub‘ instruction must be: -// (i) integer or -// (ii) vector of integer values. -// -// 2) Both arguments must have identical types. -// -// 3) The resulting value is the same type as its operands. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - sub_instruction(Instr), - !sub_instruction_first_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - sub_instruction(Instr), - !sub_instruction_second_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - sub_instruction(Instr), - instruction_returns_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - sub_instruction_first_operand(Instr, LeftOp), - !operand_has_type(LeftOp, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - sub_instruction_second_operand(Instr, RightOp), - !operand_has_type(RightOp, Type). diff --git a/datalog/schema/switch-instr.dl b/datalog/schema/switch-instr.dl new file mode 100644 index 0000000..7aefa06 --- /dev/null +++ b/datalog/schema/switch-instr.dl @@ -0,0 +1,90 @@ +// http://llvm.org/docs/LangRef.html#switch-instr +// keywords: terminator; instr + +.type SwitchInstruction = Instruction +.decl switch_instr(instr:SwitchInstruction) + +instr(v) :- switch_instr(v). +terminator_instr(v) :- switch_instr(v). + +.type SwitchInstructionCase = [ + constant : Constant, + label : Variable +] + +.decl switch_instr_operand(instr:SwitchInstruction, value:Operand) +.decl switch_instr_ncases(instr:SwitchInstruction, total:number) +.decl switch_instr_case(instr:SwitchInstruction, index:number, case:SwitchInstructionCase) +.decl switch_instr_default_label(instr:SwitchInstruction, label:Variable) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// The ‘switch‘ instr uses three parameters: +// (i) an integer comparison value ‘value‘, +// (ii) a default ‘label‘ destination, and +// (iii) an array of pairs of comparison value constants +// and ‘label‘s. +// +// The table is not allowed to contain duplicate constant entries. +//------------------------------------------------------------------------------ + + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + switch_instr(Instr), + !switch_instr_ncases(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + switch_instr(Instr), + !switch_instr_default_label(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + switch_instr(Instr), + switch_instr_default_label(Instr, Label), + !variable_is_label(Label). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + switch_instr(Instr), + switch_instr_operand(Instr, Value), + operand_has_type(Value, Type), + !integer_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + switch_instr(Instr), + switch_instr_case(Instr, _, Case), + Case = [Constant, Label], + constant(Constant), + !variable_is_label(Label). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + switch_instr(Instr), + switch_instr_case(Instr, _, Case), + Case = [Constant, Label], + variable(Label), + constant_has_type(Constant, Type), + !integer_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + switch_instr(Instr), + switch_instr_case(Instr, Index1, Case1), + switch_instr_case(Instr, Index2, Case2), + Index1 != Index2, + Case1 = [Constant1, Label1], + Case2 = [Constant2, Label2], + variable(Label1), + variable(Label2), + constants_equal(Constant1, Constant2). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + switch_instr_ncases(Instr, Total), + switch_instr_case(Instr, Index, _), + (Index < 0 ; Index >= Total). diff --git a/datalog/schema/switch-instruction.dl b/datalog/schema/switch-instruction.dl deleted file mode 100644 index 47591de..0000000 --- a/datalog/schema/switch-instruction.dl +++ /dev/null @@ -1,90 +0,0 @@ -// http://llvm.org/docs/LangRef.html#switch-instruction -// keywords: terminator; instruction - -.type SwitchInstruction = Instruction -.decl switch_instruction(instr:SwitchInstruction) - -instruction(v) :- switch_instruction(v). -terminator_instruction(v) :- switch_instruction(v). - -.type SwitchInstructionCase = [ - constant : Constant, - label : Variable -] - -.decl switch_instruction_operand(instr:SwitchInstruction, value:Operand) -.decl switch_instruction_ncases(instr:SwitchInstruction, total:number) -.decl switch_instruction_case(instr:SwitchInstruction, index:number, case:SwitchInstructionCase) -.decl switch_instruction_default_label(instr:SwitchInstruction, label:Variable) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// The ‘switch‘ instruction uses three parameters: -// (i) an integer comparison value ‘value‘, -// (ii) a default ‘label‘ destination, and -// (iii) an array of pairs of comparison value constants -// and ‘label‘s. -// -// The table is not allowed to contain duplicate constant entries. -//------------------------------------------------------------------------------ - - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - switch_instruction(Instr), - !switch_instruction_ncases(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - switch_instruction(Instr), - !switch_instruction_default_label(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - switch_instruction(Instr), - switch_instruction_default_label(Instr, Label), - !variable_is_label(Label). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - switch_instruction(Instr), - switch_instruction_operand(Instr, Value), - operand_has_type(Value, Type), - !integer_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - switch_instruction(Instr), - switch_instruction_case(Instr, _, Case), - Case = [Constant, Label], - constant(Constant), - !variable_is_label(Label). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - switch_instruction(Instr), - switch_instruction_case(Instr, _, Case), - Case = [Constant, Label], - variable(Label), - constant_has_type(Constant, Type), - !integer_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - switch_instruction(Instr), - switch_instruction_case(Instr, Index1, Case1), - switch_instruction_case(Instr, Index2, Case2), - Index1 != Index2, - Case1 = [Constant1, Label1], - Case2 = [Constant2, Label2], - variable(Label1), - variable(Label2), - constants_equal(Constant1, Constant2). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - switch_instruction_ncases(Instr, Total), - switch_instruction_case(Instr, Index, _), - (Index < 0 ; Index >= Total). diff --git a/datalog/schema/trunc-instr.dl b/datalog/schema/trunc-instr.dl new file mode 100644 index 0000000..c903626 --- /dev/null +++ b/datalog/schema/trunc-instr.dl @@ -0,0 +1,71 @@ +// http://llvm.org/docs/LangRef.html#trunc-to-instr +// keywords: conversion; unary; instr + +.type TruncInstruction = Instruction +.decl trunc_instr(instr:TruncInstruction) + +instr(v) :- trunc_instr(v). + +.decl trunc_instr_from_operand(instr:TruncInstruction, val:Operand) +.decl trunc_instr_to_type(instr:TruncInstruction, type:Type) + + +// Helper predicate + +.decl trunc_instr_from_type(instr:TruncInstruction, type:Type) + +trunc_instr_from_type(Instr, Type) :- + trunc_instr_from_operand(Instr, Operand), + operand_has_type(Operand, Type). + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// 1) The ‘trunc‘ instr takes: +// (i) a value to trunc, +// (ii) and a type to trunc it to. +// +// 2) Both source and destination types must be: +// (i) integers or +// (ii) vectors of the same number of integers. +// +// 3) The source type must be larger than the destination type. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + trunc_instr(Instr), + !trunc_instr_from_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + trunc_instr(Instr), + !trunc_instr_to_type(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + trunc_instr(Instr), + trunc_instr_to_type(Instr, Type), + !instr_returns_type(Instr, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + trunc_instr(Instr), + trunc_instr_from_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + trunc_instr(Instr), + trunc_instr_to_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + trunc_instr(Instr), + trunc_instr_from_type(Instr, FromType), + trunc_instr_to_type(Instr, ToType), + !vector_compatible_types(FromType, ToType). diff --git a/datalog/schema/trunc-instruction.dl b/datalog/schema/trunc-instruction.dl deleted file mode 100644 index 8d4171b..0000000 --- a/datalog/schema/trunc-instruction.dl +++ /dev/null @@ -1,71 +0,0 @@ -// http://llvm.org/docs/LangRef.html#trunc-to-instruction -// keywords: conversion; unary; instruction - -.type TruncInstruction = Instruction -.decl trunc_instruction(instr:TruncInstruction) - -instruction(v) :- trunc_instruction(v). - -.decl trunc_instruction_from_operand(instr:TruncInstruction, val:Operand) -.decl trunc_instruction_to_type(instr:TruncInstruction, type:Type) - - -// Helper predicate - -.decl trunc_instruction_from_type(instr:TruncInstruction, type:Type) - -trunc_instruction_from_type(Instr, Type) :- - trunc_instruction_from_operand(Instr, Operand), - operand_has_type(Operand, Type). - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// 1) The ‘trunc‘ instruction takes: -// (i) a value to trunc, -// (ii) and a type to trunc it to. -// -// 2) Both source and destination types must be: -// (i) integers or -// (ii) vectors of the same number of integers. -// -// 3) The source type must be larger than the destination type. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - trunc_instruction(Instr), - !trunc_instruction_from_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - trunc_instruction(Instr), - !trunc_instruction_to_type(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - trunc_instruction(Instr), - trunc_instruction_to_type(Instr, Type), - !instruction_returns_type(Instr, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - trunc_instruction(Instr), - trunc_instruction_from_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - trunc_instruction(Instr), - trunc_instruction_to_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - trunc_instruction(Instr), - trunc_instruction_from_type(Instr, FromType), - trunc_instruction_to_type(Instr, ToType), - !vector_compatible_types(FromType, ToType). diff --git a/datalog/schema/udiv-instr.dl b/datalog/schema/udiv-instr.dl new file mode 100644 index 0000000..517851e --- /dev/null +++ b/datalog/schema/udiv-instr.dl @@ -0,0 +1,52 @@ +// http://llvm.org/docs/LangRef.html#udiv-instr +// keywords: arithmetic; binary; instr + +.type UDivInstruction = Instruction +.decl udiv_instr(instr:UDivInstruction) + +instr(v) :- udiv_instr(v). + +.decl udiv_instr_first_operand(instr:UDivInstruction, op:Operand) +.decl udiv_instr_second_operand(instr:UDivInstruction, op:Operand) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// 1) The two arguments to the ‘udiv‘ instr must be: +// (i) integer or +// (ii) vector of integer values. +// +// 2) Both arguments must have identical types. +// +// 3) The resulting value is the same type as its operands. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + udiv_instr(Instr), + !udiv_instr_first_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + udiv_instr(Instr), + !udiv_instr_second_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + udiv_instr(Instr), + instr_returns_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + udiv_instr_first_operand(Instr, LeftOp), + !operand_has_type(LeftOp, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + udiv_instr_second_operand(Instr, RightOp), + !operand_has_type(RightOp, Type). diff --git a/datalog/schema/udiv-instruction.dl b/datalog/schema/udiv-instruction.dl deleted file mode 100644 index 0603384..0000000 --- a/datalog/schema/udiv-instruction.dl +++ /dev/null @@ -1,52 +0,0 @@ -// http://llvm.org/docs/LangRef.html#udiv-instruction -// keywords: arithmetic; binary; instruction - -.type UDivInstruction = Instruction -.decl udiv_instruction(instr:UDivInstruction) - -instruction(v) :- udiv_instruction(v). - -.decl udiv_instruction_first_operand(instr:UDivInstruction, op:Operand) -.decl udiv_instruction_second_operand(instr:UDivInstruction, op:Operand) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// 1) The two arguments to the ‘udiv‘ instruction must be: -// (i) integer or -// (ii) vector of integer values. -// -// 2) Both arguments must have identical types. -// -// 3) The resulting value is the same type as its operands. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - udiv_instruction(Instr), - !udiv_instruction_first_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - udiv_instruction(Instr), - !udiv_instruction_second_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - udiv_instruction(Instr), - instruction_returns_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - udiv_instruction_first_operand(Instr, LeftOp), - !operand_has_type(LeftOp, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - udiv_instruction_second_operand(Instr, RightOp), - !operand_has_type(RightOp, Type). diff --git a/datalog/schema/uitofp-instr.dl b/datalog/schema/uitofp-instr.dl new file mode 100644 index 0000000..ec09378 --- /dev/null +++ b/datalog/schema/uitofp-instr.dl @@ -0,0 +1,69 @@ +// http://llvm.org/docs/LangRef.html#uitofp-to-instr +// keywords: conversion; unary; instr + +.type UIToFPInstruction = Instruction +.decl uitofp_instr(instr:UIToFPInstruction) + +instr(v) :- uitofp_instr(v). + +.decl uitofp_instr_from_operand(instr:UIToFPInstruction, val:Operand) +.decl uitofp_instr_to_type(instr:UIToFPInstruction, type:Type) + + +// Helper predicate + +.decl uitofp_instr_from_type(instr:UIToFPInstruction, type:Type) + +uitofp_instr_from_type(Instr, Type) :- + uitofp_instr_from_operand(Instr, Operand), + operand_has_type(Operand, Type). + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// The ‘uitofp‘ instr takes: +// (i) a value to cast, which must be a scalar or vector integer value, +// (ii) and a type to cast it to, which must be a floating point type. +// +// If the value to be casted is a vector integer type: +// (i) the type must be a vector floating point type, +// (ii) with the same number of elements. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + uitofp_instr(Instr), + !uitofp_instr_from_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + uitofp_instr(Instr), + !uitofp_instr_to_type(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + uitofp_instr(Instr), + uitofp_instr_to_type(Instr, Type), + !instr_returns_type(Instr, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + uitofp_instr(Instr), + uitofp_instr_from_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + uitofp_instr(Instr), + uitofp_instr_to_type(Instr, Type), + !fp_type(Type), + !fp_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + uitofp_instr(Instr), + uitofp_instr_from_type(Instr, FromType), + uitofp_instr_to_type(Instr, ToType), + !vector_compatible_types(FromType, ToType). diff --git a/datalog/schema/uitofp-instruction.dl b/datalog/schema/uitofp-instruction.dl deleted file mode 100644 index 177ccbc..0000000 --- a/datalog/schema/uitofp-instruction.dl +++ /dev/null @@ -1,69 +0,0 @@ -// http://llvm.org/docs/LangRef.html#uitofp-to-instruction -// keywords: conversion; unary; instruction - -.type UIToFPInstruction = Instruction -.decl uitofp_instruction(instr:UIToFPInstruction) - -instruction(v) :- uitofp_instruction(v). - -.decl uitofp_instruction_from_operand(instr:UIToFPInstruction, val:Operand) -.decl uitofp_instruction_to_type(instr:UIToFPInstruction, type:Type) - - -// Helper predicate - -.decl uitofp_instruction_from_type(instr:UIToFPInstruction, type:Type) - -uitofp_instruction_from_type(Instr, Type) :- - uitofp_instruction_from_operand(Instr, Operand), - operand_has_type(Operand, Type). - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// The ‘uitofp‘ instruction takes: -// (i) a value to cast, which must be a scalar or vector integer value, -// (ii) and a type to cast it to, which must be a floating point type. -// -// If the value to be casted is a vector integer type: -// (i) the type must be a vector floating point type, -// (ii) with the same number of elements. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - uitofp_instruction(Instr), - !uitofp_instruction_from_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - uitofp_instruction(Instr), - !uitofp_instruction_to_type(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - uitofp_instruction(Instr), - uitofp_instruction_to_type(Instr, Type), - !instruction_returns_type(Instr, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - uitofp_instruction(Instr), - uitofp_instruction_from_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - uitofp_instruction(Instr), - uitofp_instruction_to_type(Instr, Type), - !fp_type(Type), - !fp_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - uitofp_instruction(Instr), - uitofp_instruction_from_type(Instr, FromType), - uitofp_instruction_to_type(Instr, ToType), - !vector_compatible_types(FromType, ToType). diff --git a/datalog/schema/unreachable-instr.dl b/datalog/schema/unreachable-instr.dl new file mode 100644 index 0000000..4a698a2 --- /dev/null +++ b/datalog/schema/unreachable-instr.dl @@ -0,0 +1,10 @@ +// llvm.org/docs/LangRef.html#unreachable-instr +// keywords: terminator; instr + +.type UnreachableInstruction = Instruction +.decl unreachable_instr(instr:UnreachableInstruction) + +instr(v) :- unreachable_instr(v). +terminator_instr(Insn) :- unreachable_instr(Insn). + +// The ‘unreachable‘ instr has no defined semantics. diff --git a/datalog/schema/unreachable-instruction.dl b/datalog/schema/unreachable-instruction.dl deleted file mode 100644 index 0f5e0e8..0000000 --- a/datalog/schema/unreachable-instruction.dl +++ /dev/null @@ -1,10 +0,0 @@ -// llvm.org/docs/LangRef.html#unreachable-instruction -// keywords: terminator; instruction - -.type UnreachableInstruction = Instruction -.decl unreachable_instruction(instr:UnreachableInstruction) - -instruction(v) :- unreachable_instruction(v). -terminator_instruction(Insn) :- unreachable_instruction(Insn). - -// The ‘unreachable‘ instruction has no defined semantics. diff --git a/datalog/schema/urem-instr.dl b/datalog/schema/urem-instr.dl new file mode 100644 index 0000000..46896d3 --- /dev/null +++ b/datalog/schema/urem-instr.dl @@ -0,0 +1,52 @@ +// http://llvm.org/docs/LangRef.html#urem-instr +// keywords: arithmetic; binary; instr + +.type URemInstruction = Instruction +.decl urem_instr(instr:URemInstruction) + +instr(v) :- urem_instr(v). + +.decl urem_instr_first_operand(instr:URemInstruction, op:Operand) +.decl urem_instr_second_operand(instr:URemInstruction, op:Operand) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// 1) The two arguments to the ‘urem‘ instr must be: +// (i) integer or +// (ii) vector of integer values. +// +// 2) Both arguments must have identical types. +// +// 3) The resulting value is the same type as its operands. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + urem_instr(Instr), + !urem_instr_first_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + urem_instr(Instr), + !urem_instr_second_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + urem_instr(Instr), + instr_returns_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + urem_instr_first_operand(Instr, LeftOp), + !operand_has_type(LeftOp, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + urem_instr_second_operand(Instr, RightOp), + !operand_has_type(RightOp, Type). diff --git a/datalog/schema/urem-instruction.dl b/datalog/schema/urem-instruction.dl deleted file mode 100644 index f58a8c7..0000000 --- a/datalog/schema/urem-instruction.dl +++ /dev/null @@ -1,52 +0,0 @@ -// http://llvm.org/docs/LangRef.html#urem-instruction -// keywords: arithmetic; binary; instruction - -.type URemInstruction = Instruction -.decl urem_instruction(instr:URemInstruction) - -instruction(v) :- urem_instruction(v). - -.decl urem_instruction_first_operand(instr:URemInstruction, op:Operand) -.decl urem_instruction_second_operand(instr:URemInstruction, op:Operand) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// 1) The two arguments to the ‘urem‘ instruction must be: -// (i) integer or -// (ii) vector of integer values. -// -// 2) Both arguments must have identical types. -// -// 3) The resulting value is the same type as its operands. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - urem_instruction(Instr), - !urem_instruction_first_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - urem_instruction(Instr), - !urem_instruction_second_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - urem_instruction(Instr), - instruction_returns_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - urem_instruction_first_operand(Instr, LeftOp), - !operand_has_type(LeftOp, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - urem_instruction_second_operand(Instr, RightOp), - !operand_has_type(RightOp, Type). diff --git a/datalog/schema/va-arg-instr.dl b/datalog/schema/va-arg-instr.dl new file mode 100644 index 0000000..12b1163 --- /dev/null +++ b/datalog/schema/va-arg-instr.dl @@ -0,0 +1,45 @@ +// http://llvm.org/docs/LangRef.html#va-arg-instr +// keywords: unary; instr + +.type VaArgInstruction = Instruction +.decl va_arg_instr(instr:VaArgInstruction) + +instr(v) :- va_arg_instr(v). + +.decl va_arg_instr_va_list(instr:VaArgInstruction, list:Operand) +.decl va_arg_instr_type(instr:VaArgInstruction, type:Type) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// The ‘va-arg‘ instr takes: +// (i) a va_list* value, and +// (ii) the type of the arguments, +// +// It returns: +// (i) a value of the specified argument type. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + va_arg_instr(Instr), + !va_arg_instr_va_list(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + va_arg_instr(Instr), + !va_arg_instr_type(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + va_arg_instr(Instr), + va_arg_instr_va_list(Instr, List), + operand_has_type(List, ListType), + !pointer_type(ListType). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + va_arg_instr(Instr), + va_arg_instr_type(Instr, Type), + !instr_returns_type(Instr, Type). diff --git a/datalog/schema/va-arg-instruction.dl b/datalog/schema/va-arg-instruction.dl deleted file mode 100644 index 6668e16..0000000 --- a/datalog/schema/va-arg-instruction.dl +++ /dev/null @@ -1,45 +0,0 @@ -// http://llvm.org/docs/LangRef.html#va-arg-instruction -// keywords: unary; instruction - -.type VaArgInstruction = Instruction -.decl va_arg_instruction(instr:VaArgInstruction) - -instruction(v) :- va_arg_instruction(v). - -.decl va_arg_instruction_va_list(instr:VaArgInstruction, list:Operand) -.decl va_arg_instruction_type(instr:VaArgInstruction, type:Type) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// The ‘va-arg‘ instruction takes: -// (i) a va_list* value, and -// (ii) the type of the arguments, -// -// It returns: -// (i) a value of the specified argument type. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - va_arg_instruction(Instr), - !va_arg_instruction_va_list(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - va_arg_instruction(Instr), - !va_arg_instruction_type(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - va_arg_instruction(Instr), - va_arg_instruction_va_list(Instr, List), - operand_has_type(List, ListType), - !pointer_type(ListType). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - va_arg_instruction(Instr), - va_arg_instruction_type(Instr, Type), - !instruction_returns_type(Instr, Type). diff --git a/datalog/schema/xor-instr.dl b/datalog/schema/xor-instr.dl new file mode 100644 index 0000000..ee914cf --- /dev/null +++ b/datalog/schema/xor-instr.dl @@ -0,0 +1,53 @@ +// http://llvm.org/docs/LangRef.html#xor-instr +// keywords: bitwise; binary; instr + +.type XorInstruction = Instruction +.decl xor_instr(instr:XorInstruction) + +instr(v) :- + xor_instr(v). + +.decl xor_instr_first_operand(instr:XorInstruction, op:Operand) +.decl xor_instr_second_operand(instr:XorInstruction, op:Operand) + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// 1) The two arguments to the ‘xor‘ instr must be: +// (i) integer or +// (ii) vector of integer values. +// +// 2) Both arguments must have identical types. +// +// 3) The resulting value is the same type as its operands. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + xor_instr(Instr), + !xor_instr_first_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + xor_instr(Instr), + !xor_instr_second_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + xor_instr(Instr), + instr_returns_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + xor_instr_first_operand(Instr, LeftOp), + !operand_has_type(LeftOp, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + instr_returns_type(Instr, Type), + xor_instr_second_operand(Instr, RightOp), + !operand_has_type(RightOp, Type). diff --git a/datalog/schema/xor-instruction.dl b/datalog/schema/xor-instruction.dl deleted file mode 100644 index 26d4c20..0000000 --- a/datalog/schema/xor-instruction.dl +++ /dev/null @@ -1,53 +0,0 @@ -// http://llvm.org/docs/LangRef.html#xor-instruction -// keywords: bitwise; binary; instruction - -.type XorInstruction = Instruction -.decl xor_instruction(instr:XorInstruction) - -instruction(v) :- - xor_instruction(v). - -.decl xor_instruction_first_operand(instr:XorInstruction, op:Operand) -.decl xor_instruction_second_operand(instr:XorInstruction, op:Operand) - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// 1) The two arguments to the ‘xor‘ instruction must be: -// (i) integer or -// (ii) vector of integer values. -// -// 2) Both arguments must have identical types. -// -// 3) The resulting value is the same type as its operands. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - xor_instruction(Instr), - !xor_instruction_first_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - xor_instruction(Instr), - !xor_instruction_second_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - xor_instruction(Instr), - instruction_returns_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - xor_instruction_first_operand(Instr, LeftOp), - !operand_has_type(LeftOp, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - instruction_returns_type(Instr, Type), - xor_instruction_second_operand(Instr, RightOp), - !operand_has_type(RightOp, Type). diff --git a/datalog/schema/zext-instr.dl b/datalog/schema/zext-instr.dl new file mode 100644 index 0000000..9f82c2c --- /dev/null +++ b/datalog/schema/zext-instr.dl @@ -0,0 +1,71 @@ +// http://llvm.org/docs/LangRef.html#zext-to-instr +// keywords: conversion; unary; instr + +.type ZExtInstruction = Instruction +.decl zext_instr(instr:ZExtInstruction) + +instr(v) :- zext_instr(v). + +.decl zext_instr_from_operand(instr:ZExtInstruction, val:Operand) +.decl zext_instr_to_type(instr:ZExtInstruction, type:Type) + + +// Helper predicate + +.decl zext_instr_from_type(instr:ZExtInstruction, type:Type) + +zext_instr_from_type(Instr, Type) :- + zext_instr_from_operand(Instr, Operand), + operand_has_type(Operand, Type). + + +//------------------------------------------------------------------------------ +// [Constraints] +// +// 1) The ‘zext‘ instr takes: +// (i) a value to cast, +// (ii) and a type to cast it to. +// +// 2) Both source and destination types must be: +// (i) integers or +// (ii) vectors of the same number of integers. +// +// 3) The source type must be smaller than the destination type. +//------------------------------------------------------------------------------ + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + zext_instr(Instr), + !zext_instr_from_operand(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + zext_instr(Instr), + !zext_instr_to_type(Instr, _). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + zext_instr(Instr), + zext_instr_to_type(Instr, Type), + !instr_returns_type(Instr, Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + zext_instr(Instr), + zext_instr_from_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + zext_instr(Instr), + zext_instr_to_type(Instr, Type), + !integer_type(Type), + !integer_vector_type(Type). + +schema_invalid_instr(Instr, __FILE__, __LINE__) :- + schema_sanity(), + zext_instr(Instr), + zext_instr_from_type(Instr, FromType), + zext_instr_to_type(Instr, ToType), + !vector_compatible_types(FromType, ToType). diff --git a/datalog/schema/zext-instruction.dl b/datalog/schema/zext-instruction.dl deleted file mode 100644 index 583d152..0000000 --- a/datalog/schema/zext-instruction.dl +++ /dev/null @@ -1,71 +0,0 @@ -// http://llvm.org/docs/LangRef.html#zext-to-instruction -// keywords: conversion; unary; instruction - -.type ZExtInstruction = Instruction -.decl zext_instruction(instr:ZExtInstruction) - -instruction(v) :- zext_instruction(v). - -.decl zext_instruction_from_operand(instr:ZExtInstruction, val:Operand) -.decl zext_instruction_to_type(instr:ZExtInstruction, type:Type) - - -// Helper predicate - -.decl zext_instruction_from_type(instr:ZExtInstruction, type:Type) - -zext_instruction_from_type(Instr, Type) :- - zext_instruction_from_operand(Instr, Operand), - operand_has_type(Operand, Type). - - -//------------------------------------------------------------------------------ -// [Constraints] -// -// 1) The ‘zext‘ instruction takes: -// (i) a value to cast, -// (ii) and a type to cast it to. -// -// 2) Both source and destination types must be: -// (i) integers or -// (ii) vectors of the same number of integers. -// -// 3) The source type must be smaller than the destination type. -//------------------------------------------------------------------------------ - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - zext_instruction(Instr), - !zext_instruction_from_operand(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - zext_instruction(Instr), - !zext_instruction_to_type(Instr, _). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - zext_instruction(Instr), - zext_instruction_to_type(Instr, Type), - !instruction_returns_type(Instr, Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - zext_instruction(Instr), - zext_instruction_from_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - zext_instruction(Instr), - zext_instruction_to_type(Instr, Type), - !integer_type(Type), - !integer_vector_type(Type). - -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- - schema_sanity(), - zext_instruction(Instr), - zext_instruction_from_type(Instr, FromType), - zext_instruction_to_type(Instr, ToType), - !vector_compatible_types(FromType, ToType). diff --git a/datalog/symbol-lookup/resolve-func-calls.dl b/datalog/symbol-lookup/resolve-func-calls.dl index 8d8019d..1d84766 100644 --- a/datalog/symbol-lookup/resolve-func-calls.dl +++ b/datalog/symbol-lookup/resolve-func-calls.dl @@ -10,9 +10,9 @@ // // 2. If a func definition exists, then no declarations will be // visible. This means that we do not have to deal with any -// indirections when creating the mapping from call instructions +// indirections when creating the mapping from call instrs // to funcs being called. When a func definition exists, -// then the call instruction will be mapped to it. Otherwise, it +// then the call instr will be mapped to it. Otherwise, it // will be mapped to a func declaration. // // 3. In principle, not all func declarations will map directly @@ -85,34 +85,34 @@ constant_references_variable(OtherConstant, GVar) :- //------------------------------------------------------------------------------ -// Mapping from call instructions to func declarations +// Mapping from call instrs to func declarations //------------------------------------------------------------------------------ .decl _instr_calls_func(instr:Instruction, target:FunctionDecl) _instr_calls_func(Instr, Func) :- - direct_call_instruction(Instr), - call_instruction_fn_operand(Instr, FunctionConstant), + direct_call_instr(Instr), + call_instr_fn_operand(Instr, FunctionConstant), constant(FunctionConstant), constant_references_func(FunctionConstant, Func). _instr_calls_func(Instr, Func) :- - direct_invoke_instruction(Instr), - invoke_instruction_fn_operand(Instr, FunctionConstant), + direct_invoke_instr(Instr), + invoke_instr_fn_operand(Instr, FunctionConstant), constant(FunctionConstant), constant_references_func(FunctionConstant, Func). // Is this always true for our tests? -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - direct_call_instruction(Instr), - !call_instruction_fn_target(Instr, _). + direct_call_instr(Instr), + !call_instr_fn_target(Instr, _). -schema_invalid_instruction(Instr, __FILE__, __LINE__) :- +schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), - direct_invoke_instruction(Instr), - !invoke_instruction_fn_target(Instr, _). + direct_invoke_instr(Instr), + !invoke_instr_fn_target(Instr, _). //---------------------------------------------------------------------- @@ -131,25 +131,25 @@ schema_invalid_instruction(Instr, __FILE__, __LINE__) :- func_decl_to_defn(Func, Func) :- func(Func). -// Map call instructions to funcs. If definition is obtainable, +// Map call instrs to funcs. If definition is obtainable, // map to it; else map to declaration -call_instruction_fn_target(Instr, Func) :- - call_instruction(Instr), +call_instr_fn_target(Instr, Func) :- + call_instr(Instr), _instr_calls_func(Instr, SomeFunc), func_decl_to_defn(SomeFunc, Func). -call_instruction_fn_target(Instr, SomeFunc) :- - call_instruction(Instr), +call_instr_fn_target(Instr, SomeFunc) :- + call_instr(Instr), _instr_calls_func(Instr, SomeFunc), !func_decl_to_defn(SomeFunc, _). -invoke_instruction_fn_target(Instr, Func) :- - invoke_instruction(Instr), +invoke_instr_fn_target(Instr, Func) :- + invoke_instr(Instr), _instr_calls_func(Instr, SomeFunc), func_decl_to_defn(SomeFunc, Func). -invoke_instruction_fn_target(Instr, SomeFunc) :- - invoke_instruction(Instr), +invoke_instr_fn_target(Instr, SomeFunc) :- + invoke_instr(Instr), _instr_calls_func(Instr, SomeFunc), !func_decl_to_defn(SomeFunc, _). diff --git a/doc/dev.rst b/doc/dev.rst index 53fd2da..aadcd33 100644 --- a/doc/dev.rst +++ b/doc/dev.rst @@ -60,9 +60,14 @@ space. This judgment is highly subjective, but must be made somehow. - ``var``: Variable - ``vec``: Vector -Explicitly **not** further abbreviated: +Explicitly **not** further abbreviated, because they are already fairly short, +or they are not common enough when speaking about LLVM to readily disambiguate +them from abbreviations for other terms: - ``array`` +- ``inl``: Could mean "inline" or "left injection" +- ``pred``: Could mean "predicate" or "predecessor" +- ``succ``: Could mean "successor" or "success" - ``struct`` ``type`` is for relations about types themselves, whereas ``ty`` is used for diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index 11b7a44..0000000 --- a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,4 +0,0 @@ -:main:17 *heap_alloc@main[i8* %call2] -:main:31 *heap_alloc@main[i8* %call3] -:main:35 *heap_alloc@main[i8* %call4] -:main:42 *heap_alloc@main[i8* %call7] diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index 11b7a44..0000000 --- a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,4 +0,0 @@ -:main:17 *heap_alloc@main[i8* %call2] -:main:31 *heap_alloc@main[i8* %call3] -:main:35 *heap_alloc@main[i8* %call4] -:main:42 *heap_alloc@main[i8* %call7] diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e2a57db..0000000 --- a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv +++ /dev/null @@ -1,8 +0,0 @@ -i32 :main:17 *typed_heap_alloc@main[i32* %call2] -i32 :main:31 *typed_heap_alloc@main[i32* %call3] -i32 :main:35 *typed_heap_alloc@main[i32* %call4] -i32 :main:42 *typed_heap_alloc@main[i32* %call7] -i8 :main:17 *typed_heap_alloc@main[i8* %call2] -i8 :main:31 *typed_heap_alloc@main[i8* %call3] -i8 :main:35 *typed_heap_alloc@main[i8* %call4] -i8 :main:42 *typed_heap_alloc@main[i8* %call7] diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e2a57db..0000000 --- a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv +++ /dev/null @@ -1,8 +0,0 @@ -i32 :main:17 *typed_heap_alloc@main[i32* %call2] -i32 :main:31 *typed_heap_alloc@main[i32* %call3] -i32 :main:35 *typed_heap_alloc@main[i32* %call4] -i32 :main:42 *typed_heap_alloc@main[i32* %call7] -i8 :main:17 *typed_heap_alloc@main[i8* %call2] -i8 :main:31 *typed_heap_alloc@main[i8* %call3] -i8 :main:35 *typed_heap_alloc@main[i8* %call4] -i8 :main:42 *typed_heap_alloc@main[i8* %call7] diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index ed03532..0000000 --- a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,12 +0,0 @@ -:main:0 *stack_alloc@main[i32* %retval] -:main:1 *stack_alloc@main[i32* %dyn] -:main:2 *stack_alloc@main[[8 x i32]* %small_const_size_stack] -:main:26 *stack_alloc@main[i32* %vla] -:main:3 *stack_alloc@main[[128 x i32]* %large_const_size_stack] -:main:4 *stack_alloc@main[i8** %saved_stack] -:main:5 *stack_alloc@main[i64* %__vla_expr0] -:main:6 *stack_alloc@main[i32** %small_const_size_heap] -:main:7 *stack_alloc@main[i32** %large_const_size_heap] -:main:8 *stack_alloc@main[i32** %dynamic_size_heap] -:set:0 *stack_alloc@set[i32** %buf.addr] -:set:1 *stack_alloc@set[i32* %sz.addr] diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index ed03532..0000000 --- a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,12 +0,0 @@ -:main:0 *stack_alloc@main[i32* %retval] -:main:1 *stack_alloc@main[i32* %dyn] -:main:2 *stack_alloc@main[[8 x i32]* %small_const_size_stack] -:main:26 *stack_alloc@main[i32* %vla] -:main:3 *stack_alloc@main[[128 x i32]* %large_const_size_stack] -:main:4 *stack_alloc@main[i8** %saved_stack] -:main:5 *stack_alloc@main[i64* %__vla_expr0] -:main:6 *stack_alloc@main[i32** %small_const_size_heap] -:main:7 *stack_alloc@main[i32** %large_const_size_heap] -:main:8 *stack_alloc@main[i32** %dynamic_size_heap] -:set:0 *stack_alloc@set[i32** %buf.addr] -:set:1 *stack_alloc@set[i32* %sz.addr] diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index 8343111..0000000 --- a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv +++ /dev/null @@ -1 +0,0 @@ -i8 :main:26 *typed_stack_alloc@main[i8* %vla] diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index 8343111..0000000 --- a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv +++ /dev/null @@ -1 +0,0 @@ -i8 :main:26 *typed_stack_alloc@main[i8* %vla] diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index 5b81db9..0000000 --- a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,4 +0,0 @@ -:main:20 *heap_alloc@main[i8* %call3] -:main:23 *heap_alloc@main[i8* %call4] -:main:26 *heap_alloc@main[i8* %call7] -:main:7 *heap_alloc@main[i8* %call2] diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index 5b81db9..0000000 --- a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,4 +0,0 @@ -:main:20 *heap_alloc@main[i8* %call3] -:main:23 *heap_alloc@main[i8* %call4] -:main:26 *heap_alloc@main[i8* %call7] -:main:7 *heap_alloc@main[i8* %call2] diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index 5951817..0000000 --- a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv +++ /dev/null @@ -1,7 +0,0 @@ -i32 :main:20 *typed_heap_alloc@main[i32* %call3] -i32 :main:23 *typed_heap_alloc@main[i32* %call4] -i32 :main:26 *typed_heap_alloc@main[i32* %call7] -i8 :main:20 *typed_heap_alloc@main[i8* %call3] -i8 :main:23 *typed_heap_alloc@main[i8* %call4] -i8 :main:26 *typed_heap_alloc@main[i8* %call7] -i8 :main:7 *typed_heap_alloc@main[i8* %call2] diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index 5951817..0000000 --- a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv +++ /dev/null @@ -1,7 +0,0 @@ -i32 :main:20 *typed_heap_alloc@main[i32* %call3] -i32 :main:23 *typed_heap_alloc@main[i32* %call4] -i32 :main:26 *typed_heap_alloc@main[i32* %call7] -i8 :main:20 *typed_heap_alloc@main[i8* %call3] -i8 :main:23 *typed_heap_alloc@main[i8* %call4] -i8 :main:26 *typed_heap_alloc@main[i8* %call7] -i8 :main:7 *typed_heap_alloc@main[i8* %call2] diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index 31860a3..0000000 --- a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,3 +0,0 @@ -:main:0 *stack_alloc@main[[8 x i32]* %small_const_size_stack] -:main:1 *stack_alloc@main[[128 x i32]* %large_const_size_stack] -:main:17 *stack_alloc@main[i32* %vla] diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index 31860a3..0000000 --- a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,3 +0,0 @@ -:main:0 *stack_alloc@main[[8 x i32]* %small_const_size_stack] -:main:1 *stack_alloc@main[[128 x i32]* %large_const_size_stack] -:main:17 *stack_alloc@main[i32* %vla] diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index f61a008..0000000 --- a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv +++ /dev/null @@ -1 +0,0 @@ -i8 :main:17 *typed_stack_alloc@main[i8* %vla] diff --git a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index f61a008..0000000 --- a/test/gold/allocation-sizes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv +++ /dev/null @@ -1 +0,0 @@ -i8 :main:17 *typed_stack_alloc@main[i8* %vla] diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index 808e967..0000000 --- a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,12 +0,0 @@ -:bar:0 *stack_alloc@bar[i32* %x.addr] -:foo:0 *stack_alloc@foo[i32* %x.addr] -:foo:1 *stack_alloc@foo[i32* %a] -:foo:2 *stack_alloc@foo[i32* %b] -:main:0 *stack_alloc@main[i32* %retval] -:main:1 *stack_alloc@main[i32* %argc.addr] -:main:2 *stack_alloc@main[i8*** %argv.addr] -:main:3 *stack_alloc@main[i32* %a] -:main:4 *stack_alloc@main[i32* %b] -:main:5 *stack_alloc@main[i32* %c] -:main:6 *stack_alloc@main[i32* %d] -:main:7 *stack_alloc@main[i32* %e] diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index 808e967..0000000 --- a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,12 +0,0 @@ -:bar:0 *stack_alloc@bar[i32* %x.addr] -:foo:0 *stack_alloc@foo[i32* %x.addr] -:foo:1 *stack_alloc@foo[i32* %a] -:foo:2 *stack_alloc@foo[i32* %b] -:main:0 *stack_alloc@main[i32* %retval] -:main:1 *stack_alloc@main[i32* %argc.addr] -:main:2 *stack_alloc@main[i8*** %argv.addr] -:main:3 *stack_alloc@main[i32* %a] -:main:4 *stack_alloc@main[i32* %b] -:main:5 *stack_alloc@main[i32* %c] -:main:6 *stack_alloc@main[i32* %d] -:main:7 *stack_alloc@main[i32* %e] diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index 02fc7dc..0000000 --- a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,7 +0,0 @@ -:main:0 *stack_alloc@main[i32* %retval] -:main:1 *stack_alloc@main[i32* %argc.addr] -:main:2 *stack_alloc@main[i8*** %argv.addr] -:main:3 *stack_alloc@main[%"class.std::__cxx11::basic_string"* %foo] -:main:4 *stack_alloc@main[%"class.std::allocator"* %ref.tmp] -:main:5 *stack_alloc@main[i8** %exn.slot] -:main:6 *stack_alloc@main[i32* %ehselector.slot] diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index 02fc7dc..0000000 --- a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,7 +0,0 @@ -:main:0 *stack_alloc@main[i32* %retval] -:main:1 *stack_alloc@main[i32* %argc.addr] -:main:2 *stack_alloc@main[i8*** %argv.addr] -:main:3 *stack_alloc@main[%"class.std::__cxx11::basic_string"* %foo] -:main:4 *stack_alloc@main[%"class.std::allocator"* %ref.tmp] -:main:5 *stack_alloc@main[i8** %exn.slot] -:main:6 *stack_alloc@main[i32* %ehselector.slot] diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index 342e38f..0000000 --- a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,6 +0,0 @@ -:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag:0 *stack_alloc@_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag[i64* %__dnew] -:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_M_set_lengthEm:0 *stack_alloc@_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_M_set_lengthEm[i8* %ref.tmp] -:_ZSt8distanceIPKcENSt15iterator_traitsIT_E15difference_typeES3_S3_:0 *stack_alloc@_ZSt8distanceIPKcENSt15iterator_traitsIT_E15difference_typeES3_S3_[i8** %__first.addr] -:_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c:0 *stack_alloc@_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c[i8* %__c.addr] -:main:0 *stack_alloc@main[%"class.std::__cxx11::basic_string"* %foo] -:main:1 *stack_alloc@main[%"class.std::allocator"* %ref.tmp] diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index 342e38f..0000000 --- a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,6 +0,0 @@ -:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag:0 *stack_alloc@_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag[i64* %__dnew] -:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_M_set_lengthEm:0 *stack_alloc@_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_M_set_lengthEm[i8* %ref.tmp] -:_ZSt8distanceIPKcENSt15iterator_traitsIT_E15difference_typeES3_S3_:0 *stack_alloc@_ZSt8distanceIPKcENSt15iterator_traitsIT_E15difference_typeES3_S3_[i8** %__first.addr] -:_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c:0 *stack_alloc@_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c[i8* %__c.addr] -:main:0 *stack_alloc@main[%"class.std::__cxx11::basic_string"* %foo] -:main:1 *stack_alloc@main[%"class.std::allocator"* %ref.tmp] diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index c60663f..0000000 --- a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv +++ /dev/null @@ -1 +0,0 @@ -i8 :_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag:0 *typed_stack_alloc@_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag[i8* %__dnew] diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index c60663f..0000000 --- a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv +++ /dev/null @@ -1 +0,0 @@ -i8 :_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag:0 *typed_stack_alloc@_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag[i8* %__dnew] diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cfg-test.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index 79a32fa..0000000 --- a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,4 +0,0 @@ -:main:0 *stack_alloc@main[i32* %retval] -:main:1 *stack_alloc@main[i32* %argc.addr] -:main:2 *stack_alloc@main[i8*** %argv.addr] -:main:3 *stack_alloc@main[[3 x void ()*]* %table] diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index 79a32fa..0000000 --- a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,4 +0,0 @@ -:main:0 *stack_alloc@main[i32* %retval] -:main:1 *stack_alloc@main[i32* %argc.addr] -:main:2 *stack_alloc@main[i8*** %argv.addr] -:main:3 *stack_alloc@main[[3 x void ()*]* %table] diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index 29ebafa..0000000 --- a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,2 +0,0 @@ -:hex_str:29 *heap_alloc@hex_str[i8* %call] -:notes_malloc:6 *heap_alloc@notes_malloc[i8* %call] diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index 29ebafa..0000000 --- a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,2 +0,0 @@ -:hex_str:29 *heap_alloc@hex_str[i8* %call] -:notes_malloc:6 *heap_alloc@notes_malloc[i8* %call] diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index 6293327..0000000 --- a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv +++ /dev/null @@ -1,2 +0,0 @@ -%struct.cmd :notes_malloc:6 *typed_heap_alloc@notes_malloc[%struct.cmd* %call] -i8 :notes_malloc:6 *typed_heap_alloc@notes_malloc[i8* %call] diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index 6293327..0000000 --- a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv +++ /dev/null @@ -1,2 +0,0 @@ -%struct.cmd :notes_malloc:6 *typed_heap_alloc@notes_malloc[%struct.cmd* %call] -i8 :notes_malloc:6 *typed_heap_alloc@notes_malloc[i8* %call] diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index 7124729..0000000 --- a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,46 +0,0 @@ -:accept_loop:0 *stack_alloc@accept_loop[i32* %retval] -:accept_loop:1 *stack_alloc@accept_loop[i32* %socket_fd.addr] -:accept_loop:2 *stack_alloc@accept_loop[i32* %connection_fd] -:cmd_read:0 *stack_alloc@cmd_read[i8** %retval] -:cmd_read:1 *stack_alloc@cmd_read[i8** %arg.addr] -:cmd_read:2 *stack_alloc@cmd_read[%struct._IO_FILE** %f] -:cmd_read:3 *stack_alloc@cmd_read[[1024 x i8]* %data] -:cmd_write:0 *stack_alloc@cmd_write[i8** %retval] -:cmd_write:1 *stack_alloc@cmd_write[i8** %arg.addr] -:cmd_write:2 *stack_alloc@cmd_write[i8** %k] -:cmd_write:3 *stack_alloc@cmd_write[%struct._IO_FILE** %f] -:handle:0 *stack_alloc@handle[i8** %retval] -:handle:1 *stack_alloc@handle[i8** %req.addr] -:handle:2 *stack_alloc@handle[%struct.cmd** %cmd] -:handle:3 *stack_alloc@handle[i8** %resp] -:handle_loop:0 *stack_alloc@handle_loop[i32* %connection_fd.addr] -:handle_loop:1 *stack_alloc@handle_loop[[1024 x i8]* %req] -:handle_loop:2 *stack_alloc@handle_loop[i64* %read] -:handle_loop:3 *stack_alloc@handle_loop[i8** %response] -:hex_str:0 *stack_alloc@hex_str[i8** %in.addr] -:hex_str:1 *stack_alloc@hex_str[i64* %in_len.addr] -:hex_str:2 *stack_alloc@hex_str[i64* %out_len] -:hex_str:3 *stack_alloc@hex_str[i8** %out] -:hex_str:4 *stack_alloc@hex_str[i32* %j] -:hex_str:5 *stack_alloc@hex_str[i32* %i] -:key:0 *stack_alloc@key[i8** %retval] -:key:1 *stack_alloc@key[[32 x i8]* %data] -:key:2 *stack_alloc@key[%struct._IO_FILE** %f] -:key:3 *stack_alloc@key[i32* %i] -:key:4 *stack_alloc@key[i64* %ret] -:main:0 *stack_alloc@main[i32* %retval] -:main:1 *stack_alloc@main[%struct.sockaddr_in* %sa] -:main:2 *stack_alloc@main[i32* %socket_fd] -:main:3 *stack_alloc@main[i32* %exit_code] -:new_cmd:0 *stack_alloc@new_cmd[i32* %c.addr] -:new_cmd:1 *stack_alloc@new_cmd[i8** %arg.addr] -:new_cmd:2 *stack_alloc@new_cmd[%struct.cmd** %cmd] -:notes_malloc:0 *stack_alloc@notes_malloc[i64* %sz.addr] -:notes_malloc:1 *stack_alloc@notes_malloc[i8** %p] -:notes_strdup:0 *stack_alloc@notes_strdup[i8** %s.addr] -:notes_strdup:1 *stack_alloc@notes_strdup[i8** %p] -:parse:0 *stack_alloc@parse[%struct.cmd** %retval] -:parse:1 *stack_alloc@parse[i8** %req.addr] -:parse:2 *stack_alloc@parse[i8** %arg] -:parse:3 *stack_alloc@parse[i8** %space] -:parse:4 *stack_alloc@parse[%struct.cmd** %cmd] diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index 7124729..0000000 --- a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,46 +0,0 @@ -:accept_loop:0 *stack_alloc@accept_loop[i32* %retval] -:accept_loop:1 *stack_alloc@accept_loop[i32* %socket_fd.addr] -:accept_loop:2 *stack_alloc@accept_loop[i32* %connection_fd] -:cmd_read:0 *stack_alloc@cmd_read[i8** %retval] -:cmd_read:1 *stack_alloc@cmd_read[i8** %arg.addr] -:cmd_read:2 *stack_alloc@cmd_read[%struct._IO_FILE** %f] -:cmd_read:3 *stack_alloc@cmd_read[[1024 x i8]* %data] -:cmd_write:0 *stack_alloc@cmd_write[i8** %retval] -:cmd_write:1 *stack_alloc@cmd_write[i8** %arg.addr] -:cmd_write:2 *stack_alloc@cmd_write[i8** %k] -:cmd_write:3 *stack_alloc@cmd_write[%struct._IO_FILE** %f] -:handle:0 *stack_alloc@handle[i8** %retval] -:handle:1 *stack_alloc@handle[i8** %req.addr] -:handle:2 *stack_alloc@handle[%struct.cmd** %cmd] -:handle:3 *stack_alloc@handle[i8** %resp] -:handle_loop:0 *stack_alloc@handle_loop[i32* %connection_fd.addr] -:handle_loop:1 *stack_alloc@handle_loop[[1024 x i8]* %req] -:handle_loop:2 *stack_alloc@handle_loop[i64* %read] -:handle_loop:3 *stack_alloc@handle_loop[i8** %response] -:hex_str:0 *stack_alloc@hex_str[i8** %in.addr] -:hex_str:1 *stack_alloc@hex_str[i64* %in_len.addr] -:hex_str:2 *stack_alloc@hex_str[i64* %out_len] -:hex_str:3 *stack_alloc@hex_str[i8** %out] -:hex_str:4 *stack_alloc@hex_str[i32* %j] -:hex_str:5 *stack_alloc@hex_str[i32* %i] -:key:0 *stack_alloc@key[i8** %retval] -:key:1 *stack_alloc@key[[32 x i8]* %data] -:key:2 *stack_alloc@key[%struct._IO_FILE** %f] -:key:3 *stack_alloc@key[i32* %i] -:key:4 *stack_alloc@key[i64* %ret] -:main:0 *stack_alloc@main[i32* %retval] -:main:1 *stack_alloc@main[%struct.sockaddr_in* %sa] -:main:2 *stack_alloc@main[i32* %socket_fd] -:main:3 *stack_alloc@main[i32* %exit_code] -:new_cmd:0 *stack_alloc@new_cmd[i32* %c.addr] -:new_cmd:1 *stack_alloc@new_cmd[i8** %arg.addr] -:new_cmd:2 *stack_alloc@new_cmd[%struct.cmd** %cmd] -:notes_malloc:0 *stack_alloc@notes_malloc[i64* %sz.addr] -:notes_malloc:1 *stack_alloc@notes_malloc[i8** %p] -:notes_strdup:0 *stack_alloc@notes_strdup[i8** %s.addr] -:notes_strdup:1 *stack_alloc@notes_strdup[i8** %p] -:parse:0 *stack_alloc@parse[%struct.cmd** %retval] -:parse:1 *stack_alloc@parse[i8** %req.addr] -:parse:2 *stack_alloc@parse[i8** %arg] -:parse:3 *stack_alloc@parse[i8** %space] -:parse:4 *stack_alloc@parse[%struct.cmd** %cmd] diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index 235045d..0000000 --- a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,2 +0,0 @@ -:hex_str:7 *heap_alloc@hex_str[i8* %call] -:notes_malloc:1 *heap_alloc@notes_malloc[i8* %call] diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index 235045d..0000000 --- a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,2 +0,0 @@ -:hex_str:7 *heap_alloc@hex_str[i8* %call] -:notes_malloc:1 *heap_alloc@notes_malloc[i8* %call] diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index d91441b..0000000 --- a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv +++ /dev/null @@ -1,3 +0,0 @@ -%struct.cmd :notes_malloc:1 *typed_heap_alloc@notes_malloc[%struct.cmd* %call] -i32 :notes_malloc:1 *typed_heap_alloc@notes_malloc[i32* %call] -i8 :notes_malloc:1 *typed_heap_alloc@notes_malloc[i8* %call] diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index d91441b..0000000 --- a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv +++ /dev/null @@ -1,3 +0,0 @@ -%struct.cmd :notes_malloc:1 *typed_heap_alloc@notes_malloc[%struct.cmd* %call] -i32 :notes_malloc:1 *typed_heap_alloc@notes_malloc[i32* %call] -i8 :notes_malloc:1 *typed_heap_alloc@notes_malloc[i8* %call] diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index eee457c..0000000 --- a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,4 +0,0 @@ -:cmd_read:0 *stack_alloc@cmd_read[[1024 x i8]* %data] -:handle_loop:0 *stack_alloc@handle_loop[[1024 x i8]* %req] -:key:0 *stack_alloc@key[[32 x i8]* %data] -:main:0 *stack_alloc@main[%struct.sockaddr_in* %sa] diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index eee457c..0000000 --- a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,4 +0,0 @@ -:cmd_read:0 *stack_alloc@cmd_read[[1024 x i8]* %data] -:handle_loop:0 *stack_alloc@handle_loop[[1024 x i8]* %req] -:key:0 *stack_alloc@key[[32 x i8]* %data] -:main:0 *stack_alloc@main[%struct.sockaddr_in* %sa] diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index 809b144..0000000 --- a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv +++ /dev/null @@ -1 +0,0 @@ -:_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:18 *heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[i8* %call2] diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index 809b144..0000000 --- a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv +++ /dev/null @@ -1 +0,0 @@ -:_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:18 *heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[i8* %call2] diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index 15d02d1..0000000 --- a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv +++ /dev/null @@ -1,6 +0,0 @@ -%class.std::_Mutex_base :_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:18 *typed_heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[%"class.std::_Mutex_base"* %call2] -%class.std::_Sp_counted_base :_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:18 *typed_heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[%"class.std::_Sp_counted_base"* %call2] -%class.std::_Sp_counted_ptr_inplace :_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:18 *typed_heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[%"class.std::_Sp_counted_ptr_inplace"* %call2] -i32 (...)** :_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:18 *typed_heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[i32 (...)*** %call2] -i8 :_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:18 *typed_heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[i8* %call2] -void (%"class.std::_Sp_counted_base"*)** :_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:18 *typed_heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[void (%"class.std::_Sp_counted_base"*)*** %call2] diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index 15d02d1..0000000 --- a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv +++ /dev/null @@ -1,6 +0,0 @@ -%class.std::_Mutex_base :_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:18 *typed_heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[%"class.std::_Mutex_base"* %call2] -%class.std::_Sp_counted_base :_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:18 *typed_heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[%"class.std::_Sp_counted_base"* %call2] -%class.std::_Sp_counted_ptr_inplace :_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:18 *typed_heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[%"class.std::_Sp_counted_ptr_inplace"* %call2] -i32 (...)** :_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:18 *typed_heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[i32 (...)*** %call2] -i8 :_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:18 *typed_heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[i8* %call2] -void (%"class.std::_Sp_counted_base"*)** :_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:18 *typed_heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[void (%"class.std::_Sp_counted_base"*)*** %call2] diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index 40fcc5c..0000000 --- a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,117 +0,0 @@ -:_Z16hardcoded_sharedv:0 *stack_alloc@_Z16hardcoded_sharedv[%"class.std::shared_ptr"* %mylambda] -:_Z16hardcoded_sharedv:1 *stack_alloc@_Z16hardcoded_sharedv[i8** %exn.slot] -:_Z16hardcoded_sharedv:2 *stack_alloc@_Z16hardcoded_sharedv[i32* %ehselector.slot] -:_ZN10FakeLambdaC2Ev:0 *stack_alloc@_ZN10FakeLambdaC2Ev[%class.FakeLambda** %this.addr] -:_ZN10FakeLambdaD2Ev:0 *stack_alloc@_ZN10FakeLambdaD2Ev[%class.FakeLambda** %this.addr] -:_ZN9__gnu_cxx13new_allocatorI10FakeLambdaE7destroyIS1_EEvPT_:0 *stack_alloc@_ZN9__gnu_cxx13new_allocatorI10FakeLambdaE7destroyIS1_EEvPT_[%"class.__gnu_cxx::new_allocator"** %this.addr] -:_ZN9__gnu_cxx13new_allocatorI10FakeLambdaE7destroyIS1_EEvPT_:1 *stack_alloc@_ZN9__gnu_cxx13new_allocatorI10FakeLambdaE7destroyIS1_EEvPT_[%class.FakeLambda** %__p.addr] -:_ZN9__gnu_cxx13new_allocatorI10FakeLambdaE9constructIS1_JEEEvPT_DpOT0_:0 *stack_alloc@_ZN9__gnu_cxx13new_allocatorI10FakeLambdaE9constructIS1_JEEEvPT_DpOT0_[%"class.__gnu_cxx::new_allocator"** %this.addr] -:_ZN9__gnu_cxx13new_allocatorI10FakeLambdaE9constructIS1_JEEEvPT_DpOT0_:1 *stack_alloc@_ZN9__gnu_cxx13new_allocatorI10FakeLambdaE9constructIS1_JEEEvPT_DpOT0_[%class.FakeLambda** %__p.addr] -:_ZN9__gnu_cxx13new_allocatorI10FakeLambdaEC2ERKS2_:0 *stack_alloc@_ZN9__gnu_cxx13new_allocatorI10FakeLambdaEC2ERKS2_[%"class.__gnu_cxx::new_allocator"** %this.addr] -:_ZN9__gnu_cxx13new_allocatorI10FakeLambdaEC2ERKS2_:1 *stack_alloc@_ZN9__gnu_cxx13new_allocatorI10FakeLambdaEC2ERKS2_[%"class.__gnu_cxx::new_allocator"** %.addr] -:_ZN9__gnu_cxx13new_allocatorI10FakeLambdaEC2Ev:0 *stack_alloc@_ZN9__gnu_cxx13new_allocatorI10FakeLambdaEC2Ev[%"class.__gnu_cxx::new_allocator"** %this.addr] -:_ZN9__gnu_cxx13new_allocatorI10FakeLambdaED2Ev:0 *stack_alloc@_ZN9__gnu_cxx13new_allocatorI10FakeLambdaED2Ev[%"class.__gnu_cxx::new_allocator"** %this.addr] -:_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE10deallocateEPS5_m:0 *stack_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE10deallocateEPS5_m[%"class.__gnu_cxx::new_allocator.1"** %this.addr] -:_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE10deallocateEPS5_m:1 *stack_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE10deallocateEPS5_m[%"class.std::_Sp_counted_ptr_inplace"** %__p.addr] -:_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE10deallocateEPS5_m:2 *stack_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE10deallocateEPS5_m[i64* %.addr] -:_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:0 *stack_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[%"class.__gnu_cxx::new_allocator.1"** %this.addr] -:_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:1 *stack_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[i64* %__n.addr] -:_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:2 *stack_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[i8** %.addr] -:_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEEC2Ev:0 *stack_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEEC2Ev[%"class.__gnu_cxx::new_allocator.1"** %this.addr] -:_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEED2Ev:0 *stack_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEED2Ev[%"class.__gnu_cxx::new_allocator.1"** %this.addr] -:_ZN9__gnu_cxx16__aligned_bufferI10FakeLambdaE6_M_ptrEv:0 *stack_alloc@_ZN9__gnu_cxx16__aligned_bufferI10FakeLambdaE6_M_ptrEv[%"struct.__gnu_cxx::__aligned_buffer"** %this.addr] -:_ZN9__gnu_cxx16__aligned_bufferI10FakeLambdaE7_M_addrEv:0 *stack_alloc@_ZN9__gnu_cxx16__aligned_bufferI10FakeLambdaE7_M_addrEv[%"struct.__gnu_cxx::__aligned_buffer"** %this.addr] -:_ZN9__gnu_cxxL18__exchange_and_addEPVii:0 *stack_alloc@_ZN9__gnu_cxxL18__exchange_and_addEPVii[i32** %__mem.addr] -:_ZN9__gnu_cxxL18__exchange_and_addEPVii:1 *stack_alloc@_ZN9__gnu_cxxL18__exchange_and_addEPVii[i32* %__val.addr] -:_ZN9__gnu_cxxL18__exchange_and_addEPVii:2 *stack_alloc@_ZN9__gnu_cxxL18__exchange_and_addEPVii[i32* %.atomictmp] -:_ZN9__gnu_cxxL18__exchange_and_addEPVii:3 *stack_alloc@_ZN9__gnu_cxxL18__exchange_and_addEPVii[i32* %atomic-temp] -:_ZN9__gnu_cxxL25__exchange_and_add_singleEPii:0 *stack_alloc@_ZN9__gnu_cxxL25__exchange_and_add_singleEPii[i32** %__mem.addr] -:_ZN9__gnu_cxxL25__exchange_and_add_singleEPii:1 *stack_alloc@_ZN9__gnu_cxxL25__exchange_and_add_singleEPii[i32* %__val.addr] -:_ZN9__gnu_cxxL25__exchange_and_add_singleEPii:2 *stack_alloc@_ZN9__gnu_cxxL25__exchange_and_add_singleEPii[i32* %__result] -:_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii:0 *stack_alloc@_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii[i32* %retval] -:_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii:1 *stack_alloc@_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii[i32** %__mem.addr] -:_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii:2 *stack_alloc@_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii[i32* %__val.addr] -:_ZNK10FakeLambda7inspectEv:0 *stack_alloc@_ZNK10FakeLambda7inspectEv[%class.FakeLambda** %this.addr] -:_ZNK9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8max_sizeEv:0 *stack_alloc@_ZNK9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8max_sizeEv[%"class.__gnu_cxx::new_allocator.1"** %this.addr] -:_ZNKSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EE3getEv:0 *stack_alloc@_ZNKSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EE3getEv[%"class.std::__shared_ptr"** %this.addr] -:_ZNKSt19__shared_ptr_accessI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EE6_M_getEv:0 *stack_alloc@_ZNKSt19__shared_ptr_accessI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EE6_M_getEv[%"class.std::__shared_ptr_access"** %this.addr] -:_ZNKSt19__shared_ptr_accessI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv:0 *stack_alloc@_ZNKSt19__shared_ptr_accessI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv[%"class.std::__shared_ptr_access"** %this.addr] -:_ZNSaI10FakeLambdaEC2ERKS0_:0 *stack_alloc@_ZNSaI10FakeLambdaEC2ERKS0_[%"class.std::allocator"** %this.addr] -:_ZNSaI10FakeLambdaEC2ERKS0_:1 *stack_alloc@_ZNSaI10FakeLambdaEC2ERKS0_[%"class.std::allocator"** %__a.addr] -:_ZNSaI10FakeLambdaEC2Ev:0 *stack_alloc@_ZNSaI10FakeLambdaEC2Ev[%"class.std::allocator"** %this.addr] -:_ZNSaI10FakeLambdaED2Ev:0 *stack_alloc@_ZNSaI10FakeLambdaED2Ev[%"class.std::allocator"** %this.addr] -:_ZNSaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEEC2IS0_EERKSaIT_E:0 *stack_alloc@_ZNSaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEEC2IS0_EERKSaIT_E[%"class.std::allocator.0"** %this.addr] -:_ZNSaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEEC2IS0_EERKSaIT_E:1 *stack_alloc@_ZNSaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEEC2IS0_EERKSaIT_E[%"class.std::allocator"** %.addr] -:_ZNSaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEED2Ev:0 *stack_alloc@_ZNSaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEED2Ev[%"class.std::allocator.0"** %this.addr] -:_ZNSt10shared_ptrI10FakeLambdaEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_:0 *stack_alloc@_ZNSt10shared_ptrI10FakeLambdaEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_[%"struct.std::_Sp_alloc_shared_tag"* %__tag] -:_ZNSt10shared_ptrI10FakeLambdaEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_:1 *stack_alloc@_ZNSt10shared_ptrI10FakeLambdaEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_[%"class.std::shared_ptr"** %this.addr] -:_ZNSt10shared_ptrI10FakeLambdaEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_:2 *stack_alloc@_ZNSt10shared_ptrI10FakeLambdaEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_[%"struct.std::_Sp_alloc_shared_tag"* %agg.tmp] -:_ZNSt10shared_ptrI10FakeLambdaED2Ev:0 *stack_alloc@_ZNSt10shared_ptrI10FakeLambdaED2Ev[%"class.std::shared_ptr"** %this.addr] -:_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EE31_M_enable_shared_from_this_withIS0_S0_EENSt9enable_ifIXntsr15__has_esft_baseIT0_EE5valueEvE4typeEPT_:0 *stack_alloc@_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EE31_M_enable_shared_from_this_withIS0_S0_EENSt9enable_ifIXntsr15__has_esft_baseIT0_EE5valueEvE4typeEPT_[%"class.std::__shared_ptr"** %this.addr] -:_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EE31_M_enable_shared_from_this_withIS0_S0_EENSt9enable_ifIXntsr15__has_esft_baseIT0_EE5valueEvE4typeEPT_:1 *stack_alloc@_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EE31_M_enable_shared_from_this_withIS0_S0_EENSt9enable_ifIXntsr15__has_esft_baseIT0_EE5valueEvE4typeEPT_[%class.FakeLambda** %.addr] -:_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_:0 *stack_alloc@_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_[%"struct.std::_Sp_alloc_shared_tag"* %__tag] -:_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_:1 *stack_alloc@_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_[%"class.std::__shared_ptr"** %this.addr] -:_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_:2 *stack_alloc@_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_[%"struct.std::_Sp_alloc_shared_tag"* %agg.tmp] -:_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EED2Ev:0 *stack_alloc@_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EED2Ev[%"class.std::__shared_ptr"** %this.addr] -:_ZNSt14_Sp_ebo_helperILi0ESaI10FakeLambdaELb1EE6_S_getERS2_:0 *stack_alloc@_ZNSt14_Sp_ebo_helperILi0ESaI10FakeLambdaELb1EE6_S_getERS2_[%"struct.std::_Sp_ebo_helper"** %__eboh.addr] -:_ZNSt14_Sp_ebo_helperILi0ESaI10FakeLambdaELb1EEC2ERKS1_:0 *stack_alloc@_ZNSt14_Sp_ebo_helperILi0ESaI10FakeLambdaELb1EEC2ERKS1_[%"struct.std::_Sp_ebo_helper"** %this.addr] -:_ZNSt14_Sp_ebo_helperILi0ESaI10FakeLambdaELb1EEC2ERKS1_:1 *stack_alloc@_ZNSt14_Sp_ebo_helperILi0ESaI10FakeLambdaELb1EEC2ERKS1_[%"class.std::allocator"** %__tp.addr] -:_ZNSt14_Sp_ebo_helperILi0ESaI10FakeLambdaELb1EED2Ev:0 *stack_alloc@_ZNSt14_Sp_ebo_helperILi0ESaI10FakeLambdaELb1EED2Ev[%"struct.std::_Sp_ebo_helper"** %this.addr] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:0 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%"struct.std::_Sp_alloc_shared_tag"* %__a] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:1 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%"class.std::__shared_count"** %this.addr] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:2 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%class.FakeLambda*** %__p.addr] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:3 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%"class.std::allocator.0"* %__a2] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:4 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%"struct.std::__allocated_ptr"* %__guard] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:5 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[i8** %exn.slot] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:6 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[i32* %ehselector.slot] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:7 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%"class.std::_Sp_counted_ptr_inplace"** %__mem] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:8 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%"class.std::_Sp_counted_ptr_inplace"** %__pi] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:9 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%"class.std::allocator"* %agg.tmp] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev:0 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev[%"class.std::__shared_count"** %this.addr] -:_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE3getEv:0 *stack_alloc@_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE3getEv[%"struct.std::__allocated_ptr"** %this.addr] -:_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEC2ERS6_PS5_:0 *stack_alloc@_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEC2ERS6_PS5_[%"struct.std::__allocated_ptr"** %this.addr] -:_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEC2ERS6_PS5_:1 *stack_alloc@_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEC2ERS6_PS5_[%"class.std::allocator.0"** %__a.addr] -:_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEC2ERS6_PS5_:2 *stack_alloc@_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEC2ERS6_PS5_[%"class.std::_Sp_counted_ptr_inplace"** %__ptr.addr] -:_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEED2Ev:0 *stack_alloc@_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEED2Ev[%"struct.std::__allocated_ptr"** %this.addr] -:_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEaSEDn:0 *stack_alloc@_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEaSEDn[%"struct.std::__allocated_ptr"** %this.addr] -:_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEaSEDn:1 *stack_alloc@_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEaSEDn[i8** %.addr] -:_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv:0 *stack_alloc@_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv[%"class.std::_Sp_counted_base"** %this.addr] -:_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv:0 *stack_alloc@_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv[%"class.std::_Sp_counted_base"** %this.addr] -:_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EEC2Ev:0 *stack_alloc@_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EEC2Ev[%"class.std::_Sp_counted_base"** %this.addr] -:_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED0Ev:0 *stack_alloc@_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED0Ev[%"class.std::_Sp_counted_base"** %this.addr] -:_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED2Ev:0 *stack_alloc@_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED2Ev[%"class.std::_Sp_counted_base"** %this.addr] -:_ZNSt16allocator_traitsISaI10FakeLambdaEE7destroyIS0_EEvRS1_PT_:0 *stack_alloc@_ZNSt16allocator_traitsISaI10FakeLambdaEE7destroyIS0_EEvRS1_PT_[%"class.std::allocator"** %__a.addr] -:_ZNSt16allocator_traitsISaI10FakeLambdaEE7destroyIS0_EEvRS1_PT_:1 *stack_alloc@_ZNSt16allocator_traitsISaI10FakeLambdaEE7destroyIS0_EEvRS1_PT_[%class.FakeLambda** %__p.addr] -:_ZNSt16allocator_traitsISaI10FakeLambdaEE9constructIS0_JEEEvRS1_PT_DpOT0_:0 *stack_alloc@_ZNSt16allocator_traitsISaI10FakeLambdaEE9constructIS0_JEEEvRS1_PT_DpOT0_[%"class.std::allocator"** %__a.addr] -:_ZNSt16allocator_traitsISaI10FakeLambdaEE9constructIS0_JEEEvRS1_PT_DpOT0_:1 *stack_alloc@_ZNSt16allocator_traitsISaI10FakeLambdaEE9constructIS0_JEEEvRS1_PT_DpOT0_[%class.FakeLambda** %__p.addr] -:_ZNSt16allocator_traitsISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE10deallocateERS6_PS5_m:0 *stack_alloc@_ZNSt16allocator_traitsISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE10deallocateERS6_PS5_m[%"class.std::allocator.0"** %__a.addr] -:_ZNSt16allocator_traitsISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE10deallocateERS6_PS5_m:1 *stack_alloc@_ZNSt16allocator_traitsISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE10deallocateERS6_PS5_m[%"class.std::_Sp_counted_ptr_inplace"** %__p.addr] -:_ZNSt16allocator_traitsISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE10deallocateERS6_PS5_m:2 *stack_alloc@_ZNSt16allocator_traitsISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE10deallocateERS6_PS5_m[i64* %__n.addr] -:_ZNSt16allocator_traitsISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE8allocateERS6_m:0 *stack_alloc@_ZNSt16allocator_traitsISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE8allocateERS6_m[%"class.std::allocator.0"** %__a.addr] -:_ZNSt16allocator_traitsISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE8allocateERS6_m:1 *stack_alloc@_ZNSt16allocator_traitsISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE8allocateERS6_m[i64* %__n.addr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv[%"class.std::_Sp_counted_ptr_inplace"** %this.addr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv:1 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv[%"class.std::allocator.0"* %__a] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv:2 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv[%"struct.std::__allocated_ptr"* %__guard_ptr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[%"class.std::_Sp_counted_ptr_inplace"** %this.addr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE5_Impl8_M_allocEv:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE5_Impl8_M_allocEv[%"class.std::_Sp_counted_ptr_inplace, __gnu_cxx::_S_atomic>::_Impl"** %this.addr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE5_ImplC2ES1_:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE5_ImplC2ES1_[%"class.std::_Sp_counted_ptr_inplace, __gnu_cxx::_S_atomic>::_Impl"** %this.addr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE5_ImplD2Ev:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE5_ImplD2Ev[%"class.std::_Sp_counted_ptr_inplace, __gnu_cxx::_S_atomic>::_Impl"** %this.addr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE6_M_ptrEv:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE6_M_ptrEv[%"class.std::_Sp_counted_ptr_inplace"** %this.addr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEC2IJEEES1_DpOT_:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEC2IJEEES1_DpOT_[%"class.std::_Sp_counted_ptr_inplace"** %this.addr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEC2IJEEES1_DpOT_:1 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEC2IJEEES1_DpOT_[%"class.std::allocator"* %agg.tmp] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEC2IJEEES1_DpOT_:2 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEC2IJEEES1_DpOT_[i8** %exn.slot] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEC2IJEEES1_DpOT_:3 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEC2IJEEES1_DpOT_[i32* %ehselector.slot] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EED0Ev:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EED0Ev[%"class.std::_Sp_counted_ptr_inplace"** %this.addr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EED2Ev:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EED2Ev[%"class.std::_Sp_counted_ptr_inplace"** %this.addr] -:_ZSt11__addressofISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEPT_RS7_:0 *stack_alloc@_ZSt11__addressofISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEPT_RS7_[%"class.std::allocator.0"** %__r.addr] -:_ZSt11make_sharedI10FakeLambdaJEESt10shared_ptrIT_EDpOT0_:0 *stack_alloc@_ZSt11make_sharedI10FakeLambdaJEESt10shared_ptrIT_EDpOT0_[i8** %result.ptr] -:_ZSt11make_sharedI10FakeLambdaJEESt10shared_ptrIT_EDpOT0_:1 *stack_alloc@_ZSt11make_sharedI10FakeLambdaJEESt10shared_ptrIT_EDpOT0_[%"class.std::allocator"* %ref.tmp] -:_ZSt11make_sharedI10FakeLambdaJEESt10shared_ptrIT_EDpOT0_:2 *stack_alloc@_ZSt11make_sharedI10FakeLambdaJEESt10shared_ptrIT_EDpOT0_[i8** %exn.slot] -:_ZSt11make_sharedI10FakeLambdaJEESt10shared_ptrIT_EDpOT0_:3 *stack_alloc@_ZSt11make_sharedI10FakeLambdaJEESt10shared_ptrIT_EDpOT0_[i32* %ehselector.slot] -:_ZSt12__to_addressISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEPT_S7_:0 *stack_alloc@_ZSt12__to_addressISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEPT_S7_[%"class.std::_Sp_counted_ptr_inplace"** %__ptr.addr] -:_ZSt15allocate_sharedI10FakeLambdaSaIS0_EJEESt10shared_ptrIT_ERKT0_DpOT1_:0 *stack_alloc@_ZSt15allocate_sharedI10FakeLambdaSaIS0_EJEESt10shared_ptrIT_ERKT0_DpOT1_[i8** %result.ptr] -:_ZSt15allocate_sharedI10FakeLambdaSaIS0_EJEESt10shared_ptrIT_ERKT0_DpOT1_:1 *stack_alloc@_ZSt15allocate_sharedI10FakeLambdaSaIS0_EJEESt10shared_ptrIT_ERKT0_DpOT1_[%"class.std::allocator"** %__a.addr] -:_ZSt15allocate_sharedI10FakeLambdaSaIS0_EJEESt10shared_ptrIT_ERKT0_DpOT1_:2 *stack_alloc@_ZSt15allocate_sharedI10FakeLambdaSaIS0_EJEESt10shared_ptrIT_ERKT0_DpOT1_[%"struct.std::_Sp_alloc_shared_tag"* %agg.tmp] -:_ZSt18__allocate_guardedISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEESt15__allocated_ptrIT_ERS8_:0 *stack_alloc@_ZSt18__allocate_guardedISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEESt15__allocated_ptrIT_ERS8_[i8** %result.ptr] -:_ZSt18__allocate_guardedISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEESt15__allocated_ptrIT_ERS8_:1 *stack_alloc@_ZSt18__allocate_guardedISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEESt15__allocated_ptrIT_ERS8_[%"class.std::allocator.0"** %__a.addr] -:main:0 *stack_alloc@main[i32* %retval] diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index 40fcc5c..0000000 --- a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,117 +0,0 @@ -:_Z16hardcoded_sharedv:0 *stack_alloc@_Z16hardcoded_sharedv[%"class.std::shared_ptr"* %mylambda] -:_Z16hardcoded_sharedv:1 *stack_alloc@_Z16hardcoded_sharedv[i8** %exn.slot] -:_Z16hardcoded_sharedv:2 *stack_alloc@_Z16hardcoded_sharedv[i32* %ehselector.slot] -:_ZN10FakeLambdaC2Ev:0 *stack_alloc@_ZN10FakeLambdaC2Ev[%class.FakeLambda** %this.addr] -:_ZN10FakeLambdaD2Ev:0 *stack_alloc@_ZN10FakeLambdaD2Ev[%class.FakeLambda** %this.addr] -:_ZN9__gnu_cxx13new_allocatorI10FakeLambdaE7destroyIS1_EEvPT_:0 *stack_alloc@_ZN9__gnu_cxx13new_allocatorI10FakeLambdaE7destroyIS1_EEvPT_[%"class.__gnu_cxx::new_allocator"** %this.addr] -:_ZN9__gnu_cxx13new_allocatorI10FakeLambdaE7destroyIS1_EEvPT_:1 *stack_alloc@_ZN9__gnu_cxx13new_allocatorI10FakeLambdaE7destroyIS1_EEvPT_[%class.FakeLambda** %__p.addr] -:_ZN9__gnu_cxx13new_allocatorI10FakeLambdaE9constructIS1_JEEEvPT_DpOT0_:0 *stack_alloc@_ZN9__gnu_cxx13new_allocatorI10FakeLambdaE9constructIS1_JEEEvPT_DpOT0_[%"class.__gnu_cxx::new_allocator"** %this.addr] -:_ZN9__gnu_cxx13new_allocatorI10FakeLambdaE9constructIS1_JEEEvPT_DpOT0_:1 *stack_alloc@_ZN9__gnu_cxx13new_allocatorI10FakeLambdaE9constructIS1_JEEEvPT_DpOT0_[%class.FakeLambda** %__p.addr] -:_ZN9__gnu_cxx13new_allocatorI10FakeLambdaEC2ERKS2_:0 *stack_alloc@_ZN9__gnu_cxx13new_allocatorI10FakeLambdaEC2ERKS2_[%"class.__gnu_cxx::new_allocator"** %this.addr] -:_ZN9__gnu_cxx13new_allocatorI10FakeLambdaEC2ERKS2_:1 *stack_alloc@_ZN9__gnu_cxx13new_allocatorI10FakeLambdaEC2ERKS2_[%"class.__gnu_cxx::new_allocator"** %.addr] -:_ZN9__gnu_cxx13new_allocatorI10FakeLambdaEC2Ev:0 *stack_alloc@_ZN9__gnu_cxx13new_allocatorI10FakeLambdaEC2Ev[%"class.__gnu_cxx::new_allocator"** %this.addr] -:_ZN9__gnu_cxx13new_allocatorI10FakeLambdaED2Ev:0 *stack_alloc@_ZN9__gnu_cxx13new_allocatorI10FakeLambdaED2Ev[%"class.__gnu_cxx::new_allocator"** %this.addr] -:_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE10deallocateEPS5_m:0 *stack_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE10deallocateEPS5_m[%"class.__gnu_cxx::new_allocator.1"** %this.addr] -:_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE10deallocateEPS5_m:1 *stack_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE10deallocateEPS5_m[%"class.std::_Sp_counted_ptr_inplace"** %__p.addr] -:_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE10deallocateEPS5_m:2 *stack_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE10deallocateEPS5_m[i64* %.addr] -:_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:0 *stack_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[%"class.__gnu_cxx::new_allocator.1"** %this.addr] -:_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:1 *stack_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[i64* %__n.addr] -:_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:2 *stack_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[i8** %.addr] -:_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEEC2Ev:0 *stack_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEEC2Ev[%"class.__gnu_cxx::new_allocator.1"** %this.addr] -:_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEED2Ev:0 *stack_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEED2Ev[%"class.__gnu_cxx::new_allocator.1"** %this.addr] -:_ZN9__gnu_cxx16__aligned_bufferI10FakeLambdaE6_M_ptrEv:0 *stack_alloc@_ZN9__gnu_cxx16__aligned_bufferI10FakeLambdaE6_M_ptrEv[%"struct.__gnu_cxx::__aligned_buffer"** %this.addr] -:_ZN9__gnu_cxx16__aligned_bufferI10FakeLambdaE7_M_addrEv:0 *stack_alloc@_ZN9__gnu_cxx16__aligned_bufferI10FakeLambdaE7_M_addrEv[%"struct.__gnu_cxx::__aligned_buffer"** %this.addr] -:_ZN9__gnu_cxxL18__exchange_and_addEPVii:0 *stack_alloc@_ZN9__gnu_cxxL18__exchange_and_addEPVii[i32** %__mem.addr] -:_ZN9__gnu_cxxL18__exchange_and_addEPVii:1 *stack_alloc@_ZN9__gnu_cxxL18__exchange_and_addEPVii[i32* %__val.addr] -:_ZN9__gnu_cxxL18__exchange_and_addEPVii:2 *stack_alloc@_ZN9__gnu_cxxL18__exchange_and_addEPVii[i32* %.atomictmp] -:_ZN9__gnu_cxxL18__exchange_and_addEPVii:3 *stack_alloc@_ZN9__gnu_cxxL18__exchange_and_addEPVii[i32* %atomic-temp] -:_ZN9__gnu_cxxL25__exchange_and_add_singleEPii:0 *stack_alloc@_ZN9__gnu_cxxL25__exchange_and_add_singleEPii[i32** %__mem.addr] -:_ZN9__gnu_cxxL25__exchange_and_add_singleEPii:1 *stack_alloc@_ZN9__gnu_cxxL25__exchange_and_add_singleEPii[i32* %__val.addr] -:_ZN9__gnu_cxxL25__exchange_and_add_singleEPii:2 *stack_alloc@_ZN9__gnu_cxxL25__exchange_and_add_singleEPii[i32* %__result] -:_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii:0 *stack_alloc@_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii[i32* %retval] -:_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii:1 *stack_alloc@_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii[i32** %__mem.addr] -:_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii:2 *stack_alloc@_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii[i32* %__val.addr] -:_ZNK10FakeLambda7inspectEv:0 *stack_alloc@_ZNK10FakeLambda7inspectEv[%class.FakeLambda** %this.addr] -:_ZNK9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8max_sizeEv:0 *stack_alloc@_ZNK9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8max_sizeEv[%"class.__gnu_cxx::new_allocator.1"** %this.addr] -:_ZNKSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EE3getEv:0 *stack_alloc@_ZNKSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EE3getEv[%"class.std::__shared_ptr"** %this.addr] -:_ZNKSt19__shared_ptr_accessI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EE6_M_getEv:0 *stack_alloc@_ZNKSt19__shared_ptr_accessI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EE6_M_getEv[%"class.std::__shared_ptr_access"** %this.addr] -:_ZNKSt19__shared_ptr_accessI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv:0 *stack_alloc@_ZNKSt19__shared_ptr_accessI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv[%"class.std::__shared_ptr_access"** %this.addr] -:_ZNSaI10FakeLambdaEC2ERKS0_:0 *stack_alloc@_ZNSaI10FakeLambdaEC2ERKS0_[%"class.std::allocator"** %this.addr] -:_ZNSaI10FakeLambdaEC2ERKS0_:1 *stack_alloc@_ZNSaI10FakeLambdaEC2ERKS0_[%"class.std::allocator"** %__a.addr] -:_ZNSaI10FakeLambdaEC2Ev:0 *stack_alloc@_ZNSaI10FakeLambdaEC2Ev[%"class.std::allocator"** %this.addr] -:_ZNSaI10FakeLambdaED2Ev:0 *stack_alloc@_ZNSaI10FakeLambdaED2Ev[%"class.std::allocator"** %this.addr] -:_ZNSaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEEC2IS0_EERKSaIT_E:0 *stack_alloc@_ZNSaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEEC2IS0_EERKSaIT_E[%"class.std::allocator.0"** %this.addr] -:_ZNSaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEEC2IS0_EERKSaIT_E:1 *stack_alloc@_ZNSaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEEC2IS0_EERKSaIT_E[%"class.std::allocator"** %.addr] -:_ZNSaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEED2Ev:0 *stack_alloc@_ZNSaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEED2Ev[%"class.std::allocator.0"** %this.addr] -:_ZNSt10shared_ptrI10FakeLambdaEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_:0 *stack_alloc@_ZNSt10shared_ptrI10FakeLambdaEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_[%"struct.std::_Sp_alloc_shared_tag"* %__tag] -:_ZNSt10shared_ptrI10FakeLambdaEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_:1 *stack_alloc@_ZNSt10shared_ptrI10FakeLambdaEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_[%"class.std::shared_ptr"** %this.addr] -:_ZNSt10shared_ptrI10FakeLambdaEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_:2 *stack_alloc@_ZNSt10shared_ptrI10FakeLambdaEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_[%"struct.std::_Sp_alloc_shared_tag"* %agg.tmp] -:_ZNSt10shared_ptrI10FakeLambdaED2Ev:0 *stack_alloc@_ZNSt10shared_ptrI10FakeLambdaED2Ev[%"class.std::shared_ptr"** %this.addr] -:_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EE31_M_enable_shared_from_this_withIS0_S0_EENSt9enable_ifIXntsr15__has_esft_baseIT0_EE5valueEvE4typeEPT_:0 *stack_alloc@_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EE31_M_enable_shared_from_this_withIS0_S0_EENSt9enable_ifIXntsr15__has_esft_baseIT0_EE5valueEvE4typeEPT_[%"class.std::__shared_ptr"** %this.addr] -:_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EE31_M_enable_shared_from_this_withIS0_S0_EENSt9enable_ifIXntsr15__has_esft_baseIT0_EE5valueEvE4typeEPT_:1 *stack_alloc@_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EE31_M_enable_shared_from_this_withIS0_S0_EENSt9enable_ifIXntsr15__has_esft_baseIT0_EE5valueEvE4typeEPT_[%class.FakeLambda** %.addr] -:_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_:0 *stack_alloc@_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_[%"struct.std::_Sp_alloc_shared_tag"* %__tag] -:_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_:1 *stack_alloc@_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_[%"class.std::__shared_ptr"** %this.addr] -:_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_:2 *stack_alloc@_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EEC2ISaIS0_EJEEESt20_Sp_alloc_shared_tagIT_EDpOT0_[%"struct.std::_Sp_alloc_shared_tag"* %agg.tmp] -:_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EED2Ev:0 *stack_alloc@_ZNSt12__shared_ptrI10FakeLambdaLN9__gnu_cxx12_Lock_policyE2EED2Ev[%"class.std::__shared_ptr"** %this.addr] -:_ZNSt14_Sp_ebo_helperILi0ESaI10FakeLambdaELb1EE6_S_getERS2_:0 *stack_alloc@_ZNSt14_Sp_ebo_helperILi0ESaI10FakeLambdaELb1EE6_S_getERS2_[%"struct.std::_Sp_ebo_helper"** %__eboh.addr] -:_ZNSt14_Sp_ebo_helperILi0ESaI10FakeLambdaELb1EEC2ERKS1_:0 *stack_alloc@_ZNSt14_Sp_ebo_helperILi0ESaI10FakeLambdaELb1EEC2ERKS1_[%"struct.std::_Sp_ebo_helper"** %this.addr] -:_ZNSt14_Sp_ebo_helperILi0ESaI10FakeLambdaELb1EEC2ERKS1_:1 *stack_alloc@_ZNSt14_Sp_ebo_helperILi0ESaI10FakeLambdaELb1EEC2ERKS1_[%"class.std::allocator"** %__tp.addr] -:_ZNSt14_Sp_ebo_helperILi0ESaI10FakeLambdaELb1EED2Ev:0 *stack_alloc@_ZNSt14_Sp_ebo_helperILi0ESaI10FakeLambdaELb1EED2Ev[%"struct.std::_Sp_ebo_helper"** %this.addr] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:0 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%"struct.std::_Sp_alloc_shared_tag"* %__a] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:1 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%"class.std::__shared_count"** %this.addr] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:2 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%class.FakeLambda*** %__p.addr] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:3 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%"class.std::allocator.0"* %__a2] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:4 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%"struct.std::__allocated_ptr"* %__guard] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:5 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[i8** %exn.slot] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:6 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[i32* %ehselector.slot] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:7 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%"class.std::_Sp_counted_ptr_inplace"** %__mem] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:8 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%"class.std::_Sp_counted_ptr_inplace"** %__pi] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:9 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%"class.std::allocator"* %agg.tmp] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev:0 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev[%"class.std::__shared_count"** %this.addr] -:_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE3getEv:0 *stack_alloc@_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE3getEv[%"struct.std::__allocated_ptr"** %this.addr] -:_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEC2ERS6_PS5_:0 *stack_alloc@_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEC2ERS6_PS5_[%"struct.std::__allocated_ptr"** %this.addr] -:_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEC2ERS6_PS5_:1 *stack_alloc@_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEC2ERS6_PS5_[%"class.std::allocator.0"** %__a.addr] -:_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEC2ERS6_PS5_:2 *stack_alloc@_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEC2ERS6_PS5_[%"class.std::_Sp_counted_ptr_inplace"** %__ptr.addr] -:_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEED2Ev:0 *stack_alloc@_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEED2Ev[%"struct.std::__allocated_ptr"** %this.addr] -:_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEaSEDn:0 *stack_alloc@_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEaSEDn[%"struct.std::__allocated_ptr"** %this.addr] -:_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEaSEDn:1 *stack_alloc@_ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEaSEDn[i8** %.addr] -:_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv:0 *stack_alloc@_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv[%"class.std::_Sp_counted_base"** %this.addr] -:_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv:0 *stack_alloc@_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv[%"class.std::_Sp_counted_base"** %this.addr] -:_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EEC2Ev:0 *stack_alloc@_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EEC2Ev[%"class.std::_Sp_counted_base"** %this.addr] -:_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED0Ev:0 *stack_alloc@_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED0Ev[%"class.std::_Sp_counted_base"** %this.addr] -:_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED2Ev:0 *stack_alloc@_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EED2Ev[%"class.std::_Sp_counted_base"** %this.addr] -:_ZNSt16allocator_traitsISaI10FakeLambdaEE7destroyIS0_EEvRS1_PT_:0 *stack_alloc@_ZNSt16allocator_traitsISaI10FakeLambdaEE7destroyIS0_EEvRS1_PT_[%"class.std::allocator"** %__a.addr] -:_ZNSt16allocator_traitsISaI10FakeLambdaEE7destroyIS0_EEvRS1_PT_:1 *stack_alloc@_ZNSt16allocator_traitsISaI10FakeLambdaEE7destroyIS0_EEvRS1_PT_[%class.FakeLambda** %__p.addr] -:_ZNSt16allocator_traitsISaI10FakeLambdaEE9constructIS0_JEEEvRS1_PT_DpOT0_:0 *stack_alloc@_ZNSt16allocator_traitsISaI10FakeLambdaEE9constructIS0_JEEEvRS1_PT_DpOT0_[%"class.std::allocator"** %__a.addr] -:_ZNSt16allocator_traitsISaI10FakeLambdaEE9constructIS0_JEEEvRS1_PT_DpOT0_:1 *stack_alloc@_ZNSt16allocator_traitsISaI10FakeLambdaEE9constructIS0_JEEEvRS1_PT_DpOT0_[%class.FakeLambda** %__p.addr] -:_ZNSt16allocator_traitsISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE10deallocateERS6_PS5_m:0 *stack_alloc@_ZNSt16allocator_traitsISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE10deallocateERS6_PS5_m[%"class.std::allocator.0"** %__a.addr] -:_ZNSt16allocator_traitsISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE10deallocateERS6_PS5_m:1 *stack_alloc@_ZNSt16allocator_traitsISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE10deallocateERS6_PS5_m[%"class.std::_Sp_counted_ptr_inplace"** %__p.addr] -:_ZNSt16allocator_traitsISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE10deallocateERS6_PS5_m:2 *stack_alloc@_ZNSt16allocator_traitsISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE10deallocateERS6_PS5_m[i64* %__n.addr] -:_ZNSt16allocator_traitsISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE8allocateERS6_m:0 *stack_alloc@_ZNSt16allocator_traitsISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE8allocateERS6_m[%"class.std::allocator.0"** %__a.addr] -:_ZNSt16allocator_traitsISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE8allocateERS6_m:1 *stack_alloc@_ZNSt16allocator_traitsISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEE8allocateERS6_m[i64* %__n.addr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv[%"class.std::_Sp_counted_ptr_inplace"** %this.addr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv:1 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv[%"class.std::allocator.0"* %__a] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv:2 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv[%"struct.std::__allocated_ptr"* %__guard_ptr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[%"class.std::_Sp_counted_ptr_inplace"** %this.addr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE5_Impl8_M_allocEv:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE5_Impl8_M_allocEv[%"class.std::_Sp_counted_ptr_inplace, __gnu_cxx::_S_atomic>::_Impl"** %this.addr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE5_ImplC2ES1_:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE5_ImplC2ES1_[%"class.std::_Sp_counted_ptr_inplace, __gnu_cxx::_S_atomic>::_Impl"** %this.addr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE5_ImplD2Ev:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE5_ImplD2Ev[%"class.std::_Sp_counted_ptr_inplace, __gnu_cxx::_S_atomic>::_Impl"** %this.addr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE6_M_ptrEv:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE6_M_ptrEv[%"class.std::_Sp_counted_ptr_inplace"** %this.addr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEC2IJEEES1_DpOT_:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEC2IJEEES1_DpOT_[%"class.std::_Sp_counted_ptr_inplace"** %this.addr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEC2IJEEES1_DpOT_:1 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEC2IJEEES1_DpOT_[%"class.std::allocator"* %agg.tmp] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEC2IJEEES1_DpOT_:2 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEC2IJEEES1_DpOT_[i8** %exn.slot] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEC2IJEEES1_DpOT_:3 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEC2IJEEES1_DpOT_[i32* %ehselector.slot] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EED0Ev:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EED0Ev[%"class.std::_Sp_counted_ptr_inplace"** %this.addr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EED2Ev:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EED2Ev[%"class.std::_Sp_counted_ptr_inplace"** %this.addr] -:_ZSt11__addressofISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEPT_RS7_:0 *stack_alloc@_ZSt11__addressofISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEEPT_RS7_[%"class.std::allocator.0"** %__r.addr] -:_ZSt11make_sharedI10FakeLambdaJEESt10shared_ptrIT_EDpOT0_:0 *stack_alloc@_ZSt11make_sharedI10FakeLambdaJEESt10shared_ptrIT_EDpOT0_[i8** %result.ptr] -:_ZSt11make_sharedI10FakeLambdaJEESt10shared_ptrIT_EDpOT0_:1 *stack_alloc@_ZSt11make_sharedI10FakeLambdaJEESt10shared_ptrIT_EDpOT0_[%"class.std::allocator"* %ref.tmp] -:_ZSt11make_sharedI10FakeLambdaJEESt10shared_ptrIT_EDpOT0_:2 *stack_alloc@_ZSt11make_sharedI10FakeLambdaJEESt10shared_ptrIT_EDpOT0_[i8** %exn.slot] -:_ZSt11make_sharedI10FakeLambdaJEESt10shared_ptrIT_EDpOT0_:3 *stack_alloc@_ZSt11make_sharedI10FakeLambdaJEESt10shared_ptrIT_EDpOT0_[i32* %ehselector.slot] -:_ZSt12__to_addressISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEPT_S7_:0 *stack_alloc@_ZSt12__to_addressISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEPT_S7_[%"class.std::_Sp_counted_ptr_inplace"** %__ptr.addr] -:_ZSt15allocate_sharedI10FakeLambdaSaIS0_EJEESt10shared_ptrIT_ERKT0_DpOT1_:0 *stack_alloc@_ZSt15allocate_sharedI10FakeLambdaSaIS0_EJEESt10shared_ptrIT_ERKT0_DpOT1_[i8** %result.ptr] -:_ZSt15allocate_sharedI10FakeLambdaSaIS0_EJEESt10shared_ptrIT_ERKT0_DpOT1_:1 *stack_alloc@_ZSt15allocate_sharedI10FakeLambdaSaIS0_EJEESt10shared_ptrIT_ERKT0_DpOT1_[%"class.std::allocator"** %__a.addr] -:_ZSt15allocate_sharedI10FakeLambdaSaIS0_EJEESt10shared_ptrIT_ERKT0_DpOT1_:2 *stack_alloc@_ZSt15allocate_sharedI10FakeLambdaSaIS0_EJEESt10shared_ptrIT_ERKT0_DpOT1_[%"struct.std::_Sp_alloc_shared_tag"* %agg.tmp] -:_ZSt18__allocate_guardedISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEESt15__allocated_ptrIT_ERS8_:0 *stack_alloc@_ZSt18__allocate_guardedISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEESt15__allocated_ptrIT_ERS8_[i8** %result.ptr] -:_ZSt18__allocate_guardedISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEESt15__allocated_ptrIT_ERS8_:1 *stack_alloc@_ZSt18__allocate_guardedISaISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS1_ELN9__gnu_cxx12_Lock_policyE2EEEESt15__allocated_ptrIT_ERS8_[%"class.std::allocator.0"** %__a.addr] -:main:0 *stack_alloc@main[i32* %retval] diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index 3d48819..0000000 --- a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv +++ /dev/null @@ -1 +0,0 @@ -:_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:9 *heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[i8* %call2] diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index 3d48819..0000000 --- a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv +++ /dev/null @@ -1 +0,0 @@ -:_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:9 *heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[i8* %call2] diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index d6d0af0..0000000 --- a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv +++ /dev/null @@ -1,3 +0,0 @@ -%class.std::_Sp_counted_ptr_inplace :_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:9 *typed_heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[%"class.std::_Sp_counted_ptr_inplace"* %call2] -i8 :_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:9 *typed_heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[i8* %call2] -void (%"class.std::_Sp_counted_base"*)** :_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:9 *typed_heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[void (%"class.std::_Sp_counted_base"*)*** %call2] diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index d6d0af0..0000000 --- a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv +++ /dev/null @@ -1,3 +0,0 @@ -%class.std::_Sp_counted_ptr_inplace :_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:9 *typed_heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[%"class.std::_Sp_counted_ptr_inplace"* %call2] -i8 :_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:9 *typed_heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[i8* %call2] -void (%"class.std::_Sp_counted_base"*)** :_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv:9 *typed_heap_alloc@_ZN9__gnu_cxx13new_allocatorISt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS2_ELNS_12_Lock_policyE2EEE8allocateEmPKv[void (%"class.std::_Sp_counted_base"*)*** %call2] diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index 491b20b..0000000 --- a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,9 +0,0 @@ -:_Z16hardcoded_sharedv:0 *stack_alloc@_Z16hardcoded_sharedv[%"class.std::shared_ptr"* %mylambda] -:_ZNK10FakeLambda7inspectEv:0 *stack_alloc@_ZNK10FakeLambda7inspectEv[%class.FakeLambda** %this.addr] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:0 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%"class.std::allocator.0"* %__a2] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:1 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%"struct.std::__allocated_ptr"* %__guard] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:2 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%"class.std::allocator"* %agg.tmp] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv[%"class.std::allocator.0"* %__a] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv:1 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv[%"struct.std::__allocated_ptr"* %__guard_ptr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEC2IJEEES1_DpOT_:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEC2IJEEES1_DpOT_[%"class.std::allocator"* %agg.tmp] -:_ZSt11make_sharedI10FakeLambdaJEESt10shared_ptrIT_EDpOT0_:0 *stack_alloc@_ZSt11make_sharedI10FakeLambdaJEESt10shared_ptrIT_EDpOT0_[%"class.std::allocator"* %ref.tmp] diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index 491b20b..0000000 --- a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,9 +0,0 @@ -:_Z16hardcoded_sharedv:0 *stack_alloc@_Z16hardcoded_sharedv[%"class.std::shared_ptr"* %mylambda] -:_ZNK10FakeLambda7inspectEv:0 *stack_alloc@_ZNK10FakeLambda7inspectEv[%class.FakeLambda** %this.addr] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:0 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%"class.std::allocator.0"* %__a2] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:1 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%"struct.std::__allocated_ptr"* %__guard] -:_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_:2 *stack_alloc@_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FakeLambdaSaIS4_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[%"class.std::allocator"* %agg.tmp] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv[%"class.std::allocator.0"* %__a] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv:1 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv[%"struct.std::__allocated_ptr"* %__guard_ptr] -:_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEC2IJEEES1_DpOT_:0 *stack_alloc@_ZNSt23_Sp_counted_ptr_inplaceI10FakeLambdaSaIS0_ELN9__gnu_cxx12_Lock_policyE2EEC2IJEEES1_DpOT_[%"class.std::allocator"* %agg.tmp] -:_ZSt11make_sharedI10FakeLambdaJEESt10shared_ptrIT_EDpOT0_:0 *stack_alloc@_ZSt11make_sharedI10FakeLambdaJEESt10shared_ptrIT_EDpOT0_[%"class.std::allocator"* %ref.tmp] diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/cxxbasic.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index f7c2a33..0000000 --- a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,11 +0,0 @@ -:f:0 *stack_alloc@f[i32*** %px.addr] -:f:1 *stack_alloc@f[i32** %x.addr] -:g:0 *stack_alloc@g[i32*** %px.addr] -:g:1 *stack_alloc@g[i32** %x.addr] -:h:0 *stack_alloc@h[i32*** %px.addr] -:h:1 *stack_alloc@h[i32** %x.addr] -:main:0 *stack_alloc@main[i32* %retval] -:main:1 *stack_alloc@main[i32** %pa] -:main:2 *stack_alloc@main[i32* %a] -:main:3 *stack_alloc@main[i32** %pb] -:main:4 *stack_alloc@main[i32* %b] diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index f7c2a33..0000000 --- a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,11 +0,0 @@ -:f:0 *stack_alloc@f[i32*** %px.addr] -:f:1 *stack_alloc@f[i32** %x.addr] -:g:0 *stack_alloc@g[i32*** %px.addr] -:g:1 *stack_alloc@g[i32** %x.addr] -:h:0 *stack_alloc@h[i32*** %px.addr] -:h:1 *stack_alloc@h[i32** %x.addr] -:main:0 *stack_alloc@main[i32* %retval] -:main:1 *stack_alloc@main[i32** %pa] -:main:2 *stack_alloc@main[i32* %a] -:main:3 *stack_alloc@main[i32** %pb] -:main:4 *stack_alloc@main[i32* %b] diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index 7a87d39..0000000 --- a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,4 +0,0 @@ -:main:0 *stack_alloc@main[i32** %pa] -:main:1 *stack_alloc@main[i32* %a] -:main:2 *stack_alloc@main[i32** %pb] -:main:3 *stack_alloc@main[i32* %b] diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index 7a87d39..0000000 --- a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,4 +0,0 @@ -:main:0 *stack_alloc@main[i32** %pa] -:main:1 *stack_alloc@main[i32* %a] -:main:2 *stack_alloc@main[i32** %pb] -:main:3 *stack_alloc@main[i32* %b] diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index d3affc8..0000000 --- a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv +++ /dev/null @@ -1,2 +0,0 @@ -i8 :main:1 *typed_stack_alloc@main[i8* %a] -i8 :main:3 *typed_stack_alloc@main[i8* %b] diff --git a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index d3affc8..0000000 --- a/test/gold/points-to_context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv +++ /dev/null @@ -1,2 +0,0 @@ -i8 :main:1 *typed_stack_alloc@main[i8* %a] -i8 :main:3 *typed_stack_alloc@main[i8* %b] diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index ad819b4..0000000 --- a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,6 +0,0 @@ -:id:0 *stack_alloc@id[%struct.obj** %x.addr] -:main:0 *stack_alloc@main[i32* %retval] -:main:1 *stack_alloc@main[%struct.obj** %a] -:main:2 *stack_alloc@main[%struct.obj** %b] -:main:3 *stack_alloc@main[%struct.obj** %c] -:main:4 *stack_alloc@main[%struct.obj** %d] diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index ad819b4..0000000 --- a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,6 +0,0 @@ -:id:0 *stack_alloc@id[%struct.obj** %x.addr] -:main:0 *stack_alloc@main[i32* %retval] -:main:1 *stack_alloc@main[%struct.obj** %a] -:main:2 *stack_alloc@main[%struct.obj** %b] -:main:3 *stack_alloc@main[%struct.obj** %c] -:main:4 *stack_alloc@main[%struct.obj** %d] diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index 31fd8fd..0000000 --- a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,2 +0,0 @@ -:fun1:0 *heap_alloc@fun1[i8* %call] -:fun2:0 *heap_alloc@fun2[i8* %call] diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index 31fd8fd..0000000 --- a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,2 +0,0 @@ -:fun1:0 *heap_alloc@fun1[i8* %call] -:fun2:0 *heap_alloc@fun2[i8* %call] diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index cb934d1..0000000 --- a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv +++ /dev/null @@ -1,2 +0,0 @@ -%struct.obj :fun1:0 *typed_heap_alloc@fun1[%struct.obj* %call] -%struct.obj :fun2:0 *typed_heap_alloc@fun2[%struct.obj* %call] diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index cb934d1..0000000 --- a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv +++ /dev/null @@ -1,2 +0,0 @@ -%struct.obj :fun1:0 *typed_heap_alloc@fun1[%struct.obj* %call] -%struct.obj :fun2:0 *typed_heap_alloc@fun2[%struct.obj* %call] diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index 31fd8fd..0000000 --- a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,2 +0,0 @@ -:fun1:0 *heap_alloc@fun1[i8* %call] -:fun2:0 *heap_alloc@fun2[i8* %call] diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index 31fd8fd..0000000 --- a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,2 +0,0 @@ -:fun1:0 *heap_alloc@fun1[i8* %call] -:fun2:0 *heap_alloc@fun2[i8* %call] diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index cb934d1..0000000 --- a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv +++ /dev/null @@ -1,2 +0,0 @@ -%struct.obj :fun1:0 *typed_heap_alloc@fun1[%struct.obj* %call] -%struct.obj :fun2:0 *typed_heap_alloc@fun2[%struct.obj* %call] diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index cb934d1..0000000 --- a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv +++ /dev/null @@ -1,2 +0,0 @@ -%struct.obj :fun1:0 *typed_heap_alloc@fun1[%struct.obj* %call] -%struct.obj :fun2:0 *typed_heap_alloc@fun2[%struct.obj* %call] diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/points-to_malloc-context.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index 472d5ff..0000000 --- a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,6 +0,0 @@ -:_Z2idP3obj:0 *stack_alloc@_Z2idP3obj[%struct.obj** %x.addr] -:main:0 *stack_alloc@main[i32* %retval] -:main:1 *stack_alloc@main[%struct.obj** %a] -:main:2 *stack_alloc@main[%struct.obj** %b] -:main:3 *stack_alloc@main[%struct.obj** %c] -:main:4 *stack_alloc@main[%struct.obj** %d] diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index 472d5ff..0000000 --- a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,6 +0,0 @@ -:_Z2idP3obj:0 *stack_alloc@_Z2idP3obj[%struct.obj** %x.addr] -:main:0 *stack_alloc@main[i32* %retval] -:main:1 *stack_alloc@main[%struct.obj** %a] -:main:2 *stack_alloc@main[%struct.obj** %b] -:main:3 *stack_alloc@main[%struct.obj** %c] -:main:4 *stack_alloc@main[%struct.obj** %d] diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index db3d5d1..0000000 --- a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,2 +0,0 @@ -:_Z4fun1v:0 *heap_alloc@_Z4fun1v[i8* %call] -:_Z4fun2v:0 *heap_alloc@_Z4fun2v[i8* %call] diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index db3d5d1..0000000 --- a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,2 +0,0 @@ -:_Z4fun1v:0 *heap_alloc@_Z4fun1v[i8* %call] -:_Z4fun2v:0 *heap_alloc@_Z4fun2v[i8* %call] diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index f0c162f..0000000 --- a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv +++ /dev/null @@ -1,2 +0,0 @@ -%struct.obj :_Z4fun1v:0 *typed_heap_alloc@_Z4fun1v[%struct.obj* %call] -%struct.obj :_Z4fun2v:0 *typed_heap_alloc@_Z4fun2v[%struct.obj* %call] diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index f0c162f..0000000 --- a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv +++ /dev/null @@ -1,2 +0,0 @@ -%struct.obj :_Z4fun1v:0 *typed_heap_alloc@_Z4fun1v[%struct.obj* %call] -%struct.obj :_Z4fun2v:0 *typed_heap_alloc@_Z4fun2v[%struct.obj* %call] diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index db3d5d1..0000000 --- a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,2 +0,0 @@ -:_Z4fun1v:0 *heap_alloc@_Z4fun1v[i8* %call] -:_Z4fun2v:0 *heap_alloc@_Z4fun2v[i8* %call] diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index db3d5d1..0000000 --- a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,2 +0,0 @@ -:_Z4fun1v:0 *heap_alloc@_Z4fun1v[i8* %call] -:_Z4fun2v:0 *heap_alloc@_Z4fun2v[i8* %call] diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index f0c162f..0000000 --- a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv +++ /dev/null @@ -1,2 +0,0 @@ -%struct.obj :_Z4fun1v:0 *typed_heap_alloc@_Z4fun1v[%struct.obj* %call] -%struct.obj :_Z4fun2v:0 *typed_heap_alloc@_Z4fun2v[%struct.obj* %call] diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index f0c162f..0000000 --- a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv +++ /dev/null @@ -1,2 +0,0 @@ -%struct.obj :_Z4fun1v:0 *typed_heap_alloc@_Z4fun1v[%struct.obj* %call] -%struct.obj :_Z4fun2v:0 *typed_heap_alloc@_Z4fun2v[%struct.obj* %call] diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/points-to_new-context.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index 602c658..0000000 --- a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,4 +0,0 @@ -:countdown:0 *stack_alloc@countdown[i32* %x.addr] -:main:0 *stack_alloc@main[i32* %retval] -:main:1 *stack_alloc@main[i32* %argc.addr] -:main:2 *stack_alloc@main[i8*** %argv.addr] diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index 602c658..0000000 --- a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,4 +0,0 @@ -:countdown:0 *stack_alloc@countdown[i32* %x.addr] -:main:0 *stack_alloc@main[i32* %retval] -:main:1 *stack_alloc@main[i32* %argc.addr] -:main:2 *stack_alloc@main[i8*** %argv.addr] diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/functiontable.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/notes.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/recurse.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index cd3869a..0000000 --- a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv +++ /dev/null @@ -1 +0,0 @@ -:my_calloc:9 *heap_alloc@my_calloc[i8* %call] diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index cd3869a..0000000 --- a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv +++ /dev/null @@ -1 +0,0 @@ -:my_calloc:9 *heap_alloc@my_calloc[i8* %call] diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index 52f6e68..0000000 --- a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv +++ /dev/null @@ -1,2 +0,0 @@ -%struct.double_struct :my_calloc:9 *typed_heap_alloc@my_calloc[%struct.double_struct* %call] -%struct.int_struct :my_calloc:9 *typed_heap_alloc@my_calloc[%struct.int_struct* %call] diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index 52f6e68..0000000 --- a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv +++ /dev/null @@ -1,2 +0,0 @@ -%struct.double_struct :my_calloc:9 *typed_heap_alloc@my_calloc[%struct.double_struct* %call] -%struct.int_struct :my_calloc:9 *typed_heap_alloc@my_calloc[%struct.int_struct* %call] diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index 345f3ee..0000000 --- a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,10 +0,0 @@ -:main:0 *stack_alloc@main[i32* %argc.addr] -:main:1 *stack_alloc@main[i8*** %argv.addr] -:my_calloc:0 *stack_alloc@my_calloc[i64* %count.addr] -:my_calloc:1 *stack_alloc@my_calloc[i64* %size.addr] -:print_double:0 *stack_alloc@print_double[%struct.double_struct** %s.addr] -:print_int:0 *stack_alloc@print_int[%struct.int_struct** %s.addr] -:use_double:0 *stack_alloc@use_double[double* %x] -:use_double:1 *stack_alloc@use_double[%struct.double_struct** %s] -:use_int:0 *stack_alloc@use_int[i32* %x] -:use_int:1 *stack_alloc@use_int[%struct.int_struct** %s] diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index 345f3ee..0000000 --- a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,10 +0,0 @@ -:main:0 *stack_alloc@main[i32* %argc.addr] -:main:1 *stack_alloc@main[i8*** %argv.addr] -:my_calloc:0 *stack_alloc@my_calloc[i64* %count.addr] -:my_calloc:1 *stack_alloc@my_calloc[i64* %size.addr] -:print_double:0 *stack_alloc@print_double[%struct.double_struct** %s.addr] -:print_int:0 *stack_alloc@print_int[%struct.int_struct** %s.addr] -:use_double:0 *stack_alloc@use_double[double* %x] -:use_double:1 *stack_alloc@use_double[%struct.double_struct** %s] -:use_int:0 *stack_alloc@use_int[i32* %x] -:use_int:1 *stack_alloc@use_int[%struct.int_struct** %s] diff --git a/test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/notes.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index 2fa0e1d..0000000 --- a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv +++ /dev/null @@ -1 +0,0 @@ -:my_calloc:3 *heap_alloc@my_calloc[i8* %call] diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index 2fa0e1d..0000000 --- a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv +++ /dev/null @@ -1 +0,0 @@ -:my_calloc:3 *heap_alloc@my_calloc[i8* %call] diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index 11f030b..0000000 --- a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv +++ /dev/null @@ -1,4 +0,0 @@ -%struct.double_struct :my_calloc:3 *typed_heap_alloc@my_calloc[%struct.double_struct* %call] -%struct.int_struct :my_calloc:3 *typed_heap_alloc@my_calloc[%struct.int_struct* %call] -double* :my_calloc:3 *typed_heap_alloc@my_calloc[double** %call] -i32* :my_calloc:3 *typed_heap_alloc@my_calloc[i32** %call] diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index 11f030b..0000000 --- a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv +++ /dev/null @@ -1,4 +0,0 @@ -%struct.double_struct :my_calloc:3 *typed_heap_alloc@my_calloc[%struct.double_struct* %call] -%struct.int_struct :my_calloc:3 *typed_heap_alloc@my_calloc[%struct.int_struct* %call] -double* :my_calloc:3 *typed_heap_alloc@my_calloc[double** %call] -i32* :my_calloc:3 *typed_heap_alloc@my_calloc[i32** %call] diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index 3ee5348..0000000 --- a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,2 +0,0 @@ -:use_double:0 *stack_alloc@use_double[double* %x] -:use_int:0 *stack_alloc@use_int[i32* %x] diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index 3ee5348..0000000 --- a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,2 +0,0 @@ -:use_double:0 *stack_alloc@use_double[double* %x] -:use_int:0 *stack_alloc@use_int[i32* %x] diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index 79b01a0..0000000 --- a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv +++ /dev/null @@ -1 +0,0 @@ -i8 :use_int:0 *typed_stack_alloc@use_int[i8* %x] diff --git a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index 79b01a0..0000000 --- a/test/gold/type-backprop.clang.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv +++ /dev/null @@ -1 +0,0 @@ -i8 :use_int:0 *typed_stack_alloc@use_int[i8* %x] diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index 242971f..0000000 --- a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv +++ /dev/null @@ -1 +0,0 @@ -:main:5 *heap_alloc@main[i8* %call] diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index 242971f..0000000 --- a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv +++ /dev/null @@ -1 +0,0 @@ -:main:5 *heap_alloc@main[i8* %call] diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index 0454517..0000000 --- a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv +++ /dev/null @@ -1 +0,0 @@ -%class.Animal* :main:5 *typed_heap_alloc@main[%class.Animal** %call] diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index 0454517..0000000 --- a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv +++ /dev/null @@ -1 +0,0 @@ -%class.Animal* :main:5 *typed_heap_alloc@main[%class.Animal** %call] diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index 9f18054..0000000 --- a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,15 +0,0 @@ -:_Z12someone_eatsR6Animal:0 *stack_alloc@_Z12someone_eatsR6Animal[%class.Animal** %animal.addr] -:_Z13everyone_eatsPP6Animalj:0 *stack_alloc@_Z13everyone_eatsPP6Animalj[%class.Animal*** %animals.addr] -:_Z13everyone_eatsPP6Animalj:1 *stack_alloc@_Z13everyone_eatsPP6Animalj[i32* %len.addr] -:_Z13everyone_eatsPP6Animalj:2 *stack_alloc@_Z13everyone_eatsPP6Animalj[i32* %i] -:_ZN3DogC2Ev:0 *stack_alloc@_ZN3DogC2Ev[%class.Dog** %this.addr] -:_ZN5LlamaC2Ev:0 *stack_alloc@_ZN5LlamaC2Ev[%class.Llama** %this.addr] -:_ZN6AnimalC2Ev:0 *stack_alloc@_ZN6AnimalC2Ev[%class.Animal** %this.addr] -:_ZN6PoodleC2Ev:0 *stack_alloc@_ZN6PoodleC2Ev[%class.Poodle** %this.addr] -:_ZNK3Dog3eatEv:0 *stack_alloc@_ZNK3Dog3eatEv[%class.Dog** %this.addr] -:_ZNK5Llama3eatEv:0 *stack_alloc@_ZNK5Llama3eatEv[%class.Llama** %this.addr] -:_ZNK6Poodle3eatEv:0 *stack_alloc@_ZNK6Poodle3eatEv[%class.Poodle** %this.addr] -:main:0 *stack_alloc@main[%class.Animal*** %animals] -:main:1 *stack_alloc@main[%class.Llama* %llama] -:main:2 *stack_alloc@main[%class.Dog* %dog] -:main:3 *stack_alloc@main[%class.Poodle* %poodle] diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index 9f18054..0000000 --- a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,15 +0,0 @@ -:_Z12someone_eatsR6Animal:0 *stack_alloc@_Z12someone_eatsR6Animal[%class.Animal** %animal.addr] -:_Z13everyone_eatsPP6Animalj:0 *stack_alloc@_Z13everyone_eatsPP6Animalj[%class.Animal*** %animals.addr] -:_Z13everyone_eatsPP6Animalj:1 *stack_alloc@_Z13everyone_eatsPP6Animalj[i32* %len.addr] -:_Z13everyone_eatsPP6Animalj:2 *stack_alloc@_Z13everyone_eatsPP6Animalj[i32* %i] -:_ZN3DogC2Ev:0 *stack_alloc@_ZN3DogC2Ev[%class.Dog** %this.addr] -:_ZN5LlamaC2Ev:0 *stack_alloc@_ZN5LlamaC2Ev[%class.Llama** %this.addr] -:_ZN6AnimalC2Ev:0 *stack_alloc@_ZN6AnimalC2Ev[%class.Animal** %this.addr] -:_ZN6PoodleC2Ev:0 *stack_alloc@_ZN6PoodleC2Ev[%class.Poodle** %this.addr] -:_ZNK3Dog3eatEv:0 *stack_alloc@_ZNK3Dog3eatEv[%class.Dog** %this.addr] -:_ZNK5Llama3eatEv:0 *stack_alloc@_ZNK5Llama3eatEv[%class.Llama** %this.addr] -:_ZNK6Poodle3eatEv:0 *stack_alloc@_ZNK6Poodle3eatEv[%class.Poodle** %this.addr] -:main:0 *stack_alloc@main[%class.Animal*** %animals] -:main:1 *stack_alloc@main[%class.Llama* %llama] -:main:2 *stack_alloc@main[%class.Dog* %dog] -:main:3 *stack_alloc@main[%class.Poodle* %poodle] diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.actual.csv rename to test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.actual.csv rename to test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.actual.csv rename to test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv rename to test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_instruction.golden.csv rename to test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instr.golden.csv diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv deleted file mode 100644 index 8f4a57a..0000000 --- a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.actual.csv +++ /dev/null @@ -1 +0,0 @@ -:main:3 *heap_alloc@main[i8* %call] diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv deleted file mode 100644 index 8f4a57a..0000000 --- a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_instruction.golden.csv +++ /dev/null @@ -1 +0,0 @@ -:main:3 *heap_alloc@main[i8* %call] diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.heap_allocation_by_type_instruction.golden.csv rename to test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instr.golden.csv diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e14f1de..0000000 --- a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.actual.csv +++ /dev/null @@ -1 +0,0 @@ -%class.Animal* :main:3 *typed_heap_alloc@main[%class.Animal** %call] diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e14f1de..0000000 --- a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.heap_allocation_by_type_instruction.golden.csv +++ /dev/null @@ -1 +0,0 @@ -%class.Animal* :main:3 *typed_heap_alloc@main[%class.Animal** %call] diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv similarity index 100% rename from test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.1-callsite.stack_allocation_by_instruction.golden.csv rename to test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instr.golden.csv diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv deleted file mode 100644 index a63e503..0000000 --- a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.actual.csv +++ /dev/null @@ -1,3 +0,0 @@ -:main:0 *stack_alloc@main[%class.Llama* %llama] -:main:1 *stack_alloc@main[%class.Dog* %dog] -:main:2 *stack_alloc@main[%class.Poodle* %poodle] diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv deleted file mode 100644 index a63e503..0000000 --- a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_instruction.golden.csv +++ /dev/null @@ -1,3 +0,0 @@ -:main:0 *stack_alloc@main[%class.Llama* %llama] -:main:1 *stack_alloc@main[%class.Dog* %dog] -:main:2 *stack_alloc@main[%class.Poodle* %poodle] diff --git a/test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv similarity index 100% rename from test/gold/ovington-extra-minimal.clang++.-g-grecord-gcc-switches-O1-O0-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv rename to test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instr.golden.csv diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.actual.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv b/test/gold/virtual.clang++.-g-grecord-gcc-switches-O1-O1-fno-discard-value-names.canonical.2-callsite.stack_allocation_by_type_instruction.golden.csv deleted file mode 100644 index e69de29..0000000 diff --git a/test/pointer_analysis_test.py b/test/pointer_analysis_test.py index fbae5f8..13712cf 100644 --- a/test/pointer_analysis_test.py +++ b/test/pointer_analysis_test.py @@ -13,12 +13,12 @@ "subset.callgraph.callgraph_edge", "unification.callgraph.callgraph_edge", "global_allocation_by_variable", - "heap_allocation_by_instruction", - "heap_allocation_by_type_instruction", + "heap_allocation_by_instr", + "heap_allocation_by_type_instr", "subset.operand_points_to", "subset.ptr_points_to", - "stack_allocation_by_instruction", - "stack_allocation_by_type_instruction", + "stack_allocation_by_instr", + "stack_allocation_by_type_instr", "user_options", "subset.var_points_to", "subset_lift.alloc_may_alias_ctx", From ac7d5efe9c7817de052d306f137e501ad7272e15 Mon Sep 17 00:00:00 2001 From: Langston Barrett Date: Fri, 7 Oct 2022 13:54:18 -0400 Subject: [PATCH 06/11] FactGenerator: Introduce PREDICATE2 macro Gives an explicit goal to how relation names should be derived from group + attribute names. --- FactGenerator/include/predicates.inc | 49 +++++++++++++++------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/FactGenerator/include/predicates.inc b/FactGenerator/include/predicates.inc index 4771cd5..805754c 100644 --- a/FactGenerator/include/predicates.inc +++ b/FactGenerator/include/predicates.inc @@ -9,52 +9,57 @@ #ifndef PREDICATE #define PREDICATE(group, name, fname) #endif +// The goal of the above TODO is to move most or all of the below declarations +// from using PREDICATE to PREDICATE2. +#ifndef PREDICATE2 +#define PREDICATE2(group, name) PREDICATE(group, name, group ## _ ## name) +#endif GROUP_BEGIN(block) -PREDICATE(block, predecessor, block_predecessor) +PREDICATE2(block, predecessor) GROUP_END(block) GROUP_BEGIN(global_var) PREDICATE(global_var, id, global_var) -PREDICATE(global_var, name, global_var_name) -PREDICATE(global_var, demangled_name, global_var_demangled_name) -PREDICATE(global_var, type, global_var_type) -PREDICATE(global_var, initializer, global_var_initializer) +PREDICATE2(global_var, name) +PREDICATE2(global_var, demangled_name) +PREDICATE2(global_var, type) +PREDICATE2(global_var, initializer) PREDICATE(global_var, section, global_var_in_section) PREDICATE(global_var, align, global_var_aligned_to) -PREDICATE(global_var, flag, global_var_flag) +PREDICATE2(global_var, flag) PREDICATE(global_var, linkage, global_var_linkage_type) -PREDICATE(global_var, visibility, global_var_visibility) -PREDICATE(global_var, threadlocal_mode, global_var_threadlocal_mode) +PREDICATE2(global_var, visibility) +PREDICATE2(global_var, threadlocal_mode) GROUP_END(global_var) GROUP_BEGIN(alias) PREDICATE(alias, id, alias) -PREDICATE(alias, name, alias_name) -PREDICATE(alias, type, alias_type) +PREDICATE2(alias, name) +PREDICATE2(alias, type) PREDICATE(alias, linkage, alias_linkage_type) -PREDICATE(alias, visibility, alias_visibility) -PREDICATE(alias, aliasee, alias_aliasee) +PREDICATE2(alias, visibility) +PREDICATE2(alias, aliasee) GROUP_END(alias) GROUP_BEGIN(func) PREDICATE(func, id_defn, func) PREDICATE(func, id_decl, func_decl) -PREDICATE(func, unnamed_addr, func_unnamed_addr) +PREDICATE2(func, unnamed_addr) PREDICATE(func, linkage, func_linkage_type) -PREDICATE(func, visibility, func_visibility) +PREDICATE2(func, visibility) PREDICATE(func, calling_conv, func_calling_convention) -PREDICATE(func, section, func_section) -PREDICATE(func, alignment, func_alignment) +PREDICATE2(func, section) +PREDICATE2(func, alignment) PREDICATE(func, fn_attr, func_attr) -PREDICATE(func, gc, func_gc) -PREDICATE(func, pers_fn, func_pers_fn) -PREDICATE(func, name, func_name) +PREDICATE2(func, gc) +PREDICATE2(func, pers_fn) +PREDICATE2(func, name) PREDICATE(func, type, func_ty) -PREDICATE(func, signature, func_signature) -PREDICATE(func, param, func_param) +PREDICATE2(func, signature) +PREDICATE2(func, param) PREDICATE(func, ret_attr, func_return_attr) -PREDICATE(func, param_attr, func_param_attr) +PREDICATE2(func, param_attr) GROUP_END(function) GROUP_BEGIN(instr) From a914776ec0957b0f2856559bdac9a78b2eb95738 Mon Sep 17 00:00:00 2001 From: Langston Barrett Date: Fri, 7 Oct 2022 14:01:28 -0400 Subject: [PATCH 07/11] Rename global variable relations (part 2) --- FactGenerator/include/predicates.inc | 8 +++----- FactGenerator/src/globals.cpp | 2 +- datalog/export/debug-output-extended.dl | 4 ++-- datalog/export/debug-output.dl | 4 ++-- datalog/points-to/allocations-sizes.dl | 4 ++-- datalog/points-to/cplusplus-exceptions.dl | 2 +- datalog/points-to/virtual-tables.dl | 2 +- datalog/schema/global.dl | 6 +++--- 8 files changed, 15 insertions(+), 17 deletions(-) diff --git a/FactGenerator/include/predicates.inc b/FactGenerator/include/predicates.inc index 805754c..c235853 100644 --- a/FactGenerator/include/predicates.inc +++ b/FactGenerator/include/predicates.inc @@ -11,9 +11,7 @@ #endif // The goal of the above TODO is to move most or all of the below declarations // from using PREDICATE to PREDICATE2. -#ifndef PREDICATE2 #define PREDICATE2(group, name) PREDICATE(group, name, group ## _ ## name) -#endif GROUP_BEGIN(block) PREDICATE2(block, predecessor) @@ -25,10 +23,10 @@ PREDICATE2(global_var, name) PREDICATE2(global_var, demangled_name) PREDICATE2(global_var, type) PREDICATE2(global_var, initializer) -PREDICATE(global_var, section, global_var_in_section) -PREDICATE(global_var, align, global_var_aligned_to) +PREDICATE2(global_var, section) +PREDICATE2(global_var, aligned_to) PREDICATE2(global_var, flag) -PREDICATE(global_var, linkage, global_var_linkage_type) +PREDICATE2(global_var, linkage) PREDICATE2(global_var, visibility) PREDICATE2(global_var, threadlocal_mode) GROUP_END(global_var) diff --git a/FactGenerator/src/globals.cpp b/FactGenerator/src/globals.cpp index a02112f..bd913dd 100644 --- a/FactGenerator/src/globals.cpp +++ b/FactGenerator/src/globals.cpp @@ -119,5 +119,5 @@ void FactGenerator::writeGlobalVar( // Record alignment if (gv.getAlignment()) - writeFact(pred::global_var::align, id, gv.getAlignment()); + writeFact(pred::global_var::aligned_to, id, gv.getAlignment()); } diff --git a/datalog/export/debug-output-extended.dl b/datalog/export/debug-output-extended.dl index 4d8ee48..467c46f 100644 --- a/datalog/export/debug-output-extended.dl +++ b/datalog/export/debug-output-extended.dl @@ -446,10 +446,10 @@ .output global_var_constant_reference (compress=true) .output global_var_demangled_name (compress=true) .output global_var_flag (compress=true) -.output global_var_in_section (compress=true) +.output global_var_section (compress=true) .output global_var_initializer (compress=true) .output global_var_is_constant (compress=true) -.output global_var_linkage_type (compress=true) +.output global_var_linkage (compress=true) .output global_var_name (compress=true) .output global_var_threadlocal_mode (compress=true) .output global_var_type (compress=true) diff --git a/datalog/export/debug-output.dl b/datalog/export/debug-output.dl index 4d8ee48..467c46f 100644 --- a/datalog/export/debug-output.dl +++ b/datalog/export/debug-output.dl @@ -446,10 +446,10 @@ .output global_var_constant_reference (compress=true) .output global_var_demangled_name (compress=true) .output global_var_flag (compress=true) -.output global_var_in_section (compress=true) +.output global_var_section (compress=true) .output global_var_initializer (compress=true) .output global_var_is_constant (compress=true) -.output global_var_linkage_type (compress=true) +.output global_var_linkage (compress=true) .output global_var_name (compress=true) .output global_var_threadlocal_mode (compress=true) .output global_var_type (compress=true) diff --git a/datalog/points-to/allocations-sizes.dl b/datalog/points-to/allocations-sizes.dl index 7f6107d..b9d79d6 100644 --- a/datalog/points-to/allocations-sizes.dl +++ b/datalog/points-to/allocations-sizes.dl @@ -14,7 +14,7 @@ array_allocation(?alloc) :- allocation_size(?globalAlloc, ?n) :- global_allocation_by_variable(?globalVar, ?globalAlloc), - global_var_linkage_type(?globalVar, ?linkage), + global_var_linkage(?globalVar, ?linkage), ! external_linkage_type(?linkage), static_allocation_type(?globalAlloc, ?type), type_has_size(?type, ?n), @@ -23,7 +23,7 @@ allocation_size(?globalAlloc, ?n) :- // The sizes of external globals may not match the size of their types. dynamically_sized_alloc(?alloc) :- external_linkage_type(?externalLinkage), - global_var_linkage_type(?globalVar, ?externalLinkage), + global_var_linkage(?globalVar, ?externalLinkage), global_allocation_by_variable(?globalVar, ?alloc). //----------------------- diff --git a/datalog/points-to/cplusplus-exceptions.dl b/datalog/points-to/cplusplus-exceptions.dl index 892911c..5a9148e 100644 --- a/datalog/points-to/cplusplus-exceptions.dl +++ b/datalog/points-to/cplusplus-exceptions.dl @@ -153,7 +153,7 @@ _type_info_by_alloc(?obj, ?excTypeInfo) :- typeinfo(?var), external_typeinfo(?var) :- external_linkage_type(?externalLinkage), - global_var_linkage_type(?var, ?externalLinkage), + global_var_linkage(?var, ?externalLinkage), global_var_name(?var, ?name), substr(?name, 0, strlen("@_ZTI")) = "@_ZTI". diff --git a/datalog/points-to/virtual-tables.dl b/datalog/points-to/virtual-tables.dl index d09c27e..49c11f5 100644 --- a/datalog/points-to/virtual-tables.dl +++ b/datalog/points-to/virtual-tables.dl @@ -24,7 +24,7 @@ vtable(?vt, ?name) :- typeinfo_vtable(?vt, ?name) :- external_linkage_type(?externalLinkage), - global_var_linkage_type(?vt, ?externalLinkage), + global_var_linkage(?vt, ?externalLinkage), global_var_name(?vt, ?name), contains("class_type_info", ?name), contains("cxxabi", ?name). diff --git a/datalog/schema/global.dl b/datalog/schema/global.dl index c271d9c..05968a7 100644 --- a/datalog/schema/global.dl +++ b/datalog/schema/global.dl @@ -6,10 +6,10 @@ .decl global_var_name(gv:GlobalVariable, name:GlobalVarName) .decl global_var_demangled_name(gv:GlobalVariable, name:symbol) .decl global_var_flag(gv:GlobalVariable, flag:Flag) -.decl global_var_linkage_type(gv:GlobalVariable, link:LinkageType) +.decl global_var_linkage(gv:GlobalVariable, link:LinkageType) .decl global_var_initializer(gv:GlobalVariable, init:Constant) .decl global_var_visibility(gv:GlobalVariable, vis:Visibility) -.decl global_var_in_section(gv:GlobalVariable, sect:symbol) +.decl global_var_section(gv:GlobalVariable, sect:symbol) .decl global_var_threadlocal_mode(gv:GlobalVariable, mode:ThreadLocalMode) .decl global_var_aligned_to(gv:GlobalVariable, alignment:number) @@ -27,7 +27,7 @@ schema_invalid_global_var(GVar, __FILE__, __LINE__) :- schema_invalid_global_var(GVar, __FILE__, __LINE__) :- schema_sanity(), global_var(GVar), - !global_var_linkage_type(GVar, _). + !global_var_linkage(GVar, _). //------------------------------------------------------------------------------ From 275ec306133a1ef35e4ac256c80455c2feda178d Mon Sep 17 00:00:00 2001 From: Langston Barrett Date: Fri, 7 Oct 2022 14:26:34 -0400 Subject: [PATCH 08/11] Rename alias_linkage_type to alias_linkage --- FactGenerator/include/predicates.inc | 2 +- datalog/export/debug-output-extended.dl | 2 +- datalog/export/debug-output.dl | 2 +- datalog/schema/global.dl | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/FactGenerator/include/predicates.inc b/FactGenerator/include/predicates.inc index c235853..cc8789c 100644 --- a/FactGenerator/include/predicates.inc +++ b/FactGenerator/include/predicates.inc @@ -35,7 +35,7 @@ GROUP_BEGIN(alias) PREDICATE(alias, id, alias) PREDICATE2(alias, name) PREDICATE2(alias, type) -PREDICATE(alias, linkage, alias_linkage_type) +PREDICATE2(alias, linkage) PREDICATE2(alias, visibility) PREDICATE2(alias, aliasee) GROUP_END(alias) diff --git a/datalog/export/debug-output-extended.dl b/datalog/export/debug-output-extended.dl index 467c46f..24673bf 100644 --- a/datalog/export/debug-output-extended.dl +++ b/datalog/export/debug-output-extended.dl @@ -53,7 +53,7 @@ .output aggregate_type (compress=true) .output alias (compress=true) .output alias_aliasee (compress=true) -.output alias_linkage_type (compress=true) +.output alias_linkage (compress=true) .output alias_name (compress=true) .output alias_type (compress=true) .output alias_visibility (compress=true) diff --git a/datalog/export/debug-output.dl b/datalog/export/debug-output.dl index 467c46f..24673bf 100644 --- a/datalog/export/debug-output.dl +++ b/datalog/export/debug-output.dl @@ -53,7 +53,7 @@ .output aggregate_type (compress=true) .output alias (compress=true) .output alias_aliasee (compress=true) -.output alias_linkage_type (compress=true) +.output alias_linkage (compress=true) .output alias_name (compress=true) .output alias_type (compress=true) .output alias_visibility (compress=true) diff --git a/datalog/schema/global.dl b/datalog/schema/global.dl index 05968a7..e313932 100644 --- a/datalog/schema/global.dl +++ b/datalog/schema/global.dl @@ -136,7 +136,7 @@ local_exec_threadlocal_mode("thread_local(localexec)"). .decl alias_aliasee(x:Alias, y:Constant) .decl alias_name(x:Alias, name:symbol) .decl alias_type(x:Alias, type:Type) -.decl alias_linkage_type(x:Alias, link:LinkageType) +.decl alias_linkage(x:Alias, link:LinkageType) .decl alias_visibility(x:Alias, vis:Visibility) // For constraints @@ -154,7 +154,7 @@ schema_invalid_alias(Var, __FILE__, __LINE__) :- schema_invalid_alias(Var, __FILE__, __LINE__) :- schema_sanity(), - alias_linkage_type(Var, Link), + alias_linkage(Var, Link), !private_linkage_type(Link), !linker_private_linkage_type(Link), !linker_private_weak_linkage_type(Link), From bc1f9ad5722f44cff48b91e0168b7ee2a3425b6f Mon Sep 17 00:00:00 2001 From: Langston Barrett Date: Fri, 7 Oct 2022 14:38:02 -0400 Subject: [PATCH 09/11] Rename function relations (part 2) --- FactGenerator/include/predicates.inc | 17 +-- FactGenerator/src/InstructionVisitor.cpp | 4 +- FactGenerator/src/functions.cpp | 6 +- datalog/export/debug-output-extended.dl | 74 ++++++------ datalog/export/debug-output.dl | 74 ++++++------ datalog/schema/attr.dl | 136 +++++++++++------------ datalog/schema/call-instr.dl | 16 +-- datalog/schema/func.dl | 12 +- datalog/schema/invoke-instr.dl | 14 +-- doc/dev.rst | 1 + 10 files changed, 178 insertions(+), 176 deletions(-) diff --git a/FactGenerator/include/predicates.inc b/FactGenerator/include/predicates.inc index cc8789c..5ab83a5 100644 --- a/FactGenerator/include/predicates.inc +++ b/FactGenerator/include/predicates.inc @@ -10,8 +10,9 @@ #define PREDICATE(group, name, fname) #endif // The goal of the above TODO is to move most or all of the below declarations -// from using PREDICATE to PREDICATE2. +// from using PREDICATE to PREDICATE2 and PREDICATE_INSTR. #define PREDICATE2(group, name) PREDICATE(group, name, group ## _ ## name) +#define PREDICATE_INSTR(group, name) PREDICATE(group, name, group ## _instr_ ## name) GROUP_BEGIN(block) PREDICATE2(block, predecessor) @@ -44,19 +45,19 @@ GROUP_BEGIN(func) PREDICATE(func, id_defn, func) PREDICATE(func, id_decl, func_decl) PREDICATE2(func, unnamed_addr) -PREDICATE(func, linkage, func_linkage_type) +PREDICATE2(func, linkage) PREDICATE2(func, visibility) -PREDICATE(func, calling_conv, func_calling_convention) +PREDICATE2(func, calling_conv) PREDICATE2(func, section) PREDICATE2(func, alignment) -PREDICATE(func, fn_attr, func_attr) +PREDICATE2(func, fn_attr) PREDICATE2(func, gc) PREDICATE2(func, pers_fn) PREDICATE2(func, name) -PREDICATE(func, type, func_ty) +PREDICATE2(func, ty) PREDICATE2(func, signature) PREDICATE2(func, param) -PREDICATE(func, ret_attr, func_return_attr) +PREDICATE2(func, return_attr) PREDICATE2(func, param_attr) GROUP_END(function) @@ -226,7 +227,7 @@ PREDICATE(invoke, instr_indirect, indirect_invoke_instr) PREDICATE(invoke, function, invoke_instr_fn_operand) PREDICATE(invoke, arg, invoke_instr_arg) PREDICATE(invoke, calling_conv, invoke_instr_with_calling_convention) -PREDICATE(invoke, ret_attr, invoke_instr_with_return_attr) +PREDICATE(invoke, return_attr, invoke_instr_with_return_attr) PREDICATE(invoke, param_attr, invoke_instr_with_param_attr) PREDICATE(invoke, fn_attr, invoke_instr_with_fn_attr) PREDICATE(invoke, normal_label, invoke_instr_normal_label) @@ -448,7 +449,7 @@ PREDICATE(call, instr_indirect, indirect_call_instr) PREDICATE(call, function, call_instr_fn_operand) PREDICATE(call, arg, call_instr_arg) PREDICATE(call, calling_conv, call_instr_with_calling_convention) -PREDICATE(call, ret_attr, call_instr_with_return_attr) +PREDICATE(call, return_attr, call_instr_with_return_attr) PREDICATE(call, param_attr, call_instr_with_param_attr) PREDICATE(call, fn_attr, call_instr_with_fn_attr) PREDICATE(call, tail, call_instr_is_tail_opt) diff --git a/FactGenerator/src/InstructionVisitor.cpp b/FactGenerator/src/InstructionVisitor.cpp index 583bd01..fbdba4d 100644 --- a/FactGenerator/src/InstructionVisitor.cpp +++ b/FactGenerator/src/InstructionVisitor.cpp @@ -302,7 +302,7 @@ void InstructionVisitor::visitInvokeInst(const llvm::InvokeInst &II) { if (Attrs.hasAttributes(Attributes::ReturnIndex)) { string attrs = Attrs.getAsString(Attributes::ReturnIndex); - gen.writeFact(pred::invoke::ret_attr, iref, attrs); + gen.writeFact(pred::invoke::return_attr, iref, attrs); } gen.writeFnAttributes(iref, Attrs); @@ -580,7 +580,7 @@ void InstructionVisitor::visitCallInst(const llvm::CallInst &CI) { if (Attrs.hasAttributes(Attributes::ReturnIndex)) { const auto ReturnAttrs = Attrs.getAttributes(Attributes::ReturnIndex); for (const auto Attr : ReturnAttrs) { - gen.writeFact(pred::call::ret_attr, iref, Attr.getAsString()); + gen.writeFact(pred::call::return_attr, iref, Attr.getAsString()); } } diff --git a/FactGenerator/src/functions.cpp b/FactGenerator/src/functions.cpp index 589dfa7..80766fa 100644 --- a/FactGenerator/src/functions.cpp +++ b/FactGenerator/src/functions.cpp @@ -21,7 +21,7 @@ void FactGenerator::writeFunction( refmode_t typeSignature = recordType(func.getFunctionType()); // Record function type signature - writeFact(pred::func::type, funcref, typeSignature); + writeFact(pred::func::ty, funcref, typeSignature); // Record function signature (name plus type signature) after // unmangling @@ -79,7 +79,7 @@ void FactGenerator::writeFunction( if (Attrs.hasAttributes(Attributes::ReturnIndex)) writeFact( - pred::func::ret_attr, + pred::func::return_attr, funcref, Attrs.getAsString(Attributes::ReturnIndex)); @@ -158,7 +158,7 @@ void FactGenerator::writeFnAttributes( // Record attribute by kind switch (index) { case Attributes::AttrIndex::ReturnIndex: - writeFact(PredGroup::ret_attr, refmode, attr); + writeFact(PredGroup::return_attr, refmode, attr); break; case Attributes::AttrIndex::FunctionIndex: writeFact(PredGroup::fn_attr, refmode, attr); diff --git a/datalog/export/debug-output-extended.dl b/datalog/export/debug-output-extended.dl index 24673bf..e8423bb 100644 --- a/datalog/export/debug-output-extended.dl +++ b/datalog/export/debug-output-extended.dl @@ -339,44 +339,44 @@ .output fsub_instr_second_operand (compress=true) .output func (compress=true) .output func_alignment (compress=true) -.output func_attr (compress=true) -.output func_attr__alignstack (compress=true) -.output func_attr__alwaysinline (compress=true) -.output func_attr__argmemonly (compress=true) -.output func_attr__builtin (compress=true) -.output func_attr__cold (compress=true) -.output func_attr__convergent (compress=true) -.output func_attr__inaccessiblemem_or_argmemonly (compress=true) -.output func_attr__inaccessiblememonly (compress=true) -.output func_attr__inlinehint (compress=true) -.output func_attr__jumptable (compress=true) -.output func_attr__minsize (compress=true) -.output func_attr__naked (compress=true) -.output func_attr__nobuiltin (compress=true) -.output func_attr__noduplicate (compress=true) -.output func_attr__noimplicitfloat (compress=true) -.output func_attr__noinline (compress=true) -.output func_attr__nonlazybind (compress=true) -.output func_attr__norecurse (compress=true) -.output func_attr__noredzone (compress=true) -.output func_attr__noreturn (compress=true) -.output func_attr__nounwind (compress=true) -.output func_attr__optnone (compress=true) -.output func_attr__optsize (compress=true) -.output func_attr__readnone (compress=true) -.output func_attr__readonly (compress=true) -.output func_attr__returns_twice (compress=true) -.output func_attr__safestack (compress=true) -.output func_attr__sanitize_address (compress=true) -.output func_attr__sanitize_memory (compress=true) -.output func_attr__sanitize_thread (compress=true) -.output func_attr__ssp (compress=true) -.output func_attr__sspreq (compress=true) -.output func_attr__sspstrong (compress=true) -.output func_attr__uwtable (compress=true) +.output func_fn_attr (compress=true) +.output func_fn_attr__alignstack (compress=true) +.output func_fn_attr__alwaysinline (compress=true) +.output func_fn_attr__argmemonly (compress=true) +.output func_fn_attr__builtin (compress=true) +.output func_fn_attr__cold (compress=true) +.output func_fn_attr__convergent (compress=true) +.output func_fn_attr__inaccessiblemem_or_argmemonly (compress=true) +.output func_fn_attr__inaccessiblememonly (compress=true) +.output func_fn_attr__inlinehint (compress=true) +.output func_fn_attr__jumptable (compress=true) +.output func_fn_attr__minsize (compress=true) +.output func_fn_attr__naked (compress=true) +.output func_fn_attr__nobuiltin (compress=true) +.output func_fn_attr__noduplicate (compress=true) +.output func_fn_attr__noimplicitfloat (compress=true) +.output func_fn_attr__noinline (compress=true) +.output func_fn_attr__nonlazybind (compress=true) +.output func_fn_attr__norecurse (compress=true) +.output func_fn_attr__noredzone (compress=true) +.output func_fn_attr__noreturn (compress=true) +.output func_fn_attr__nounwind (compress=true) +.output func_fn_attr__optnone (compress=true) +.output func_fn_attr__optsize (compress=true) +.output func_fn_attr__readnone (compress=true) +.output func_fn_attr__readonly (compress=true) +.output func_fn_attr__returns_twice (compress=true) +.output func_fn_attr__safestack (compress=true) +.output func_fn_attr__sanitize_address (compress=true) +.output func_fn_attr__sanitize_memory (compress=true) +.output func_fn_attr__sanitize_thread (compress=true) +.output func_fn_attr__ssp (compress=true) +.output func_fn_attr__sspreq (compress=true) +.output func_fn_attr__sspstrong (compress=true) +.output func_fn_attr__uwtable (compress=true) .output func_by_location (compress=true) .output func_by_value_param (compress=true) -.output func_calling_convention (compress=true) +.output func_calling_conv (compress=true) .output func_calls_func (compress=true) .output func_constant (compress=true) .output func_constant_fn_name (compress=true) @@ -386,7 +386,7 @@ .output func_gc (compress=true) .output func_is_illformed (compress=true) .output func_is_wellformed (compress=true) -.output func_linkage_type (compress=true) +.output func_linkage (compress=true) .output func_missing_pts_signature (compress=true) .output func_name (compress=true) .output func_needs_pts_signature (compress=true) diff --git a/datalog/export/debug-output.dl b/datalog/export/debug-output.dl index 24673bf..e8423bb 100644 --- a/datalog/export/debug-output.dl +++ b/datalog/export/debug-output.dl @@ -339,44 +339,44 @@ .output fsub_instr_second_operand (compress=true) .output func (compress=true) .output func_alignment (compress=true) -.output func_attr (compress=true) -.output func_attr__alignstack (compress=true) -.output func_attr__alwaysinline (compress=true) -.output func_attr__argmemonly (compress=true) -.output func_attr__builtin (compress=true) -.output func_attr__cold (compress=true) -.output func_attr__convergent (compress=true) -.output func_attr__inaccessiblemem_or_argmemonly (compress=true) -.output func_attr__inaccessiblememonly (compress=true) -.output func_attr__inlinehint (compress=true) -.output func_attr__jumptable (compress=true) -.output func_attr__minsize (compress=true) -.output func_attr__naked (compress=true) -.output func_attr__nobuiltin (compress=true) -.output func_attr__noduplicate (compress=true) -.output func_attr__noimplicitfloat (compress=true) -.output func_attr__noinline (compress=true) -.output func_attr__nonlazybind (compress=true) -.output func_attr__norecurse (compress=true) -.output func_attr__noredzone (compress=true) -.output func_attr__noreturn (compress=true) -.output func_attr__nounwind (compress=true) -.output func_attr__optnone (compress=true) -.output func_attr__optsize (compress=true) -.output func_attr__readnone (compress=true) -.output func_attr__readonly (compress=true) -.output func_attr__returns_twice (compress=true) -.output func_attr__safestack (compress=true) -.output func_attr__sanitize_address (compress=true) -.output func_attr__sanitize_memory (compress=true) -.output func_attr__sanitize_thread (compress=true) -.output func_attr__ssp (compress=true) -.output func_attr__sspreq (compress=true) -.output func_attr__sspstrong (compress=true) -.output func_attr__uwtable (compress=true) +.output func_fn_attr (compress=true) +.output func_fn_attr__alignstack (compress=true) +.output func_fn_attr__alwaysinline (compress=true) +.output func_fn_attr__argmemonly (compress=true) +.output func_fn_attr__builtin (compress=true) +.output func_fn_attr__cold (compress=true) +.output func_fn_attr__convergent (compress=true) +.output func_fn_attr__inaccessiblemem_or_argmemonly (compress=true) +.output func_fn_attr__inaccessiblememonly (compress=true) +.output func_fn_attr__inlinehint (compress=true) +.output func_fn_attr__jumptable (compress=true) +.output func_fn_attr__minsize (compress=true) +.output func_fn_attr__naked (compress=true) +.output func_fn_attr__nobuiltin (compress=true) +.output func_fn_attr__noduplicate (compress=true) +.output func_fn_attr__noimplicitfloat (compress=true) +.output func_fn_attr__noinline (compress=true) +.output func_fn_attr__nonlazybind (compress=true) +.output func_fn_attr__norecurse (compress=true) +.output func_fn_attr__noredzone (compress=true) +.output func_fn_attr__noreturn (compress=true) +.output func_fn_attr__nounwind (compress=true) +.output func_fn_attr__optnone (compress=true) +.output func_fn_attr__optsize (compress=true) +.output func_fn_attr__readnone (compress=true) +.output func_fn_attr__readonly (compress=true) +.output func_fn_attr__returns_twice (compress=true) +.output func_fn_attr__safestack (compress=true) +.output func_fn_attr__sanitize_address (compress=true) +.output func_fn_attr__sanitize_memory (compress=true) +.output func_fn_attr__sanitize_thread (compress=true) +.output func_fn_attr__ssp (compress=true) +.output func_fn_attr__sspreq (compress=true) +.output func_fn_attr__sspstrong (compress=true) +.output func_fn_attr__uwtable (compress=true) .output func_by_location (compress=true) .output func_by_value_param (compress=true) -.output func_calling_convention (compress=true) +.output func_calling_conv (compress=true) .output func_calls_func (compress=true) .output func_constant (compress=true) .output func_constant_fn_name (compress=true) @@ -386,7 +386,7 @@ .output func_gc (compress=true) .output func_is_illformed (compress=true) .output func_is_wellformed (compress=true) -.output func_linkage_type (compress=true) +.output func_linkage (compress=true) .output func_missing_pts_signature (compress=true) .output func_name (compress=true) .output func_needs_pts_signature (compress=true) diff --git a/datalog/schema/attr.dl b/datalog/schema/attr.dl index e374f08..265af49 100644 --- a/datalog/schema/attr.dl +++ b/datalog/schema/attr.dl @@ -48,77 +48,77 @@ parameter_attr__align(Attr) :- // Function Attributes -.decl func_attr__alwaysinline(attr:Attribute) -.decl func_attr__builtin(attr:Attribute) -.decl func_attr__cold(attr:Attribute) -.decl func_attr__convergent(attr:Attribute) -.decl func_attr__inaccessiblememonly(attr:Attribute) -.decl func_attr__inaccessiblemem_or_argmemonly(attr:Attribute) -.decl func_attr__inlinehint(attr:Attribute) -.decl func_attr__jumptable(attr:Attribute) -.decl func_attr__minsize(attr:Attribute) -.decl func_attr__naked(attr:Attribute) -.decl func_attr__nobuiltin(attr:Attribute) -.decl func_attr__noduplicate(attr:Attribute) -.decl func_attr__noimplicitfloat(attr:Attribute) -.decl func_attr__noinline(attr:Attribute) -.decl func_attr__nonlazybind(attr:Attribute) -.decl func_attr__noredzone(attr:Attribute) -.decl func_attr__noreturn(attr:Attribute) -.decl func_attr__norecurse(attr:Attribute) -.decl func_attr__nounwind(attr:Attribute) -.decl func_attr__optnone(attr:Attribute) -.decl func_attr__optsize(attr:Attribute) -.decl func_attr__readnone(attr:Attribute) -.decl func_attr__readonly(attr:Attribute) -.decl func_attr__argmemonly(attr:Attribute) -.decl func_attr__returns_twice(attr:Attribute) -.decl func_attr__safestack(attr:Attribute) -.decl func_attr__sanitize_address(attr:Attribute) -.decl func_attr__sanitize_memory(attr:Attribute) -.decl func_attr__sanitize_thread(attr:Attribute) -.decl func_attr__ssp(attr:Attribute) -.decl func_attr__sspreq(attr:Attribute) -.decl func_attr__sspstrong(attr:Attribute) -.decl func_attr__uwtable(attr:Attribute) -.decl func_attr__alignstack(attr:Attribute) +.decl func_fn_attr__alwaysinline(attr:Attribute) +.decl func_fn_attr__builtin(attr:Attribute) +.decl func_fn_attr__cold(attr:Attribute) +.decl func_fn_attr__convergent(attr:Attribute) +.decl func_fn_attr__inaccessiblememonly(attr:Attribute) +.decl func_fn_attr__inaccessiblemem_or_argmemonly(attr:Attribute) +.decl func_fn_attr__inlinehint(attr:Attribute) +.decl func_fn_attr__jumptable(attr:Attribute) +.decl func_fn_attr__minsize(attr:Attribute) +.decl func_fn_attr__naked(attr:Attribute) +.decl func_fn_attr__nobuiltin(attr:Attribute) +.decl func_fn_attr__noduplicate(attr:Attribute) +.decl func_fn_attr__noimplicitfloat(attr:Attribute) +.decl func_fn_attr__noinline(attr:Attribute) +.decl func_fn_attr__nonlazybind(attr:Attribute) +.decl func_fn_attr__noredzone(attr:Attribute) +.decl func_fn_attr__noreturn(attr:Attribute) +.decl func_fn_attr__norecurse(attr:Attribute) +.decl func_fn_attr__nounwind(attr:Attribute) +.decl func_fn_attr__optnone(attr:Attribute) +.decl func_fn_attr__optsize(attr:Attribute) +.decl func_fn_attr__readnone(attr:Attribute) +.decl func_fn_attr__readonly(attr:Attribute) +.decl func_fn_attr__argmemonly(attr:Attribute) +.decl func_fn_attr__returns_twice(attr:Attribute) +.decl func_fn_attr__safestack(attr:Attribute) +.decl func_fn_attr__sanitize_address(attr:Attribute) +.decl func_fn_attr__sanitize_memory(attr:Attribute) +.decl func_fn_attr__sanitize_thread(attr:Attribute) +.decl func_fn_attr__ssp(attr:Attribute) +.decl func_fn_attr__sspreq(attr:Attribute) +.decl func_fn_attr__sspstrong(attr:Attribute) +.decl func_fn_attr__uwtable(attr:Attribute) +.decl func_fn_attr__alignstack(attr:Attribute) -attr("alwaysinline"). func_attr__alwaysinline("alwaysinline"). -attr("builtin"). func_attr__builtin("builtin"). -attr("cold"). func_attr__cold("cold"). -attr("convergent"). func_attr__convergent("convergent"). -attr("inaccessiblememonly"). func_attr__inaccessiblememonly("inaccessiblememonly"). +attr("alwaysinline"). func_fn_attr__alwaysinline("alwaysinline"). +attr("builtin"). func_fn_attr__builtin("builtin"). +attr("cold"). func_fn_attr__cold("cold"). +attr("convergent"). func_fn_attr__convergent("convergent"). +attr("inaccessiblememonly"). func_fn_attr__inaccessiblememonly("inaccessiblememonly"). attr("inaccessiblemem_or_argmemonly"). -func_attr__inaccessiblemem_or_argmemonly("inaccessiblemem_or_argmemonly"). -attr("inlinehint"). func_attr__inlinehint("inlinehint"). -attr("jumptable"). func_attr__jumptable("jumptable"). -attr("minsize"). func_attr__minsize("minsize"). -attr("naked"). func_attr__naked("naked"). -attr("nobuiltin"). func_attr__nobuiltin("nobuiltin"). -attr("noduplicate"). func_attr__noduplicate("noduplicate"). -attr("noimplicitfloat"). func_attr__noimplicitfloat("noimplicitfloat"). -attr("noinline"). func_attr__noinline("noinline"). -attr("nonlazybind"). func_attr__nonlazybind("nonlazybind"). -attr("noredzone"). func_attr__noredzone("noredzone"). -attr("noreturn"). func_attr__noreturn("noreturn"). -attr("norecurse"). func_attr__norecurse("norecurse"). -attr("nounwind"). func_attr__nounwind("nounwind"). -attr("optnone"). func_attr__optnone("optnone"). -attr("optsize"). func_attr__optsize("optsize"). -attr("readnone"). func_attr__readnone("readnone"). -attr("readonly"). func_attr__readonly("readonly"). -attr("argmemonly"). func_attr__argmemonly("argmemonly"). -attr("returns_twice"). func_attr__returns_twice("returns_twice"). -attr("safestack"). func_attr__safestack("safestack"). -attr("sanitize_address"). func_attr__sanitize_address("sanitize_address"). -attr("sanitize_memory"). func_attr__sanitize_memory("sanitize_memory"). -attr("sanitize_thread"). func_attr__sanitize_thread("sanitize_thread"). -attr("ssp"). func_attr__ssp("ssp"). -attr("sspreq"). func_attr__sspreq("sspreq"). -attr("sspstrong"). func_attr__sspstrong("sspstrong"). -attr("uwtable"). func_attr__uwtable("uwtable"). +func_fn_attr__inaccessiblemem_or_argmemonly("inaccessiblemem_or_argmemonly"). +attr("inlinehint"). func_fn_attr__inlinehint("inlinehint"). +attr("jumptable"). func_fn_attr__jumptable("jumptable"). +attr("minsize"). func_fn_attr__minsize("minsize"). +attr("naked"). func_fn_attr__naked("naked"). +attr("nobuiltin"). func_fn_attr__nobuiltin("nobuiltin"). +attr("noduplicate"). func_fn_attr__noduplicate("noduplicate"). +attr("noimplicitfloat"). func_fn_attr__noimplicitfloat("noimplicitfloat"). +attr("noinline"). func_fn_attr__noinline("noinline"). +attr("nonlazybind"). func_fn_attr__nonlazybind("nonlazybind"). +attr("noredzone"). func_fn_attr__noredzone("noredzone"). +attr("noreturn"). func_fn_attr__noreturn("noreturn"). +attr("norecurse"). func_fn_attr__norecurse("norecurse"). +attr("nounwind"). func_fn_attr__nounwind("nounwind"). +attr("optnone"). func_fn_attr__optnone("optnone"). +attr("optsize"). func_fn_attr__optsize("optsize"). +attr("readnone"). func_fn_attr__readnone("readnone"). +attr("readonly"). func_fn_attr__readonly("readonly"). +attr("argmemonly"). func_fn_attr__argmemonly("argmemonly"). +attr("returns_twice"). func_fn_attr__returns_twice("returns_twice"). +attr("safestack"). func_fn_attr__safestack("safestack"). +attr("sanitize_address"). func_fn_attr__sanitize_address("sanitize_address"). +attr("sanitize_memory"). func_fn_attr__sanitize_memory("sanitize_memory"). +attr("sanitize_thread"). func_fn_attr__sanitize_thread("sanitize_thread"). +attr("ssp"). func_fn_attr__ssp("ssp"). +attr("sspreq"). func_fn_attr__sspreq("sspreq"). +attr("sspstrong"). func_fn_attr__sspstrong("sspstrong"). +attr("uwtable"). func_fn_attr__uwtable("uwtable"). -func_attr__alignstack(Attr) :- +func_fn_attr__alignstack(Attr) :- attr(Attr), substr(Attr, 0, strlen("alignstack")) = "alignstack". diff --git a/datalog/schema/call-instr.dl b/datalog/schema/call-instr.dl index 3f82691..211b629 100644 --- a/datalog/schema/call-instr.dl +++ b/datalog/schema/call-instr.dl @@ -120,13 +120,13 @@ schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), call_instr_with_fn_attr(Instr, Attr), - !func_attr__noreturn(Attr), - !func_attr__nounwind(Attr), - !func_attr__readonly(Attr), - !func_attr__readnone(Attr), - !func_attr__cold(Attr), - !func_attr__returns_twice(Attr), - !func_attr__builtin(Attr), + !func_fn_attr__noreturn(Attr), + !func_fn_attr__nounwind(Attr), + !func_fn_attr__readonly(Attr), + !func_fn_attr__readnone(Attr), + !func_fn_attr__cold(Attr), + !func_fn_attr__returns_twice(Attr), + !func_fn_attr__builtin(Attr), !target_dependent_attr(Attr). // c6 @@ -139,7 +139,7 @@ schema_invalid_instr(Instr, __FILE__, __LINE__) :- // schema_sanity(), // call_instr_fn_target(Instr, Func), // call_instr_with_calling_convention(Instr, CConv), -// !func_calling_convention(Func, CConv). // c2 +// !func_calling_conv(Func, CConv). // c2 // Signature conformance schema_invalid_instr(Instr, __FILE__, __LINE__) :- diff --git a/datalog/schema/func.dl b/datalog/schema/func.dl index 3872e8d..08ff58c 100644 --- a/datalog/schema/func.dl +++ b/datalog/schema/func.dl @@ -64,15 +64,15 @@ schema_multiple_func_names(Func, __FILE__, __LINE__) :- //----------------------------------------------------------------- .decl func_alignment(func:FunctionDecl, alignment:number) -.decl func_linkage_type(func:FunctionDecl, link:LinkageType) +.decl func_linkage(func:FunctionDecl, link:LinkageType) .decl func_visibility(func:FunctionDecl, vis:Visibility) -.decl func_calling_convention(func:FunctionDecl, cc:CallingConvention) +.decl func_calling_conv(func:FunctionDecl, cc:CallingConvention) .decl func_unnamed_addr(func:FunctionDecl) .decl func_gc(func:FunctionDecl, collector:symbol) .decl func_pers_fn(func:FunctionDecl, persfn:Constant) -calling_convention(cc) :- func_calling_convention(_, cc). -linkage_type(link) :- func_linkage_type(_, link). +calling_convention(cc) :- func_calling_conv(_, cc). +linkage_type(link) :- func_linkage(_, link). visibility(vis) :- func_visibility(_, vis). //----------------------------------------------------------------- @@ -114,11 +114,11 @@ func_nparams(Func, Total) :- // If multiple parameter attrs are needed, they are space separated. //------------------------------------------------------------------------------ -.decl func_attr(func:FunctionDecl, attr:Attribute) +.decl func_fn_attr(func:FunctionDecl, attr:Attribute) .decl func_return_attr(func:FunctionDecl, attr:Attribute) .decl func_param_attr(func:FunctionDecl, index:ArgumentIndex, attr:Attribute) -attr(Attr) :- func_attr(_, Attr). +attr(Attr) :- func_fn_attr(_, Attr). attr(Attr) :- func_return_attr(_, Attr). attr(Attr) :- func_param_attr(_, _, Attr). diff --git a/datalog/schema/invoke-instr.dl b/datalog/schema/invoke-instr.dl index 54b0560..39ec2b8 100644 --- a/datalog/schema/invoke-instr.dl +++ b/datalog/schema/invoke-instr.dl @@ -133,13 +133,13 @@ schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_invalid_instr(Instr, __FILE__, __LINE__) :- schema_sanity(), invoke_instr_with_fn_attr(Instr, Attr), - !func_attr__noreturn(Attr), - !func_attr__nounwind(Attr), - !func_attr__readonly(Attr), - !func_attr__readnone(Attr), - !func_attr__cold(Attr), - !func_attr__returns_twice(Attr), - !func_attr__builtin(Attr), + !func_fn_attr__noreturn(Attr), + !func_fn_attr__nounwind(Attr), + !func_fn_attr__readonly(Attr), + !func_fn_attr__readnone(Attr), + !func_fn_attr__cold(Attr), + !func_fn_attr__returns_twice(Attr), + !func_fn_attr__builtin(Attr), !target_dependent_attr(Attr). // c5 diff --git a/doc/dev.rst b/doc/dev.rst index aadcd33..bbd4991 100644 --- a/doc/dev.rst +++ b/doc/dev.rst @@ -48,6 +48,7 @@ space. This judgment is highly subjective, but must be made somehow. - ``asm``: Assembly - ``attr``: Attribute - ``block``: LLVM basic block +- ``calling_conv``: Calling convention - ``const``: Constant - ``global_var``: Global variable - ``expr``: Expression From 411c0239dacfdf3424a704069238a10d87d1aa85 Mon Sep 17 00:00:00 2001 From: Langston Barrett Date: Fri, 7 Oct 2022 14:58:23 -0400 Subject: [PATCH 10/11] FactGenerator: Capture instr attr naming schemes (pt. 1) Begin systematizing the names of attributes of instructions. This commit endeavors not to rename anything that appears in the fact generator nor Datalog, but merely to capture the existing system(s) of instruction attribute names. This will make it more obvious which ones lie outside these conventions, and make it easier to change them. This commit ends at `trunc`, further commits will do the rest. --- FactGenerator/include/predicates.inc | 214 ++++++++++++++------------- doc/dev.rst | 2 +- 2 files changed, 116 insertions(+), 100 deletions(-) diff --git a/FactGenerator/include/predicates.inc b/FactGenerator/include/predicates.inc index 5ab83a5..6aa6ecb 100644 --- a/FactGenerator/include/predicates.inc +++ b/FactGenerator/include/predicates.inc @@ -10,9 +10,11 @@ #define PREDICATE(group, name, fname) #endif // The goal of the above TODO is to move most or all of the below declarations -// from using PREDICATE to PREDICATE2 and PREDICATE_INSTR. +// from using PREDICATE to PREDICATE2S? and PREDICATEIS?. #define PREDICATE2(group, name) PREDICATE(group, name, group ## _ ## name) -#define PREDICATE_INSTR(group, name) PREDICATE(group, name, group ## _instr_ ## name) +#define PREDICATE2S(group, name) PREDICATE(group, name, group ## name) +#define PREDICATEI(group, name) PREDICATE(group, name, group ## _instr_ ## name) +#define PREDICATEIS(group, name) PREDICATE(group, name, group ## instr_ ## name) GROUP_BEGIN(block) PREDICATE2(block, predecessor) @@ -72,125 +74,127 @@ PREDICATE(instr, unreachable, unreachable_instr) GROUP_END(instr) GROUP_BEGIN(add) -PREDICATE(add, instr, add_instr) -PREDICATE(add, first_operand, add_instr_first_operand) -PREDICATE(add, second_operand, add_instr_second_operand) +PREDICATE2(add, instr) +PREDICATEI(add, first_operand) +PREDICATEI(add, second_operand) GROUP_END(add) GROUP_BEGIN(fadd) -PREDICATE(fadd, instr, fadd_instr) -PREDICATE(fadd, first_operand, fadd_instr_first_operand) -PREDICATE(fadd, second_operand, fadd_instr_second_operand) +PREDICATE2(fadd, instr) +PREDICATEI(fadd, first_operand) +PREDICATEI(fadd, second_operand) GROUP_END(fadd) GROUP_BEGIN(sub) -PREDICATE(sub, instr, sub_instr) -PREDICATE(sub, first_operand, sub_instr_first_operand) -PREDICATE(sub, second_operand, sub_instr_second_operand) +PREDICATE2(sub, instr) +PREDICATEI(sub, first_operand) +PREDICATEI(sub, second_operand) GROUP_END(sub) GROUP_BEGIN(fsub) -PREDICATE(fsub, instr, fsub_instr) -PREDICATE(fsub, first_operand, fsub_instr_first_operand) -PREDICATE(fsub, second_operand, fsub_instr_second_operand) +PREDICATE2(fsub, instr) +PREDICATEI(fsub, first_operand) +PREDICATEI(fsub, second_operand) GROUP_END(fsub) GROUP_BEGIN(mul) -PREDICATE(mul, instr, mul_instr) -PREDICATE(mul, first_operand, mul_instr_first_operand) -PREDICATE(mul, second_operand, mul_instr_second_operand) +PREDICATE2(mul, instr) +PREDICATEI(mul, first_operand) +PREDICATEI(mul, second_operand) GROUP_END(mul) GROUP_BEGIN(fmul) -PREDICATE(fmul, instr, fmul_instr) -PREDICATE(fmul, first_operand, fmul_instr_first_operand) -PREDICATE(fmul, second_operand, fmul_instr_second_operand) +PREDICATE2(fmul, instr) +PREDICATEI(fmul, first_operand) +PREDICATEI(fmul, second_operand) GROUP_END(fmul) GROUP_BEGIN(udiv) -PREDICATE(udiv, instr, udiv_instr) -PREDICATE(udiv, first_operand, udiv_instr_first_operand) -PREDICATE(udiv, second_operand, udiv_instr_second_operand) -GROUP_END(udiv) +PREDICATE2(udiv, instr) +PREDICATEI(udiv, first_operand) +PREDICATEI(udiv, second_operand) +GROUP_END(udv) GROUP_BEGIN(fdiv) -PREDICATE(fdiv, instr, fdiv_instr) -PREDICATE(fdiv, first_operand, fdiv_instr_first_operand) -PREDICATE(fdiv, second_operand, fdiv_instr_second_operand) +PREDICATE2(fdiv, instr) +PREDICATEI(fdiv, first_operand) +PREDICATEI(fdiv, second_operand) GROUP_END(fdiv) GROUP_BEGIN(sdiv) -PREDICATE(sdiv, instr, sdiv_instr) -PREDICATE(sdiv, first_operand, sdiv_instr_first_operand) -PREDICATE(sdiv, second_operand, sdiv_instr_second_operand) +PREDICATE2(sdiv, instr) +PREDICATEI(sdiv, first_operand) +PREDICATEI(sdiv, second_operand) GROUP_END(sdiv) GROUP_BEGIN(urem) -PREDICATE(urem, instr, urem_instr) -PREDICATE(urem, first_operand, urem_instr_first_operand) -PREDICATE(urem, second_operand, urem_instr_second_operand) +PREDICATE2(urem, instr) +PREDICATEI(urem, first_operand) +PREDICATEI(urem, second_operand) GROUP_END(urem) GROUP_BEGIN(srem) -PREDICATE(srem, instr, srem_instr) -PREDICATE(srem, first_operand, srem_instr_first_operand) -PREDICATE(srem, second_operand, srem_instr_second_operand) +PREDICATE2(srem, instr) +PREDICATEI(srem, first_operand) +PREDICATEI(srem, second_operand) GROUP_END(srem) GROUP_BEGIN(frem) -PREDICATE(frem, instr, frem_instr) -PREDICATE(frem, first_operand, frem_instr_first_operand) -PREDICATE(frem, second_operand, frem_instr_second_operand) +PREDICATE2(frem, instr) +PREDICATEI(frem, first_operand) +PREDICATEI(frem, second_operand) GROUP_END(frem) // Bitwise Binary Instrs GROUP_BEGIN(shl) -PREDICATE(shl, instr, shl_instr) -PREDICATE(shl, first_operand, shl_instr_first_operand) -PREDICATE(shl, second_operand, shl_instr_second_operand) +PREDICATE2(shl, instr) +PREDICATEI(shl, first_operand) +PREDICATEI(shl, second_operand) GROUP_END(shl) GROUP_BEGIN(lshr) -PREDICATE(lshr, instr, lshr_instr) -PREDICATE(lshr, first_operand, lshr_instr_first_operand) -PREDICATE(lshr, second_operand, lshr_instr_second_operand) +PREDICATE2(lshr, instr) +PREDICATEI(lshr, first_operand) +PREDICATEI(lshr, second_operand) GROUP_END(lshr) GROUP_BEGIN(ashr) -PREDICATE(ashr, instr, ashr_instr) -PREDICATE(ashr, first_operand, ashr_instr_first_operand) -PREDICATE(ashr, second_operand, ashr_instr_second_operand) +PREDICATE2(ashr, instr) +PREDICATEI(ashr, first_operand) +PREDICATEI(ashr, second_operand) GROUP_END(ashr) GROUP_BEGIN(and_) -PREDICATE(and_, instr, and_instr) -PREDICATE(and_, first_operand, and_instr_first_operand) -PREDICATE(and_, second_operand, and_instr_second_operand) +PREDICATE2S(and_, instr) +PREDICATEIS(and_, first_operand) +PREDICATEIS(and_, second_operand) GROUP_END(and_) GROUP_BEGIN(or_) -PREDICATE(or_, instr, or_instr) -PREDICATE(or_, first_operand, or_instr_first_operand) -PREDICATE(or_, second_operand, or_instr_second_operand) +PREDICATE2S(or_, instr) +PREDICATEIS(or_, first_operand) +PREDICATEIS(or_, second_operand) GROUP_END(or_) GROUP_BEGIN(xor_) -PREDICATE(xor_, instr, xor_instr) -PREDICATE(xor_, first_operand, xor_instr_first_operand) -PREDICATE(xor_, second_operand, xor_instr_second_operand) +PREDICATE2S(xor_, instr) +PREDICATEIS(xor_, first_operand) +PREDICATEIS(xor_, second_operand) GROUP_END(xor_) // Terminator Instrs GROUP_BEGIN(ret) -PREDICATE(ret, instr, ret_instr) +PREDICATE2(ret, instr) +// TODO(lb): PREDICATE(ret, instr_void, void_ret_instr) +// TODO(lb): PREDICATE(ret, operand, ret_instr_value) GROUP_END(ret) GROUP_BEGIN(br) -PREDICATE(br, instr, br_instr) +PREDICATE2(br, instr) PREDICATE(br, instr_cond, br_cond_instr) PREDICATE(br, condition, br_cond_instr_condition) PREDICATE(br, cond_iftrue, br_cond_instr_iftrue_label) @@ -200,28 +204,30 @@ PREDICATE(br, uncond_dest, br_uncond_instr_dest_label) GROUP_END(br) GROUP_BEGIN(switch_) -PREDICATE(switch_, instr, switch_instr) -PREDICATE(switch_, operand, switch_instr_operand) -PREDICATE(switch_, default_label, switch_instr_default_label) +PREDICATE2S(switch_, instr) +PREDICATEIS(switch_, operand) +PREDICATEIS(switch_, default_label) +// TODO(lb): Remove leading underscores PREDICATE(switch_, case_value, _switch_instr_case_value) PREDICATE(switch_, case_label, _switch_instr_case_label) -PREDICATE(switch_, ncases, switch_instr_ncases) +PREDICATEIS(switch_, ncases) GROUP_END(switch_) GROUP_BEGIN(indirectbr) -PREDICATE(indirectbr, instr, indirectbr_instr) -PREDICATE(indirectbr, address, indirectbr_instr_address) -PREDICATE(indirectbr, label, indirectbr_instr_label) -PREDICATE(indirectbr, nlabels, indirectbr_instr_nlabels) +PREDICATE2(indirectbr, instr) +PREDICATEI(indirectbr, address) +PREDICATEI(indirectbr, label) +PREDICATEI(indirectbr, nlabels) GROUP_END(indirectbr) GROUP_BEGIN(resume) -PREDICATE(resume, instr, resume_instr) -PREDICATE(resume, operand, resume_instr_operand) +PREDICATE2(resume, instr) +PREDICATEI(resume, operand) GROUP_END(resume) GROUP_BEGIN(invoke) -PREDICATE(invoke, instr, invoke_instr) +PREDICATE2(invoke, instr) +// TODO(lb): Rename for consistency PREDICATE(invoke, instr_direct, direct_invoke_instr) PREDICATE(invoke, instr_indirect, indirect_invoke_instr) PREDICATE(invoke, function, invoke_instr_fn_operand) @@ -237,12 +243,14 @@ GROUP_END(invoke) // Vector Operations GROUP_BEGIN(extract_element) +// TODO(lb): Rename extract_element to extractelement PREDICATE(extract_element, instr, extractelement_instr) PREDICATE(extract_element, base, extractelement_instr_base) PREDICATE(extract_element, index, extractelement_instr_index) GROUP_END(extract_element) GROUP_BEGIN(insert_element) +// TODO(lb): Rename insert_element to insertelement PREDICATE(insert_element, instr, insertelement_instr) PREDICATE(insert_element, base, insertelement_instr_base) PREDICATE(insert_element, index, insertelement_instr_index) @@ -250,6 +258,7 @@ PREDICATE(insert_element, value, insertelement_instr_value) GROUP_END(insert_element) GROUP_BEGIN(shuffle_vector) +// TODO(lb): Rename shuffle_vector to shufflevector PREDICATE(shuffle_vector, instr, shufflevector_instr) PREDICATE(shuffle_vector, first_vector, shufflevector_instr_first_vector) PREDICATE(shuffle_vector, second_vector, shufflevector_instr_second_vector) @@ -259,6 +268,7 @@ GROUP_END(shuffle_vector) // Aggregate Operations GROUP_BEGIN(extract_value) +// TODO(lb): Rename extract_value to extractvalue PREDICATE(extract_value, instr, extractvalue_instr) PREDICATE(extract_value, base, extractvalue_instr_base) PREDICATE(extract_value, index, extractvalue_instr_index) @@ -266,6 +276,7 @@ PREDICATE(extract_value, nindices, extractvalue_instr_nindices) GROUP_END(extract_value) GROUP_BEGIN(insert_value) +// TODO(lb): Rename insert_value to insertvalue PREDICATE(insert_value, instr, insertvalue_instr) PREDICATE(insert_value, base, insertvalue_instr_base) PREDICATE(insert_value, value, insertvalue_instr_value) @@ -276,54 +287,59 @@ GROUP_END(insert_value) // Memory Operations GROUP_BEGIN(alloca) -PREDICATE(alloca, instr, alloca_instr) -PREDICATE(alloca, size, alloca_instr_size) -PREDICATE(alloca, alignment, alloca_instr_alignment) -PREDICATE(alloca, type, alloca_instr_type) +PREDICATE2(alloca, instr) +PREDICATEI(alloca, size) +PREDICATEI(alloca, alignment) +PREDICATEI(alloca, type) GROUP_END(alloca) GROUP_BEGIN(load) -PREDICATE(load, instr, load_instr) -PREDICATE(load, alignment, load_instr_alignment) -PREDICATE(load, ordering, load_instr_ordering) -PREDICATE(load, address, load_instr_address) +PREDICATE2(load, instr) +PREDICATEI(load, alignment) +PREDICATEI(load, ordering) +PREDICATEI(load, address) +// TODO(lb): PREDICATE(load, isvolatile, load_instr_is_volatile) GROUP_END(load) GROUP_BEGIN(store) -PREDICATE(store, instr, store_instr) -PREDICATE(store, alignment, store_instr_alignment) -PREDICATE(store, ordering, store_instr_ordering) -PREDICATE(store, value, store_instr_value) -PREDICATE(store, address, store_instr_address) +PREDICATE2(store, instr) +PREDICATEI(store, alignment) +PREDICATEI(store, ordering) +PREDICATEI(store, value) +PREDICATEI(store, address) +// TODO(lb): PREDICATE(store, isvolatile, store_instr_is_volatile) GROUP_END(store) GROUP_BEGIN(fence) -PREDICATE(fence, instr, fence_instr) -PREDICATE(fence, ordering, fence_instr_ordering) +PREDICATE2(fence, instr) +PREDICATEI(fence, ordering) GROUP_END(fence) GROUP_BEGIN(atomicrmw) -PREDICATE(atomicrmw, instr, atomicrmw_instr) -PREDICATE(atomicrmw, ordering, atomicrmw_instr_ordering) -PREDICATE(atomicrmw, operation, atomicrmw_instr_operation) -PREDICATE(atomicrmw, address, atomicrmw_instr_address) -PREDICATE(atomicrmw, value, atomicrmw_instr_value) +PREDICATE2(atomicrmw, instr) +PREDICATEI(atomicrmw, ordering) +PREDICATEI(atomicrmw, operation) +PREDICATEI(atomicrmw, address) +PREDICATEI(atomicrmw, value) +// TODO(lb): PREDICATE(atomicrmw, isvolatile, atomicrmw_instr_is_volatile) GROUP_END(atomicrmw) GROUP_BEGIN(cmpxchg) -PREDICATE(cmpxchg, instr, cmpxchg_instr) -PREDICATE(cmpxchg, ordering, cmpxchg_instr_ordering) -PREDICATE(cmpxchg, address, cmpxchg_instr_address) -PREDICATE(cmpxchg, cmp_value, cmpxchg_instr_cmp_value) -PREDICATE(cmpxchg, new_value, cmpxchg_instr_new_value) -PREDICATE(cmpxchg, type, cmpxchg_instr_type) +PREDICATE2(cmpxchg, instr) +PREDICATEI(cmpxchg, ordering) +PREDICATEI(cmpxchg, address) +PREDICATEI(cmpxchg, cmp_value) +PREDICATEI(cmpxchg, new_value) +PREDICATEI(cmpxchg, type) +// TODO(lb): PREDICATE(cmpxchg, isvolatile, cmpxchg_instr_is_volatile) GROUP_END(cmpxchg) GROUP_BEGIN(gep) +// TODO(lb): Rename getelementptr to gep in Datalog PREDICATE(gep, instr, getelementptr_instr) PREDICATE(gep, base, getelementptr_instr_base) PREDICATE(gep, index, getelementptr_instr_index) @@ -334,9 +350,9 @@ GROUP_END(gep) // Conversion Operations GROUP_BEGIN(trunc) -PREDICATE(trunc, instr, trunc_instr) -PREDICATE(trunc, from_operand, trunc_instr_from_operand) -PREDICATE(trunc, to_type, trunc_instr_to_type) +PREDICATE2(trunc, instr) +PREDICATEI(trunc, from_operand) +PREDICATEI(trunc, to_type) GROUP_END(trunc) GROUP_BEGIN(zext) diff --git a/doc/dev.rst b/doc/dev.rst index bbd4991..13d3a55 100644 --- a/doc/dev.rst +++ b/doc/dev.rst @@ -53,7 +53,7 @@ space. This judgment is highly subjective, but must be made somehow. - ``global_var``: Global variable - ``expr``: Expression - ``func``: Function -- ``gep``: ``getelementptr`` +- ``gep``: ``getelementptr`` (this is the only abbreviated opcode) - ``instr``: Instruction - ``int``: Integer - ``param``: Parameter From 961897eefd3df452b503e2b734b6653124a805fc Mon Sep 17 00:00:00 2001 From: Langston Barrett Date: Fri, 7 Oct 2022 15:10:06 -0400 Subject: [PATCH 11/11] FactGenerator: Finish capturing instr naming schemes Finish the work started in the previous commit. --- FactGenerator/include/predicates.inc | 146 ++++++++++++++------------- 1 file changed, 77 insertions(+), 69 deletions(-) diff --git a/FactGenerator/include/predicates.inc b/FactGenerator/include/predicates.inc index 6aa6ecb..71ba5f7 100644 --- a/FactGenerator/include/predicates.inc +++ b/FactGenerator/include/predicates.inc @@ -187,9 +187,9 @@ GROUP_END(xor_) GROUP_BEGIN(ret) PREDICATE2(ret, instr) -// TODO(lb): +// TODO(#42): PREDICATE(ret, instr_void, void_ret_instr) -// TODO(lb): +// TODO(#42): PREDICATE(ret, operand, ret_instr_value) GROUP_END(ret) @@ -207,7 +207,7 @@ GROUP_BEGIN(switch_) PREDICATE2S(switch_, instr) PREDICATEIS(switch_, operand) PREDICATEIS(switch_, default_label) -// TODO(lb): Remove leading underscores +// TODO(#42): Remove leading underscores PREDICATE(switch_, case_value, _switch_instr_case_value) PREDICATE(switch_, case_label, _switch_instr_case_label) PREDICATEIS(switch_, ncases) @@ -227,7 +227,7 @@ GROUP_END(resume) GROUP_BEGIN(invoke) PREDICATE2(invoke, instr) -// TODO(lb): Rename for consistency +// TODO(#42): Rename for consistency PREDICATE(invoke, instr_direct, direct_invoke_instr) PREDICATE(invoke, instr_indirect, indirect_invoke_instr) PREDICATE(invoke, function, invoke_instr_fn_operand) @@ -243,14 +243,14 @@ GROUP_END(invoke) // Vector Operations GROUP_BEGIN(extract_element) -// TODO(lb): Rename extract_element to extractelement +// TODO(#42): Rename extract_element to extractelement PREDICATE(extract_element, instr, extractelement_instr) PREDICATE(extract_element, base, extractelement_instr_base) PREDICATE(extract_element, index, extractelement_instr_index) GROUP_END(extract_element) GROUP_BEGIN(insert_element) -// TODO(lb): Rename insert_element to insertelement +// TODO(#42): Rename insert_element to insertelement PREDICATE(insert_element, instr, insertelement_instr) PREDICATE(insert_element, base, insertelement_instr_base) PREDICATE(insert_element, index, insertelement_instr_index) @@ -258,7 +258,7 @@ PREDICATE(insert_element, value, insertelement_instr_value) GROUP_END(insert_element) GROUP_BEGIN(shuffle_vector) -// TODO(lb): Rename shuffle_vector to shufflevector +// TODO(#42): Rename shuffle_vector to shufflevector PREDICATE(shuffle_vector, instr, shufflevector_instr) PREDICATE(shuffle_vector, first_vector, shufflevector_instr_first_vector) PREDICATE(shuffle_vector, second_vector, shufflevector_instr_second_vector) @@ -268,7 +268,7 @@ GROUP_END(shuffle_vector) // Aggregate Operations GROUP_BEGIN(extract_value) -// TODO(lb): Rename extract_value to extractvalue +// TODO(#42): Rename extract_value to extractvalue PREDICATE(extract_value, instr, extractvalue_instr) PREDICATE(extract_value, base, extractvalue_instr_base) PREDICATE(extract_value, index, extractvalue_instr_index) @@ -276,7 +276,7 @@ PREDICATE(extract_value, nindices, extractvalue_instr_nindices) GROUP_END(extract_value) GROUP_BEGIN(insert_value) -// TODO(lb): Rename insert_value to insertvalue +// TODO(#42): Rename insert_value to insertvalue PREDICATE(insert_value, instr, insertvalue_instr) PREDICATE(insert_value, base, insertvalue_instr_base) PREDICATE(insert_value, value, insertvalue_instr_value) @@ -298,7 +298,7 @@ PREDICATE2(load, instr) PREDICATEI(load, alignment) PREDICATEI(load, ordering) PREDICATEI(load, address) -// TODO(lb): +// TODO(#42): PREDICATE(load, isvolatile, load_instr_is_volatile) GROUP_END(load) @@ -308,7 +308,7 @@ PREDICATEI(store, alignment) PREDICATEI(store, ordering) PREDICATEI(store, value) PREDICATEI(store, address) -// TODO(lb): +// TODO(#42): PREDICATE(store, isvolatile, store_instr_is_volatile) GROUP_END(store) @@ -323,7 +323,7 @@ PREDICATEI(atomicrmw, ordering) PREDICATEI(atomicrmw, operation) PREDICATEI(atomicrmw, address) PREDICATEI(atomicrmw, value) -// TODO(lb): +// TODO(#42): PREDICATE(atomicrmw, isvolatile, atomicrmw_instr_is_volatile) GROUP_END(atomicrmw) @@ -334,12 +334,12 @@ PREDICATEI(cmpxchg, address) PREDICATEI(cmpxchg, cmp_value) PREDICATEI(cmpxchg, new_value) PREDICATEI(cmpxchg, type) -// TODO(lb): +// TODO(#42): PREDICATE(cmpxchg, isvolatile, cmpxchg_instr_is_volatile) GROUP_END(cmpxchg) GROUP_BEGIN(gep) -// TODO(lb): Rename getelementptr to gep in Datalog +// TODO(#42): Rename getelementptr to gep in Datalog PREDICATE(gep, instr, getelementptr_instr) PREDICATE(gep, base, getelementptr_instr_base) PREDICATE(gep, index, getelementptr_instr_index) @@ -356,110 +356,112 @@ PREDICATEI(trunc, to_type) GROUP_END(trunc) GROUP_BEGIN(zext) -PREDICATE(zext, instr, zext_instr) -PREDICATE(zext, from_operand, zext_instr_from_operand) -PREDICATE(zext, to_type, zext_instr_to_type) +PREDICATE2(zext, instr) +PREDICATEI(zext, from_operand) +PREDICATEI(zext, to_type) GROUP_END(zext) GROUP_BEGIN(sext) -PREDICATE(sext, instr, sext_instr) -PREDICATE(sext, from_operand, sext_instr_from_operand) -PREDICATE(sext, to_type, sext_instr_to_type) +PREDICATE2(sext, instr) +PREDICATEI(sext, from_operand) +PREDICATEI(sext, to_type) GROUP_END(sext) GROUP_BEGIN(fptrunc) -PREDICATE(fptrunc, instr, fptrunc_instr) -PREDICATE(fptrunc, from_operand, fptrunc_instr_from_operand) -PREDICATE(fptrunc, to_type, fptrunc_instr_to_type) +PREDICATE2(fptrunc, instr) +PREDICATEI(fptrunc, from_operand) +PREDICATEI(fptrunc, to_type) GROUP_END(fptrunc) GROUP_BEGIN(fpext) -PREDICATE(fpext, instr, fpext_instr) -PREDICATE(fpext, from_operand, fpext_instr_from_operand) -PREDICATE(fpext, to_type, fpext_instr_to_type) +PREDICATE2(fpext, instr) +PREDICATEI(fpext, from_operand) +PREDICATEI(fpext, to_type) GROUP_END(fpext) GROUP_BEGIN(fptoui) -PREDICATE(fptoui, instr, fptoui_instr) -PREDICATE(fptoui, from_operand, fptoui_instr_from_operand) -PREDICATE(fptoui, to_type, fptoui_instr_to_type) +PREDICATE2(fptoui, instr) +PREDICATEI(fptoui, from_operand) +PREDICATEI(fptoui, to_type) GROUP_END(fptoui) GROUP_BEGIN(fptosi) -PREDICATE(fptosi, instr, fptosi_instr) -PREDICATE(fptosi, from_operand, fptosi_instr_from_operand) -PREDICATE(fptosi, to_type, fptosi_instr_to_type) +PREDICATE2(fptosi, instr) +PREDICATEI(fptosi, from_operand) +PREDICATEI(fptosi, to_type) GROUP_END(fptosi) GROUP_BEGIN(uitofp) -PREDICATE(uitofp, instr, uitofp_instr) -PREDICATE(uitofp, from_operand, uitofp_instr_from_operand) -PREDICATE(uitofp, to_type, uitofp_instr_to_type) +PREDICATE2(uitofp, instr) +PREDICATEI(uitofp, from_operand) +PREDICATEI(uitofp, to_type) GROUP_END(uitofp) GROUP_BEGIN(sitofp) -PREDICATE(sitofp, instr, sitofp_instr) -PREDICATE(sitofp, from_operand, sitofp_instr_from_operand) -PREDICATE(sitofp, to_type, sitofp_instr_to_type) +PREDICATE2(sitofp, instr) +PREDICATEI(sitofp, from_operand) +PREDICATEI(sitofp, to_type) GROUP_END(sitofp) GROUP_BEGIN(ptrtoint) -PREDICATE(ptrtoint, instr, ptrtoint_instr) -PREDICATE(ptrtoint, from_operand, ptrtoint_instr_from_operand) -PREDICATE(ptrtoint, to_type, ptrtoint_instr_to_type) +PREDICATE2(ptrtoint, instr) +PREDICATEI(ptrtoint, from_operand) +PREDICATEI(ptrtoint, to_type) GROUP_END(ptrtoint) GROUP_BEGIN(inttoptr) -PREDICATE(inttoptr, instr, inttoptr_instr) -PREDICATE(inttoptr, from_operand, inttoptr_instr_from_operand) -PREDICATE(inttoptr, to_type, inttoptr_instr_to_type) +PREDICATE2(inttoptr, instr) +PREDICATEI(inttoptr, from_operand) +PREDICATEI(inttoptr, to_type) GROUP_END(inttoptr) GROUP_BEGIN(bitcast) -PREDICATE(bitcast, instr, bitcast_instr) -PREDICATE(bitcast, from_operand, bitcast_instr_from_operand) -PREDICATE(bitcast, to_type, bitcast_instr_to_type) +PREDICATE2(bitcast, instr) +PREDICATEI(bitcast, from_operand) +PREDICATEI(bitcast, to_type) GROUP_END(bitcast) // Other Operations GROUP_BEGIN(icmp) -PREDICATE(icmp, instr, icmp_instr) -PREDICATE(icmp, condition, icmp_instr_condition) -PREDICATE(icmp, first_operand, icmp_instr_first_operand) -PREDICATE(icmp, second_operand, icmp_instr_second_operand) +PREDICATE2(icmp, instr) +PREDICATEI(icmp, condition) +PREDICATEI(icmp, first_operand) +PREDICATEI(icmp, second_operand) GROUP_END(icmp) GROUP_BEGIN(fcmp) -PREDICATE(fcmp, instr, fcmp_instr) -PREDICATE(fcmp, condition, fcmp_instr_condition) -PREDICATE(fcmp, first_operand, fcmp_instr_first_operand) -PREDICATE(fcmp, second_operand, fcmp_instr_second_operand) +PREDICATE2(fcmp, instr) +PREDICATEI(fcmp, condition) +PREDICATEI(fcmp, first_operand) +PREDICATEI(fcmp, second_operand) GROUP_END(fcmp) GROUP_BEGIN(phi) -PREDICATE(phi, instr, phi_instr) -PREDICATE(phi, type, phi_instr_type) +PREDICATE2(phi, instr) +PREDICATEI(phi, type) +// TODO(#42): Remove underscores! PREDICATE(phi, pair_value, _phi_instr_pair_value) PREDICATE(phi, pair_label, _phi_instr_pair_label) -PREDICATE(phi, npairs, phi_instr_npairs) +PREDICATEI(phi, npairs) GROUP_END(phi) GROUP_BEGIN(select) -PREDICATE(select, instr, select_instr) -PREDICATE(select, condition, select_instr_condition) -PREDICATE(select, first_operand, select_instr_first_operand) -PREDICATE(select, second_operand, select_instr_second_operand) +PREDICATE2(select, instr) +PREDICATEI(select, condition) +PREDICATEI(select, first_operand) +PREDICATEI(select, second_operand) GROUP_END(select) GROUP_BEGIN(va_arg) -PREDICATE(va_arg, instr, va_arg_instr) -PREDICATE(va_arg, va_list, va_arg_instr_va_list) -PREDICATE(va_arg, type, va_arg_instr_type) +PREDICATE2(va_arg, instr) +PREDICATEI(va_arg, va_list) +PREDICATEI(va_arg, type) GROUP_END(va_arg) GROUP_BEGIN(call) -PREDICATE(call, instr, call_instr) +PREDICATE2(call, instr) +// TODO(#42): PREDICATE(call, instr_direct, direct_call_instr) PREDICATE(call, instr_indirect, indirect_call_instr) PREDICATE(call, function, call_instr_fn_operand) @@ -472,11 +474,13 @@ PREDICATE(call, tail, call_instr_is_tail_opt) GROUP_END(call) GROUP_BEGIN(landingpad) -PREDICATE(landingpad, instr, landingpad_instr) -PREDICATE(landingpad, type, landingpad_instr_type) +PREDICATE2(landingpad, instr) +PREDICATEI(landingpad, type) +// TODO(#42): Remove underscores PREDICATE(landingpad, catch_clause, _landingpad_instr_catch_clause) PREDICATE(landingpad, filter_clause, _landingpad_instr_filter_clause) -PREDICATE(landingpad, nclauses, landingpad_instr_nclauses) +PREDICATEI(landingpad, nclauses) +// TODO(#42): Remove is PREDICATE(landingpad, cleanup, landingpad_instr_is_cleanup) GROUP_END(landingpad) @@ -676,3 +680,7 @@ GROUP_END(user) #undef GROUP_BEGIN #undef GROUP_END #undef PREDICATE +#undef PREDICATE2 +#undef PREDICATE2S +#undef PREDICATEI +#undef PREDICATEIS