FLAGS=“-emit-llvm -S "
PASSES=-targetlibinfo -tti -tbaa -scoped-noalias-aa -assumption-cache-tracker -profile-summary-info -annotation2metadata -forceattrs -inferattrs -ipsccp -called-value-propagation -globalopt -domtree -mem2reg -tti -tbaa -scoped-noalias-aa -assumption-cache-tracker -targetlibinfo -verify -lower-expect -simplifycfg -domtree -sroa -deadargelim -domtree -basic-aa -aa -loops -lazy-branch-prob -lazy-block-freq -opt-remark-emitter -instcombine -simplifycfg -basiccg -globals-aa -prune-eh -inline -openmp-opt-cgscc”
The Actual command for OPT
clang -std=c99 $FLAGS -m64 -c -o lbm.ll -DSPEC -DNDEBUG -DLARGE_WORKLOAD -g -fopenmp -DSPEC_OPENMP -DSPEC_LP64 lbm.c
opt -O3 $PASSES lbm.ll -o lbm1.ll -enable-new-pm=0
clang -c lbm.ll -o lbm.o
clang -std=c99 -m64 -g -fopenmp -DSPEC_OPENMP lbm.o main.o -lm -o lbm_s
Can anyone tell me that the command is correct or not ,
- I have created .ll file from .c
- passes .ll file in opt with some passes
- created obejct file and executable file to run benchmark