Skip to content

Commit b63dc4d

Browse files
jdoerfertivanradanov
authored andcommitted
[WIP] Input Gen
input-gen tool Generate inputs for all fucntions in module Optionally compile the input gen module Make rt optinal Keep track of all available functions add py script Parallel input gen of single module script Fix scripts Add test ll Add initial recording capabilities Merge fixes clang-format input-gen get module from stdin by default binary output] of input Move rt Also output args Add rt function for running the generated inputs Add run instrumentation Minor fixes Move runtimes Move runtimes Fix Load all remaps at once Add dummy function Add argument remapping, works for linked list example now Remove printfs Recognize library calls and don't stub them Provide a first lit end to end test Fix wrong function signature? More robust scripts for large scale input gen Remove stray variable Precompile runtimes add prefix and suffix to temp files Dump to json Rename script Fix various little errors, add more tests Properly support globals Adjust insertion point Fix type Store the module for the mass_input script Make it work with internal functions Ensure to create the folder first Add multicore mass input gen Redo the mapping scheme to allow capture overwritten data Return generated values from stubs Fix minor oversight remove broken assertion Fix error w/ globals, add VERBOSE env var Make free a noop during runs Refactor input-gen tool Fail in runtime instead of instrumentation for read_write kind Also output module-wise statistics chunksize=1 Keep track of functions in input-gen Whole-module instrumentation Fix rt-run compilation Add function name to input binary file Fix issues and tests Test and fix run runtime Fix mass-input-gen script Use ray in mass input gen Fix input-gen in shared library builds Flux scripts Fixes Rename function Switch tests to take cpp rts Working ray impl Add verbose mode Update comments Add enable.sh script Move the "kind" from the function name to the signature Bail early for addresses not to be instrumented Also instrument readonly args Add support for vectors mass_input_gen: Log progress only every 500 modules whoops Add vector tests Add support for structs and float Fix enable script Error in CreateGEP Add verify option to input-gen Change struct GEP index type to i32 Fix double read/write Fix __inputgen__arg_* signature Remove bitcode files Print missing callback type WIP support fp80, i128 Fix fp handling in input-gen Add debug flag to input-gen Fix target paths in tests Fix remaining target paths in tests Mark vector test XFAIL Add support for running O1 before instrumentation (#1) This patch adds support for running optimizations (specifically the O1 pipeline) before instrumentation. This will run passes like SROA which might end up making instrumentation faster and is something that we want to experiment with regardless. WIP alternative object allocation scheme WIP WIP WIP report WIP various fixes Ensure alignment Dump aligned chunks We do not need ValMap We only need ptr offsets Use uintptr_t * instead of void * Comment out non working code Add missing (void *) WIP generate at least exists properly WIP some fixes Fix Add debug flag to tests Uncomment arg get for larger than ptr types Fix store inst addr operand Ptr tracking fix Log addr translation Handle input run struct args Recursively handle struct args in input-run Add nested struct test Fix nested type handling Add .gitignore free INPUTGEN_DEBUG macro Make alignment functions more generic Allocate memory chunks at the start Extract object addressing logic Input gen works Fix input run Pretty print stats Fix stub value gen Script improvements Remove module ctors/dtors from instrumented module Rename defined functions Also -O0 when debugging is enabled in input-gen tool More logging in mass_input_gen.py Fix bugs in the script Remove address translation Ignore accesses to stack memory Change default allocation Add -DNDEBUG and O3 to mass input gen Fix scripts Fix Used array indexing issue Use the INPUTGEN_DEBUG macro Do not put code with side effects in assert.......... Improve logging in scripts Silence unused var warnings Properly load globals in rt-run Make local run script more customizable Fix memory issues un-XFAIL vector-rw test Use function ID in the filename instead of function name Fix wrong printf types Fix alignment and offset issues Script fix Do not litter cwd in tests MIG script improvements Silence compilation warnings Need to print one more line More robust script Remove outdated comment More descriptive name for stub gen value callbacks Fail at runtime instead of at compile time when encountering unknown callback types Strip comdat Preserve landingpad globals Only preserve allowed external functions Use jug for parallelizing Set up jug for mass input gen Script fixes Insert traps instead of unreachables Script fixes Remove unneeded prints Script fix Forgot to delete Handle a case where stale files impacted the statistics Internalize globals Support masked load/store Script fixes Add useful commands to the readme Small readme fix Script fixes Clean up scripts Let's not delete the directory the user provided Do not instrument globals with opaque types Add option to invalidate uninstrumented results Fix pointer offset issue in rt run Handle llvm function names with spaces Improved support for exception handling Collect per-language statistics Label the num and stats field when printing Fix types of memset intrinsic calls Distinguish between symbols to stub and to rename Stub personality and other functions or globals as weak symbols so we can provide a backup if they were not linked in. Better handling of global symbols Make the available_functions file '\0'-delimited Add tool to get coverage with PGO Info (llvm#6) Do not stub malloc/free Improve access logging More logging in rts Wrong callback used for args Forgot to add masked rw test Silence warning PGO based code coverage (llvm#7) Change dataset Prevent optimizing away the function we generate inputs for Only preserve the pgo globals if we instrumented Remove stray echo Coverage statistics Note down the configuration used for jug run and improve customization Add ability to load profiles to input gen tool (llvm#9) Fix build Add branch hints Iterative retry for ptr comparisons Add configuration to input gen rt add puts to allowed funcs Figure out what value we need fron the branch hints Handle null ptrs using retry iteration Support for profile-guided input-gen in scripts Wrap the entire input-gen in a try block and flag failures for retrying Implement support for unreachable (and noreturn calls) Do not replace invokes, only call insts Remove jug dependency on single node mig Make it possible to set a different jugdir Fix missing num bb executed entries Fix issue with assigning instead of appending to num bbs executed Find possible callee candidates for function pointers and select among those. This (currently) has a few restrictions: - Attributor has to find possible callees in the first place. - Only function pointers being handed directly to the function under investigation are handled. Generalize FPtr handling - now also works on memory accesses. Dont memoize calls across A.run(). Drop MD_dbg when stubbing a declaration. And silence some fp info. Merge equivalent fp globals and stubs Add requirements.txt for the scripts Limit the allowed AAs for the Attributor to reduce failure surface. Move FP selection to InputGenRTTy to contain randomness. Fix instrumentation dying due to eager value erasure. Add command line argument for disabling FP handling. Don't add parent function to call's callee list. This is to prevent endless recursion via function pointers.. Also add --disable-fp-handling to python tooling. Keep Attributor from replacing indirect calls with just one assumed callee by a direct call. This makes it impossible for us to hook into this and e.g. provide our stub as an alternative.. Fix running lit suite with fp handling. Ignore all constant function pointer values.. Virtual function calls...? Per-language mig Add env var to control fp handling Typo...... Remove old and obsolete main renaming Fix errors in python scripts for some configurations `swifterror` parameters must be special `alloca`s. silence difference warning when looking at jug results Introduce AS casts, remove tokens, initialize callbacks earlier Fix some FP issues (likely to clash) Support array types and avoid bad casts Make sure pointer comparisons do not evaluate differently in input-run More array type support Do not instrument accesses to the reload of globals (to undo indirection) User internal, not private linkage for functions Test comparisons of zero-sized objects Add ABI attributes for fp stubs. Likely needs to be checked for other callees too Make entry -> Fn calls ABI compatible Compare ABI info for potential callees Add test for a global relocation we fail Only update output with cmp info if cmp is not empty Do not use an entire object for each global - bundle them together Add DISABLE env vars for ablation instead of ENABLE Add test for global input relocation Booleans are too hard Properly pass and use branch profile flags Access implicit ABI copy elements to ensure they exists Fix masked rw test Give object idx slightly more bits This brings the default max obj to 1024 Make run mig script more configurable Do not reuse the same pass infra for both gen and run instrumentation Disable specialization for callees Collect per-seed statistics Fix assertion with unknown sentinel Strip unknown operand bundles Keep track of statistics about unreachable exits Revert accidentally masked instrumentation failures Fix script crash when we failed instrumentation Make sure not to inline the callee in the entry func This caused instructions that use specific cpu features to fail lowering Strip debug info before handling module Handle unknown probe-stack functions Hijack free function Rewrite gatherFunctionPtrCallees to not rely on IndirectCalleeSpecial… …izationCallback to gather the candidates. Instead, select the calls in the beginning and then read the callee metadata. However, this relies on a patch of the Attributor to not eliminate Calls with seemingly no callees. Adapt masked_rw to current state. Don't emit access_ptr for stderr/stdout. In gen, overwrite load with valid fptr if not a known fptr so far. Do not delete invoke insts when selecting fp Revert "In gen, overwrite load with valid fptr if not a known fptr so far." This reverts commit e278687. Add calloc to allowed functions Add timing capabilities to input gen runtimes Globals can never be null Fix test Invalidate retry info Fix nullptr deref Fix single module scripts remove stray include Further fixes to the scripts Add --function flag to igm.py Instrument after profile is put in place Change clock resolution to nanosecs Add timing capabilities to igm.py Use branch profiles directly (not frequencies) Fix typo Do not backtrack for pointers we can never match (user managed ones) Add a penalty for UnreachableInst Add more detailed timing to the runtimes Exit when input-gen is not in PATH Fix input ran statistics Update README Dont tweak globals for record Add input record runtime and refactor Test file file name Now we can record arguments Track mallocs Init globals Hook up to object management WIP custom allocator Obj custom malloc Fix off-by-one error Minor fixes Dump input file Record only once Refactor dump input function Print to stderr Rename to rt-replay Revert "Rename to rt-replay" This reverts commit dcc567c. Fix input-gen (branch hints not working??) Magic number and mode Rename NFC refactor ObjectAddressing Fix magix number Recorded input replaying works! Forgot to add test Rename InputOut -> File Refactor WIP Fancier object addressing WIP LinkedList Node WIP fancy object handling WIP logging WIP Initial version of alt object addressing WIP make replay work WIP WIP rt-run compiles Fix getObjects Fix bugs with Object addressing Comments re linked list node WIP move to compiler-rt Refactoring Report OA structure Make ArrayNode allocate all its children immediately Fix various bugs Merge the two inputgen classes Enable timing in record rt Quick hack to enable recorded input replaying Enable lto for inputgen runtimes Make Used a bit array Experiment with static size obj WIP Another strategy Move inputrecord pass Add more interfaces Somehwat working, 10x overhead or something
1 parent e04fde1 commit b63dc4d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+9261
-44
lines changed

README.md

Lines changed: 48 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,60 @@
1-
# The LLVM Compiler Infrastructure
1+
# Input-gen useful commands
22

3-
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/llvm/llvm-project/badge)](https://securityscorecards.dev/viewer/?uri=github.com/llvm/llvm-project)
4-
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8273/badge)](https://www.bestpractices.dev/projects/8273)
5-
[![libc++](https://github.com/llvm/llvm-project/actions/workflows/libcxx-build-and-test.yaml/badge.svg?branch=main&event=schedule)](https://github.com/llvm/llvm-project/actions/workflows/libcxx-build-and-test.yaml?query=event%3Aschedule)
3+
``` sh
4+
$ ./scripts/input_gen_module.py --help
5+
```
66

7-
Welcome to the LLVM project!
7+
To generate 5 inputs for `func_name` in `module.bc`:
8+
``` sh
9+
$ ./scripts/input_gen_module.py [--verbose] --function func_name --outdir ./outdir --input-module module.bc
10+
```
811

9-
This repository contains the source code for LLVM, a toolkit for the
10-
construction of highly optimized compilers, optimizers, and run-time
11-
environments.
12+
To generate 5 inputs for all available functions in `module.bc`:
13+
``` sh
14+
$ ./scripts/input_gen_module.py [--verbose] --outdir ./outdir --input-module module.bc --input-gen-num 5
15+
```
1216

13-
The LLVM project has multiple components. The core of the project is
14-
itself called "LLVM". This contains all of the tools, libraries, and header
15-
files needed to process intermediate representations and convert them into
16-
object files. Tools include an assembler, disassembler, bitcode analyzer, and
17-
bitcode optimizer.
17+
## Mass input gen
1818

19-
C-like languages use the [Clang](https://clang.llvm.org/) frontend. This
20-
component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode
21-
-- and from there into object files, using LLVM.
19+
To generate inputs:
2220

23-
Other components include:
24-
the [libc++ C++ standard library](https://libcxx.llvm.org),
25-
the [LLD linker](https://lld.llvm.org), and more.
21+
Single cpu:
22+
``` sh
23+
JUG=run START=0 END=500000 ./scripts/run_local_mass_input_gen.sh
24+
```
2625

27-
## Getting the Source Code and Building LLVM
26+
Multi-cpu:
27+
``` sh
28+
for i in $(seq 0 40); do
29+
JUG=run START=0 END=500000 ./scripts/run_local_mass_input_gen.sh &
30+
done
31+
```
2832

29-
Consult the
30-
[Getting Started with LLVM](https://llvm.org/docs/GettingStarted.html#getting-the-source-code-and-building-llvm)
31-
page for information on building and running LLVM.
33+
Multi-node:
34+
``` sh
35+
JUG=run START=0 END=500000 flux submit -x -N 10 --tasks-per-node 40 -t 5h ./scripts/run_local_mass_input_gen.sh
36+
```
3237

33-
For information on how to contribute to the LLVM project, please take a look at
34-
the [Contributing to LLVM](https://llvm.org/docs/Contributing.html) guide.
38+
The results are stored in the scripts/*jugdata directory - that needs to be on an NFS for this to work across nodes.
3539

36-
## Getting in touch
40+
To see the results at any time (even while running or partially completed):
41+
``` sh
42+
JUG=results START=0 END=7000 ./scripts/run_local_mass_input_gen.sh
43+
```
3744

38-
Join the [LLVM Discourse forums](https://discourse.llvm.org/), [Discord
39-
chat](https://discord.gg/xS7Z362),
40-
[LLVM Office Hours](https://llvm.org/docs/GettingInvolved.html#office-hours) or
41-
[Regular sync-ups](https://llvm.org/docs/GettingInvolved.html#online-sync-ups).
45+
## Debugging/exploring
4246

43-
The LLVM project has adopted a [code of conduct](https://llvm.org/docs/CodeOfConduct.html) for
44-
participants to all modes of communication within the project.
47+
To test out a single module locally:
48+
``` sh
49+
ADDITIONAL_FLAGS="--verbose -g" NOCLEANUP=1 SINGLE=18450 ./scripts/run_local_mass_input_gen.sh
50+
```
51+
52+
This will print out all intermediate commands ran and what failed, etc.
53+
54+
To debug the input gen/run runtimes use VERBOSE=1, e.g.:
55+
``` sh
56+
VERBOSE=1 /l/ssd/$USER/compile-input-gen-out/12374/input-gen.module.generate.a.out /l/ssd/$USER/compile-input-gen-out/12374/input-gen.32.inputs 3 4 _ZN25vnl_symmetric_eigensystemIdE5solveERK10vnl_vectorIdEPS2_ 32
57+
```
58+
59+
60+
There are some hardcoded paths to the llvm installation dirs etc which need to be edited in the `./scripts/run_local_mass_input_gen.sh` script.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// RUN: mkdir -p %t
2+
// RUN: %clangxx -g -O2 %s -mllvm --input-gen-mode=record -mllvm --input-gen-entry-point=foo -mllvm -include-input-gen -o %t/record.a.out -linputgen.record
3+
// RUN: %clangxx -g -O2 %s -mllvm --input-gen-mode=replay -mllvm --input-gen-entry-point=foo -mllvm -include-input-gen -rdynamic -o %t/replay.a.out -linputgen.replay
4+
// RUN: INPUT_RECORD_FILENAME=%t/input.bin %t/record.a.out
5+
// RUN: %t/replay.a.out %t/input.bin
6+
7+
#include <stdio.h>
8+
#include <stdlib.h>
9+
#include <alloca.h>
10+
11+
#define N 10
12+
13+
extern "C" int foo(int *a, int *b, int *c, int n) {
14+
int sum = 0;
15+
for (int i = 0; i < n; i++) {
16+
c[i] = a[i] + b[i] * n;
17+
sum += c[i];
18+
}
19+
printf("Sum: %d\n", sum);
20+
return sum;
21+
}
22+
23+
int b[N];
24+
25+
int main() {
26+
int *a = (int *)malloc(N * sizeof(*a));
27+
int *c = (int *)alloca(N * sizeof(*c));
28+
29+
for (int i = 0; i < N; i++) {
30+
a[i] = b[i] = i % 10;
31+
}
32+
33+
int d = foo(a, b, c, N);
34+
printf("Output: %d\n", d);
35+
36+
free(a);
37+
return 0;
38+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// RUN: mkdir -p %t
2+
// RUN: %clangxx -g -O2 %s -mllvm --input-gen-mode=record -mllvm --input-gen-entry-point=foo -mllvm -include-input-gen -o %t/record.a.out -linputgen.record
3+
// RUN: %clangxx -g -O2 %s -mllvm --input-gen-mode=replay -mllvm --input-gen-entry-point=foo -mllvm -include-input-gen -rdynamic -o %t/replay.a.out -linputgen.replay
4+
// RUN: INPUT_RECORD_FILENAME=%t/input.bin %t/record.a.out
5+
// RUN: %t/replay.a.out %t/input.bin
6+
7+
#include <stdio.h>
8+
#include <stdlib.h>
9+
#include <alloca.h>
10+
11+
#define N 10
12+
13+
extern "C" int foo(int *a, int *b, int *c, int n) {
14+
int sum = 0;
15+
for (int i = 0; i < n; i++) {
16+
c[i] = a[i] + b[i] * n;
17+
sum += c[i];
18+
}
19+
printf("Sum: %d\n", sum);
20+
return sum;
21+
}
22+
23+
int main() {
24+
int *a = (int *)malloc(N * sizeof(*a));
25+
int *b = (int *)malloc(N * sizeof(*b));
26+
int *c = (int *)malloc(N * sizeof(*c));
27+
28+
for (int i = 0; i < N; i++) {
29+
a[i] = b[i] = i % 10;
30+
}
31+
32+
int d = foo(a, b, c, N);
33+
printf("Output: %d\n", d);
34+
35+
free(a);
36+
free(b);
37+
free(c);
38+
return 0;
39+
}

compiler-rt/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ append_list_if(COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG -fvisibility=hidden SANIT
363363
if(NOT COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG)
364364
append_list_if(COMPILER_RT_HAS_FVISIBILITY_INLINES_HIDDEN_FLAG -fvisibility-inlines-hidden SANITIZER_COMMON_CFLAGS)
365365
endif()
366-
append_list_if(COMPILER_RT_HAS_FNO_LTO_FLAG -fno-lto SANITIZER_COMMON_CFLAGS)
366+
# append_list_if(COMPILER_RT_HAS_FNO_LTO_FLAG -fno-lto SANITIZER_COMMON_CFLAGS)
367367

368368
# By default do not instrument or use profdata for compiler-rt.
369369
if(NOT COMPILER_RT_ENABLE_PGO)

compiler-rt/cmake/Modules/AddCompilerRT.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,10 @@ function(add_compiler_rt_runtime name type)
178178
# Until we support this some other way, build compiler-rt runtime without LTO
179179
# to allow non-LTO projects to link with it. GPU targets can currently only be
180180
# distributed as LLVM-IR and ignore this.
181-
if(COMPILER_RT_HAS_FNO_LTO_FLAG AND NOT COMPILER_RT_GPU_BUILD)
182-
set(NO_LTO_FLAGS "-fno-lto")
181+
if(COMPILER_RT_HAS_FNO_LTO_FLAG)
182+
# FIXME we want the inputgen runtimes to be lto
183+
# set(NO_LTO_FLAGS "-fno-lto")
184+
set(NO_LTO_FLAGS "")
183185
else()
184186
set(NO_LTO_FLAGS "")
185187
endif()

compiler-rt/lib/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ if(COMPILER_RT_BUILD_ORC)
7373
compiler_rt_build_runtime(orc)
7474
endif()
7575

76+
add_subdirectory(inputgen)
77+
7678
# It doesn't normally make sense to build runtimes when a sanitizer is enabled,
7779
# so we don't add_subdirectory the runtimes in that case. However, the opposite
7880
# is true for fuzzers that exercise parts of the runtime. So we add the fuzzer
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
2+
#ifndef __IG_OBJ__
3+
#error "__IG_OBJ__ must be defined"
4+
#endif
5+
6+
#define INTERFACE_MEM(PREFIX) \
7+
void __##PREFIX##_memcpy(VoidPtrTy Tgt, VoidPtrTy Src, uint64_t N) { \
8+
__IG_OBJ__.memcpy(Tgt, Src, N); \
9+
} \
10+
void __##PREFIX##_memset(VoidPtrTy Tgt, char C, uint64_t N) { \
11+
__IG_OBJ__.memset(Tgt, C, N); \
12+
}
13+
14+
#define INTERFACE_CMP_PTR(PREFIX) \
15+
void __##PREFIX##_cmp_ptr(VoidPtrTy A, VoidPtrTy B, int32_t Predicate) { \
16+
__IG_OBJ__.cmpPtr(A, B, Predicate); \
17+
}
18+
19+
#define INTERFACE_UNREACHABLE(PREFIX) \
20+
void __inputgen_unreachable(int32_t No, const char *Name) { \
21+
printf("Reached unreachable %i due to '%s'\n", No, Name ? Name : "n/a"); \
22+
exit(UnreachableExitStatus); \
23+
}
24+
25+
#define INTERFACE_FUNCS(TY, NAME, PREFIX) \
26+
static TY __ig_convert_##NAME##_from_i64(int64_t Val) { \
27+
TY TyVal; \
28+
if constexpr (sizeof(TY) <= sizeof(int64_t)) { \
29+
/* We need to reinterpret_cast fp types because they are just bitcast \
30+
to the int64_t type in LLVM. */ \
31+
if constexpr (std::is_same<TY, float>::value) { \
32+
int32_t Trunc = (int32_t)Val; \
33+
TyVal = *reinterpret_cast<TY *>(&Trunc); \
34+
} else if constexpr (std::is_same<TY, double>::value) { \
35+
TyVal = *reinterpret_cast<TY *>(&Val); \
36+
} else { \
37+
TyVal = (TY)Val; \
38+
} \
39+
} else { \
40+
TyVal = *(TY *)Val; \
41+
} \
42+
return TyVal; \
43+
} \
44+
void __##PREFIX##_access_##NAME(VoidPtrTy Ptr, int64_t Val, int32_t Size, \
45+
VoidPtrTy Base, int32_t Kind, \
46+
BranchHint *BHs, int32_t BHSize) { \
47+
switch (Kind) { \
48+
case 0: \
49+
__IG_OBJ__.read<TY>(Ptr, Base, Size, BHs, BHSize); \
50+
return; \
51+
case 1: { \
52+
TY TyVal = __ig_convert_##NAME##_from_i64(Val); \
53+
__IG_OBJ__.write<TY>(Ptr, TyVal, Size); \
54+
return; \
55+
} \
56+
default: \
57+
abort(); \
58+
} \
59+
} \
60+
TY __##PREFIX##_stub_##NAME(BranchHint *BHs, int32_t BHSize) { \
61+
return __IG_OBJ__.generateNewStubReturn<TY>(BHs, BHSize); \
62+
} \
63+
TY __##PREFIX##_arg_##NAME(BranchHint *BHs, int32_t BHSize) { \
64+
return __IG_OBJ__.generateNewArg<TY>(BHs, BHSize); \
65+
} \
66+
void __##PREFIX##_arg_record_##NAME(int64_t Val, BranchHint *BHs, \
67+
int32_t BHSize) { \
68+
TY TyVal = __ig_convert_##NAME##_from_i64(Val); \
69+
__IG_OBJ__.recordArg<TY>(TyVal); \
70+
}
71+
72+
#define DEFINE_INTERFACE(PREFIX) \
73+
INTERFACE_FUNCS(bool, i1, PREFIX) \
74+
INTERFACE_FUNCS(char, i8, PREFIX) \
75+
INTERFACE_FUNCS(short, i16, PREFIX) \
76+
INTERFACE_FUNCS(int32_t, i32, PREFIX) \
77+
INTERFACE_FUNCS(int64_t, i64, PREFIX) \
78+
INTERFACE_FUNCS(float, float, PREFIX) \
79+
INTERFACE_FUNCS(double, double, PREFIX) \
80+
INTERFACE_FUNCS(VoidPtrTy, ptr, PREFIX) \
81+
INTERFACE_FUNCS(__int128, i128, PREFIX) \
82+
INTERFACE_FUNCS(long double, x86_fp80, PREFIX) \
83+
INTERFACE_CMP_PTR(PREFIX) \
84+
INTERFACE_UNREACHABLE(PREFIX) \
85+
INTERFACE_MEM(PREFIX)

0 commit comments

Comments
 (0)