Bug 200262 - [ports]Universal optimization patch
Summary: [ports]Universal optimization patch
Status: Closed Not Accepted
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-17 05:19 UTC by sasamotikomi
Modified: 2015-06-18 16:53 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sasamotikomi 2015-05-17 05:19:59 UTC
I offer use universal optimization submenu(or as section additional "development") and automatic detect instruction of processor  instead understandably options "Optimization" or single option for one instruction (MMX/SSE):
Example:
_________________________________Development_____________
Optimization +->(mean submenu also if possible use color and legend such: Green - all possible(or/and recommended) optimization is used, Yellow few optimization is used some not used by default, Red some enabled optimization is not supported by your processor but enabled, Gray optimization is not used)
                           Architecture:
i386(x86_32) () amd64(x86_64) (*) arm () arm64() mips() mips64() powerpc32() powerpc64() sparc64()
(useless until cross compilation isn't supported https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200167 )

Mircoachitecture(better use real architecture name, if abbreviation of compiler is not obvious):
native()
(show inly if i386 selected):
AMD: 			    Intel:		Winchip:   	VIA:
k6()			    i386() 		winchip-c6()	c3()
k6-2()			    i486() 		winchip2()	c3-2()
k6-3()			    i586() 
athlon()		    pentium() 
athlon-tbird()	            pentium-mmx()  
athlon-4()		    pentiumpro() 
athlon-xp()		    i686()  
athlon-mp()		    pentium2()
geode()			    pentium3() 
			    pentium3m()
			    pentium-m()
			    pentium4( )
			    pentium4m( )
			    prescott( )  
(x86_64)          
AMD:			Intel:
 k8()			nocona()
 opteron()		core2()
 athlon64()		nehalem()
 athlon-fx()		westmere()
 k8-sse3()		sandybridge()
 opteron-sse3()		ivybridge()
 athlon64-sse3()	haswell()
 amdfam10()		broadwell()
 barcelona(*)		bonnell()
 bdver1()		silvermont()
 bdver2()		knl()
 bdver3()		
 bdver4()		
 btver1()		
 btver2()		
 
Optimization level: Not() | -O() -O2() -O3(*) -Os() -0[_]()
Cache size []  l1[___] l2[__] l3 [__] l4[___] 
Instructions(don't show unavailable instructions for processor or ports):
MMX[x] 
3DNow![] 
SSE[x] SSE2[x] SSE3[x] SSE4[x]  SSE4.1 [x] SSE4.2 [x] SSE4A[]
AES[x]
AVX[] AVX2[]  AVX512[] AVX512PF[] AVX512ER[] AVX512CD[]
SHA []
PCLMUL[]
FSGSBASE[]
RDRND[] 
F16C[]
FMA[] FMA4[]
XOP[] 
LWP []
ABM[]
BMI[] BMI2[]
FXSR[] 
XSAVE[] XSAVEOPT[]
LZCNT[] 
RTM[] 
MPX[]

It's fix or help avoid many issue with wrong optimization flags such SSE2/SSE3 on i386 or 3dnow! on Intel processor or AMD FX:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194861
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198296
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198738
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200258
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200234
Comment 1 Antoine Brodin freebsd_committer 2015-06-18 16:53:00 UTC
This duplicates what we already have with MACHINE_CPU and bsd.cpu.mk