projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac47db6
)
[SimplifyLibCalls] Use helper methods to query attributes (NFC)
author
Nikita Popov
<npopov@redhat.com>
Tue, 11 Oct 2022 09:41:28 +0000
(11:41 +0200)
committer
Nikita Popov
<npopov@redhat.com>
Tue, 11 Oct 2022 09:41:28 +0000
(11:41 +0200)
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
index
3616186
..
8f25e80
100644
(file)
--- a/
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
+++ b/
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
@@
-2515,8
+2515,7
@@
static bool isTrigLibCall(CallInst *CI) {
// We can only hope to do anything useful if we can ignore things like errno
// and floating-point exceptions.
// We already checked the prototype.
- return CI->hasFnAttr(Attribute::NoUnwind) &&
- CI->hasFnAttr(Attribute::ReadNone);
+ return CI->doesNotThrow() && CI->doesNotAccessMemory();
}
static bool insertSinCosCall(IRBuilderBase &B, Function *OrigCallee, Value *Arg,