Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang] make reciprocal estimate codegen a function attribute
The motivation for the change is that we can't have pseudo-global settings for codegen living in TargetOptions because that doesn't work with LTO. Ideally, these reciprocal attributes will be moved to the instruction-level via FMF, metadata, or something else. But making them function attributes is at least an improvement over the current state. I'm committing this patch ahead of the related LLVM patch to avoid bot failures, but if that patch needs to be reverted, then this should be reverted too. Differential Revision: https://reviews.llvm.org/D24815 llvm-svn: 283251
- Loading branch information
1 parent
f993d6e
commit 0bb72c1
Showing
3 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// RUN: %clang_cc1 -mrecip=!sqrtf,vec-divf:3 -emit-llvm %s -o - | FileCheck %s | ||
|
||
int baz(int a) { return 4; } | ||
|
||
// CHECK: baz{{.*}} #0 | ||
// CHECK: #0 = {{.*}}"reciprocal-estimates"="!sqrtf,vec-divf:3" | ||
|