diff options
author | Jon Roelofs <jonathan_roelofs@apple.com> | 2023-12-14 14:40:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-14 14:40:52 -0700 |
commit | 640c1d3dd12843f9ad29df472bbf0a88f90770b5 (patch) | |
tree | 1269258901f05311db372d4fc42fcc42e4de0fe0 /llvm/lib/IR | |
parent | 7c6b4be615c225b11a94a90bfd421265e1544fd5 (diff) | |
download | llvm-640c1d3dd12843f9ad29df472bbf0a88f90770b5.zip llvm-640c1d3dd12843f9ad29df472bbf0a88f90770b5.tar.gz llvm-640c1d3dd12843f9ad29df472bbf0a88f90770b5.tar.bz2 |
[llvm] Support IFuncs on Darwin platforms (#73686)
... by lowering them as lazy resolve-on-first-use symbol resolvers. Note that this is subtly different timing than on ELF platforms, where ifunc resolution happens at load time.
Since ld64 and ld-prime don't support all the cases we need for these, we lower them manually in the AsmPrinter.
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index cdc556b..8aba280 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -2229,13 +2229,11 @@ void Verifier::verifyFunctionAttrs(FunctionType *FT, AttributeList Attrs, } // Check EVEX512 feature. - if (MaxParameterWidth >= 512 && Attrs.hasFnAttr("target-features")) { - Triple T(M.getTargetTriple()); - if (T.isX86()) { - StringRef TF = Attrs.getFnAttr("target-features").getValueAsString(); - Check(!TF.contains("+avx512f") || !TF.contains("-evex512"), - "512-bit vector arguments require 'evex512' for AVX512", V); - } + if (MaxParameterWidth >= 512 && Attrs.hasFnAttr("target-features") && + TT.isX86()) { + StringRef TF = Attrs.getFnAttr("target-features").getValueAsString(); + Check(!TF.contains("+avx512f") || !TF.contains("-evex512"), + "512-bit vector arguments require 'evex512' for AVX512", V); } checkUnsignedBaseTenFuncAttr(Attrs, "patchable-function-prefix", V); |