Skip to content

Commit

Permalink
Indent function getTargetFeatures with 4 spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
eschnett committed Mar 6, 2016
1 parent 8a7eac2 commit d8186bc
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5797,51 +5797,51 @@ static void init_julia_llvm_env(Module *m)
// If the user specifies native (or does not specify) we default
// using the API provided by LLVM
static inline SmallVector<std::string,10> getTargetFeatures() {
StringMap<bool> HostFeatures;
if( !strcmp(jl_options.cpu_target,"native") )
{
// On earlier versions of LLVM this is empty
llvm::sys::getHostCPUFeatures(HostFeatures);
}

// Platform specific overides follow
StringMap<bool> HostFeatures;
if (!strcmp(jl_options.cpu_target,"native"))
{
// On earlier versions of LLVM this is empty
llvm::sys::getHostCPUFeatures(HostFeatures);
}

// Platform specific overides follow
#if defined(_CPU_X86_64_) || defined(_CPU_X86_)
#ifndef USE_MCJIT
// Temporarily disable Haswell BMI2 features due to LLVM bug.
HostFeatures["bmi2"] = false;
HostFeatures["avx2"] = false;
// Temporarily disable Haswell BMI2 features due to LLVM bug.
HostFeatures["bmi2"] = false;
HostFeatures["avx2"] = false;
#endif
#ifdef V128_BUG
HostFeatures["avx"] = false;
HostFeatures["avx"] = false;
#endif
// Require cx16 (cmpxchg16b)
// We need this for 128-bit atomic operations. We only need this
// when threading is enabled; however, to test whether this excludes
// important systems, we require this even when threading is
// disabled.
HostFeatures["cx16"] = true;
// Require cx16 (cmpxchg16b)
// We need this for 128-bit atomic operations. We only need this
// when threading is enabled; however, to test whether this
// excludes important systems, we require this even when threading
// is disabled.
HostFeatures["cx16"] = true;
#endif

// Figure out if we know the cpu_target
std::string cpu = strcmp(jl_options.cpu_target,"native") ? jl_options.cpu_target : sys::getHostCPUName();
if (cpu.empty() || cpu == "generic") {
jl_printf(JL_STDERR, "WARNING: unable to determine host cpu name.\n");
// Figure out if we know the cpu_target
std::string cpu = strcmp(jl_options.cpu_target,"native") ? jl_options.cpu_target : sys::getHostCPUName();
if (cpu.empty() || cpu == "generic") {
jl_printf(JL_STDERR, "WARNING: unable to determine host cpu name.\n");
#if defined(_CPU_ARM_) && defined(__ARM_PCS_VFP)
// Check if this is required when you have read the features directly from the processor
// This affects the platform calling convention.
// TODO: enable vfp3 for ARMv7+ (but adapt the ABI)
HostFeatures["vfp2"] = true;
#endif
}

SmallVector<std::string,10> attr;
for( StringMap<bool>::const_iterator it = HostFeatures.begin(); it != HostFeatures.end(); it++ )
{
std::string att = it->getValue() ? it->getKey().str() :
std::string("-") + it->getKey().str();
attr.append( 1, att );
}
return attr;
// Check if this is required when you have read the features directly from the processor
// This affects the platform calling convention.
// TODO: enable vfp3 for ARMv7+ (but adapt the ABI)
HostFeatures["vfp2"] = true;
#endif
}

SmallVector<std::string,10> attr;
for (StringMap<bool>::const_iterator it = HostFeatures.begin(); it != HostFeatures.end(); it++)
{
std::string att = it->getValue() ? it->getKey().str() :
std::string("-") + it->getKey().str();
attr.append(1, att);
}
return attr;
}

extern "C" void jl_init_debuginfo(void);
Expand Down

0 comments on commit d8186bc

Please sign in to comment.