Merge remote-tracking branch 'upstream/master' into knc-modes

This commit is contained in:
egaburov
2013-09-23 08:12:00 +02:00
2 changed files with 14 additions and 9 deletions

View File

@@ -81,7 +81,7 @@ def build_LLVM(version_LLVM, revision, folder, tarball, debug, selfbuild, from_v
llvm_home = os.environ["LLVM_HOME"] llvm_home = os.environ["LLVM_HOME"]
os.chdir(llvm_home) os.chdir(llvm_home)
FOLDER_NAME=version_LLVM FOLDER_NAME=version_LLVM
if version_LLVM == "head": if version_LLVM == "trunk":
SVN_PATH="trunk" SVN_PATH="trunk"
if version_LLVM == "3.3": if version_LLVM == "3.3":
SVN_PATH="tags/RELEASE_33/final" SVN_PATH="tags/RELEASE_33/final"
@@ -334,7 +334,7 @@ def validation_run(only, only_targets, reference_branch, notify, update):
archs.append("x86-64") archs.append("x86-64")
if "native" in only: if "native" in only:
sde_targets_t = [] sde_targets_t = []
for i in ["3.1", "3.2", "3.3", "head"]: for i in ["3.1", "3.2", "3.3", "trunk"]:
if i in only: if i in only:
LLVM.append(i) LLVM.append(i)
if "current" in only: if "current" in only:
@@ -367,7 +367,7 @@ def validation_run(only, only_targets, reference_branch, notify, update):
if len(archs) == 0: if len(archs) == 0:
archs = ["x86", "x86-64"] archs = ["x86", "x86-64"]
if len(LLVM) == 0: if len(LLVM) == 0:
LLVM = ["3.3", "head"] LLVM = ["3.3", "trunk"]
gen_archs = ["x86-64"] gen_archs = ["x86-64"]
need_LLVM = check_LLVM(LLVM) need_LLVM = check_LLVM(LLVM)
for i in range(0,len(need_LLVM)): for i in range(0,len(need_LLVM)):
@@ -562,9 +562,9 @@ parser = OptionParser()
parser.add_option('-b', '--build-llvm', dest='build_llvm', parser.add_option('-b', '--build-llvm', dest='build_llvm',
help='ask to build LLVM', default=False, action="store_true") help='ask to build LLVM', default=False, action="store_true")
parser.add_option('--version', dest='version', parser.add_option('--version', dest='version',
help='version of llvm to build', default="head") help='version of llvm to build: 3.1 3.2 3.3 trunk', default="trunk")
parser.add_option('--revision', dest='revision', parser.add_option('--revision', dest='revision',
help='revision of llvm to build', default="") help='revision of llvm to build in format r172870', default="")
parser.add_option('--debug', dest='debug', parser.add_option('--debug', dest='debug',
help='debug build of LLVM?', default=False, action="store_true") help='debug build of LLVM?', default=False, action="store_true")
parser.add_option('--folder', dest='folder', parser.add_option('--folder', dest='folder',
@@ -592,7 +592,7 @@ parser.add_option('--notify', dest='notify',
parser.add_option('--only', dest='only', parser.add_option('--only', dest='only',
help='set types of tests. Possible values:\n' + help='set types of tests. Possible values:\n' +
'-O0, -O2, x86, x86-64, stability (test only stability), performance (test only performance)\n' + '-O0, -O2, x86, x86-64, stability (test only stability), performance (test only performance)\n' +
'build (only build with different LLVM), 3.1, 3.2, 3.3, head, native (do not use SDE), current (do not rebuild ISPC).\n' + 'build (only build with different LLVM), 3.1, 3.2, 3.3, trunk, native (do not use SDE), current (do not rebuild ISPC).\n' +
'Example: --only="3.2 -O0 stability 3.3"', default="") 'Example: --only="3.2 -O0 stability 3.3"', default="")
parser.add_option('--update-errors', dest='update', parser.add_option('--update-errors', dest='update',
help='rewrite fail_db.txt file according to received results (F or FP)', default="") help='rewrite fail_db.txt file according to received results (F or FP)', default="")

View File

@@ -126,7 +126,7 @@ lGetSystemISA() {
return "avx1.1-i32x8"; return "avx1.1-i32x8";
} }
// Regular AVX // Regular AVX
return "avx-i32x8"; return "avx1-i32x8";
} }
else if ((info[2] & (1 << 19)) != 0) else if ((info[2] & (1 << 19)) != 0)
return "sse4-i32x4"; return "sse4-i32x4";
@@ -151,6 +151,9 @@ static const char *supportedCPUs[] = {
#if !defined(LLVM_3_1) #if !defined(LLVM_3_1)
, "core-avx-i", "core-avx2" , "core-avx-i", "core-avx2"
#endif // LLVM 3.2+ #endif // LLVM 3.2+
#if !defined(LLVM_3_1) && !defined(LLVM_3_2) && !defined(LLVM_3_3)
, "slm"
#endif // LLVM 3.4+
}; };
Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) : Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
@@ -196,9 +199,10 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
isa = "avx1.1-i32x8"; isa = "avx1.1-i32x8";
else if (!strcmp(cpu, "sandybridge") || else if (!strcmp(cpu, "sandybridge") ||
!strcmp(cpu, "corei7-avx")) !strcmp(cpu, "corei7-avx"))
isa = "avx-i32x8"; isa = "avx1-i32x8";
else if (!strcmp(cpu, "corei7") || else if (!strcmp(cpu, "corei7") ||
!strcmp(cpu, "penryn")) !strcmp(cpu, "penryn") ||
!strcmp(cpu, "slm"))
isa = "sse4-i32x4"; isa = "sse4-i32x4";
else else
isa = "sse2-i32x4"; isa = "sse2-i32x4";
@@ -660,6 +664,7 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
// Initialize target-specific "target-feature" attribute. // Initialize target-specific "target-feature" attribute.
if (!m_attributes.empty()) { if (!m_attributes.empty()) {
llvm::AttrBuilder attrBuilder; llvm::AttrBuilder attrBuilder;
attrBuilder.addAttribute("target-cpu", this->m_cpu);
attrBuilder.addAttribute("target-features", this->m_attributes); attrBuilder.addAttribute("target-features", this->m_attributes);
this->m_tf_attributes = new llvm::AttributeSet( this->m_tf_attributes = new llvm::AttributeSet(
llvm::AttributeSet::get( llvm::AttributeSet::get(