llc

Dot file not genearting for -view-isel-dags option

浪尽此生 提交于 2020-05-14 09:12:09
问题 While trying to see the SelectionDag nodes generated during the instruction selection phase using LLVM (built from sources with debug mode enabled), I am using the below command which is not creating Graphviz DOT file. llc -view-isel-dags sum.bc Instead it is creating sum.s file. Is there something I'm missing here? sum.c int sum(int x, int y) { return x+y; } sum.bc $ clang -emit-llvm sum.c -c -o sum.bc LLVM information $ llc -help-hidden | grep 'view-isel' -view-isel-dags - Pop up a window

How do I use a freshly compiled LLVM tool directly from LLVM source tree?

寵の児 提交于 2019-12-11 06:18:00
问题 I am writing a MachineFunctionPass targeting the X86 architecture which results in a modified llc binary. In order to test my modified version of llc I have created a bunch of .c programs whose MIR will be handled by my pass. For the sake of cleanliness, I have added the directory including the sources directly into LLVM's source tree, specifically in $llvm_src_dir/lib/Target/X86/$examples_dir : I have then plugged it into LLVM build system by appending the add_subdirectory() directive to