execute(command) → Dict[str, Any]
Execute given command.
Args:
command
: Command to be executed.
fetch_perf_stat(command) → Dict[str, Any]
Use perf stat <command>
to analyze given program and get dict of counters.
Args:
command
: Command to be used inperf stat
.
ir2vec(llvm_ir, outfile, mode='fa', vocab='vocab.txt', level='p')
Call ir2vec tool and fetch the result.
generate_llvm(src, llvm_ir, llvm_compiler='clang') → None
Generate llvm ir for source code.
fetch_src_feature(
src: str,
llvm_ir=None,
outfile=None,
clean=False
) → <built-in function array>
Fetch source code feature by using ir2vec.
fetch_arch() → str
Fetch machine architecture information.
Returns:
str
: The architecture
fetch_gcc_optimizers(cc='gcc') → List[str]
Fetch gcc optimizers
Args:
cc
(str, optional): Specified gcc binary. Defaults to 'gcc'.
Returns:
List[str]
: Optimizers
fetch_gcc_version(cc='gcc') → Tuple[int, int, int]
Fetch gcc version.
Args:
cc
(str, optional): Specified gcc binary. Defaults to 'gcc'.
Returns:
Tuple[int, int, int]
: gcc version in triplet.
fetch_gcc_parameters(
cc='gcc',
params_def: str = None
) → Dict[str, Tuple[int, int, int]]
Fetch gcc parameters and its range
Args:
cc
(str, optional): Specified gcc binary. Defaults to 'gcc'.params_def
(str, optional):params.def
of gcc source for version earlier then 10. Defaults to None.
Raises:
RuntimeError
: Ifparams.def
is not given for gcc earlier than 10.
Returns:
Dict[str, Tuple[int, int, int]]
: Parameters in format ofparam: (min, max, default)
.
fetch_gcc_enabled_optimizers(cc='gcc', options='-O3') → List[str]
Fetch enabled optimizers of certain options
Args:
cc
(str, optional): Specified gcc binary. Defaults to 'gcc'.options
(str, optional): Options to look into. Defaults to '-O3'.
Returns:
List[str]
: Enabled optimizers.
fetch_size(filename: str) → int
Fetch file size
Args:
filename
(str): Path to file.
Returns:
int
: File size in bytes.
This file was automatically generated via lazydocs.