Skip to content

Commit 32908d7

Browse files
committedMay 7, 2014
[x86] Make the 'x86-64' cpu, what I see as and many use as the generic
default architecture for reasonable modern x86 processors, actually be modern. This processor model should essentially be "tuned" for modern x86 chips as much as possible without undue penalties on any specific architecture. Previously we weren't even using the nice scheduling models. There are a few other tweaks needed here, but this change at least I have benchmarked across a decent swatch of chips (intel's clovertown, westmere, and sandybridge; amd's istanbul) and seen no significant regressions. If anyone has suggested ways to test this, just let me know. Somewhat alarmingly, no existing tests failed. llvm-svn: 208230
1 parent d70cc60 commit 32908d7

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed
 

‎llvm/lib/Target/X86/X86.td

+15-2
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ def : Proc<"pentium3m", [FeatureSSE1, FeatureSlowBTMem]>;
195195
def : Proc<"pentium-m", [FeatureSSE2, FeatureSlowBTMem]>;
196196
def : Proc<"pentium4", [FeatureSSE2]>;
197197
def : Proc<"pentium4m", [FeatureSSE2, FeatureSlowBTMem]>;
198-
def : Proc<"x86-64", [FeatureSSE2, Feature64Bit, FeatureSlowBTMem,
199-
FeatureFastUAMem]>;
198+
200199
// Intel Core Duo.
201200
def : ProcessorModel<"yonah", SandyBridgeModel,
202201
[FeatureSSE3, FeatureSlowBTMem]>;
@@ -343,6 +342,20 @@ def : Proc<"winchip2", [Feature3DNow]>;
343342
def : Proc<"c3", [Feature3DNow]>;
344343
def : Proc<"c3-2", [FeatureSSE1]>;
345344

345+
// We also provide a generic 64-bit specific x86 processor model which tries to
346+
// be good for modern chips without enabling instruction set encodings past the
347+
// basic SSE2 and 64-bit ones. It disables slow things from any mainstream and
348+
// modern 64-bit x86 chip, and enables features that are generally beneficial.
349+
//
350+
// We currently use the Sandy Bridge model as the default scheduling model as
351+
// we use it across Nehalem, Westmere, Sandy Bridge, and Ivy Bridge which
352+
// covers a huge swath of x86 processors. If there are specific scheduling
353+
// knobs which need to be tuned differently for AMD chips, we might consider
354+
// forming a common base for them.
355+
def : ProcessorModel<"x86-64", SandyBridgeModel,
356+
[FeatureSSE2, Feature64Bit, FeatureSlowBTMem,
357+
FeatureFastUAMem]>;
358+
346359
//===----------------------------------------------------------------------===//
347360
// Register File Description
348361
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)
Please sign in to comment.