Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@khuey
khuey / llvm_dup_blocks.ll
Created June 21, 2020 02:22
LLVM doesn't deduplicate bbs?
bb45: ; preds = %bb37
%_7.i.i.i.i288 = icmp eq i64 %value.1, 6
br i1 %_7.i.i.i.i288, label %bb55, label %bb53
bb53: ; preds = %bb45
%.idx.val.i.i.i42.i = load i8, i8* %13, align 1, !alias.scope !80, !noalias !89
switch i64 %value.1, label %bb78 [
i64 7, label %bb63
i64 8, label %bb72
i64 9, label %bb80
This C++
stacks.h
void look_at_the_stack_here(void);
inline void inlined_different_file(void) {
look_at_the_stack_here();
}
/* gcc -lpthread -g -o test test.c */
#include <assert.h>
#include <errno.h>
#include <linux/filter.h>
#include <linux/seccomp.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>