forked from OSchip/llvm-project
Revert "Declares __cpu_model as dso local"
This reverts r348978 llvm-svn: 348982
This commit is contained in:
parent
1ae5089765
commit
e177082972
|
@ -9465,7 +9465,6 @@ Value *CodeGenFunction::EmitX86CpuIs(StringRef CPUStr) {
|
||||||
|
|
||||||
// Grab the global __cpu_model.
|
// Grab the global __cpu_model.
|
||||||
llvm::Constant *CpuModel = CGM.CreateRuntimeVariable(STy, "__cpu_model");
|
llvm::Constant *CpuModel = CGM.CreateRuntimeVariable(STy, "__cpu_model");
|
||||||
cast<llvm::GlobalValue>(CpuModel)->setDSOLocal(true);
|
|
||||||
|
|
||||||
// Calculate the index needed to access the correct field based on the
|
// Calculate the index needed to access the correct field based on the
|
||||||
// range. Also adjust the expected value.
|
// range. Also adjust the expected value.
|
||||||
|
@ -9538,7 +9537,6 @@ llvm::Value *CodeGenFunction::EmitX86CpuSupports(uint64_t FeaturesMask) {
|
||||||
|
|
||||||
// Grab the global __cpu_model.
|
// Grab the global __cpu_model.
|
||||||
llvm::Constant *CpuModel = CGM.CreateRuntimeVariable(STy, "__cpu_model");
|
llvm::Constant *CpuModel = CGM.CreateRuntimeVariable(STy, "__cpu_model");
|
||||||
cast<llvm::GlobalValue>(CpuModel)->setDSOLocal(true);
|
|
||||||
|
|
||||||
// Grab the first (0th) element from the field __cpu_features off of the
|
// Grab the first (0th) element from the field __cpu_features off of the
|
||||||
// global in the struct STy.
|
// global in the struct STy.
|
||||||
|
@ -9558,8 +9556,6 @@ llvm::Value *CodeGenFunction::EmitX86CpuSupports(uint64_t FeaturesMask) {
|
||||||
if (Features2 != 0) {
|
if (Features2 != 0) {
|
||||||
llvm::Constant *CpuFeatures2 = CGM.CreateRuntimeVariable(Int32Ty,
|
llvm::Constant *CpuFeatures2 = CGM.CreateRuntimeVariable(Int32Ty,
|
||||||
"__cpu_features2");
|
"__cpu_features2");
|
||||||
cast<llvm::GlobalValue>(CpuFeatures2)->setDSOLocal(true);
|
|
||||||
|
|
||||||
Value *Features =
|
Value *Features =
|
||||||
Builder.CreateAlignedLoad(CpuFeatures2, CharUnits::fromQuantity(4));
|
Builder.CreateAlignedLoad(CpuFeatures2, CharUnits::fromQuantity(4));
|
||||||
|
|
||||||
|
@ -9577,7 +9573,6 @@ Value *CodeGenFunction::EmitX86CpuInit() {
|
||||||
llvm::FunctionType *FTy = llvm::FunctionType::get(VoidTy,
|
llvm::FunctionType *FTy = llvm::FunctionType::get(VoidTy,
|
||||||
/*Variadic*/ false);
|
/*Variadic*/ false);
|
||||||
llvm::Constant *Func = CGM.CreateRuntimeFunction(FTy, "__cpu_indicator_init");
|
llvm::Constant *Func = CGM.CreateRuntimeFunction(FTy, "__cpu_indicator_init");
|
||||||
cast<llvm::GlobalValue>(Func)->setDSOLocal(true);
|
|
||||||
return Builder.CreateCall(Func);
|
return Builder.CreateCall(Func);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
// global, the bit grab, and the icmp correct.
|
// global, the bit grab, and the icmp correct.
|
||||||
extern void a(const char *);
|
extern void a(const char *);
|
||||||
|
|
||||||
// CHECK: @__cpu_model = external dso_local global { i32, i32, i32, [1 x i32] }
|
|
||||||
|
|
||||||
void intel() {
|
void intel() {
|
||||||
if (__builtin_cpu_is("intel"))
|
if (__builtin_cpu_is("intel"))
|
||||||
a("intel");
|
a("intel");
|
||||||
|
|
|
@ -4,9 +4,6 @@
|
||||||
// global, the bit grab, and the icmp correct.
|
// global, the bit grab, and the icmp correct.
|
||||||
extern void a(const char *);
|
extern void a(const char *);
|
||||||
|
|
||||||
// CHECK: @__cpu_model = external dso_local global { i32, i32, i32, [1 x i32] }
|
|
||||||
// CHECK: @__cpu_features2 = external dso_local global i32
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
__builtin_cpu_init();
|
__builtin_cpu_init();
|
||||||
|
|
||||||
|
@ -28,5 +25,3 @@ int main() {
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: declare dso_local void @__cpu_indicator_init()
|
|
||||||
|
|
Loading…
Reference in New Issue