[llvm-commits] [test-suite] r45883 - in /test-suite/trunk: External/SPEC/Makefile.spec Makefile.programs Makefile.rules Makefile.tests MultiSource/Makefile.multisrc SingleSource/Makefile.singlesrc TEST.nightly.Makefile

Evan Cheng evan.cheng at apple.com
Fri Jan 11 14:16:56 PST 2008


On Jan 11, 2008, at 1:43 PM, Tanya Lattner wrote:

> Switching the nightly tester makefile to be -O3 is going to mess with
> performance data over time (was it O2 always before?). The nightly
> testers probably should be modified so that this information is
> propagated to the tester databases and also you should be able to set
> it when you run the nightly tester.

No, it won't. Native has always been compiled with -O3. And up to now  
we have not been testing with LTO turned off. So each .c and .cpp  
files have been compiled with -O0 and optimization is performed at  
link time. This patch won't change that.

Evan

>
> -Tanya
>
> On Jan 11, 2008, at 1:20 PM, Evan Cheng wrote:
>
>> Author: evancheng
>> Date: Fri Jan 11 15:20:45 2008
>> New Revision: 45883
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=45883&view=rev
>> Log:
>> - Clean up.
>> - Added DISABLE_LTO option to disable link time optimization. If
>> this is not
>>   set, each file is compiled with -O0 and optimization is performed
>> with
>>   opt -std-compile-opts and llvm-ld. If it is set, each file is
>> compiled with
>>   -O3 (same as gcc, g++) and -disable-inlining and -disable-opt are
>> passed to
>>   opt and llvm-ld. This is useful for performance comparison and
>> finding ABI
>>   problems.
>>
>> Modified:
>>     test-suite/trunk/External/SPEC/Makefile.spec
>>     test-suite/trunk/Makefile.programs
>>     test-suite/trunk/Makefile.rules
>>     test-suite/trunk/Makefile.tests
>>     test-suite/trunk/MultiSource/Makefile.multisrc
>>     test-suite/trunk/SingleSource/Makefile.singlesrc
>>     test-suite/trunk/TEST.nightly.Makefile
>>
>> Modified: test-suite/trunk/External/SPEC/Makefile.spec
>> URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/
>> SPEC/Makefile.spec?rev=45883&r1=45882&r2=45883&view=diff
>>
>> ===================================================================== 
>> =
>> ========
>> --- test-suite/trunk/External/SPEC/Makefile.spec (original)
>> +++ test-suite/trunk/External/SPEC/Makefile.spec Fri Jan 11
>> 15:20:45 2008
>> @@ -7,10 +7,6 @@
>>
>>  include $(LEVEL)/MultiSource/Makefile.multisrc
>>
>> -# Do not pass -Wall to compile commands...
>> -LCCFLAGS  := -O3
>> -LCXXFLAGS := -O3
>> -
>>  CPPFLAGS += -I $(SPEC_BENCH_DIR)/src/
>>  SPEC_SANDBOX := $(PROGDIR)/External/SPEC/Sandbox.sh
>>
>>
>> Modified: test-suite/trunk/Makefile.programs
>> URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/
>> Makefile.programs?rev=45883&r1=45882&r2=45883&view=diff
>>
>> ===================================================================== 
>> =
>> ========
>> --- test-suite/trunk/Makefile.programs (original)
>> +++ test-suite/trunk/Makefile.programs Fri Jan 11 15:20:45 2008
>> @@ -348,7 +348,7 @@
>>
>>  $(PROGRAMS_TO_TEST:%=Output/%.cbe): \
>>  Output/%.cbe: Output/%.cbe.c
>> -	-$(CC) $< -o $@ $(LDFLAGS) $(CFLAGS) -fno-strict-aliasing -O2 -
>> fno-inline $(TARGET_FLAGS) $(LIBS)
>> +	-$(CC) $< -o $@ $(LDFLAGS) $(CFLAGS) -fno-strict-aliasing -fno-
>> inline $(TARGET_FLAGS) $(LIBS)
>>
>>  #
>>  # Compile a linked program to machine code with LLC.
>>
>> Modified: test-suite/trunk/Makefile.rules
>> URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/
>> Makefile.rules?rev=45883&r1=45882&r2=45883&view=diff
>>
>> ===================================================================== 
>> =
>> ========
>> --- test-suite/trunk/Makefile.rules (original)
>> +++ test-suite/trunk/Makefile.rules Fri Jan 11 15:20:45 2008
>> @@ -350,6 +350,11 @@
>>  CPPFLAGS += -DSMALL_PROBLEM_SIZE
>>  endif
>>
>> +ifdef DISABLE_LTO
>> +EXTRA_LOPT_OPTIONS += -disable-opt -disable-inlining
>> +EXTRA_LINKTIME_OPT_FLAGS += -disable-opt -disable-inlining
>> +endif
>> +
>>  #
>>  # Compile commands with libtool.
>>  #
>>
>> Modified: test-suite/trunk/Makefile.tests
>> URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/
>> Makefile.tests?rev=45883&r1=45882&r2=45883&view=diff
>>
>> ===================================================================== 
>> =
>> ========
>> --- test-suite/trunk/Makefile.tests (original)
>> +++ test-suite/trunk/Makefile.tests Fri Jan 11 15:20:45 2008
>> @@ -34,9 +34,23 @@
>>  .PRECIOUS: Output/%.llvm.bc
>>  .PRECIOUS: Output/%.llvm
>>
>> -LCCFLAGS  += -O2
>> -LCXXFLAGS += -O2
>> -LLCFLAGS =
>> +ifndef CFLAGS
>> +CFLAGS = -O3
>> +endif
>> +ifndef CXXFLAGS
>> +CXXFLAGS = -O3
>> +endif
>> +
>> +# If LTO is on, compile each .c .cpp file with -O0 and optimize with
>> +# opt and llvm-ld.
>> +ifndef DISABLE_LTO
>> +LCCFLAGS := -O0 $(CPPFLAGS)
>> +LCXXFLAGS := -O0 $(CPPFLAGS)
>> +else
>> +LCCFLAGS := $(CFLAGS) $(CPPFLAGS)
>> +LCXXFLAGS := $(CXXFLAGS) $(CPPFLAGS)
>> +endif
>> +
>>  FAILURE  = $(LLVM_SRC_ROOT)/test/Failure.sh
>>  LLCLIBS := $(LLCLIBS) -lm
>>
>> @@ -46,22 +60,22 @@
>>
>>  # Compile from X.c to Output/X.ll
>>  Output/%.bc: %.c $(LCC1) Output/.dir $(INCLUDES)
>> -	-$(LLVMGCC) $(CPPFLAGS) $(LCCFLAGS) $(TARGET_FLAGS) -O0 -c $< -o
>> $@ -emit-llvm
>> +	-$(LLVMGCC) $(CPPFLAGS) $(LCCFLAGS) $(TARGET_FLAGS) -c $< -o $@ -
>> emit-llvm
>>  	-$(call UPGRADE_LL,$@)
>>
>>  # Compile from X.cpp to Output/X.ll
>>  Output/%.bc: %.cpp $(LCC1XX) Output/.dir $(INCLUDES)
>> -	-$(LLVMGXX) $(CPPFLAGS) $(LCXXFLAGS) $(TARGET_FLAGS) -O0 -c $< -o
>> $@ -emit-llvm
>> +	-$(LLVMGXX) $(CPPFLAGS) $(LCXXFLAGS) $(TARGET_FLAGS) -c $< -o $@ -
>> emit-llvm
>>  	-$(call UPGRADE_LL,$@)
>>
>>  # Compile from X.cc to Output/X.ll
>>  Output/%.bc: %.cc $(LCC1XX) Output/.dir $(INCLUDES)
>> -	-$(LLVMGXX) $(CPPFLAGS) $(LCXXFLAGS) $(TARGET_FLAGS) -O0 -c $< -o
>> $@ -emit-llvm
>> +	-$(LLVMGXX) $(CPPFLAGS) $(LCXXFLAGS) $(TARGET_FLAGS) -c $< -o $@ -
>> emit-llvm
>>  	-$(call UPGRADE_LL,$@)
>>
>>  # Compile from X.C to Output/X.ll
>>  Output/%.bc: %.C $(LCC1XX) Output/.dir $(INCLUDES)
>> -	-$(LLVMGXX) $(CPPFLAGS) $(LCXXFLAGS) $(TARGET_FLAGS) -O0 -c $< -o
>> $@ -emit-llvm
>> +	-$(LLVMGXX) $(CPPFLAGS) $(LCXXFLAGS) $(TARGET_FLAGS) -c $< -o $@ -
>> emit-llvm
>>  	-$(call UPGRADE_LL,$@)
>>
>>  # LLVM Assemble from X.ll to Output/X.bc.  Because we are coming
>> directly from
>>
>> Modified: test-suite/trunk/MultiSource/Makefile.multisrc
>> URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/
>> MultiSource/Makefile.multisrc?rev=45883&r1=45882&r2=45883&view=diff
>>
>> ===================================================================== 
>> =
>> ========
>> --- test-suite/trunk/MultiSource/Makefile.multisrc (original)
>> +++ test-suite/trunk/MultiSource/Makefile.multisrc Fri Jan 11
>> 15:20:45 2008
>> @@ -10,7 +10,6 @@
>>  #
>>
>> ##===---------------------------------------------------------------- 
>> -
>> -----===##
>>
>> -LCCFLAGS := $(CFLAGS) $(CPPFLAGS)
>>  PROGRAMS_TO_TEST := $(PROG)
>>
>>  ## LLVM bytecode libraries that must be linked with an application
>> @@ -29,16 +28,16 @@
>>  .PRECIOUS: $(LObjects) $(NObjects)
>>
>>  Output/%.o: %.c Output/.dir
>> -	-$(CC) $(CPPFLAGS) $(CFLAGS) -O2 $(TARGET_FLAGS) -c $< -o $@
>> +	-$(CC) $(CPPFLAGS) $(CFLAGS) $(TARGET_FLAGS) -c $< -o $@
>>
>>  Output/%.o: %.C Output/.dir
>> -	-$(CC) $(CPPFLAGS) $(CXXFLAGS) -O2 $(TARGET_FLAGS) -c $< -o $@
>> +	-$(CC) $(CPPFLAGS) $(CXXFLAGS) $(TARGET_FLAGS) -c $< -o $@
>>
>>  Output/%.o: %.cpp Output/.dir
>> -	-$(CC) $(CPPFLAGS) $(CXXFLAGS) -O2 $(TARGET_FLAGS) -c $< -o $@
>> +	-$(CC) $(CPPFLAGS) $(CXXFLAGS) $(TARGET_FLAGS) -c $< -o $@
>>
>>  Output/%.o: %.cc Output/.dir
>> -	-$(CC) $(CPPFLAGS) $(CXXFLAGS) -O2 $(TARGET_FLAGS) -c $< -o $@
>> +	-$(CC) $(CPPFLAGS) $(CXXFLAGS) $(TARGET_FLAGS) -c $< -o $@
>>
>>  bugpoint-opt: Output/$(PROG).bugpoint-opt
>>  bugpoint-gccas: Output/$(PROG).bugpoint-opt
>>
>> Modified: test-suite/trunk/SingleSource/Makefile.singlesrc
>> URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/
>> SingleSource/Makefile.singlesrc?rev=45883&r1=45882&r2=45883&view=diff
>>
>> ===================================================================== 
>> =
>> ========
>> --- test-suite/trunk/SingleSource/Makefile.singlesrc (original)
>> +++ test-suite/trunk/SingleSource/Makefile.singlesrc Fri Jan 11
>> 15:20:45 2008
>> @@ -34,10 +34,10 @@
>>
>>  # FIXME: LIBS should be specified, not hardcoded to -lm
>>  Output/%.native: $(SourceDir)/%.c Output/.dir
>> -	-$(CC) -O2 $(CPPFLAGS) $(CFLAGS) $(TARGET_FLAGS) $< -lm -o $@ $
>> (LDFLAGS)
>> +	-$(CC) $(CPPFLAGS) $(CFLAGS) $(TARGET_FLAGS) $< -lm -o $@ $ 
>> (LDFLAGS)
>>
>>  Output/%.native: $(SourceDir)/%.cpp Output/.dir
>> -	-$(CXX) -O2 $(CPPFLAGS) $(CXXFLAGS) $(TARGET_FLAGS) $< -lm -o $@ $
>> (LDFLAGS)
>> +	-$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(TARGET_FLAGS) $< -lm -o $@ $
>> (LDFLAGS)
>>
>>
>>  bugpoint-gccas bugpoint-opt bugpoint-llvm-ld bugpoint-gccld
>> bugpoint-jit bugpoint-llc bugpoint-llc-beta:
>>
>> Modified: test-suite/trunk/TEST.nightly.Makefile
>> URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/
>> TEST.nightly.Makefile?rev=45883&r1=45882&r2=45883&view=diff
>>
>> ===================================================================== 
>> =
>> ========
>> --- test-suite/trunk/TEST.nightly.Makefile (original)
>> +++ test-suite/trunk/TEST.nightly.Makefile Fri Jan 11 15:20:45 2008
>> @@ -8,7 +8,6 @@
>>  CURDIR  := $(shell cd .; pwd)
>>  PROGDIR := $(PROJ_SRC_ROOT)
>>  RELDIR  := $(subst $(PROGDIR),,$(CURDIR))
>> -CFLAGS  := -O3
>>
>>  REPORTS_TO_GEN := compile nat
>>  ifndef DISABLE_LLC
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list