This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CParser | |
$ git clone --recursive https://github.com/libfirm/cparser.git | |
$ cd cparser | |
$ make | |
$ cat ~/test.c | |
int foobar(int a, int b) { | |
return a + b; | |
} | |
$ build/debug/cparser -S -o - ~/test.c -fdump-all-phases | |
# This will create lots of *.vcg files in the current directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ source config.sh | |
++ PYTHON=/home/matthiasb/compiling/tf_venv/bin/python | |
++ OBJ_BASE_DIR=/home/matthiasb/perfexp/luafoo | |
++ LLVM_DIR=/home/matthiasb/dev/llvm/tfbuild | |
++ RA_CORPUS=build/ra_corpus | |
++ RA_DEFAULT_TRACE=build/ra_default_trace | |
++ RA_DEFAULT_VOCAB=compiler_opt/rl/regalloc/vocab/ | |
+++ pwd | |
++ RA_WARMSTART_OUTPUT_DIR=/home/matthiasb/compiling/ml-compiler-opt/build/ra_warmstart | |
+++ pwd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
# | |
# Swiss army knife to compare A/B benchmarking results. Mostly used to read | |
# test-suite result .csv files, but has grown readers for other formats by now. | |
import pandas as pd | |
import sys | |
import os.path | |
import re | |
import numbers | |
import argparse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// SUBREG_TO_REG - Assert the value of bits in a super register. | |
/// The result of this instruction is the value of the second operand inserted | |
/// into the subregister specified by the third operand. All other bits are | |
/// assumed to be equal to the bits in the immediate integer constant in the | |
/// first operand. This instruction just communicates information; No code | |
/// should be generated. | |
/// This is typically used after an instruction where the write to a subregister | |
/// implicitely cleared the bits in the super registers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir /tmp/preprocessed | |
for i in MultiSource/Benchmarks/mediabench/gsm/toast/*.c SingleSource/Benchmarks/Adobe-C++/loop_unroll.cpp; do | |
clang -E $i -o /tmp/preprocessed/$(basename $i).i | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spacegoo game engine tweaked to allow future predictions on the game client | |
from copy import deepcopy | |
from math import ceil, sqrt | |
def distance(self, other): | |
xdiff = self.x-other.x | |
ydiff = self.y-other.y | |
return int(ceil(sqrt(xdiff*xdiff + ydiff*ydiff))) | |
def combine_fleets(fleet1, fleet2): |