Skip to content

Commit

Permalink
noinline attr
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrantq committed Oct 6, 2024
1 parent 0717147 commit 7a49094
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion experiments/example.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// ## PRE c: 1, 9
// ## PRE a: 1, 9
// ## PRE b: 1, 9
[[clang::noinline]]
__attribute__((noinline))
double example(double a, double b, double c) {
double tmp;
if (a < b) {
Expand Down
4 changes: 3 additions & 1 deletion experiments/run-all.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ def main():

print(f"Processing function: {func_name}")
func_body_lines = func["func_body"].split("\n")
func_signature_line = f"{return_type} example({params}) {{"

func_signature_line = f"__attribute__((noinline))\n{return_type} example({params}) {{"

func_body_lines[0] = func_signature_line
func_code = comments + "\n" + "\n".join(func_body_lines)
includes = "#include <math.h>\n#include <stdint.h>\n#define TRUE 1\n#define FALSE 0\n"
Expand Down

0 comments on commit 7a49094

Please sign in to comment.