मैं एक परियोजना पर काम कर रहा हूं जिसे मैं एलएलवीएम 2.6 और एलएलएमएम-जीसीसी फ्रंट एंड के साथ संकलित कर रहा था। मैं इसे एलएलवीएम 3.1 और क्लैंग के साथ संकलित करने का परीक्षण करने की कोशिश कर रहा हूं।एलएलवीएम और क्लेंग में अनुकूलन स्तर
error: invalid value '5' in '-O5'
हालांकि, LLVM 2.6 और LLVM-जीसीसी -O5
ध्वज के साथ ठीक काम किया है: जब मैं ऐसा किया मैं -O5 अनुकूलन स्तर के बारे में निम्न त्रुटि संदेश मिल गया। मैं बजना अनुकूलन स्तर के बारे में निम्नलिखित दस्तावेज़ में देखा:
-O0 -O1 -O2 -Os -O3 -O4
Specify which optimization level to use. -O0 means "no optimization": this level compiles the
fastest and generates the most debuggable code. -O2 is a moderate level of optimization which
enables most optimizations. -Os is like -O2 with extra optimizations to reduce code size. -O3
is like -O2, except that it enables optimizations that take longer to perform or that may
generate larger code (in an attempt to make the program run faster). On supported platforms, -O4
enables link-time optimization; object files are stored in the LLVM bitcode file format and whole
program optimization is done at link time. -O1 is somewhere between -O0 and -O2.
तो मैं यह पता लगाने की क्या Makefile मैं पहली जगह में क्या कर रहा था के साथ काम कर रहा हूँ में -O5
(मैं नहीं लिखा था करने के लिए कोशिश कर रहा हूँ makefile)। क्या यह कुछ बदल गया है और एलएलवीएम के साथ प्रयोग किया जाता है? या यह अभी भी एक उपयोगी सुविधा है और मुझे इसे किसी अन्य तरीके से सक्रिय करने की आवश्यकता है।
इसके अलावा मामले में यह उपयोगी है आदेश मैं चल रहा हूँ कि त्रुटि दे रहा है मूल रूप से है:
/bin/clang -g -c -mcmodel=medium -fstrict-aliasing -Wstrict-aliasing -O5 -emit-llvm -fkeep-inline-functions -fno-stack-protector -c -o foo.bc foo.cpp
इसके अलावा मामले में यह मायने रखता है कि मैं एक लिनक्स (Ubuntu 10.04) x86_64 सिस्टम पर चलने कर रहा हूँ।