mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 03:29:57 +00:00
clang: Stop emitting "strictfp"
The attribute is a proper enum attribute, strictfp. We were getting strictfp and "strictfp" set on every function with -fexperimental-strict-floating-point. https://reviews.llvm.org/D139629
This commit is contained in:
parent
75b7901901
commit
42d4c85ca8
@ -2416,15 +2416,6 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
|
||||
}
|
||||
}
|
||||
|
||||
void CodeGenModule::setLLVMFunctionFEnvAttributes(const FunctionDecl *D,
|
||||
llvm::Function *F) {
|
||||
if (D->hasAttr<StrictFPAttr>()) {
|
||||
llvm::AttrBuilder FuncAttrs(F->getContext());
|
||||
FuncAttrs.addAttribute("strictfp");
|
||||
F->addFnAttrs(FuncAttrs);
|
||||
}
|
||||
}
|
||||
|
||||
void CodeGenModule::SetCommonAttributes(GlobalDecl GD, llvm::GlobalValue *GV) {
|
||||
const Decl *D = GD.getDecl();
|
||||
if (isa_and_nonnull<NamedDecl>(D))
|
||||
@ -5661,9 +5652,6 @@ void CodeGenModule::EmitGlobalFunctionDefinition(GlobalDecl GD,
|
||||
|
||||
maybeSetTrivialComdat(*D, *Fn);
|
||||
|
||||
// Set CodeGen attributes that represent floating point environment.
|
||||
setLLVMFunctionFEnvAttributes(D, Fn);
|
||||
|
||||
CodeGenFunction(*this).GenerateCode(GD, Fn, FI);
|
||||
|
||||
setNonAliasAttributes(GD, Fn);
|
||||
|
@ -284,3 +284,6 @@ MyComplex useAdd() {
|
||||
// CHECK-FAST: Function Attrs: noinline nounwind{{$$}}
|
||||
// CHECK-NOHONOR: Function Attrs: noinline nounwind{{$$}}
|
||||
// CHECK-LABEL: define{{.*}} @_GLOBAL__sub_I_fp_floatcontrol_stack
|
||||
|
||||
// CHECK-DEBSTRICT: {{[ ]}}strictfp{{[ ]}}
|
||||
// CHECK-DEBSTRICT-NOT: "strictfp"
|
||||
|
@ -168,7 +168,7 @@ kernel void device_side_enqueue(global float *a, global float *b, int i) {
|
||||
// SPIR32: attributes #[[ATTR3:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
|
||||
// SPIR32: attributes #[[ATTR4]] = { convergent nounwind "denormal-fp-math-f32"="preserve-sign,preserve-sign" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
|
||||
//.
|
||||
// STRICTFP: attributes #[[ATTR0]] = { convergent noinline norecurse nounwind optnone strictfp "stack-protector-buffer-size"="8" "strictfp" "uniform-work-group-size"="false" }
|
||||
// STRICTFP: attributes #[[ATTR0]] = { convergent noinline norecurse nounwind optnone strictfp "stack-protector-buffer-size"="8" "uniform-work-group-size"="false" }
|
||||
// STRICTFP: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
|
||||
// STRICTFP: attributes #[[ATTR2]] = { convergent noinline nounwind optnone strictfp "stack-protector-buffer-size"="8" }
|
||||
// STRICTFP: attributes #[[ATTR3:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) }
|
||||
|
Loading…
Reference in New Issue
Block a user