From 56d2c626f75e86923facefb9f0c27c94152afc50 Mon Sep 17 00:00:00 2001 From: Vasileios Porpodas Date: Tue, 8 Oct 2024 14:37:48 -0700 Subject: [PATCH 001/129] [SandboxVec][Interval] Add print() and dump() --- .../SandboxVectorizer/DependencyGraph.h | 2 +- .../Vectorize/SandboxVectorizer/Interval.h | 24 ++++++++++++++++++- llvm/lib/Transforms/Vectorize/CMakeLists.txt | 1 + .../Vectorize/SandboxVectorizer/Interval.cpp | 22 +++++++++++++++++ 4 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 llvm/lib/Transforms/Vectorize/SandboxVectorizer/Interval.cpp diff --git a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h index 6333f0b81f9c33..7bc920537faf41 100644 --- a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h +++ b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h @@ -110,7 +110,7 @@ class DGNode { #ifndef NDEBUG virtual void print(raw_ostream &OS, bool PrintDeps = true) const; - friend raw_ostream &operator<<(DGNode &N, raw_ostream &OS) { + friend raw_ostream &operator<<(raw_ostream &OS, DGNode &N) { N.print(OS); return OS; } diff --git a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Interval.h b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Interval.h index 58ae3c06620fad..b05294d70a3e0c 100644 --- a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Interval.h +++ b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Interval.h @@ -13,7 +13,7 @@ // // This is currently used for Instruction intervals. // It provides an API for some basic operations on the interval, including some -// simple set operations, like union, interseciton and others. +// simple set operations, like union, intersection and others. // //===----------------------------------------------------------------------===// @@ -21,6 +21,7 @@ #define LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_INSTRINTERVAL_H #include "llvm/ADT/ArrayRef.h" +#include "llvm/Support/raw_ostream.h" #include namespace llvm::sandboxir { @@ -197,6 +198,27 @@ template class Interval { auto *NewTo = To->comesBefore(Other.To) ? Other.To : To; return {NewFrom, NewTo}; } + +#ifndef NDEBUG + void print(raw_ostream &OS) const { + auto *Top = top(); + auto *Bot = bottom(); + OS << "Top: "; + if (Top != nullptr) + OS << *Top; + else + OS << "nullptr"; + OS << "\n"; + + OS << "Bot: "; + if (Bot != nullptr) + OS << *Bot; + else + OS << "nullptr"; + OS << "\n"; + } + LLVM_DUMP_METHOD void dump() const; +#endif }; } // namespace llvm::sandboxir diff --git a/llvm/lib/Transforms/Vectorize/CMakeLists.txt b/llvm/lib/Transforms/Vectorize/CMakeLists.txt index 887c2089c5a520..9c2e7c1e0c5bc7 100644 --- a/llvm/lib/Transforms/Vectorize/CMakeLists.txt +++ b/llvm/lib/Transforms/Vectorize/CMakeLists.txt @@ -4,6 +4,7 @@ add_llvm_component_library(LLVMVectorize LoopVectorizationLegality.cpp LoopVectorize.cpp SandboxVectorizer/DependencyGraph.cpp + SandboxVectorizer/Interval.cpp SandboxVectorizer/Passes/BottomUpVec.cpp SandboxVectorizer/SandboxVectorizer.cpp SandboxVectorizer/SeedCollector.cpp diff --git a/llvm/lib/Transforms/Vectorize/SandboxVectorizer/Interval.cpp b/llvm/lib/Transforms/Vectorize/SandboxVectorizer/Interval.cpp new file mode 100644 index 00000000000000..79b37444195359 --- /dev/null +++ b/llvm/lib/Transforms/Vectorize/SandboxVectorizer/Interval.cpp @@ -0,0 +1,22 @@ +//===- Interval.cpp -------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "llvm/Transforms/Vectorize/SandboxVectorizer/Interval.h" +#include "llvm/SandboxIR/Instruction.h" +#include "llvm/Support/Debug.h" +#include "llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h" + +namespace llvm::sandboxir { + +template class Interval; +template class Interval; + +#ifndef NDEBUG +template void Interval::dump() const { print(dbgs()); } +#endif +} // namespace llvm::sandboxir From 0c0ec040ac89608d5f746750a654f645c97434bc Mon Sep 17 00:00:00 2001 From: LLVM GN Syncbot Date: Tue, 8 Oct 2024 22:27:45 +0000 Subject: [PATCH 002/129] [gn build] Port 56d2c626f75e --- llvm/utils/gn/secondary/llvm/lib/Transforms/Vectorize/BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm/utils/gn/secondary/llvm/lib/Transforms/Vectorize/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/Transforms/Vectorize/BUILD.gn index 8a5f76d6b60505..5146c9a0f61ddd 100644 --- a/llvm/utils/gn/secondary/llvm/lib/Transforms/Vectorize/BUILD.gn +++ b/llvm/utils/gn/secondary/llvm/lib/Transforms/Vectorize/BUILD.gn @@ -14,6 +14,7 @@ static_library("Vectorize") { "LoopVectorize.cpp", "SLPVectorizer.cpp", "SandboxVectorizer/DependencyGraph.cpp", + "SandboxVectorizer/Interval.cpp", "SandboxVectorizer/Passes/BottomUpVec.cpp", "SandboxVectorizer/SandboxVectorizer.cpp", "SandboxVectorizer/SeedCollector.cpp", From e5fae7682dac8c3ffa5f062078e6112d021cc63b Mon Sep 17 00:00:00 2001 From: Sterling-Augustine <56981066+Sterling-Augustine@users.noreply.github.com> Date: Tue, 8 Oct 2024 15:38:07 -0700 Subject: [PATCH 003/129] [SandboxVectorizer] Add MemSeed bundle types (#111584) --- .../SandboxVectorizer/SeedCollector.h | 39 ++++++++++ .../SandboxVectorizer/SeedCollectorTest.cpp | 73 +++++++++++++++++++ 2 files changed, 112 insertions(+) diff --git a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h index 460e3f675fa797..619c2147f2e5c4 100644 --- a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h +++ b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h @@ -123,5 +123,44 @@ class SeedBundle { } #endif // NDEBUG }; + +/// Specialization of SeedBundle for memory access instructions. Keeps +/// seeds sorted in ascending memory order, which is convenient for slicing +/// these bundles into vectorizable groups. +template class MemSeedBundle : public SeedBundle { +public: + explicit MemSeedBundle(SmallVector &&SV, ScalarEvolution &SE) + : SeedBundle(std::move(SV)) { + static_assert(std::is_same::value || + std::is_same::value, + "Expected LoadInst or StoreInst!"); + assert(all_of(Seeds, [](auto *S) { return isa(S); }) && + "Expected Load or Store instructions!"); + auto Cmp = [&SE](Instruction *I0, Instruction *I1) { + return Utils::atLowerAddress(cast(I0), + cast(I1), SE); + }; + std::sort(Seeds.begin(), Seeds.end(), Cmp); + } + explicit MemSeedBundle(LoadOrStoreT *MemI) : SeedBundle(MemI) { + static_assert(std::is_same::value || + std::is_same::value, + "Expected LoadInst or StoreInst!"); + assert(isa(MemI) && "Expected Load or Store!"); + } + void insert(sandboxir::Instruction *I, ScalarEvolution &SE) { + assert(isa(I) && "Expected a Store or a Load!"); + auto Cmp = [&SE](Instruction *I0, Instruction *I1) { + return Utils::atLowerAddress(cast(I0), + cast(I1), SE); + }; + // Find the first element after I in mem. Then insert I before it. + insertAt(std::upper_bound(begin(), end(), I, Cmp), I); + } +}; + +using StoreSeedBundle = MemSeedBundle; +using LoadSeedBundle = MemSeedBundle; + } // namespace llvm::sandboxir #endif // LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_SEEDCOLLECTOR_H diff --git a/llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SeedCollectorTest.cpp b/llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SeedCollectorTest.cpp index 36400afeaf4c59..dd41b0a6605095 100644 --- a/llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SeedCollectorTest.cpp +++ b/llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SeedCollectorTest.cpp @@ -7,7 +7,13 @@ //===----------------------------------------------------------------------===// #include "llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h" +#include "llvm/Analysis/AliasAnalysis.h" +#include "llvm/Analysis/AssumptionCache.h" +#include "llvm/Analysis/BasicAliasAnalysis.h" +#include "llvm/Analysis/LoopInfo.h" +#include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/AsmParser/Parser.h" +#include "llvm/IR/Dominators.h" #include "llvm/SandboxIR/Function.h" #include "llvm/SandboxIR/Instruction.h" #include "llvm/Support/SourceMgr.h" @@ -26,6 +32,12 @@ struct SeedBundleTest : public testing::Test { if (!M) Err.print("LegalityTest", errs()); } + BasicBlock *getBasicBlockByName(Function &F, StringRef Name) { + for (BasicBlock &BB : F) + if (BB.getName() == Name) + return &BB; + llvm_unreachable("Expected to find basic block!"); + } }; TEST_F(SeedBundleTest, SeedBundle) { @@ -123,3 +135,64 @@ define void @foo(float %v0, i32 %i0, i16 %i1, i8 %i2) { /* ForcePowerOf2 */ true); EXPECT_EQ(Slice4.size(), 0u); } + +TEST_F(SeedBundleTest, MemSeedBundle) { + parseIR(C, R"IR( +define void @foo(ptr %ptrA, float %val, ptr %ptr) { +bb: + %gep0 = getelementptr float, ptr %ptr, i32 0 + %gep1 = getelementptr float, ptr %ptr, i32 1 + %gep2 = getelementptr float, ptr %ptr, i32 3 + %gep3 = getelementptr float, ptr %ptr, i32 4 + store float %val, ptr %gep0 + store float %val, ptr %gep1 + store float %val, ptr %gep2 + store float %val, ptr %gep3 + + load float, ptr %gep0 + load float, ptr %gep1 + load float, ptr %gep2 + load float, ptr %gep3 + + ret void +} +)IR"); + Function &LLVMF = *M->getFunction("foo"); + + DominatorTree DT(LLVMF); + TargetLibraryInfoImpl TLII; + TargetLibraryInfo TLI(TLII); + DataLayout DL(M->getDataLayout()); + LoopInfo LI(DT); + AssumptionCache AC(LLVMF); + ScalarEvolution SE(LLVMF, TLI, AC, DT, LI); + + sandboxir::Context Ctx(C); + auto &F = *Ctx.createFunction(&LLVMF); + auto *BB = &*F.begin(); + auto It = std::next(BB->begin(), 4); + auto *S0 = cast(&*It++); + auto *S1 = cast(&*It++); + auto *S2 = cast(&*It++); + auto *S3 = cast(&*It++); + + // Single instruction constructor; test insert out of memory order + sandboxir::StoreSeedBundle SB(S3); + SB.insert(S1, SE); + SB.insert(S2, SE); + SB.insert(S0, SE); + EXPECT_THAT(SB, testing::ElementsAre(S0, S1, S2, S3)); + + // Instruction list constructor; test list out of order + auto *L0 = cast(&*It++); + auto *L1 = cast(&*It++); + auto *L2 = cast(&*It++); + auto *L3 = cast(&*It++); + SmallVector Loads; + Loads.push_back(L1); + Loads.push_back(L3); + Loads.push_back(L2); + Loads.push_back(L0); + sandboxir::LoadSeedBundle LB(std::move(Loads), SE); + EXPECT_THAT(LB, testing::ElementsAre(L0, L1, L2, L3)); +} From a8eb12cdc9a218e4828863f280d2b9f022dac757 Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Tue, 8 Oct 2024 23:50:39 +0100 Subject: [PATCH 004/129] [compiler-rt] Reapply freadlink interception for macOs. (#110917) Fixed test, needed explicit O_SYMLINK on symbolic link opening. --- .../sanitizer_common_interceptors.inc | 18 +++++++++++ .../sanitizer_platform_interceptors.h | 8 ++++- .../TestCases/Darwin/freadlink.c | 31 +++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 compiler-rt/test/sanitizer_common/TestCases/Darwin/freadlink.c diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc index d3c41221d5a94c..a6dd2bbf45f520 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc @@ -10350,6 +10350,23 @@ INTERCEPTOR(SSIZE_T, pwritev2, int fd, __sanitizer_iovec *iov, int iovcnt, #define INIT_PWRITEV2 #endif +#if SANITIZER_INTERCEPT_FREADLINK +INTERCEPTOR(SSIZE_T, freadlink, int fd, char *buf, SIZE_T bufsiz) { + void *ctx; + COMMON_INTERCEPTOR_ENTER(ctx, freadlink, fd, buf, bufsiz); + COMMON_INTERCEPTOR_FD_ACCESS(ctx, fd); + SSIZE_T res = REAL(freadlink)(fd, buf, bufsiz); + if (res > 0) + COMMON_INTERCEPTOR_WRITE_RANGE(ctx, buf, res); + if (res >= 0 && fd > 0) + COMMON_INTERCEPTOR_FD_ACQUIRE(ctx, fd); + return res; +} +# define INIT_FREADLINK COMMON_INTERCEPT_FUNCTION(freadlink) +#else +# define INIT_FREADLINK +#endif + #include "sanitizer_common_interceptors_netbsd_compat.inc" namespace __sanitizer { @@ -10671,6 +10688,7 @@ static void InitializeCommonInterceptors() { INIT_CPUSET_GETAFFINITY; INIT_PREADV2; INIT_PWRITEV2; + INIT_FREADLINK; INIT___PRINTF_CHK; } diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h index b1dc1ec204bc8c..28bb6384daf2cd 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h @@ -607,7 +607,13 @@ // FIXME: also available from musl 1.2.5 #define SANITIZER_INTERCEPT_PREADV2 (SI_LINUX && __GLIBC_PREREQ(2, 26)) #define SANITIZER_INTERCEPT_PWRITEV2 (SI_LINUX && __GLIBC_PREREQ(2, 26)) - +#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && \ + __MAC_OS_X_VERSION_MIN_REQUIRED >= 130000 +# define SI_MAC_OS_DEPLOYMENT_MIN_13_00 1 +#else +# define SI_MAC_OS_DEPLOYMENT_MIN_13_00 0 +#endif +#define SANITIZER_INTERCEPT_FREADLINK (SI_MAC && SI_MAC_OS_DEPLOYMENT_MIN_13_00) // This macro gives a way for downstream users to override the above // interceptor macros irrespective of the platform they are on. They have // to do two things: diff --git a/compiler-rt/test/sanitizer_common/TestCases/Darwin/freadlink.c b/compiler-rt/test/sanitizer_common/TestCases/Darwin/freadlink.c new file mode 100644 index 00000000000000..9957448617be04 --- /dev/null +++ b/compiler-rt/test/sanitizer_common/TestCases/Darwin/freadlink.c @@ -0,0 +1,31 @@ + +// RUN: %clang -O0 %s -o %t && %run %t + +#include +#include +#include +#include +#include +#include +#include + +int main(int argc, char **argv) { + char symlink_path[PATH_MAX]; + snprintf(symlink_path, sizeof(symlink_path), "%s_%d.symlink", argv[0], + getpid()); + remove(symlink_path); + int res = symlink(argv[0], symlink_path); + assert(!res); + + int fd; + char readlink_path[PATH_MAX]; + fd = open(symlink_path, O_RDONLY | O_SYMLINK); + assert(fd > 0); + ssize_t res2 = freadlink(fd, readlink_path, sizeof(readlink_path)); + assert(res2 >= 0); + readlink_path[res2] = '\0'; + assert(!strcmp(readlink_path, argv[0])); + close(fd); + + return 0; +} From 87b491a95c3a8f17bd5c6e578104289954c16456 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Tue, 8 Oct 2024 15:51:27 -0700 Subject: [PATCH 005/129] [NFC] [MTE] get rid of unnecessary cast (#110336) --- llvm/lib/Target/AArch64/AArch64StackTagging.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Target/AArch64/AArch64StackTagging.cpp b/llvm/lib/Target/AArch64/AArch64StackTagging.cpp index 1d2b2573778283..7652758284f4b0 100644 --- a/llvm/lib/Target/AArch64/AArch64StackTagging.cpp +++ b/llvm/lib/Target/AArch64/AArch64StackTagging.cpp @@ -580,14 +580,14 @@ bool AArch64StackTagging::runOnFunction(Function &Fn) { Instruction *Base = insertBaseTaggedPointer(*Fn.getParent(), SInfo.AllocasToInstrument, DT); - int NextTag = 0; + unsigned int NextTag = 0; for (auto &I : SInfo.AllocasToInstrument) { memtag::AllocaInfo &Info = I.second; assert(Info.AI && SIB.getAllocaInterestingness(*Info.AI) == llvm::memtag::AllocaInterestingness::kInteresting); memtag::alignAndPadAlloca(Info, kTagGranuleSize); AllocaInst *AI = Info.AI; - int Tag = NextTag; + unsigned int Tag = NextTag; NextTag = (NextTag + 1) % 16; // Replace alloca with tagp(alloca). IRBuilder<> IRB(Info.AI->getNextNode()); @@ -642,7 +642,7 @@ bool AArch64StackTagging::runOnFunction(Function &Fn) { II->eraseFromParent(); } - memtag::annotateDebugRecords(Info, static_cast(Tag)); + memtag::annotateDebugRecords(Info, Tag); } // If we have instrumented at least one alloca, all unrecognized lifetime From 5f36042508c1ba765df503a493beafb20bf9ddd0 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Tue, 8 Oct 2024 15:53:01 -0700 Subject: [PATCH 006/129] [NFC] [HWASan] [MTE] factor out threadlong increment (#110340) --- .../Transforms/Utils/MemoryTaggingSupport.h | 2 ++ .../Target/AArch64/AArch64StackTagging.cpp | 15 ++------ .../Instrumentation/HWAddressSanitizer.cpp | 30 +--------------- .../Transforms/Utils/MemoryTaggingSupport.cpp | 34 +++++++++++++++++++ 4 files changed, 39 insertions(+), 42 deletions(-) diff --git a/llvm/include/llvm/Transforms/Utils/MemoryTaggingSupport.h b/llvm/include/llvm/Transforms/Utils/MemoryTaggingSupport.h index 1401c5fcde5f77..60255d57364099 100644 --- a/llvm/include/llvm/Transforms/Utils/MemoryTaggingSupport.h +++ b/llvm/include/llvm/Transforms/Utils/MemoryTaggingSupport.h @@ -99,6 +99,8 @@ Value *getPC(const Triple &TargetTriple, IRBuilder<> &IRB); Value *getAndroidSlotPtr(IRBuilder<> &IRB, int Slot); void annotateDebugRecords(AllocaInfo &Info, unsigned int Tag); +Value *incrementThreadLong(IRBuilder<> &IRB, Value *ThreadLong, + unsigned int Inc); } // namespace memtag } // namespace llvm diff --git a/llvm/lib/Target/AArch64/AArch64StackTagging.cpp b/llvm/lib/Target/AArch64/AArch64StackTagging.cpp index 7652758284f4b0..e62437c28b863f 100644 --- a/llvm/lib/Target/AArch64/AArch64StackTagging.cpp +++ b/llvm/lib/Target/AArch64/AArch64StackTagging.cpp @@ -506,19 +506,8 @@ Instruction *AArch64StackTagging::insertBaseTaggedPointer( Value *RecordPtr = IRB.CreateIntToPtr(ThreadLong, IRB.getPtrTy(0)); IRB.CreateStore(PC, RecordPtr); IRB.CreateStore(TaggedFP, IRB.CreateConstGEP1_64(IntptrTy, RecordPtr, 1)); - // Update the ring buffer. Top byte of ThreadLong defines the size of the - // buffer in pages, it must be a power of two, and the start of the buffer - // must be aligned by twice that much. Therefore wrap around of the ring - // buffer is simply Addr &= ~((ThreadLong >> 56) << 12). - // The use of AShr instead of LShr is due to - // https://bugs.llvm.org/show_bug.cgi?id=39030 - // Runtime library makes sure not to use the highest bit. - Value *WrapMask = IRB.CreateXor( - IRB.CreateShl(IRB.CreateAShr(ThreadLong, 56), 12, "", true, true), - ConstantInt::get(IntptrTy, (uint64_t)-1)); - Value *ThreadLongNew = IRB.CreateAnd( - IRB.CreateAdd(ThreadLong, ConstantInt::get(IntptrTy, 16)), WrapMask); - IRB.CreateStore(ThreadLongNew, SlotPtr); + + IRB.CreateStore(memtag::incrementThreadLong(IRB, ThreadLong, 16), SlotPtr); } return Base; } diff --git a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp index 669b63343e994e..cc7f20cffea771 100644 --- a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp @@ -1421,35 +1421,7 @@ void HWAddressSanitizer::emitPrologue(IRBuilder<> &IRB, bool WithFrameRecord) { IRB.CreateIntToPtr(ThreadLongMaybeUntagged, IRB.getPtrTy(0)); IRB.CreateStore(FrameRecordInfo, RecordPtr); - // Update the ring buffer. Top byte of ThreadLong defines the size of the - // buffer in pages, it must be a power of two, and the start of the buffer - // must be aligned by twice that much. Therefore wrap around of the ring - // buffer is simply Addr &= ~((ThreadLong >> 56) << 12). - // The use of AShr instead of LShr is due to - // https://bugs.llvm.org/show_bug.cgi?id=39030 - // Runtime library makes sure not to use the highest bit. - // - // Mechanical proof of this address calculation can be found at: - // https://github.com/google/sanitizers/blob/master/hwaddress-sanitizer/prove_hwasanwrap.smt2 - // - // Example of the wrap case for N = 1 - // Pointer: 0x01AAAAAAAAAAAFF8 - // + - // 0x0000000000000008 - // = - // 0x01AAAAAAAAAAB000 - // & - // WrapMask: 0xFFFFFFFFFFFFF000 - // = - // 0x01AAAAAAAAAAA000 - // - // Then the WrapMask will be a no-op until the next wrap case. - Value *WrapMask = IRB.CreateXor( - IRB.CreateShl(IRB.CreateAShr(ThreadLong, 56), 12, "", true, true), - ConstantInt::get(IntptrTy, (uint64_t)-1)); - Value *ThreadLongNew = IRB.CreateAnd( - IRB.CreateAdd(ThreadLong, ConstantInt::get(IntptrTy, 8)), WrapMask); - IRB.CreateStore(ThreadLongNew, SlotPtr); + IRB.CreateStore(memtag::incrementThreadLong(IRB, ThreadLong, 8), SlotPtr); break; } case none: { diff --git a/llvm/lib/Transforms/Utils/MemoryTaggingSupport.cpp b/llvm/lib/Transforms/Utils/MemoryTaggingSupport.cpp index c5d22fbcc4e639..1cb1a7b396badc 100644 --- a/llvm/lib/Transforms/Utils/MemoryTaggingSupport.cpp +++ b/llvm/lib/Transforms/Utils/MemoryTaggingSupport.cpp @@ -338,5 +338,39 @@ void annotateDebugRecords(AllocaInfo &Info, unsigned int Tag) { llvm::for_each(Info.DbgVariableRecords, AnnotateDbgRecord); } +Value *incrementThreadLong(IRBuilder<> &IRB, Value *ThreadLong, + unsigned int Inc) { + // Update the ring buffer. Top byte of ThreadLong defines the size of the + // buffer in pages, it must be a power of two, and the start of the buffer + // must be aligned by twice that much. Therefore wrap around of the ring + // buffer is simply Addr &= ~((ThreadLong >> 56) << 12). + // The use of AShr instead of LShr is due to + // https://bugs.llvm.org/show_bug.cgi?id=39030 + // Runtime library makes sure not to use the highest bit. + // + // Mechanical proof of this address calculation can be found at: + // https://github.com/google/sanitizers/blob/master/hwaddress-sanitizer/prove_hwasanwrap.smt2 + // + // Example of the wrap case for N = 1 + // Pointer: 0x01AAAAAAAAAAAFF8 + // + + // 0x0000000000000008 + // = + // 0x01AAAAAAAAAAB000 + // & + // WrapMask: 0xFFFFFFFFFFFFF000 + // = + // 0x01AAAAAAAAAAA000 + // + // Then the WrapMask will be a no-op until the next wrap case. + assert((4096 % Inc) == 0); + Value *WrapMask = IRB.CreateXor( + IRB.CreateShl(IRB.CreateAShr(ThreadLong, 56), 12, "", true, true), + ConstantInt::get(ThreadLong->getType(), (uint64_t)-1)); + return IRB.CreateAnd( + IRB.CreateAdd(ThreadLong, ConstantInt::get(ThreadLong->getType(), Inc)), + WrapMask); +} + } // namespace memtag } // namespace llvm From 1a193137e3125c3abb107dd4e526163e0851253a Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Tue, 8 Oct 2024 18:00:45 -0500 Subject: [PATCH 007/129] [RISC-V][HWASAN] Fix incorrect comments (#103728) These comments were confusing because they do not match the code. --- llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp b/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp index 69ab49de1dacad..52d0a70d335e97 100644 --- a/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp +++ b/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp @@ -679,12 +679,12 @@ void RISCVAsmPrinter::EmitHwasanMemaccessSymbols(Module &M) { OutStreamer->emitInstruction( MCInstBuilder(RISCV::LBU).addReg(RISCV::X6).addReg(RISCV::X6).addImm(0), MCSTI); - // Extract tag from X5 and compare it with loaded tag from shadow + // Extract tag from pointer and compare it with loaded tag from shadow OutStreamer->emitInstruction( MCInstBuilder(RISCV::SRLI).addReg(RISCV::X7).addReg(Reg).addImm(56), MCSTI); MCSymbol *HandleMismatchOrPartialSym = OutContext.createTempSymbol(); - // X7 contains tag from memory, while X6 contains tag from the pointer + // X7 contains tag from the pointer, while X6 contains tag from memory OutStreamer->emitInstruction( MCInstBuilder(RISCV::BNE) .addReg(RISCV::X7) From 4cab01f07262e0347cf08b061eef9a89957151ce Mon Sep 17 00:00:00 2001 From: ShatianWang <38512325+ShatianWang@users.noreply.github.com> Date: Tue, 8 Oct 2024 19:07:43 -0400 Subject: [PATCH 008/129] [BOLT] Profile quality stats -- CFG discontinuity (#109683) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In a perfect profile, each positive-execution-count block in the function’s CFG should be reachable from a positive-execution-count function entry block through a positive-execution-count path. This new pass checks how well the BOLT input profile satisfies this “CFG continuity” property. More specifically, for each of the hottest 1000 functions, the pass calculates the function’s fraction of basic block execution counts that is “unreachable”. It then reports the 95th percentile of the distribution of the 1000 unreachable fractions in a single BOLT-INFO line. The smaller the reported value is, the better the BOLT profile satisfies the CFG continuity property. The default value of 1000 above can be changed via the hidden BOLT option `-num-functions-for-continuity-check=[N]`. If more detailed stats are needed, `-v=1` can be added to the BOLT invocation: the hottest N functions will be grouped into 5 equally-sized buckets, from the hottest to the coldest; for each bucket, various summary statistics of the distribution of the fractions and the raw unreachable execution counts will be reported. --- bolt/include/bolt/Passes/ContinuityStats.h | 61 +++++ bolt/lib/Passes/CMakeLists.txt | 1 + bolt/lib/Passes/ContinuityStats.cpp | 250 ++++++++++++++++++ bolt/lib/Rewrite/BinaryPassManager.cpp | 3 + .../test/X86/cfg-discontinuity-reporting.test | 4 + 5 files changed, 319 insertions(+) create mode 100644 bolt/include/bolt/Passes/ContinuityStats.h create mode 100644 bolt/lib/Passes/ContinuityStats.cpp create mode 100644 bolt/test/X86/cfg-discontinuity-reporting.test diff --git a/bolt/include/bolt/Passes/ContinuityStats.h b/bolt/include/bolt/Passes/ContinuityStats.h new file mode 100644 index 00000000000000..bd4d491ad4a55b --- /dev/null +++ b/bolt/include/bolt/Passes/ContinuityStats.h @@ -0,0 +1,61 @@ +//===- bolt/Passes/ContinuityStats.h ----------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This pass checks how well the BOLT input profile satisfies the following +// "CFG continuity" property of a perfect profile: +// +// Each positive-execution-count block in the function’s CFG +// should be *reachable* from a positive-execution-count function +// entry block through a positive-execution-count path. +// +// More specifically, for each of the hottest 1000 functions, the pass +// calculates the function’s fraction of basic block execution counts +// that is *unreachable*. It then reports the 95th percentile of the +// distribution of the 1000 unreachable fractions in a single BOLT-INFO line. +// The smaller the reported value is, the better the BOLT profile +// satisfies the CFG continuity property. + +// The default value of 1000 above can be changed via the hidden BOLT option +// `-num-functions-for-continuity-check=[N]`. +// If more detailed stats are needed, `-v=1` can be used: the hottest N +// functions will be grouped into 5 equally-sized buckets, from the hottest +// to the coldest; for each bucket, various summary statistics of the +// distribution of the unreachable fractions and the raw unreachable execution +// counts will be reported. +// +//===----------------------------------------------------------------------===// + +#ifndef BOLT_PASSES_CONTINUITYSTATS_H +#define BOLT_PASSES_CONTINUITYSTATS_H + +#include "bolt/Passes/BinaryPasses.h" +#include + +namespace llvm { + +class raw_ostream; + +namespace bolt { +class BinaryContext; + +/// Compute and report to the user the function CFG continuity quality +class PrintContinuityStats : public BinaryFunctionPass { +public: + explicit PrintContinuityStats(const cl::opt &PrintPass) + : BinaryFunctionPass(PrintPass) {} + + bool shouldOptimize(const BinaryFunction &BF) const override; + const char *getName() const override { return "continuity-stats"; } + bool shouldPrint(const BinaryFunction &) const override { return false; } + Error runOnFunctions(BinaryContext &BC) override; +}; + +} // namespace bolt +} // namespace llvm + +#endif // BOLT_PASSES_CONTINUITYSTATS_H diff --git a/bolt/lib/Passes/CMakeLists.txt b/bolt/lib/Passes/CMakeLists.txt index 407d8b03f73977..1c1273b3d2420d 100644 --- a/bolt/lib/Passes/CMakeLists.txt +++ b/bolt/lib/Passes/CMakeLists.txt @@ -26,6 +26,7 @@ add_llvm_library(LLVMBOLTPasses PatchEntries.cpp PettisAndHansen.cpp PLTCall.cpp + ContinuityStats.cpp RegAnalysis.cpp RegReAssign.cpp ReorderAlgorithm.cpp diff --git a/bolt/lib/Passes/ContinuityStats.cpp b/bolt/lib/Passes/ContinuityStats.cpp new file mode 100644 index 00000000000000..b32365b59065dc --- /dev/null +++ b/bolt/lib/Passes/ContinuityStats.cpp @@ -0,0 +1,250 @@ +//===- bolt/Passes/ContinuityStats.cpp --------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file implements the continuity stats calculation pass. +// +//===----------------------------------------------------------------------===// + +#include "bolt/Passes/ContinuityStats.h" +#include "bolt/Core/BinaryBasicBlock.h" +#include "bolt/Core/BinaryFunction.h" +#include "bolt/Utils/CommandLineOpts.h" +#include "llvm/Support/CommandLine.h" +#include +#include +#include + +#define DEBUG_TYPE "bolt-opts" + +using namespace llvm; +using namespace bolt; + +namespace opts { +extern cl::opt Verbosity; +cl::opt NumFunctionsForContinuityCheck( + "num-functions-for-continuity-check", + cl::desc("number of hottest functions to print aggregated " + "CFG discontinuity stats of."), + cl::init(1000), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); +} // namespace opts + +namespace { +using FunctionListType = std::vector; +using function_iterator = FunctionListType::iterator; + +template +void printDistribution(raw_ostream &OS, std::vector &values, + bool Fraction = false) { + if (values.empty()) + return; + // Sort values from largest to smallest and print the MAX, TOP 1%, 5%, 10%, + // 20%, 50%, 80%, MIN. If Fraction is true, then values are printed as + // fractions instead of integers. + std::sort(values.begin(), values.end()); + + auto printLine = [&](std::string Text, double Percent) { + int Rank = int(values.size() * (1.0 - Percent / 100)); + if (Percent == 0) + Rank = values.size() - 1; + if (Fraction) + OS << " " << Text << std::string(9 - Text.length(), ' ') << ": " + << format("%.2lf%%", values[Rank] * 100) << "\n"; + else + OS << " " << Text << std::string(9 - Text.length(), ' ') << ": " + << values[Rank] << "\n"; + }; + + printLine("MAX", 0); + const int percentages[] = {1, 5, 10, 20, 50, 80}; + for (size_t i = 0; i < sizeof(percentages) / sizeof(percentages[0]); ++i) { + printLine("TOP " + std::to_string(percentages[i]) + "%", percentages[i]); + } + printLine("MIN", 100); +} + +void printCFGContinuityStats(raw_ostream &OS, + iterator_range &Functions) { + // Given a perfect profile, every positive-execution-count BB should be + // connected to an entry of the function through a positive-execution-count + // directed path in the control flow graph. + std::vector NumUnreachables; + std::vector SumECUnreachables; + std::vector FractionECUnreachables; + + for (auto it = Functions.begin(); it != Functions.end(); ++it) { + const BinaryFunction *Function = *it; + if (Function->size() <= 1) + continue; + + // Compute the sum of all BB execution counts (ECs). + size_t NumPosECBBs = 0; + size_t SumAllBBEC = 0; + for (const BinaryBasicBlock &BB : *Function) { + const size_t BBEC = BB.getKnownExecutionCount(); + NumPosECBBs += BBEC > 0 ? 1 : 0; + SumAllBBEC += BBEC; + } + + // Perform BFS on subgraph of CFG induced by positive weight edges. + // Compute the number of BBs reachable from the entry(s) of the function and + // the sum of their execution counts (ECs). + std::unordered_map IndexToBB; + std::unordered_set Visited; + std::queue Queue; + for (const BinaryBasicBlock &BB : *Function) { + // Make sure BB.getIndex() is not already in IndexToBB. + assert(IndexToBB.find(BB.getIndex()) == IndexToBB.end()); + IndexToBB[BB.getIndex()] = &BB; + if (BB.isEntryPoint() && BB.getKnownExecutionCount() > 0) { + Queue.push(BB.getIndex()); + Visited.insert(BB.getIndex()); + } + } + while (!Queue.empty()) { + const unsigned BBIndex = Queue.front(); + const BinaryBasicBlock *BB = IndexToBB[BBIndex]; + Queue.pop(); + auto SuccBIIter = BB->branch_info_begin(); + for (const BinaryBasicBlock *Succ : BB->successors()) { + const uint64_t Count = SuccBIIter->Count; + if (Count == BinaryBasicBlock::COUNT_NO_PROFILE || Count == 0) { + ++SuccBIIter; + continue; + } + if (!Visited.insert(Succ->getIndex()).second) { + ++SuccBIIter; + continue; + } + Queue.push(Succ->getIndex()); + ++SuccBIIter; + } + } + + const size_t NumReachableBBs = Visited.size(); + + // Loop through Visited, and sum the corresponding BBs' execution counts + // (ECs). + size_t SumReachableBBEC = 0; + for (const unsigned BBIndex : Visited) { + const BinaryBasicBlock *BB = IndexToBB[BBIndex]; + SumReachableBBEC += BB->getKnownExecutionCount(); + } + + const size_t NumPosECBBsUnreachableFromEntry = + NumPosECBBs - NumReachableBBs; + const size_t SumUnreachableBBEC = SumAllBBEC - SumReachableBBEC; + const double FractionECUnreachable = + (double)SumUnreachableBBEC / SumAllBBEC; + + if (opts::Verbosity >= 2 && FractionECUnreachable >= 0.05) { + OS << "Non-trivial CFG discontinuity observed in function " + << Function->getPrintName() << "\n"; + LLVM_DEBUG(Function->dump()); + } + + NumUnreachables.push_back(NumPosECBBsUnreachableFromEntry); + SumECUnreachables.push_back(SumUnreachableBBEC); + FractionECUnreachables.push_back(FractionECUnreachable); + } + + if (FractionECUnreachables.empty()) + return; + + std::sort(FractionECUnreachables.begin(), FractionECUnreachables.end()); + const int Rank = int(FractionECUnreachables.size() * 0.95); + OS << format("top 5%% function CFG discontinuity is %.2lf%%\n", + FractionECUnreachables[Rank] * 100); + + if (opts::Verbosity >= 1) { + OS << "abbreviations: EC = execution count, POS BBs = positive EC BBs\n" + << "distribution of NUM(unreachable POS BBs) among all focal " + "functions\n"; + printDistribution(OS, NumUnreachables); + + OS << "distribution of SUM_EC(unreachable POS BBs) among all focal " + "functions\n"; + printDistribution(OS, SumECUnreachables); + + OS << "distribution of [(SUM_EC(unreachable POS BBs) / SUM_EC(all " + "POS BBs))] among all focal functions\n"; + printDistribution(OS, FractionECUnreachables, /*Fraction=*/true); + } +} + +void printAll(BinaryContext &BC, FunctionListType &ValidFunctions, + size_t NumTopFunctions) { + // Sort the list of functions by execution counts (reverse). + llvm::sort(ValidFunctions, + [&](const BinaryFunction *A, const BinaryFunction *B) { + return A->getKnownExecutionCount() > B->getKnownExecutionCount(); + }); + + const size_t RealNumTopFunctions = + std::min(NumTopFunctions, ValidFunctions.size()); + + iterator_range Functions( + ValidFunctions.begin(), ValidFunctions.begin() + RealNumTopFunctions); + + BC.outs() << format("BOLT-INFO: among the hottest %zu functions ", + RealNumTopFunctions); + printCFGContinuityStats(BC.outs(), Functions); + + // Print more detailed bucketed stats if requested. + if (opts::Verbosity >= 1 && RealNumTopFunctions >= 5) { + const size_t PerBucketSize = RealNumTopFunctions / 5; + BC.outs() << format( + "Detailed stats for 5 buckets, each with %zu functions:\n", + PerBucketSize); + + // For each bucket, print the CFG continuity stats of the functions in the + // bucket. + for (size_t BucketIndex = 0; BucketIndex < 5; ++BucketIndex) { + const size_t StartIndex = BucketIndex * PerBucketSize; + const size_t EndIndex = StartIndex + PerBucketSize; + iterator_range Functions( + ValidFunctions.begin() + StartIndex, + ValidFunctions.begin() + EndIndex); + const size_t MaxFunctionExecutionCount = + ValidFunctions[StartIndex]->getKnownExecutionCount(); + const size_t MinFunctionExecutionCount = + ValidFunctions[EndIndex - 1]->getKnownExecutionCount(); + BC.outs() << format("----------------\n| Bucket %zu: " + "|\n----------------\n", + BucketIndex + 1) + << format( + "execution counts of the %zu functions in the bucket: " + "%zu-%zu\n", + EndIndex - StartIndex, MinFunctionExecutionCount, + MaxFunctionExecutionCount); + printCFGContinuityStats(BC.outs(), Functions); + } + } +} +} // namespace + +bool PrintContinuityStats::shouldOptimize(const BinaryFunction &BF) const { + if (BF.empty() || !BF.hasValidProfile()) + return false; + + return BinaryFunctionPass::shouldOptimize(BF); +} + +Error PrintContinuityStats::runOnFunctions(BinaryContext &BC) { + // Create a list of functions with valid profiles. + FunctionListType ValidFunctions; + for (const auto &BFI : BC.getBinaryFunctions()) { + const BinaryFunction *Function = &BFI.second; + if (PrintContinuityStats::shouldOptimize(*Function)) + ValidFunctions.push_back(Function); + } + if (ValidFunctions.empty() || opts::NumFunctionsForContinuityCheck == 0) + return Error::success(); + + printAll(BC, ValidFunctions, opts::NumFunctionsForContinuityCheck); + return Error::success(); +} diff --git a/bolt/lib/Rewrite/BinaryPassManager.cpp b/bolt/lib/Rewrite/BinaryPassManager.cpp index 5dfef0b71cc79f..b0906041833484 100644 --- a/bolt/lib/Rewrite/BinaryPassManager.cpp +++ b/bolt/lib/Rewrite/BinaryPassManager.cpp @@ -12,6 +12,7 @@ #include "bolt/Passes/AllocCombiner.h" #include "bolt/Passes/AsmDump.h" #include "bolt/Passes/CMOVConversion.h" +#include "bolt/Passes/ContinuityStats.h" #include "bolt/Passes/FixRISCVCallsPass.h" #include "bolt/Passes/FixRelaxationPass.h" #include "bolt/Passes/FrameOptimizer.h" @@ -373,6 +374,8 @@ Error BinaryFunctionPassManager::runAllPasses(BinaryContext &BC) { if (opts::PrintProfileStats) Manager.registerPass(std::make_unique(NeverPrint)); + Manager.registerPass(std::make_unique(NeverPrint)); + Manager.registerPass(std::make_unique(NeverPrint)); Manager.registerPass(std::make_unique(NeverPrint)); diff --git a/bolt/test/X86/cfg-discontinuity-reporting.test b/bolt/test/X86/cfg-discontinuity-reporting.test new file mode 100644 index 00000000000000..4d7d3305cdb751 --- /dev/null +++ b/bolt/test/X86/cfg-discontinuity-reporting.test @@ -0,0 +1,4 @@ +## Check profile discontinuity reporting +RUN: yaml2obj %p/Inputs/blarge_new.yaml &> %t.exe +RUN: llvm-bolt %t.exe -o %t.out --pa -p %p/Inputs/blarge_new.preagg.txt | FileCheck %s +CHECK: among the hottest 5 functions top 5% function CFG discontinuity is 100.00% From a85eb345603b9588ecf0e0c782d2c599580acc58 Mon Sep 17 00:00:00 2001 From: LLVM GN Syncbot Date: Tue, 8 Oct 2024 23:09:02 +0000 Subject: [PATCH 009/129] [gn build] Port 4cab01f07262 --- llvm/utils/gn/secondary/bolt/lib/Passes/BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm/utils/gn/secondary/bolt/lib/Passes/BUILD.gn b/llvm/utils/gn/secondary/bolt/lib/Passes/BUILD.gn index 620c9e8927faaf..3aa2c58f3038de 100644 --- a/llvm/utils/gn/secondary/bolt/lib/Passes/BUILD.gn +++ b/llvm/utils/gn/secondary/bolt/lib/Passes/BUILD.gn @@ -19,6 +19,7 @@ static_library("Passes") { "BinaryPasses.cpp", "CMOVConversion.cpp", "CacheMetrics.cpp", + "ContinuityStats.cpp", "DataflowAnalysis.cpp", "DataflowInfoManager.cpp", "FixRISCVCallsPass.cpp", From 0e86e5214c7ba4fbf99b632b080db82716fd9db0 Mon Sep 17 00:00:00 2001 From: Maksim Panchenko Date: Tue, 8 Oct 2024 16:15:00 -0700 Subject: [PATCH 010/129] [BOLT][AArch64] Reduce the number of ADR relaxations (#111577) If ADR instruction references the same function, we can skip relaxation even if the function is split but ADR is in the main fragment. --- bolt/lib/Passes/ADRRelaxationPass.cpp | 7 ++-- bolt/test/AArch64/adr-relaxation.s | 49 +++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 bolt/test/AArch64/adr-relaxation.s diff --git a/bolt/lib/Passes/ADRRelaxationPass.cpp b/bolt/lib/Passes/ADRRelaxationPass.cpp index 256034a841c706..52811edcb82731 100644 --- a/bolt/lib/Passes/ADRRelaxationPass.cpp +++ b/bolt/lib/Passes/ADRRelaxationPass.cpp @@ -56,13 +56,14 @@ void ADRRelaxationPass::runOnFunction(BinaryFunction &BF) { continue; } - // Don't relax adr if it points to the same function and it is not split - // and BF initial size is < 1MB. + // Don't relax ADR if it points to the same function and is in the main + // fragment and BF initial size is < 1MB. const unsigned OneMB = 0x100000; if (BF.getSize() < OneMB) { BinaryFunction *TargetBF = BC.getFunctionForSymbol(Symbol); - if (TargetBF == &BF && !BF.isSplit()) + if (TargetBF == &BF && !BB.isSplit()) continue; + // No relaxation needed if ADR references a basic block in the same // fragment. if (BinaryBasicBlock *TargetBB = BF.getBasicBlockForLabel(Symbol)) diff --git a/bolt/test/AArch64/adr-relaxation.s b/bolt/test/AArch64/adr-relaxation.s new file mode 100644 index 00000000000000..0aa3c71f29aaab --- /dev/null +++ b/bolt/test/AArch64/adr-relaxation.s @@ -0,0 +1,49 @@ +## Check that llvm-bolt will not unnecessarily relax ADR instruction. + +# RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown %s -o %t.o +# RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -static +# RUN: llvm-bolt %t.exe -o %t.bolt --split-functions --split-strategy=random2 +# RUN: llvm-objdump -d --disassemble-symbols=_start %t.bolt | FileCheck %s +# RUN: llvm-objdump -d --disassemble-symbols=foo.cold.0 %t.bolt \ +# RUN: | FileCheck --check-prefix=CHECK-FOO %s + +## ADR below references its containing function that is split. But ADR is always +## in the main fragment, thus there is no need to relax it. + .text + .globl _start + .type _start, %function +_start: +# CHECK: <_start>: + .cfi_startproc + adr x1, _start +# CHECK-NOT: adrp +# CHECK: adr + cmp x1, x11 + b.hi .L1 + mov x0, #0x0 +.L1: + ret x30 + .cfi_endproc +.size _start, .-_start + + +## In foo, ADR is in the split fragment but references the main one. Thus, it +## needs to be relaxed into ADRP + ADD. + .globl foo + .type foo, %function +foo: + .cfi_startproc + cmp x1, x11 + b.hi .L2 + mov x0, #0x0 +.L2: +# CHECK-FOO: : + adr x1, foo +# CHECK-FOO: adrp +# CHECK-FOO-NEXT: add + ret x30 + .cfi_endproc +.size foo, .-foo + +## Force relocation mode. + .reloc 0, R_AARCH64_NONE From 04a8bffdf7b1d6e30616561de1734373375cfef5 Mon Sep 17 00:00:00 2001 From: vporpo Date: Tue, 8 Oct 2024 16:18:57 -0700 Subject: [PATCH 011/129] [SandboxVec][DAG] Build actual dependencies (#111094) This patch implements actual dependencies checking using BatchAA. This adds memory dep edges between MemDGNodes. --- llvm/include/llvm/SandboxIR/Utils.h | 8 + .../SandboxVectorizer/DependencyGraph.h | 42 ++- .../Vectorize/SandboxVectorizer/Interval.h | 12 +- .../SandboxVectorizer/DependencyGraph.cpp | 133 +++++++- .../SandboxVectorizer/DependencyGraphTest.cpp | 314 +++++++++++++++++- 5 files changed, 485 insertions(+), 24 deletions(-) diff --git a/llvm/include/llvm/SandboxIR/Utils.h b/llvm/include/llvm/SandboxIR/Utils.h index e4156c6af9a220..4ff4509b7086c5 100644 --- a/llvm/include/llvm/SandboxIR/Utils.h +++ b/llvm/include/llvm/SandboxIR/Utils.h @@ -12,6 +12,7 @@ #ifndef LLVM_SANDBOXIR_UTILS_H #define LLVM_SANDBOXIR_UTILS_H +#include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Analysis/LoopAccessAnalysis.h" #include "llvm/Analysis/MemoryLocation.h" #include "llvm/Analysis/ScalarEvolution.h" @@ -99,6 +100,13 @@ class Utils { return false; return *Diff > 0; } + + /// Equivalent to BatchAA::getModRefInfo(). + static ModRefInfo + aliasAnalysisGetModRefInfo(BatchAAResults &BatchAA, const Instruction *I, + const std::optional &OptLoc) { + return BatchAA.getModRefInfo(cast(I->Val), OptLoc); + } }; } // namespace llvm::sandboxir diff --git a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h index 7bc920537faf41..ab49c3aa27143c 100644 --- a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h +++ b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h @@ -24,6 +24,7 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/iterator_range.h" +#include "llvm/Analysis/AliasAnalysis.h" #include "llvm/SandboxIR/Instruction.h" #include "llvm/SandboxIR/IntrinsicInst.h" #include "llvm/Transforms/Vectorize/SandboxVectorizer/Interval.h" @@ -47,6 +48,7 @@ class DGNode { // TODO: Use a PointerIntPair for SubclassID and I. /// For isa/dyn_cast etc. DGNodeID SubclassID; + // TODO: Move MemPreds to MemDGNode. /// Memory predecessors. DenseSet MemPreds; @@ -86,13 +88,20 @@ class DGNode { (!(II = dyn_cast(I)) || isMemIntrinsic(II)); } + /// \Returns true if \p I is fence like. It excludes non-mem intrinsics. + static bool isFenceLike(Instruction *I) { + IntrinsicInst *II; + return I->isFenceLike() && + (!(II = dyn_cast(I)) || isMemIntrinsic(II)); + } + /// \Returns true if \p I is a memory dependency candidate instruction. static bool isMemDepNodeCandidate(Instruction *I) { AllocaInst *Alloca; return isMemDepCandidate(I) || ((Alloca = dyn_cast(I)) && Alloca->isUsedWithInAlloca()) || - isStackSaveOrRestoreIntrinsic(I); + isStackSaveOrRestoreIntrinsic(I) || isFenceLike(I); } Instruction *getInstruction() const { return I; } @@ -159,8 +168,37 @@ class DependencyGraph { /// The DAG spans across all instructions in this interval. Interval DAGInterval; + std::unique_ptr BatchAA; + + enum class DependencyType { + RAW, ///> Read After Write + WAW, ///> Write After Write + RAR, ///> Read After Read + WAR, ///> Write After Read + CTRL, ///> Control-related dependencies, like with PHIs/Terminators + OTHER, ///> Currently used for stack related instrs + NONE, ///> No memory/other dependency + }; + /// \Returns the dependency type depending on whether instructions may + /// read/write memory or whether they are some specific opcode-related + /// restrictions. + /// Note: It does not check whether a memory dependency is actually correct, + /// as it won't call AA. Therefore it returns the worst-case dep type. + static DependencyType getRoughDepType(Instruction *FromI, Instruction *ToI); + + // TODO: Implement AABudget. + /// \Returns true if there is a memory/other dependency \p SrcI->DstI. + bool alias(Instruction *SrcI, Instruction *DstI, DependencyType DepType); + + bool hasDep(sandboxir::Instruction *SrcI, sandboxir::Instruction *DstI); + + /// Go through all mem nodes in \p SrcScanRange and try to add dependencies to + /// \p DstN. + void scanAndAddDeps(DGNode &DstN, const Interval &SrcScanRange); + public: - DependencyGraph() {} + DependencyGraph(AAResults &AA) + : BatchAA(std::make_unique(AA)) {} DGNode *getNode(Instruction *I) const { auto It = InstrToNodeMap.find(I); diff --git a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Interval.h b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Interval.h index b05294d70a3e0c..e0c581f1d50b40 100644 --- a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Interval.h +++ b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Interval.h @@ -58,7 +58,7 @@ template class IntervalIterator { } IntervalIterator &operator--() { // `I` is nullptr for end() when To is the BB terminator. - I = I != nullptr ? I->getPrevNode() : R.To; + I = I != nullptr ? I->getPrevNode() : R.bottom(); return *this; } IntervalIterator operator--(int) { @@ -110,14 +110,16 @@ template class Interval { T *bottom() const { return To; } using iterator = IntervalIterator; - using const_iterator = IntervalIterator; iterator begin() { return iterator(From, *this); } iterator end() { return iterator(To != nullptr ? To->getNextNode() : nullptr, *this); } - const_iterator begin() const { return const_iterator(From, *this); } - const_iterator end() const { - return const_iterator(To != nullptr ? To->getNextNode() : nullptr, *this); + iterator begin() const { + return iterator(From, const_cast(*this)); + } + iterator end() const { + return iterator(To != nullptr ? To->getNextNode() : nullptr, + const_cast(*this)); } /// Equality. bool operator==(const Interval &Other) const { diff --git a/llvm/lib/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.cpp b/llvm/lib/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.cpp index 10da07c24940dd..845fadefc9bf03 100644 --- a/llvm/lib/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.cpp +++ b/llvm/lib/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.cpp @@ -8,8 +8,9 @@ #include "llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h" #include "llvm/ADT/ArrayRef.h" +#include "llvm/SandboxIR/Utils.h" -using namespace llvm::sandboxir; +namespace llvm::sandboxir { #ifndef NDEBUG void DGNode::print(raw_ostream &OS, bool PrintDeps) const { @@ -50,19 +51,119 @@ MemDGNodeIntervalBuilder::make(const Interval &Instrs, cast(DAG.getNode(MemBotI))); } +DependencyGraph::DependencyType +DependencyGraph::getRoughDepType(Instruction *FromI, Instruction *ToI) { + // TODO: Perhaps compile-time improvement by skipping if neither is mem? + if (FromI->mayWriteToMemory()) { + if (ToI->mayReadFromMemory()) + return DependencyType::RAW; + if (ToI->mayWriteToMemory()) + return DependencyType::WAW; + } else if (FromI->mayReadFromMemory()) { + if (ToI->mayWriteToMemory()) + return DependencyType::WAR; + if (ToI->mayReadFromMemory()) + return DependencyType::RAR; + } + if (isa(FromI) || isa(ToI)) + return DependencyType::CTRL; + if (ToI->isTerminator()) + return DependencyType::CTRL; + if (DGNode::isStackSaveOrRestoreIntrinsic(FromI) || + DGNode::isStackSaveOrRestoreIntrinsic(ToI)) + return DependencyType::OTHER; + return DependencyType::NONE; +} + +static bool isOrdered(Instruction *I) { + auto IsOrdered = [](Instruction *I) { + if (auto *LI = dyn_cast(I)) + return !LI->isUnordered(); + if (auto *SI = dyn_cast(I)) + return !SI->isUnordered(); + if (DGNode::isFenceLike(I)) + return true; + return false; + }; + bool Is = IsOrdered(I); + assert((!Is || DGNode::isMemDepCandidate(I)) && + "An ordered instruction must be a MemDepCandidate!"); + return Is; +} + +bool DependencyGraph::alias(Instruction *SrcI, Instruction *DstI, + DependencyType DepType) { + std::optional DstLocOpt = + Utils::memoryLocationGetOrNone(DstI); + if (!DstLocOpt) + return true; + // Check aliasing. + assert((SrcI->mayReadFromMemory() || SrcI->mayWriteToMemory()) && + "Expected a mem instr"); + // TODO: Check AABudget + ModRefInfo SrcModRef = + isOrdered(SrcI) + ? ModRefInfo::Mod + : Utils::aliasAnalysisGetModRefInfo(*BatchAA, SrcI, *DstLocOpt); + switch (DepType) { + case DependencyType::RAW: + case DependencyType::WAW: + return isModSet(SrcModRef); + case DependencyType::WAR: + return isRefSet(SrcModRef); + default: + llvm_unreachable("Expected only RAW, WAW and WAR!"); + } +} + +bool DependencyGraph::hasDep(Instruction *SrcI, Instruction *DstI) { + DependencyType RoughDepType = getRoughDepType(SrcI, DstI); + switch (RoughDepType) { + case DependencyType::RAR: + return false; + case DependencyType::RAW: + case DependencyType::WAW: + case DependencyType::WAR: + return alias(SrcI, DstI, RoughDepType); + case DependencyType::CTRL: + // Adding actual dep edges from PHIs/to terminator would just create too + // many edges, which would be bad for compile-time. + // So we ignore them in the DAG formation but handle them in the + // scheduler, while sorting the ready list. + return false; + case DependencyType::OTHER: + return true; + case DependencyType::NONE: + return false; + } +} + +void DependencyGraph::scanAndAddDeps(DGNode &DstN, + const Interval &SrcScanRange) { + assert(isa(DstN) && + "DstN is the mem dep destination, so it must be mem"); + Instruction *DstI = DstN.getInstruction(); + // Walk up the instruction chain from ScanRange bottom to top, looking for + // memory instrs that may alias. + for (MemDGNode &SrcN : reverse(SrcScanRange)) { + Instruction *SrcI = SrcN.getInstruction(); + if (hasDep(SrcI, DstI)) + DstN.addMemPred(&SrcN); + } +} + Interval DependencyGraph::extend(ArrayRef Instrs) { if (Instrs.empty()) return {}; - // TODO: For now create a chain of dependencies. - Interval Interval(Instrs); - auto *TopI = Interval.top(); - auto *BotI = Interval.bottom(); - DGNode *LastN = getOrCreateNode(TopI); + + Interval InstrInterval(Instrs); + + DGNode *LastN = getOrCreateNode(InstrInterval.top()); + // Create DGNodes for all instrs in Interval to avoid future Instruction to + // DGNode lookups. MemDGNode *LastMemN = dyn_cast(LastN); - for (Instruction *I = TopI->getNextNode(), *E = BotI->getNextNode(); I != E; - I = I->getNextNode()) { - auto *N = getOrCreateNode(I); - N->addMemPred(LastMemN); + for (Instruction &I : drop_begin(InstrInterval)) { + auto *N = getOrCreateNode(&I); // Build the Mem node chain. if (auto *MemN = dyn_cast(N)) { MemN->setPrevNode(LastMemN); @@ -70,9 +171,15 @@ Interval DependencyGraph::extend(ArrayRef Instrs) { LastMemN->setNextNode(MemN); LastMemN = MemN; } - LastN = N; } - return Interval; + // Create the dependencies. + auto DstRange = MemDGNodeIntervalBuilder::make(InstrInterval, *this); + for (MemDGNode &DstN : drop_begin(DstRange)) { + auto SrcRange = Interval(DstRange.top(), DstN.getPrevNode()); + scanAndAddDeps(DstN, SrcRange); + } + + return InstrInterval; } #ifndef NDEBUG @@ -95,3 +202,5 @@ void DependencyGraph::dump() const { dbgs() << "\n"; } #endif // NDEBUG + +} // namespace llvm::sandboxir diff --git a/llvm/unittests/Transforms/Vectorize/SandboxVectorizer/DependencyGraphTest.cpp b/llvm/unittests/Transforms/Vectorize/SandboxVectorizer/DependencyGraphTest.cpp index fb8d3780684f80..e2f16919a5cddd 100644 --- a/llvm/unittests/Transforms/Vectorize/SandboxVectorizer/DependencyGraphTest.cpp +++ b/llvm/unittests/Transforms/Vectorize/SandboxVectorizer/DependencyGraphTest.cpp @@ -7,7 +7,13 @@ //===----------------------------------------------------------------------===// #include "llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h" +#include "llvm/Analysis/AliasAnalysis.h" +#include "llvm/Analysis/AssumptionCache.h" +#include "llvm/Analysis/BasicAliasAnalysis.h" +#include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/AsmParser/Parser.h" +#include "llvm/IR/DataLayout.h" +#include "llvm/IR/Dominators.h" #include "llvm/SandboxIR/Context.h" #include "llvm/SandboxIR/Function.h" #include "llvm/SandboxIR/Instruction.h" @@ -20,6 +26,10 @@ using namespace llvm; struct DependencyGraphTest : public testing::Test { LLVMContext C; std::unique_ptr M; + std::unique_ptr AC; + std::unique_ptr DT; + std::unique_ptr BAA; + std::unique_ptr AA; void parseIR(LLVMContext &C, const char *IR) { SMDiagnostic Err; @@ -27,6 +37,24 @@ struct DependencyGraphTest : public testing::Test { if (!M) Err.print("DependencyGraphTest", errs()); } + + AAResults &getAA(llvm::Function &LLVMF) { + TargetLibraryInfoImpl TLII; + TargetLibraryInfo TLI(TLII); + AA = std::make_unique(TLI); + AC = std::make_unique(LLVMF); + DT = std::make_unique(LLVMF); + BAA = std::make_unique(M->getDataLayout(), LLVMF, TLI, *AC, + DT.get()); + AA->addAAResult(*BAA); + return *AA; + } + /// \Returns true if there is a dependency: SrcN->DstN. + bool dependency(sandboxir::DGNode *SrcN, sandboxir::DGNode *DstN) { + const auto &Preds = DstN->memPreds(); + auto It = find(Preds, SrcN); + return It != Preds.end(); + } }; TEST_F(DependencyGraphTest, isStackSaveOrRestoreIntrinsic) { @@ -151,6 +179,7 @@ define void @foo(i8 %v1, ptr %ptr) { )IR"); llvm::Function *LLVMF = &*M->getFunction("foo"); sandboxir::Context Ctx(C); + auto *F = Ctx.createFunction(LLVMF); auto *BB = &*F->begin(); auto It = BB->begin(); @@ -165,7 +194,7 @@ define void @foo(i8 %v1, ptr %ptr) { auto *Call = cast(&*It++); auto *Ret = cast(&*It++); - sandboxir::DependencyGraph DAG; + sandboxir::DependencyGraph DAG(getAA(*LLVMF)); DAG.extend({&*BB->begin(), BB->getTerminator()}); EXPECT_TRUE(isa(DAG.getNode(Store))); EXPECT_TRUE(isa(DAG.getNode(Load))); @@ -195,7 +224,7 @@ define void @foo(ptr %ptr, i8 %v0, i8 %v1) { auto *S0 = cast(&*It++); auto *S1 = cast(&*It++); auto *Ret = cast(&*It++); - sandboxir::DependencyGraph DAG; + sandboxir::DependencyGraph DAG(getAA(*LLVMF)); auto Span = DAG.extend({&*BB->begin(), BB->getTerminator()}); // Check extend(). EXPECT_EQ(Span.top(), &*BB->begin()); @@ -214,7 +243,7 @@ define void @foo(ptr %ptr, i8 %v0, i8 %v1) { // Check memPreds(). EXPECT_TRUE(N0->memPreds().empty()); EXPECT_THAT(N1->memPreds(), testing::ElementsAre(N0)); - EXPECT_THAT(N2->memPreds(), testing::ElementsAre(N1)); + EXPECT_TRUE(N2->memPreds().empty()); } TEST_F(DependencyGraphTest, MemDGNode_getPrevNode_getNextNode) { @@ -236,7 +265,7 @@ define void @foo(ptr %ptr, i8 %v0, i8 %v1) { auto *S1 = cast(&*It++); [[maybe_unused]] auto *Ret = cast(&*It++); - sandboxir::DependencyGraph DAG; + sandboxir::DependencyGraph DAG(getAA(*LLVMF)); DAG.extend({&*BB->begin(), BB->getTerminator()}); auto *S0N = cast(DAG.getNode(S0)); @@ -270,7 +299,7 @@ define void @foo(ptr %ptr, i8 %v0, i8 %v1) { auto *S1 = cast(&*It++); auto *Ret = cast(&*It++); - sandboxir::DependencyGraph DAG; + sandboxir::DependencyGraph DAG(getAA(*LLVMF)); DAG.extend({&*BB->begin(), BB->getTerminator()}); auto *S0N = cast(DAG.getNode(S0)); @@ -313,3 +342,278 @@ define void @foo(ptr %ptr, i8 %v0, i8 %v1) { getPtrVec(sandboxir::MemDGNodeIntervalBuilder::make({Add0, Add0}, DAG)), testing::ElementsAre()); } + +TEST_F(DependencyGraphTest, AliasingStores) { + parseIR(C, R"IR( +define void @foo(ptr %ptr, i8 %v0, i8 %v1) { + store i8 %v0, ptr %ptr + store i8 %v1, ptr %ptr + ret void +} +)IR"); + llvm::Function *LLVMF = &*M->getFunction("foo"); + sandboxir::Context Ctx(C); + auto *F = Ctx.createFunction(LLVMF); + auto *BB = &*F->begin(); + sandboxir::DependencyGraph DAG(getAA(*LLVMF)); + DAG.extend({&*BB->begin(), BB->getTerminator()}); + auto It = BB->begin(); + auto *Store0N = DAG.getNode(cast(&*It++)); + auto *Store1N = DAG.getNode(cast(&*It++)); + auto *RetN = DAG.getNode(cast(&*It++)); + EXPECT_TRUE(Store0N->memPreds().empty()); + EXPECT_THAT(Store1N->memPreds(), testing::ElementsAre(Store0N)); + EXPECT_TRUE(RetN->memPreds().empty()); +} + +TEST_F(DependencyGraphTest, NonAliasingStores) { + parseIR(C, R"IR( +define void @foo(ptr noalias %ptr0, ptr noalias %ptr1, i8 %v0, i8 %v1) { + store i8 %v0, ptr %ptr0 + store i8 %v1, ptr %ptr1 + ret void +} +)IR"); + llvm::Function *LLVMF = &*M->getFunction("foo"); + sandboxir::Context Ctx(C); + auto *F = Ctx.createFunction(LLVMF); + auto *BB = &*F->begin(); + sandboxir::DependencyGraph DAG(getAA(*LLVMF)); + DAG.extend({&*BB->begin(), BB->getTerminator()}); + auto It = BB->begin(); + auto *Store0N = DAG.getNode(cast(&*It++)); + auto *Store1N = DAG.getNode(cast(&*It++)); + auto *RetN = DAG.getNode(cast(&*It++)); + // We expect no dependencies because the stores don't alias. + EXPECT_TRUE(Store0N->memPreds().empty()); + EXPECT_TRUE(Store1N->memPreds().empty()); + EXPECT_TRUE(RetN->memPreds().empty()); +} + +TEST_F(DependencyGraphTest, VolatileLoads) { + parseIR(C, R"IR( +define void @foo(ptr noalias %ptr0, ptr noalias %ptr1) { + %ld0 = load volatile i8, ptr %ptr0 + %ld1 = load volatile i8, ptr %ptr1 + ret void +} +)IR"); + llvm::Function *LLVMF = &*M->getFunction("foo"); + sandboxir::Context Ctx(C); + auto *F = Ctx.createFunction(LLVMF); + auto *BB = &*F->begin(); + sandboxir::DependencyGraph DAG(getAA(*LLVMF)); + DAG.extend({&*BB->begin(), BB->getTerminator()}); + auto It = BB->begin(); + auto *Ld0N = DAG.getNode(cast(&*It++)); + auto *Ld1N = DAG.getNode(cast(&*It++)); + auto *RetN = DAG.getNode(cast(&*It++)); + EXPECT_TRUE(Ld0N->memPreds().empty()); + EXPECT_THAT(Ld1N->memPreds(), testing::ElementsAre(Ld0N)); + EXPECT_TRUE(RetN->memPreds().empty()); +} + +TEST_F(DependencyGraphTest, VolatileSotres) { + parseIR(C, R"IR( +define void @foo(ptr noalias %ptr0, ptr noalias %ptr1, i8 %v) { + store volatile i8 %v, ptr %ptr0 + store volatile i8 %v, ptr %ptr1 + ret void +} +)IR"); + llvm::Function *LLVMF = &*M->getFunction("foo"); + sandboxir::Context Ctx(C); + auto *F = Ctx.createFunction(LLVMF); + auto *BB = &*F->begin(); + sandboxir::DependencyGraph DAG(getAA(*LLVMF)); + DAG.extend({&*BB->begin(), BB->getTerminator()}); + auto It = BB->begin(); + auto *Store0N = DAG.getNode(cast(&*It++)); + auto *Store1N = DAG.getNode(cast(&*It++)); + auto *RetN = DAG.getNode(cast(&*It++)); + EXPECT_TRUE(Store0N->memPreds().empty()); + EXPECT_THAT(Store1N->memPreds(), testing::ElementsAre(Store0N)); + EXPECT_TRUE(RetN->memPreds().empty()); +} + +TEST_F(DependencyGraphTest, Call) { + parseIR(C, R"IR( +declare void @bar1() +declare void @bar2() +define void @foo(float %v1, float %v2) { + call void @bar1() + %add = fadd float %v1, %v2 + call void @bar2() + ret void +} +)IR"); + Function *LLVMF = M->getFunction("foo"); + + sandboxir::Context Ctx(C); + auto *F = Ctx.createFunction(LLVMF); + auto *BB = &*F->begin(); + + sandboxir::DependencyGraph DAG(getAA(*LLVMF)); + DAG.extend({&*BB->begin(), BB->getTerminator()->getPrevNode()}); + + auto It = BB->begin(); + auto *Call1N = DAG.getNode(&*It++); + auto *AddN = DAG.getNode(&*It++); + auto *Call2N = DAG.getNode(&*It++); + + EXPECT_THAT(Call1N->memPreds(), testing::ElementsAre()); + EXPECT_THAT(AddN->memPreds(), testing::ElementsAre()); + EXPECT_THAT(Call2N->memPreds(), testing::ElementsAre(Call1N)); +} + +// Check that there is a dependency: stacksave -> alloca -> stackrestore. +TEST_F(DependencyGraphTest, StackSaveRestoreInAlloca) { + parseIR(C, R"IR( +declare ptr @llvm.stacksave() +declare void @llvm.stackrestore(ptr %ptr) + +define void @foo() { + %stack0 = call ptr @llvm.stacksave() ; Should depend on store + %alloca0 = alloca inalloca i8 ; Should depend on stacksave + call void @llvm.stackrestore(ptr %stack0) ; Should depend transiently on %alloca0 + ret void +} +)IR"); + Function *LLVMF = M->getFunction("foo"); + + sandboxir::Context Ctx(C); + auto *F = Ctx.createFunction(LLVMF); + auto *BB = &*F->begin(); + + sandboxir::DependencyGraph DAG(getAA(*LLVMF)); + DAG.extend({&*BB->begin(), BB->getTerminator()->getPrevNode()}); + + auto It = BB->begin(); + auto *StackSaveN = DAG.getNode(&*It++); + auto *AllocaN = DAG.getNode(&*It++); + auto *StackRestoreN = DAG.getNode(&*It++); + + EXPECT_TRUE(dependency(AllocaN, StackRestoreN)); + EXPECT_TRUE(dependency(StackSaveN, AllocaN)); +} + +// Checks that stacksave and stackrestore depend on other mem instrs. +TEST_F(DependencyGraphTest, StackSaveRestoreDependOnOtherMem) { + parseIR(C, R"IR( +declare ptr @llvm.stacksave() +declare void @llvm.stackrestore(ptr %ptr) + +define void @foo(i8 %v0, i8 %v1, ptr %ptr) { + store volatile i8 %v0, ptr %ptr, align 4 + %stack0 = call ptr @llvm.stacksave() ; Should depend on store + call void @llvm.stackrestore(ptr %stack0) ; Should depend on stacksave + store volatile i8 %v1, ptr %ptr, align 4 ; Should depend on stackrestore + ret void +} +)IR"); + Function *LLVMF = M->getFunction("foo"); + + sandboxir::Context Ctx(C); + auto *F = Ctx.createFunction(LLVMF); + auto *BB = &*F->begin(); + + sandboxir::DependencyGraph DAG(getAA(*LLVMF)); + DAG.extend({&*BB->begin(), BB->getTerminator()->getPrevNode()}); + + auto It = BB->begin(); + auto *Store0N = DAG.getNode(&*It++); + auto *StackSaveN = DAG.getNode(&*It++); + auto *StackRestoreN = DAG.getNode(&*It++); + auto *Store1N = DAG.getNode(&*It++); + + EXPECT_TRUE(dependency(Store0N, StackSaveN)); + EXPECT_TRUE(dependency(StackSaveN, StackRestoreN)); + EXPECT_TRUE(dependency(StackRestoreN, Store1N)); +} + +// Make sure there is a dependency between a stackrestore and an alloca. +TEST_F(DependencyGraphTest, StackRestoreAndInAlloca) { + parseIR(C, R"IR( +declare void @llvm.stackrestore(ptr %ptr) + +define void @foo(ptr %ptr) { + call void @llvm.stackrestore(ptr %ptr) + %alloca0 = alloca inalloca i8 ; Should depend on stackrestore + ret void +} +)IR"); + Function *LLVMF = M->getFunction("foo"); + + sandboxir::Context Ctx(C); + auto *F = Ctx.createFunction(LLVMF); + auto *BB = &*F->begin(); + + sandboxir::DependencyGraph DAG(getAA(*LLVMF)); + DAG.extend({&*BB->begin(), BB->getTerminator()->getPrevNode()}); + + auto It = BB->begin(); + auto *StackRestoreN = DAG.getNode(&*It++); + auto *AllocaN = DAG.getNode(&*It++); + + EXPECT_TRUE(dependency(StackRestoreN, AllocaN)); +} + +// Make sure there is a dependency between the alloca and stacksave +TEST_F(DependencyGraphTest, StackSaveAndInAlloca) { + parseIR(C, R"IR( +declare ptr @llvm.stacksave() + +define void @foo(ptr %ptr) { + %alloca0 = alloca inalloca i8 ; Should depend on stackrestore + %stack0 = call ptr @llvm.stacksave() ; Should depend on alloca0 + ret void +} +)IR"); + Function *LLVMF = M->getFunction("foo"); + + sandboxir::Context Ctx(C); + auto *F = Ctx.createFunction(LLVMF); + auto *BB = &*F->begin(); + + sandboxir::DependencyGraph DAG(getAA(*LLVMF)); + DAG.extend({&*BB->begin(), BB->getTerminator()->getPrevNode()}); + + auto It = BB->begin(); + auto *AllocaN = DAG.getNode(&*It++); + auto *StackSaveN = DAG.getNode(&*It++); + + EXPECT_TRUE(dependency(AllocaN, StackSaveN)); +} + +// A non-InAlloca in a stacksave-stackrestore region does not need extra +// dependencies. +TEST_F(DependencyGraphTest, StackSaveRestoreNoInAlloca) { + parseIR(C, R"IR( +declare ptr @llvm.stacksave() +declare void @llvm.stackrestore(ptr %ptr) +declare void @use(ptr %ptr) + +define void @foo() { + %stack = call ptr @llvm.stacksave() + %alloca1 = alloca i8 ; No dependency + call void @llvm.stackrestore(ptr %stack) + ret void +} +)IR"); + Function *LLVMF = M->getFunction("foo"); + + sandboxir::Context Ctx(C); + auto *F = Ctx.createFunction(LLVMF); + auto *BB = &*F->begin(); + + sandboxir::DependencyGraph DAG(getAA(*LLVMF)); + DAG.extend({&*BB->begin(), BB->getTerminator()->getPrevNode()}); + + auto It = BB->begin(); + auto *StackSaveN = DAG.getNode(&*It++); + auto *AllocaN = DAG.getNode(&*It++); + auto *StackRestoreN = DAG.getNode(&*It++); + + EXPECT_FALSE(dependency(StackSaveN, AllocaN)); + EXPECT_FALSE(dependency(AllocaN, StackRestoreN)); +} From aabddc91b475b2cbb64320a35d3bc595d48fddfb Mon Sep 17 00:00:00 2001 From: DarshanRamakant Date: Wed, 9 Oct 2024 05:40:59 +0530 Subject: [PATCH 012/129] [MLIR][memref] Fix normalization issue in memref.load (#107771) This change will fix the normalization issue with memref.load when the associated affine map is reducing the dimension. This PR fixes #82675 Co-authored-by: Kai Sasaki --- mlir/lib/Dialect/Affine/Utils/Utils.cpp | 100 +++++++++++++++++- .../Dialect/MemRef/normalize-memrefs.mlir | 38 +++++++ 2 files changed, 136 insertions(+), 2 deletions(-) diff --git a/mlir/lib/Dialect/Affine/Utils/Utils.cpp b/mlir/lib/Dialect/Affine/Utils/Utils.cpp index 898467d573362b..910ad1733d03e8 100644 --- a/mlir/lib/Dialect/Affine/Utils/Utils.cpp +++ b/mlir/lib/Dialect/Affine/Utils/Utils.cpp @@ -27,6 +27,7 @@ #include "mlir/IR/ImplicitLocOpBuilder.h" #include "mlir/IR/IntegerSet.h" #include "mlir/Transforms/GreedyPatternRewriteDriver.h" +#include "llvm/Support/LogicalResult.h" #include #define DEBUG_TYPE "affine-utils" @@ -1093,6 +1094,90 @@ void mlir::affine::affineScalarReplace(func::FuncOp f, DominanceInfo &domInfo, op->erase(); } +// Private helper function to transform memref.load with reduced rank. +// This function will modify the indices of the memref.load to match the +// newMemRef. +LogicalResult transformMemRefLoadWithReducedRank( + Operation *op, Value oldMemRef, Value newMemRef, unsigned memRefOperandPos, + ArrayRef extraIndices, ArrayRef extraOperands, + ArrayRef symbolOperands, AffineMap indexRemap) { + unsigned oldMemRefRank = cast(oldMemRef.getType()).getRank(); + unsigned newMemRefRank = cast(newMemRef.getType()).getRank(); + unsigned oldMapNumInputs = oldMemRefRank; + SmallVector oldMapOperands( + op->operand_begin() + memRefOperandPos + 1, + op->operand_begin() + memRefOperandPos + 1 + oldMapNumInputs); + SmallVector oldMemRefOperands; + oldMemRefOperands.assign(oldMapOperands.begin(), oldMapOperands.end()); + SmallVector remapOperands; + remapOperands.reserve(extraOperands.size() + oldMemRefRank + + symbolOperands.size()); + remapOperands.append(extraOperands.begin(), extraOperands.end()); + remapOperands.append(oldMemRefOperands.begin(), oldMemRefOperands.end()); + remapOperands.append(symbolOperands.begin(), symbolOperands.end()); + + SmallVector remapOutputs; + remapOutputs.reserve(oldMemRefRank); + SmallVector affineApplyOps; + + OpBuilder builder(op); + + if (indexRemap && + indexRemap != builder.getMultiDimIdentityMap(indexRemap.getNumDims())) { + // Remapped indices. + for (auto resultExpr : indexRemap.getResults()) { + auto singleResMap = AffineMap::get( + indexRemap.getNumDims(), indexRemap.getNumSymbols(), resultExpr); + auto afOp = builder.create(op->getLoc(), singleResMap, + remapOperands); + remapOutputs.push_back(afOp); + affineApplyOps.push_back(afOp); + } + } else { + // No remapping specified. + remapOutputs.assign(remapOperands.begin(), remapOperands.end()); + } + + SmallVector newMapOperands; + newMapOperands.reserve(newMemRefRank); + + // Prepend 'extraIndices' in 'newMapOperands'. + for (Value extraIndex : extraIndices) { + assert((isValidDim(extraIndex) || isValidSymbol(extraIndex)) && + "invalid memory op index"); + newMapOperands.push_back(extraIndex); + } + + // Append 'remapOutputs' to 'newMapOperands'. + newMapOperands.append(remapOutputs.begin(), remapOutputs.end()); + + // Create new fully composed AffineMap for new op to be created. + assert(newMapOperands.size() == newMemRefRank); + + OperationState state(op->getLoc(), op->getName()); + // Construct the new operation using this memref. + state.operands.reserve(newMapOperands.size() + extraIndices.size()); + state.operands.push_back(newMemRef); + + // Insert the new memref map operands. + state.operands.append(newMapOperands.begin(), newMapOperands.end()); + + state.types.reserve(op->getNumResults()); + for (auto result : op->getResults()) + state.types.push_back(result.getType()); + + // Copy over the attributes from the old operation to the new operation. + for (auto namedAttr : op->getAttrs()) { + state.attributes.push_back(namedAttr); + } + + // Create the new operation. + auto *repOp = builder.create(state); + op->replaceAllUsesWith(repOp); + op->erase(); + + return success(); +} // Perform the replacement in `op`. LogicalResult mlir::affine::replaceAllMemRefUsesWith( Value oldMemRef, Value newMemRef, Operation *op, @@ -1146,8 +1231,19 @@ LogicalResult mlir::affine::replaceAllMemRefUsesWith( // is set. return failure(); } - op->setOperand(memRefOperandPos, newMemRef); - return success(); + + // Check if it is a memref.load + auto memrefLoad = dyn_cast(op); + bool isReductionLike = + indexRemap.getNumResults() < indexRemap.getNumInputs(); + if (!memrefLoad || !isReductionLike) { + op->setOperand(memRefOperandPos, newMemRef); + return success(); + } + + return transformMemRefLoadWithReducedRank( + op, oldMemRef, newMemRef, memRefOperandPos, extraIndices, extraOperands, + symbolOperands, indexRemap); } // Perform index rewrites for the dereferencing op and then replace the op NamedAttribute oldMapAttrPair = diff --git a/mlir/test/Dialect/MemRef/normalize-memrefs.mlir b/mlir/test/Dialect/MemRef/normalize-memrefs.mlir index c7af033a22a2c6..11114bcf2b1ab1 100644 --- a/mlir/test/Dialect/MemRef/normalize-memrefs.mlir +++ b/mlir/test/Dialect/MemRef/normalize-memrefs.mlir @@ -3,6 +3,10 @@ // This file tests whether the memref type having non-trivial map layouts // are normalized to trivial (identity) layouts. +// CHECK-DAG: #[[$REDUCE_MAP1:.*]] = affine_map<(d0, d1) -> ((d0 mod 2) * 2 + d1 mod 2 + (d0 floordiv 2) * 4 + (d1 floordiv 2) * 8)> +// CHECK-DAG: #[[$REDUCE_MAP2:.*]] = affine_map<(d0, d1) -> (d0 mod 2 + (d1 mod 2) * 2 + (d0 floordiv 2) * 8 + (d1 floordiv 2) * 4)> +// CHECK-DAG: #[[$REDUCE_MAP3:.*]] = affine_map<(d0, d1) -> (d0 * 4 + d1)> + // CHECK-LABEL: func @permute() func.func @permute() { %A = memref.alloc() : memref<64x256xf32, affine_map<(d0, d1) -> (d1, d0)>> @@ -363,3 +367,37 @@ func.func @memref_with_strided_offset(%arg0: tensor<128x512xf32>, %arg1: index, %1 = bufferization.to_tensor %cast : memref<16x512xf32, strided<[?, ?], offset: ?>> return %1 : tensor<16x512xf32> } + +#map0 = affine_map<(i,k) -> (2 * (i mod 2) + (k mod 2) + 4 * (i floordiv 2) + 8 * (k floordiv 2))> +#map1 = affine_map<(k,j) -> ((k mod 2) + 2 * (j mod 2) + 8 * (k floordiv 2) + 4 * (j floordiv 2))> +#map2 = affine_map<(i,j) -> (4 * i + j)> +// CHECK-LABEL: func @memref_load_with_reduction_map +func.func @memref_load_with_reduction_map(%arg0 : memref<4x4xf32,#map2>) -> () { + %0 = memref.alloc() : memref<4x8xf32,#map0> + %1 = memref.alloc() : memref<8x4xf32,#map1> + %2 = memref.alloc() : memref<4x4xf32,#map2> + // CHECK-NOT: memref<4x8xf32> + // CHECK-NOT: memref<8x4xf32> + // CHECK-NOT: memref<4x4xf32> + %cst = arith.constant 3.0 : f32 + %cst0 = arith.constant 0 : index + affine.for %i = 0 to 4 { + affine.for %j = 0 to 8 { + affine.for %k = 0 to 8 { + // CHECK: %[[INDEX0:.*]] = affine.apply #[[$REDUCE_MAP1]](%{{.*}}, %{{.*}}) + // CHECK: memref.load %alloc[%[[INDEX0]]] : memref<32xf32> + %a = memref.load %0[%i, %k] : memref<4x8xf32,#map0> + // CHECK: %[[INDEX1:.*]] = affine.apply #[[$REDUCE_MAP2]](%{{.*}}, %{{.*}}) + // CHECK: memref.load %alloc_0[%[[INDEX1]]] : memref<32xf32> + %b = memref.load %1[%k, %j] :memref<8x4xf32,#map1> + // CHECK: %[[INDEX2:.*]] = affine.apply #[[$REDUCE_MAP3]](%{{.*}}, %{{.*}}) + // CHECK: memref.load %alloc_1[%[[INDEX2]]] : memref<16xf32> + %c = memref.load %2[%i, %j] : memref<4x4xf32,#map2> + %3 = arith.mulf %a, %b : f32 + %4 = arith.addf %3, %c : f32 + affine.store %4, %arg0[%i, %j] : memref<4x4xf32,#map2> + } + } + } + return +} \ No newline at end of file From c80f48491b150197d758f0906011b44472fa2dd5 Mon Sep 17 00:00:00 2001 From: Igor Kudrin Date: Wed, 9 Oct 2024 07:46:02 +0700 Subject: [PATCH 013/129] [lldb][NFC] Fix a build failure with MSVC (#111231) This fixes a build error with msvc for code introduced in #106442: ``` ...\lldb\source\Expression\DiagnosticManager.cpp(37): error C2668: 'llvm::ErrorInfo::ErrorInfo': ambiguous call to overloaded function ...\llvm\include\llvm/Support/Error.h(357): note: could be 'llvm::ErrorInfo::ErrorInfo(std::error_code)', which inherits 'lldb_private::CloneableECError::CloneableECError(std::error_code)' via base class 'lldb_private::ExpressionErrorBase' ...\llvm\include\llvm/Support/Error.h(357): note: or 'llvm::ErrorInfo::ErrorInfo(std::error_code,std::string)', which inherits 'lldb_private::ExpressionErrorBase::ExpressionErrorBase(std::error_code,std::string)' via base class 'lldb_private::ExpressionErrorBase' ...\lldb\source\Expression\DiagnosticManager.cpp(37): note: while trying to match the argument list '(std::error_code)' ``` --- lldb/include/lldb/Utility/Status.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lldb/include/lldb/Utility/Status.h b/lldb/include/lldb/Utility/Status.h index 3910c26d115a09..2911ffb804c6fb 100644 --- a/lldb/include/lldb/Utility/Status.h +++ b/lldb/include/lldb/Utility/Status.h @@ -83,8 +83,7 @@ class ExpressionErrorBase : public llvm::ErrorInfo { public: using llvm::ErrorInfo::ErrorInfo; - ExpressionErrorBase(std::error_code ec, std::string msg = {}) - : ErrorInfo(ec) {} + ExpressionErrorBase(std::error_code ec) : ErrorInfo(ec) {} lldb::ErrorType GetErrorType() const override; static char ID; }; From ff6facaa61d9bd58ec375be80fc725b2bb6fbadf Mon Sep 17 00:00:00 2001 From: Enna1 Date: Wed, 9 Oct 2024 09:16:55 +0800 Subject: [PATCH 014/129] [clang] remove extra space in warn_atomic_op_oversized (NFC) (#110955) --- .../clang/Basic/DiagnosticFrontendKinds.td | 2 +- clang/test/CodeGen/RISCV/riscv-atomics.c | 24 +++++++++---------- clang/test/CodeGen/atomics-sema-alignment.c | 2 +- .../configs/armv7m-picolibc-libc++.cfg.in | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/clang/include/clang/Basic/DiagnosticFrontendKinds.td b/clang/include/clang/Basic/DiagnosticFrontendKinds.td index a6b17ccb6799d2..1ed379c76c8ea2 100644 --- a/clang/include/clang/Basic/DiagnosticFrontendKinds.td +++ b/clang/include/clang/Basic/DiagnosticFrontendKinds.td @@ -335,7 +335,7 @@ def warn_atomic_op_misaligned : Warning< def warn_atomic_op_oversized : Warning< "large atomic operation may incur " "significant performance penalty" - "; the access size (%0 bytes) exceeds the max lock-free size (%1 bytes)">, + "; the access size (%0 bytes) exceeds the max lock-free size (%1 bytes)">, InGroup; def warn_sync_op_misaligned : Warning< diff --git a/clang/test/CodeGen/RISCV/riscv-atomics.c b/clang/test/CodeGen/RISCV/riscv-atomics.c index 437cb949bbb0fe..d0a2500e9d9e51 100644 --- a/clang/test/CodeGen/RISCV/riscv-atomics.c +++ b/clang/test/CodeGen/RISCV/riscv-atomics.c @@ -13,22 +13,22 @@ #include void test_i8_atomics(_Atomic(int8_t) * a, int8_t b) { - __c11_atomic_load(a, memory_order_seq_cst); // no-atomics-warning {{large atomic operation may incur significant performance penalty; the access size (1 bytes) exceeds the max lock-free size (0 bytes)}} - __c11_atomic_store(a, b, memory_order_seq_cst); // no-atomics-warning {{large atomic operation may incur significant performance penalty; the access size (1 bytes) exceeds the max lock-free size (0 bytes)}} - __c11_atomic_fetch_add(a, b, memory_order_seq_cst); // no-atomics-warning {{large atomic operation may incur significant performance penalty; the access size (1 bytes) exceeds the max lock-free size (0 bytes)}} + __c11_atomic_load(a, memory_order_seq_cst); // no-atomics-warning {{large atomic operation may incur significant performance penalty; the access size (1 bytes) exceeds the max lock-free size (0 bytes)}} + __c11_atomic_store(a, b, memory_order_seq_cst); // no-atomics-warning {{large atomic operation may incur significant performance penalty; the access size (1 bytes) exceeds the max lock-free size (0 bytes)}} + __c11_atomic_fetch_add(a, b, memory_order_seq_cst); // no-atomics-warning {{large atomic operation may incur significant performance penalty; the access size (1 bytes) exceeds the max lock-free size (0 bytes)}} } void test_i32_atomics(_Atomic(int32_t) * a, int32_t b) { - __c11_atomic_load(a, memory_order_seq_cst); // no-atomics-warning {{large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes)}} - __c11_atomic_store(a, b, memory_order_seq_cst); // no-atomics-warning {{large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes)}} - __c11_atomic_fetch_add(a, b, memory_order_seq_cst); // no-atomics-warning {{large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes)}} + __c11_atomic_load(a, memory_order_seq_cst); // no-atomics-warning {{large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes)}} + __c11_atomic_store(a, b, memory_order_seq_cst); // no-atomics-warning {{large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes)}} + __c11_atomic_fetch_add(a, b, memory_order_seq_cst); // no-atomics-warning {{large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes)}} } void test_i64_atomics(_Atomic(int64_t) * a, int64_t b) { - __c11_atomic_load(a, memory_order_seq_cst); // no-atomics-warning {{large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (0 bytes)}} - // small-atomics-warning@28 {{large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (4 bytes)}} - __c11_atomic_store(a, b, memory_order_seq_cst); // no-atomics-warning {{large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (0 bytes)}} - // small-atomics-warning@30 {{large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (4 bytes)}} - __c11_atomic_fetch_add(a, b, memory_order_seq_cst); // no-atomics-warning {{large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (0 bytes)}} - // small-atomics-warning@32 {{large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (4 bytes)}} + __c11_atomic_load(a, memory_order_seq_cst); // no-atomics-warning {{large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (0 bytes)}} + // small-atomics-warning@28 {{large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (4 bytes)}} + __c11_atomic_store(a, b, memory_order_seq_cst); // no-atomics-warning {{large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (0 bytes)}} + // small-atomics-warning@30 {{large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (4 bytes)}} + __c11_atomic_fetch_add(a, b, memory_order_seq_cst); // no-atomics-warning {{large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (0 bytes)}} + // small-atomics-warning@32 {{large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (4 bytes)}} } diff --git a/clang/test/CodeGen/atomics-sema-alignment.c b/clang/test/CodeGen/atomics-sema-alignment.c index d0058f1da8b01f..a7d83980113df0 100644 --- a/clang/test/CodeGen/atomics-sema-alignment.c +++ b/clang/test/CodeGen/atomics-sema-alignment.c @@ -44,5 +44,5 @@ void braz(Foo *foo, ThirtyTwo *braz) { ThirtyTwo thirtyTwo1; ThirtyTwo thirtyTwo2; - __atomic_load(&thirtyTwo1, &thirtyTwo2, __ATOMIC_RELAXED); // expected-warning {{large atomic operation may incur significant performance penalty; the access size (32 bytes) exceeds the max lock-free size (16 bytes)}} + __atomic_load(&thirtyTwo1, &thirtyTwo2, __ATOMIC_RELAXED); // expected-warning {{large atomic operation may incur significant performance penalty; the access size (32 bytes) exceeds the max lock-free size (16 bytes)}} } diff --git a/libcxx/test/configs/armv7m-picolibc-libc++.cfg.in b/libcxx/test/configs/armv7m-picolibc-libc++.cfg.in index 8ca8603008200a..7588b5c2a44cbb 100644 --- a/libcxx/test/configs/armv7m-picolibc-libc++.cfg.in +++ b/libcxx/test/configs/armv7m-picolibc-libc++.cfg.in @@ -9,7 +9,7 @@ config.substitutions.append(('%{compile_flags}', # Disable warnings in cxx_atomic_impl.h: # "large atomic operation may incur significant performance penalty; the - # access size (4 bytes) exceeds the max lock-free size (0 bytes)" + # access size (4 bytes) exceeds the max lock-free size (0 bytes)" ' -Wno-atomic-alignment' # Various libc++ headers check for the definition of _NEWLIB_VERSION From 181840459d2c8841ab8a564d4fbac6efc65e0fa9 Mon Sep 17 00:00:00 2001 From: William G Hatch Date: Tue, 8 Oct 2024 19:38:47 -0600 Subject: [PATCH 015/129] [LiveDebugValues][NVPTX]VarLocBasedImpl handle vregs, enable for NVPTX (#111456) This patch handles virtual registers in the VarLocBasedImpl of the LiveDebugVariables pass, allowing it to be used on architectures that depend on virtual registers in debugging, like NVPTX. It enables the pass for NVPTX. --- .../LiveDebugValues/LiveDebugValues.cpp | 8 - .../LiveDebugValues/VarLocBasedImpl.cpp | 25 +- llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp | 1 - llvm/test/DebugInfo/NVPTX/debug-info.ll | 2341 +++++++++-------- 4 files changed, 1196 insertions(+), 1179 deletions(-) diff --git a/llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.cpp b/llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.cpp index 0c0a4e13c7c9ec..a2b1662271940d 100644 --- a/llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.cpp +++ b/llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.cpp @@ -102,14 +102,6 @@ LiveDebugValues::LiveDebugValues() : MachineFunctionPass(ID) { } bool LiveDebugValues::runOnMachineFunction(MachineFunction &MF) { - // Except for Wasm, all targets should be only using physical register at this - // point. Wasm only use virtual registers throught its pipeline, but its - // virtual registers don't participate in this LiveDebugValues analysis; only - // its target indices do. - assert(MF.getTarget().getTargetTriple().isWasm() || - MF.getProperties().hasProperty( - MachineFunctionProperties::Property::NoVRegs)); - bool InstrRefBased = MF.useDebugInstrRef(); // Allow the user to force selection of InstrRef LDV. InstrRefBased |= ForceInstrRefLDV; diff --git a/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp index 7e7d90f24fccba..c80b54a4f91216 100644 --- a/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp +++ b/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp @@ -239,6 +239,10 @@ struct LocIndex { /// becomes a problem. static constexpr u32_location_t kWasmLocation = kFirstInvalidRegLocation + 2; + /// The first location that is reserved for VarLocs with locations of kind + /// VirtualRegisterKind. + static constexpr u32_location_t kFirstVirtualRegLocation = 1 << 31; + LocIndex(u32_location_t Location, u32_index_t Index) : Location(Location), Index(Index) {} @@ -810,9 +814,10 @@ class VarLocBasedLDV : public LDVImpl { VL.getDescribingRegs(Locations); assert(all_of(Locations, [](auto RegNo) { - return RegNo < LocIndex::kFirstInvalidRegLocation; + return (RegNo < LocIndex::kFirstInvalidRegLocation) || + (LocIndex::kFirstVirtualRegLocation <= RegNo); }) && - "Physreg out of range?"); + "Physical or virtual register out of range?"); if (VL.containsSpillLocs()) Locations.push_back(LocIndex::kSpillLocation); if (VL.containsWasmLocs()) @@ -1240,9 +1245,9 @@ void VarLocBasedLDV::getUsedRegs(const VarLocSet &CollectFrom, LocIndex::rawIndexForReg(LocIndex::kFirstRegLocation); uint64_t FirstInvalidIndex = LocIndex::rawIndexForReg(LocIndex::kFirstInvalidRegLocation); - for (auto It = CollectFrom.find(FirstRegIndex), - End = CollectFrom.find(FirstInvalidIndex); - It != End;) { + uint64_t FirstVirtualRegIndex = + LocIndex::rawIndexForReg(LocIndex::kFirstVirtualRegLocation); + auto doGetUsedRegs = [&](VarLocSet::const_iterator &It) { // We found a VarLoc ID for a VarLoc that lives in a register. Figure out // which register and add it to UsedRegs. uint32_t FoundReg = LocIndex::fromRawInteger(*It).Location; @@ -1255,6 +1260,16 @@ void VarLocBasedLDV::getUsedRegs(const VarLocSet &CollectFrom, // guaranteed to move on to the next register (or to end()). uint64_t NextRegIndex = LocIndex::rawIndexForReg(FoundReg + 1); It.advanceToLowerBound(NextRegIndex); + }; + for (auto It = CollectFrom.find(FirstRegIndex), + End = CollectFrom.find(FirstInvalidIndex); + It != End;) { + doGetUsedRegs(It); + } + for (auto It = CollectFrom.find(FirstVirtualRegIndex), + End = CollectFrom.end(); + It != End;) { + doGetUsedRegs(It); } } diff --git a/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp b/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp index 57b7fa783c14a7..8e6e4395efb559 100644 --- a/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp +++ b/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp @@ -309,7 +309,6 @@ void NVPTXPassConfig::addIRPasses() { disablePass(&MachineCopyPropagationID); disablePass(&TailDuplicateID); disablePass(&StackMapLivenessID); - disablePass(&LiveDebugValuesID); disablePass(&PostRAMachineSinkingID); disablePass(&PostRASchedulerID); disablePass(&FuncletLayoutID); diff --git a/llvm/test/DebugInfo/NVPTX/debug-info.ll b/llvm/test/DebugInfo/NVPTX/debug-info.ll index 64509b22ed365d..35443738e05379 100644 --- a/llvm/test/DebugInfo/NVPTX/debug-info.ll +++ b/llvm/test/DebugInfo/NVPTX/debug-info.ll @@ -121,20 +121,8 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b64 0 ; CHECK-NEXT:.b64 0 ; CHECK-NEXT:$L__debug_loc1: -; CHECK-NEXT:.b64 $L__tmp0 -; CHECK-NEXT:.b64 $L__tmp7 -; CHECK-NEXT:.b8 5 // Loc expr size -; CHECK-NEXT:.b8 0 -; CHECK-NEXT:.b8 144 // DW_OP_regx -; CHECK-NEXT:.b8 178 // 2454066 -; CHECK-NEXT:.b8 228 // -; CHECK-NEXT:.b8 149 // -; CHECK-NEXT:.b8 1 // -; CHECK-NEXT:.b64 0 -; CHECK-NEXT:.b64 0 -; CHECK-NEXT:$L__debug_loc2: ; CHECK-NEXT:.b64 $L__tmp5 -; CHECK-NEXT:.b64 $L__tmp7 +; CHECK-NEXT:.b64 $L__func_end0 ; CHECK-NEXT:.b8 5 // Loc expr size ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 144 // DW_OP_regx @@ -478,8 +466,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 24 // Abbreviation Code ; CHECK-NEXT:.b8 5 // DW_TAG_formal_parameter ; CHECK-NEXT:.b8 0 // DW_CHILDREN_no +; CHECK-NEXT:.b8 51 // DW_AT_address_class +; CHECK-NEXT:.b8 11 // DW_FORM_data1 ; CHECK-NEXT:.b8 2 // DW_AT_location -; CHECK-NEXT:.b8 6 // DW_FORM_data4 +; CHECK-NEXT:.b8 10 // DW_FORM_block1 ; CHECK-NEXT:.b8 3 // DW_AT_name ; CHECK-NEXT:.b8 8 // DW_FORM_string ; CHECK-NEXT:.b8 58 // DW_AT_decl_file @@ -491,7 +481,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) ; CHECK-NEXT:.b8 25 // Abbreviation Code -; CHECK-NEXT:.b8 52 // DW_TAG_variable +; CHECK-NEXT:.b8 5 // DW_TAG_formal_parameter ; CHECK-NEXT:.b8 0 // DW_CHILDREN_no ; CHECK-NEXT:.b8 2 // DW_AT_location ; CHECK-NEXT:.b8 6 // DW_FORM_data4 @@ -506,6 +496,21 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) ; CHECK-NEXT:.b8 26 // Abbreviation Code +; CHECK-NEXT:.b8 52 // DW_TAG_variable +; CHECK-NEXT:.b8 0 // DW_CHILDREN_no +; CHECK-NEXT:.b8 2 // DW_AT_location +; CHECK-NEXT:.b8 6 // DW_FORM_data4 +; CHECK-NEXT:.b8 3 // DW_AT_name +; CHECK-NEXT:.b8 8 // DW_FORM_string +; CHECK-NEXT:.b8 58 // DW_AT_decl_file +; CHECK-NEXT:.b8 11 // DW_FORM_data1 +; CHECK-NEXT:.b8 59 // DW_AT_decl_line +; CHECK-NEXT:.b8 11 // DW_FORM_data1 +; CHECK-NEXT:.b8 73 // DW_AT_type +; CHECK-NEXT:.b8 19 // DW_FORM_ref4 +; CHECK-NEXT:.b8 0 // EOM(1) +; CHECK-NEXT:.b8 0 // EOM(2) +; CHECK-NEXT:.b8 27 // Abbreviation Code ; CHECK-NEXT:.b8 29 // DW_TAG_inlined_subroutine ; CHECK-NEXT:.b8 0 // DW_CHILDREN_no ; CHECK-NEXT:.b8 49 // DW_AT_abstract_origin @@ -522,7 +527,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 11 // DW_FORM_data1 ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) -; CHECK-NEXT:.b8 27 // Abbreviation Code +; CHECK-NEXT:.b8 28 // Abbreviation Code ; CHECK-NEXT:.b8 29 // DW_TAG_inlined_subroutine ; CHECK-NEXT:.b8 1 // DW_CHILDREN_yes ; CHECK-NEXT:.b8 49 // DW_AT_abstract_origin @@ -539,7 +544,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 11 // DW_FORM_data1 ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) -; CHECK-NEXT:.b8 28 // Abbreviation Code +; CHECK-NEXT:.b8 29 // Abbreviation Code ; CHECK-NEXT:.b8 5 // DW_TAG_formal_parameter ; CHECK-NEXT:.b8 0 // DW_CHILDREN_no ; CHECK-NEXT:.b8 51 // DW_AT_address_class @@ -550,14 +555,14 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 19 // DW_FORM_ref4 ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) -; CHECK-NEXT:.b8 29 // Abbreviation Code +; CHECK-NEXT:.b8 30 // Abbreviation Code ; CHECK-NEXT:.b8 57 // DW_TAG_namespace ; CHECK-NEXT:.b8 1 // DW_CHILDREN_yes ; CHECK-NEXT:.b8 3 // DW_AT_name ; CHECK-NEXT:.b8 8 // DW_FORM_string ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) -; CHECK-NEXT:.b8 30 // Abbreviation Code +; CHECK-NEXT:.b8 31 // Abbreviation Code ; CHECK-NEXT:.b8 8 // DW_TAG_imported_declaration ; CHECK-NEXT:.b8 0 // DW_CHILDREN_no ; CHECK-NEXT:.b8 58 // DW_AT_decl_file @@ -568,7 +573,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 19 // DW_FORM_ref4 ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) -; CHECK-NEXT:.b8 31 // Abbreviation Code +; CHECK-NEXT:.b8 32 // Abbreviation Code ; CHECK-NEXT:.b8 8 // DW_TAG_imported_declaration ; CHECK-NEXT:.b8 0 // DW_CHILDREN_no ; CHECK-NEXT:.b8 58 // DW_AT_decl_file @@ -579,7 +584,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 19 // DW_FORM_ref4 ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) -; CHECK-NEXT:.b8 32 // Abbreviation Code +; CHECK-NEXT:.b8 33 // Abbreviation Code ; CHECK-NEXT:.b8 46 // DW_TAG_subprogram ; CHECK-NEXT:.b8 1 // DW_CHILDREN_yes ; CHECK-NEXT:.b8 135 // DW_AT_MIPS_linkage_name @@ -597,7 +602,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 12 // DW_FORM_flag ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) -; CHECK-NEXT:.b8 33 // Abbreviation Code +; CHECK-NEXT:.b8 34 // Abbreviation Code ; CHECK-NEXT:.b8 46 // DW_TAG_subprogram ; CHECK-NEXT:.b8 1 // DW_CHILDREN_yes ; CHECK-NEXT:.b8 3 // DW_AT_name @@ -614,7 +619,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 12 // DW_FORM_flag ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) -; CHECK-NEXT:.b8 34 // Abbreviation Code +; CHECK-NEXT:.b8 35 // Abbreviation Code ; CHECK-NEXT:.b8 22 // DW_TAG_typedef ; CHECK-NEXT:.b8 0 // DW_CHILDREN_no ; CHECK-NEXT:.b8 73 // DW_AT_type @@ -627,14 +632,14 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 11 // DW_FORM_data1 ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) -; CHECK-NEXT:.b8 35 // Abbreviation Code +; CHECK-NEXT:.b8 36 // Abbreviation Code ; CHECK-NEXT:.b8 19 // DW_TAG_structure_type ; CHECK-NEXT:.b8 0 // DW_CHILDREN_no ; CHECK-NEXT:.b8 60 // DW_AT_declaration ; CHECK-NEXT:.b8 12 // DW_FORM_flag ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) -; CHECK-NEXT:.b8 36 // Abbreviation Code +; CHECK-NEXT:.b8 37 // Abbreviation Code ; CHECK-NEXT:.b8 19 // DW_TAG_structure_type ; CHECK-NEXT:.b8 1 // DW_CHILDREN_yes ; CHECK-NEXT:.b8 11 // DW_AT_byte_size @@ -645,7 +650,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 11 // DW_FORM_data1 ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) -; CHECK-NEXT:.b8 37 // Abbreviation Code +; CHECK-NEXT:.b8 38 // Abbreviation Code ; CHECK-NEXT:.b8 46 // DW_TAG_subprogram ; CHECK-NEXT:.b8 0 // DW_CHILDREN_no ; CHECK-NEXT:.b8 3 // DW_AT_name @@ -663,7 +668,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 12 // DW_FORM_flag ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) -; CHECK-NEXT:.b8 38 // Abbreviation Code +; CHECK-NEXT:.b8 39 // Abbreviation Code ; CHECK-NEXT:.b8 46 // DW_TAG_subprogram ; CHECK-NEXT:.b8 1 // DW_CHILDREN_yes ; CHECK-NEXT:.b8 3 // DW_AT_name @@ -680,29 +685,29 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 12 // DW_FORM_flag ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) -; CHECK-NEXT:.b8 39 // Abbreviation Code +; CHECK-NEXT:.b8 40 // Abbreviation Code ; CHECK-NEXT:.b8 21 // DW_TAG_subroutine_type ; CHECK-NEXT:.b8 0 // DW_CHILDREN_no ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) -; CHECK-NEXT:.b8 40 // Abbreviation Code +; CHECK-NEXT:.b8 41 // Abbreviation Code ; CHECK-NEXT:.b8 15 // DW_TAG_pointer_type ; CHECK-NEXT:.b8 0 // DW_CHILDREN_no ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) -; CHECK-NEXT:.b8 41 // Abbreviation Code +; CHECK-NEXT:.b8 42 // Abbreviation Code ; CHECK-NEXT:.b8 38 // DW_TAG_const_type ; CHECK-NEXT:.b8 0 // DW_CHILDREN_no ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) -; CHECK-NEXT:.b8 42 // Abbreviation Code +; CHECK-NEXT:.b8 43 // Abbreviation Code ; CHECK-NEXT:.b8 21 // DW_TAG_subroutine_type ; CHECK-NEXT:.b8 1 // DW_CHILDREN_yes ; CHECK-NEXT:.b8 73 // DW_AT_type ; CHECK-NEXT:.b8 19 // DW_FORM_ref4 ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) -; CHECK-NEXT:.b8 43 // Abbreviation Code +; CHECK-NEXT:.b8 44 // Abbreviation Code ; CHECK-NEXT:.b8 46 // DW_TAG_subprogram ; CHECK-NEXT:.b8 1 // DW_CHILDREN_yes ; CHECK-NEXT:.b8 3 // DW_AT_name @@ -720,7 +725,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 12 // DW_FORM_flag ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) -; CHECK-NEXT:.b8 44 // Abbreviation Code +; CHECK-NEXT:.b8 45 // Abbreviation Code ; CHECK-NEXT:.b8 46 // DW_TAG_subprogram ; CHECK-NEXT:.b8 0 // DW_CHILDREN_no ; CHECK-NEXT:.b8 3 // DW_AT_name @@ -737,7 +742,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 12 // DW_FORM_flag ; CHECK-NEXT:.b8 0 // EOM(1) ; CHECK-NEXT:.b8 0 // EOM(2) -; CHECK-NEXT:.b8 45 // Abbreviation Code +; CHECK-NEXT:.b8 46 // Abbreviation Code ; CHECK-NEXT:.b8 46 // DW_TAG_subprogram ; CHECK-NEXT:.b8 1 // DW_CHILDREN_yes ; CHECK-NEXT:.b8 135 // DW_AT_MIPS_linkage_name @@ -759,12 +764,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT: } ; CHECK-NEXT: .section .debug_info ; CHECK-NEXT: { -; CHECK-NEXT:.b32 10032 // Length of Unit +; CHECK-NEXT:.b32 10035 // Length of Unit ; CHECK-NEXT:.b8 2 // DWARF version number ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b32 .debug_abbrev // Offset Into Abbrev. Section ; CHECK-NEXT:.b8 8 // Address Size (in bytes) -; CHECK-NEXT:.b8 1 // Abbrev [1] 0xb:0x2729 DW_TAG_compile_unit +; CHECK-NEXT:.b8 1 // Abbrev [1] 0xb:0x272c DW_TAG_compile_unit ; CHECK-NEXT:.b8 0 // DW_AT_producer ; CHECK-NEXT:.b8 4 // DW_AT_language ; CHECK-NEXT:.b8 0 @@ -2654,7 +2659,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 4 // DW_AT_byte_size ; CHECK-NEXT:.b8 12 // Abbrev [12] 0x83d:0x5 DW_TAG_pointer_type ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 23 // Abbrev [23] 0x842:0xd2 DW_TAG_subprogram +; CHECK-NEXT:.b8 23 // Abbrev [23] 0x842:0xd5 DW_TAG_subprogram ; CHECK-NEXT:.b64 $L__func_begin0 // DW_AT_low_pc ; CHECK-NEXT:.b64 $L__func_end0 // DW_AT_high_pc ; CHECK-NEXT:.b8 1 // DW_AT_frame_base @@ -2683,68 +2688,74 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 1 // DW_AT_decl_file ; CHECK-NEXT:.b8 5 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 24 // Abbrev [24] 0x86d:0xd DW_TAG_formal_parameter -; CHECK-NEXT:.b32 $L__debug_loc1 // DW_AT_location +; CHECK-NEXT:.b8 24 // Abbrev [24] 0x86d:0x10 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 2 // DW_AT_address_class +; CHECK-NEXT:.b8 5 // DW_AT_location +; CHECK-NEXT:.b8 144 +; CHECK-NEXT:.b8 178 +; CHECK-NEXT:.b8 228 +; CHECK-NEXT:.b8 149 +; CHECK-NEXT:.b8 1 ; CHECK-NEXT:.b8 110 // DW_AT_name ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 1 // DW_AT_decl_file ; CHECK-NEXT:.b8 5 // DW_AT_decl_line -; CHECK-NEXT:.b32 4582 // DW_AT_type -; CHECK-NEXT:.b8 24 // Abbrev [24] 0x87a:0xd DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4585 // DW_AT_type +; CHECK-NEXT:.b8 25 // Abbrev [25] 0x87d:0xd DW_TAG_formal_parameter ; CHECK-NEXT:.b32 $L__debug_loc0 // DW_AT_location ; CHECK-NEXT:.b8 97 // DW_AT_name ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 1 // DW_AT_decl_file ; CHECK-NEXT:.b8 5 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 22 // Abbrev [22] 0x887:0x9 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 22 // Abbrev [22] 0x88a:0x9 DW_TAG_formal_parameter ; CHECK-NEXT:.b8 120 // DW_AT_name ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 1 // DW_AT_decl_file ; CHECK-NEXT:.b8 5 // DW_AT_decl_line ; CHECK-NEXT:.b32 2109 // DW_AT_type -; CHECK-NEXT:.b8 22 // Abbrev [22] 0x890:0x9 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 22 // Abbrev [22] 0x893:0x9 DW_TAG_formal_parameter ; CHECK-NEXT:.b8 121 // DW_AT_name ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 1 // DW_AT_decl_file ; CHECK-NEXT:.b8 5 // DW_AT_decl_line ; CHECK-NEXT:.b32 2109 // DW_AT_type -; CHECK-NEXT:.b8 25 // Abbrev [25] 0x899:0xd DW_TAG_variable -; CHECK-NEXT:.b32 $L__debug_loc2 // DW_AT_location +; CHECK-NEXT:.b8 26 // Abbrev [26] 0x89c:0xd DW_TAG_variable +; CHECK-NEXT:.b32 $L__debug_loc1 // DW_AT_location ; CHECK-NEXT:.b8 105 // DW_AT_name ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 1 // DW_AT_decl_file ; CHECK-NEXT:.b8 6 // DW_AT_decl_line -; CHECK-NEXT:.b32 4582 // DW_AT_type -; CHECK-NEXT:.b8 26 // Abbrev [26] 0x8a6:0x18 DW_TAG_inlined_subroutine +; CHECK-NEXT:.b32 4585 // DW_AT_type +; CHECK-NEXT:.b8 27 // Abbrev [27] 0x8a9:0x18 DW_TAG_inlined_subroutine ; CHECK-NEXT:.b32 691 // DW_AT_abstract_origin ; CHECK-NEXT:.b64 $L__tmp1 // DW_AT_low_pc ; CHECK-NEXT:.b64 $L__tmp2 // DW_AT_high_pc ; CHECK-NEXT:.b8 1 // DW_AT_call_file ; CHECK-NEXT:.b8 6 // DW_AT_call_line ; CHECK-NEXT:.b8 11 // DW_AT_call_column -; CHECK-NEXT:.b8 26 // Abbrev [26] 0x8be:0x18 DW_TAG_inlined_subroutine +; CHECK-NEXT:.b8 27 // Abbrev [27] 0x8c1:0x18 DW_TAG_inlined_subroutine ; CHECK-NEXT:.b32 1450 // DW_AT_abstract_origin ; CHECK-NEXT:.b64 $L__tmp2 // DW_AT_low_pc ; CHECK-NEXT:.b64 $L__tmp3 // DW_AT_high_pc ; CHECK-NEXT:.b8 1 // DW_AT_call_file ; CHECK-NEXT:.b8 6 // DW_AT_call_line ; CHECK-NEXT:.b8 24 // DW_AT_call_column -; CHECK-NEXT:.b8 26 // Abbrev [26] 0x8d6:0x18 DW_TAG_inlined_subroutine +; CHECK-NEXT:.b8 27 // Abbrev [27] 0x8d9:0x18 DW_TAG_inlined_subroutine ; CHECK-NEXT:.b32 2044 // DW_AT_abstract_origin ; CHECK-NEXT:.b64 $L__tmp3 // DW_AT_low_pc ; CHECK-NEXT:.b64 $L__tmp4 // DW_AT_high_pc ; CHECK-NEXT:.b8 1 // DW_AT_call_file ; CHECK-NEXT:.b8 6 // DW_AT_call_line ; CHECK-NEXT:.b8 37 // DW_AT_call_column -; CHECK-NEXT:.b8 27 // Abbrev [27] 0x8ee:0x25 DW_TAG_inlined_subroutine +; CHECK-NEXT:.b8 28 // Abbrev [28] 0x8f1:0x25 DW_TAG_inlined_subroutine ; CHECK-NEXT:.b32 2050 // DW_AT_abstract_origin ; CHECK-NEXT:.b64 $L__tmp9 // DW_AT_low_pc ; CHECK-NEXT:.b64 $L__tmp10 // DW_AT_high_pc ; CHECK-NEXT:.b8 1 // DW_AT_call_file ; CHECK-NEXT:.b8 8 // DW_AT_call_line ; CHECK-NEXT:.b8 5 // DW_AT_call_column -; CHECK-NEXT:.b8 28 // Abbrev [28] 0x906:0xc DW_TAG_formal_parameter +; CHECK-NEXT:.b8 29 // Abbrev [29] 0x909:0xc DW_TAG_formal_parameter ; CHECK-NEXT:.b8 2 // DW_AT_address_class ; CHECK-NEXT:.b8 5 // DW_AT_location ; CHECK-NEXT:.b8 144 @@ -2755,856 +2766,856 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b32 2079 // DW_AT_abstract_origin ; CHECK-NEXT:.b8 0 // End Of Children Mark ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 29 // Abbrev [29] 0x914:0x588 DW_TAG_namespace +; CHECK-NEXT:.b8 30 // Abbrev [30] 0x917:0x588 DW_TAG_namespace ; CHECK-NEXT:.b8 115 // DW_AT_name ; CHECK-NEXT:.b8 116 ; CHECK-NEXT:.b8 100 ; CHECK-NEXT:.b8 0 -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x919:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x91c:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 202 // DW_AT_decl_line -; CHECK-NEXT:.b32 3740 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x920:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 3743 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x923:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 203 // DW_AT_decl_line -; CHECK-NEXT:.b32 3784 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x927:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 3787 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x92a:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 204 // DW_AT_decl_line -; CHECK-NEXT:.b32 3813 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x92e:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 3816 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x931:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 205 // DW_AT_decl_line -; CHECK-NEXT:.b32 3844 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x935:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 3847 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x938:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 206 // DW_AT_decl_line -; CHECK-NEXT:.b32 3873 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x93c:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 3876 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x93f:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 207 // DW_AT_decl_line -; CHECK-NEXT:.b32 3904 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x943:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 3907 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x946:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 208 // DW_AT_decl_line -; CHECK-NEXT:.b32 3933 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x94a:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 3936 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x94d:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 209 // DW_AT_decl_line -; CHECK-NEXT:.b32 3970 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x951:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 3973 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x954:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 210 // DW_AT_decl_line -; CHECK-NEXT:.b32 4001 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x958:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4004 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x95b:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 211 // DW_AT_decl_line -; CHECK-NEXT:.b32 4030 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x95f:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4033 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x962:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 212 // DW_AT_decl_line -; CHECK-NEXT:.b32 4059 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x966:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4062 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x969:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 213 // DW_AT_decl_line -; CHECK-NEXT:.b32 4102 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x96d:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4105 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x970:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 214 // DW_AT_decl_line -; CHECK-NEXT:.b32 4129 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x974:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4132 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x977:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 215 // DW_AT_decl_line -; CHECK-NEXT:.b32 4158 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x97b:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4161 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x97e:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 216 // DW_AT_decl_line -; CHECK-NEXT:.b32 4185 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x982:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4188 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x985:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 217 // DW_AT_decl_line -; CHECK-NEXT:.b32 4214 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x989:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4217 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x98c:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 218 // DW_AT_decl_line -; CHECK-NEXT:.b32 4241 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x990:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4244 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x993:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 219 // DW_AT_decl_line -; CHECK-NEXT:.b32 4270 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x997:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4273 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x99a:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 220 // DW_AT_decl_line -; CHECK-NEXT:.b32 4301 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x99e:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4304 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x9a1:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 221 // DW_AT_decl_line -; CHECK-NEXT:.b32 4330 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x9a5:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4333 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x9a8:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 222 // DW_AT_decl_line -; CHECK-NEXT:.b32 4365 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x9ac:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4368 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x9af:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 223 // DW_AT_decl_line -; CHECK-NEXT:.b32 4396 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x9b3:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4399 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x9b6:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 224 // DW_AT_decl_line -; CHECK-NEXT:.b32 4435 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x9ba:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4438 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x9bd:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 225 // DW_AT_decl_line -; CHECK-NEXT:.b32 4470 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x9c1:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4473 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x9c4:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 226 // DW_AT_decl_line -; CHECK-NEXT:.b32 4505 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x9c8:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4508 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x9cb:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 227 // DW_AT_decl_line -; CHECK-NEXT:.b32 4540 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x9cf:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4543 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x9d2:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 228 // DW_AT_decl_line -; CHECK-NEXT:.b32 4589 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x9d6:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4592 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x9d9:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 229 // DW_AT_decl_line -; CHECK-NEXT:.b32 4632 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x9dd:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4635 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x9e0:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 230 // DW_AT_decl_line -; CHECK-NEXT:.b32 4669 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x9e4:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4672 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x9e7:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 231 // DW_AT_decl_line -; CHECK-NEXT:.b32 4700 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x9eb:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4703 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x9ee:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 232 // DW_AT_decl_line -; CHECK-NEXT:.b32 4745 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x9f2:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4748 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x9f5:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 233 // DW_AT_decl_line -; CHECK-NEXT:.b32 4790 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x9f9:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4793 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x9fc:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 234 // DW_AT_decl_line -; CHECK-NEXT:.b32 4846 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa00:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4849 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa03:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 235 // DW_AT_decl_line -; CHECK-NEXT:.b32 4877 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa07:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4880 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa0a:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 236 // DW_AT_decl_line -; CHECK-NEXT:.b32 4916 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa0e:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4919 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa11:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 237 // DW_AT_decl_line -; CHECK-NEXT:.b32 4966 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa15:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 4969 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa18:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 238 // DW_AT_decl_line -; CHECK-NEXT:.b32 5020 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa1c:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5023 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa1f:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 239 // DW_AT_decl_line -; CHECK-NEXT:.b32 5051 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa23:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5054 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa26:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 240 // DW_AT_decl_line -; CHECK-NEXT:.b32 5088 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa2a:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5091 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa2d:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 241 // DW_AT_decl_line -; CHECK-NEXT:.b32 5138 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa31:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5141 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa34:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 242 // DW_AT_decl_line -; CHECK-NEXT:.b32 5179 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa38:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5182 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa3b:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 243 // DW_AT_decl_line -; CHECK-NEXT:.b32 5216 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa3f:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5219 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa42:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 244 // DW_AT_decl_line -; CHECK-NEXT:.b32 5249 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa46:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5252 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa49:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 245 // DW_AT_decl_line -; CHECK-NEXT:.b32 5280 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa4d:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5283 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa50:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 246 // DW_AT_decl_line -; CHECK-NEXT:.b32 5313 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa54:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5316 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa57:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 247 // DW_AT_decl_line -; CHECK-NEXT:.b32 5340 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa5b:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5343 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa5e:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 248 // DW_AT_decl_line -; CHECK-NEXT:.b32 5371 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa62:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5374 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa65:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 249 // DW_AT_decl_line -; CHECK-NEXT:.b32 5402 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa69:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5405 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa6c:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 250 // DW_AT_decl_line -; CHECK-NEXT:.b32 5431 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa70:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5434 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa73:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 251 // DW_AT_decl_line -; CHECK-NEXT:.b32 5460 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa77:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5463 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa7a:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 252 // DW_AT_decl_line -; CHECK-NEXT:.b32 5491 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa7e:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5494 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa81:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 253 // DW_AT_decl_line -; CHECK-NEXT:.b32 5524 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa85:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5527 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa88:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 254 // DW_AT_decl_line -; CHECK-NEXT:.b32 5559 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xa8c:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5562 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa8f:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 255 // DW_AT_decl_line -; CHECK-NEXT:.b32 5595 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa93:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5598 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xa96:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 0 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 5652 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xa9b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5655 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xa9e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 1 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 5683 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xaa3:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5686 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xaa6:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 2 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 5722 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xaab:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5725 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xaae:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 3 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 5767 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xab3:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5770 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xab6:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 4 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 5800 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xabb:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5803 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xabe:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 5 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 5845 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xac3:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5848 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xac6:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 6 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 5891 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xacb:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5894 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xace:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 7 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 5920 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xad3:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5923 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xad6:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 8 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 5951 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xadb:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5954 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xade:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 9 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 5992 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xae3:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 5995 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xae6:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 10 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6031 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xaeb:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6034 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xaee:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 11 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6066 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xaf3:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6069 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xaf6:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 12 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6093 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xafb:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6096 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xafe:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 13 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6122 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb03:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6125 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xb06:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 14 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6151 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb0b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6154 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xb0e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 15 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6178 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb13:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6181 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xb16:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 16 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6207 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb1b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6210 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xb1e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 17 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6240 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xb23:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6243 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb26:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 102 // DW_AT_decl_line -; CHECK-NEXT:.b32 6271 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xb2a:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6274 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb2d:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 121 // DW_AT_decl_line -; CHECK-NEXT:.b32 6291 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xb31:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6294 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb34:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 140 // DW_AT_decl_line -; CHECK-NEXT:.b32 6311 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xb38:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6314 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb3b:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 159 // DW_AT_decl_line -; CHECK-NEXT:.b32 6331 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xb3f:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6334 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb42:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 180 // DW_AT_decl_line -; CHECK-NEXT:.b32 6357 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xb46:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6360 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb49:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 199 // DW_AT_decl_line -; CHECK-NEXT:.b32 6377 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xb4d:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6380 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb50:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 218 // DW_AT_decl_line -; CHECK-NEXT:.b32 6396 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xb54:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6399 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb57:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 237 // DW_AT_decl_line -; CHECK-NEXT:.b32 6416 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb5b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6419 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xb5e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 0 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6435 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb63:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6438 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xb66:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 19 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6455 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb6b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6458 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xb6e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 38 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6476 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb73:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6479 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xb76:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 59 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6501 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb7b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6504 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xb7e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 78 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6527 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb83:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6530 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xb86:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 97 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6553 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb8b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6556 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xb8e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 116 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6572 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb93:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6575 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xb96:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 135 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6593 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xb9b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6596 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xb9e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 147 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6623 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xba3:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6626 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xba6:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 184 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6647 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xbab:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6650 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xbae:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 203 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6666 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xbb3:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6669 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xbb6:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 222 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6686 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xbbb:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6689 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xbbe:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 241 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6706 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xbc3:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6709 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xbc6:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 6 // DW_AT_decl_file ; CHECK-NEXT:.b8 4 // DW_AT_decl_line ; CHECK-NEXT:.b8 2 -; CHECK-NEXT:.b32 6725 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xbcb:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6728 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xbce:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 118 // DW_AT_decl_line -; CHECK-NEXT:.b32 6745 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xbd2:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6748 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xbd5:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 119 // DW_AT_decl_line -; CHECK-NEXT:.b32 6760 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xbd9:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6763 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xbdc:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 121 // DW_AT_decl_line -; CHECK-NEXT:.b32 6808 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xbe0:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6811 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xbe3:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 122 // DW_AT_decl_line -; CHECK-NEXT:.b32 6821 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xbe7:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6824 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xbea:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 123 // DW_AT_decl_line -; CHECK-NEXT:.b32 6841 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xbee:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6844 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xbf1:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 129 // DW_AT_decl_line -; CHECK-NEXT:.b32 6870 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xbf5:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6873 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xbf8:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 130 // DW_AT_decl_line -; CHECK-NEXT:.b32 6890 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xbfc:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6893 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xbff:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 131 // DW_AT_decl_line -; CHECK-NEXT:.b32 6911 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc03:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6914 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc06:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 132 // DW_AT_decl_line -; CHECK-NEXT:.b32 6932 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc0a:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 6935 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc0d:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 133 // DW_AT_decl_line -; CHECK-NEXT:.b32 7060 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc11:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7063 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc14:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 134 // DW_AT_decl_line -; CHECK-NEXT:.b32 7088 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc18:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7091 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc1b:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 135 // DW_AT_decl_line -; CHECK-NEXT:.b32 7113 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc1f:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7116 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc22:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 136 // DW_AT_decl_line -; CHECK-NEXT:.b32 7131 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc26:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7134 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc29:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 137 // DW_AT_decl_line -; CHECK-NEXT:.b32 7148 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc2d:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7151 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc30:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 138 // DW_AT_decl_line -; CHECK-NEXT:.b32 7176 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc34:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7179 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc37:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 139 // DW_AT_decl_line -; CHECK-NEXT:.b32 7197 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc3b:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7200 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc3e:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 140 // DW_AT_decl_line -; CHECK-NEXT:.b32 7223 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc42:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7226 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc45:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 142 // DW_AT_decl_line -; CHECK-NEXT:.b32 7246 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc49:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7249 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc4c:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 143 // DW_AT_decl_line -; CHECK-NEXT:.b32 7273 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc50:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7276 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc53:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 144 // DW_AT_decl_line -; CHECK-NEXT:.b32 7324 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc57:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7327 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc5a:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 146 // DW_AT_decl_line -; CHECK-NEXT:.b32 7357 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc5e:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7360 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc61:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 152 // DW_AT_decl_line -; CHECK-NEXT:.b32 7390 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc65:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7393 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc68:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 153 // DW_AT_decl_line -; CHECK-NEXT:.b32 7405 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc6c:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7408 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc6f:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 154 // DW_AT_decl_line -; CHECK-NEXT:.b32 7434 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc73:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7437 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc76:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 155 // DW_AT_decl_line -; CHECK-NEXT:.b32 7452 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc7a:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7455 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc7d:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 156 // DW_AT_decl_line -; CHECK-NEXT:.b32 7484 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc81:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7487 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc84:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 157 // DW_AT_decl_line -; CHECK-NEXT:.b32 7516 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc88:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7519 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc8b:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 158 // DW_AT_decl_line -; CHECK-NEXT:.b32 7549 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc8f:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7552 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc92:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 160 // DW_AT_decl_line -; CHECK-NEXT:.b32 7572 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc96:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7575 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xc99:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 161 // DW_AT_decl_line -; CHECK-NEXT:.b32 7617 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xc9d:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7620 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xca0:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 241 // DW_AT_decl_line -; CHECK-NEXT:.b32 7765 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xca4:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7768 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xca7:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 243 // DW_AT_decl_line -; CHECK-NEXT:.b32 7814 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xcab:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7817 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xcae:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 245 // DW_AT_decl_line -; CHECK-NEXT:.b32 7833 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xcb2:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7836 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xcb5:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 246 // DW_AT_decl_line -; CHECK-NEXT:.b32 7719 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xcb9:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7722 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xcbc:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 247 // DW_AT_decl_line -; CHECK-NEXT:.b32 7855 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xcc0:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7858 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xcc3:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 249 // DW_AT_decl_line -; CHECK-NEXT:.b32 7882 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xcc7:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7885 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xcca:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 250 // DW_AT_decl_line -; CHECK-NEXT:.b32 7997 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xcce:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8000 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xcd1:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 251 // DW_AT_decl_line -; CHECK-NEXT:.b32 7904 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xcd5:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7907 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xcd8:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 252 // DW_AT_decl_line -; CHECK-NEXT:.b32 7937 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0xcdc:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7940 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0xcdf:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 253 // DW_AT_decl_line -; CHECK-NEXT:.b32 8024 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xce3:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8027 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xce6:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 149 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8067 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xceb:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8070 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xcee:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 150 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8099 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xcf3:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8102 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xcf6:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 151 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8133 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xcfb:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8136 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xcfe:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 152 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8165 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xd03:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8168 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xd06:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 153 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8199 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xd0b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8202 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xd0e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 154 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8239 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xd13:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8242 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xd16:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 155 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8271 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xd1b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8274 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xd1e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 156 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8305 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xd23:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8308 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xd26:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 157 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8337 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xd2b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8340 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xd2e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 158 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8369 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xd33:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8372 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xd36:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 159 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8415 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xd3b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8418 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xd3e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 160 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8445 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xd43:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8448 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xd46:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 161 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8477 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xd4b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8480 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xd4e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 162 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8509 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xd53:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8512 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xd56:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 163 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8539 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xd5b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8542 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xd5e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 164 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8571 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xd63:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8574 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xd66:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 165 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8601 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xd6b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8604 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xd6e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 166 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8635 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xd73:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8638 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xd76:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 167 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8667 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xd7b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8670 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xd7e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 168 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8705 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xd83:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8708 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xd86:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 169 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8739 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xd8b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8742 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xd8e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 170 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8781 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xd93:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8784 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xd96:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 171 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8819 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xd9b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8822 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xd9e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 172 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8857 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xda3:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8860 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xda6:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 173 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8895 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xdab:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8898 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xdae:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 174 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8936 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xdb3:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8939 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xdb6:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 175 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 8976 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xdbb:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8979 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xdbe:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 176 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9010 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xdc3:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9013 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xdc6:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 177 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9050 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xdcb:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9053 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xdce:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 178 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9086 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xdd3:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9089 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xdd6:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 179 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9122 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xddb:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9125 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xdde:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 180 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9160 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xde3:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9163 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xde6:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 181 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9194 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xdeb:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9197 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xdee:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 182 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9228 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xdf3:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9231 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xdf6:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 183 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9260 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xdfb:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9263 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xdfe:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 184 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9292 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xe03:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9295 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xe06:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 185 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9322 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xe0b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9325 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xe0e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 186 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9356 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xe13:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9359 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xe16:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 187 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9392 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xe1b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9395 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xe1e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 188 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9431 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xe23:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9434 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xe26:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 189 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9474 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xe2b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9477 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xe2e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 190 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9523 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xe33:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9526 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xe36:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 191 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9559 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xe3b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9562 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xe3e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 192 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9608 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xe43:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9611 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xe46:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 193 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9657 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xe4b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9660 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xe4e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 194 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9689 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xe53:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9692 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xe56:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 195 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9723 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xe5b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9726 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xe5e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 196 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9767 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xe63:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9770 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xe66:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 197 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9809 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xe6b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9812 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xe6e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 198 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9839 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xe73:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9842 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xe76:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 199 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9871 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xe7b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9874 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xe7e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 200 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9903 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xe83:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9906 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xe86:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 201 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9933 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xe8b:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9936 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xe8e:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 202 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 9965 // DW_AT_import -; CHECK-NEXT:.b8 31 // Abbrev [31] 0xe93:0x8 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 9968 // DW_AT_import +; CHECK-NEXT:.b8 32 // Abbrev [32] 0xe96:0x8 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 13 // DW_AT_decl_file ; CHECK-NEXT:.b8 203 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 10001 // DW_AT_import +; CHECK-NEXT:.b32 10004 // DW_AT_import ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0xe9c:0x1b DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0xe9f:0x1b DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -3620,12 +3631,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 44 // DW_AT_decl_line -; CHECK-NEXT:.b32 3767 // DW_AT_type +; CHECK-NEXT:.b32 3770 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0xeb1:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 3767 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0xeb4:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 3770 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 10 // Abbrev [10] 0xeb7:0x11 DW_TAG_base_type +; CHECK-NEXT:.b8 10 // Abbrev [10] 0xeba:0x11 DW_TAG_base_type ; CHECK-NEXT:.b8 108 // DW_AT_name ; CHECK-NEXT:.b8 111 ; CHECK-NEXT:.b8 110 @@ -3642,7 +3653,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_encoding ; CHECK-NEXT:.b8 8 // DW_AT_byte_size -; CHECK-NEXT:.b8 32 // Abbrev [32] 0xec8:0x1d DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0xecb:0x1d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -3662,10 +3673,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 46 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0xedf:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0xee2:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0xee5:0x1f DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0xee8:0x1f DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -3687,10 +3698,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 48 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0xefe:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0xf01:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0xf04:0x1d DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0xf07:0x1d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -3710,10 +3721,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 50 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0xf1b:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0xf1e:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0xf21:0x1f DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0xf24:0x1f DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -3735,10 +3746,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 52 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0xf3a:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0xf3d:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0xf40:0x1d DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0xf43:0x1d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -3758,10 +3769,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 56 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0xf57:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0xf5a:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0xf5d:0x25 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0xf60:0x25 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -3784,12 +3795,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 54 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0xf77:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0xf7a:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0xf7c:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0xf7f:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0xf82:0x1f DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0xf85:0x1f DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -3811,10 +3822,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 58 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0xf9b:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0xf9e:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0xfa1:0x1d DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0xfa4:0x1d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -3834,10 +3845,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 60 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0xfb8:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0xfbb:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0xfbe:0x1d DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0xfc1:0x1d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -3857,10 +3868,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 62 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0xfd5:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0xfd8:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0xfdb:0x2b DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0xfde:0x2b DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -3889,12 +3900,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 64 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0xffb:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0xffe:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1000:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1003:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1006:0x1b DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1009:0x1b DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -3912,10 +3923,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 66 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x101b:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x101e:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1021:0x1d DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1024:0x1d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -3935,10 +3946,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 68 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1038:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x103b:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x103e:0x1b DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1041:0x1b DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -3956,10 +3967,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 72 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1053:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1056:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1059:0x1d DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x105c:0x1d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -3979,10 +3990,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 70 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1070:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1073:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1076:0x1b DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1079:0x1b DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4000,10 +4011,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 76 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x108b:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x108e:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1091:0x1d DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1094:0x1d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4023,10 +4034,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 74 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x10a8:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x10ab:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x10ae:0x1f DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x10b1:0x1f DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4048,10 +4059,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 78 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x10c7:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x10ca:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x10cd:0x1d DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x10d0:0x1d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4071,10 +4082,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 80 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x10e4:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x10e7:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x10ea:0x23 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x10ed:0x23 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4095,12 +4106,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 82 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1102:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1105:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1107:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x110a:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x110d:0x1f DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1110:0x1f DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4122,10 +4133,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 84 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1126:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1129:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x112c:0x27 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x112f:0x27 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4145,14 +4156,14 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 86 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1143:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1146:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1148:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x114b:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x114d:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1150:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1153:0x23 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1156:0x23 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4173,12 +4184,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 88 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x116b:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x116e:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1170:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1173:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1176:0x23 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1179:0x23 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4199,12 +4210,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 90 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x118e:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1191:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1193:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1196:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1199:0x23 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x119c:0x23 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4225,12 +4236,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 92 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x11b1:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x11b4:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x11b6:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x11b9:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x11bc:0x2a DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x11bf:0x2a DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4261,19 +4272,19 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 94 // DW_AT_decl_line -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x11e0:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x11e3:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 10 // Abbrev [10] 0x11e6:0x7 DW_TAG_base_type +; CHECK-NEXT:.b8 10 // Abbrev [10] 0x11e9:0x7 DW_TAG_base_type ; CHECK-NEXT:.b8 105 // DW_AT_name ; CHECK-NEXT:.b8 110 ; CHECK-NEXT:.b8 116 ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_encoding ; CHECK-NEXT:.b8 4 // DW_AT_byte_size -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x11ed:0x26 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x11f0:0x26 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4297,14 +4308,14 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 96 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1208:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x120b:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x120d:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 4627 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1210:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4630 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 12 // Abbrev [12] 0x1213:0x5 DW_TAG_pointer_type -; CHECK-NEXT:.b32 4582 // DW_AT_type -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1218:0x25 DW_TAG_subprogram +; CHECK-NEXT:.b8 12 // Abbrev [12] 0x1216:0x5 DW_TAG_pointer_type +; CHECK-NEXT:.b32 4585 // DW_AT_type +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x121b:0x25 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4327,12 +4338,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 98 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1232:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1235:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1237:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x123a:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x123d:0x1f DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1240:0x1f DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4352,12 +4363,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 100 // DW_AT_decl_line -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1256:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1259:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x125c:0x25 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x125f:0x25 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4383,12 +4394,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 102 // DW_AT_decl_line -; CHECK-NEXT:.b32 4737 // DW_AT_type +; CHECK-NEXT:.b32 4740 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x127b:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x127e:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 10 // Abbrev [10] 0x1281:0x8 DW_TAG_base_type +; CHECK-NEXT:.b8 10 // Abbrev [10] 0x1284:0x8 DW_TAG_base_type ; CHECK-NEXT:.b8 98 // DW_AT_name ; CHECK-NEXT:.b8 111 ; CHECK-NEXT:.b8 111 @@ -4396,7 +4407,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 2 // DW_AT_encoding ; CHECK-NEXT:.b8 1 // DW_AT_byte_size -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1289:0x2d DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x128c:0x2d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4425,14 +4436,14 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 106 // DW_AT_decl_line -; CHECK-NEXT:.b32 4737 // DW_AT_type +; CHECK-NEXT:.b32 4740 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x12ab:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x12ae:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x12b0:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x12b3:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x12b6:0x38 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x12b9:0x38 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4472,14 +4483,14 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 105 // DW_AT_decl_line -; CHECK-NEXT:.b32 4737 // DW_AT_type +; CHECK-NEXT:.b32 4740 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x12e3:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x12e6:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x12e8:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x12eb:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x12ee:0x1f DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x12f1:0x1f DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4499,12 +4510,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 108 // DW_AT_decl_line -; CHECK-NEXT:.b32 4737 // DW_AT_type +; CHECK-NEXT:.b32 4740 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1307:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x130a:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x130d:0x27 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1310:0x27 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4527,14 +4538,14 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 112 // DW_AT_decl_line -; CHECK-NEXT:.b32 4737 // DW_AT_type +; CHECK-NEXT:.b32 4740 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1329:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x132c:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x132e:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1331:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1334:0x32 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1337:0x32 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4568,14 +4579,14 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 111 // DW_AT_decl_line -; CHECK-NEXT:.b32 4737 // DW_AT_type +; CHECK-NEXT:.b32 4740 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x135b:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x135e:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1360:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1363:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1366:0x36 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1369:0x36 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4613,14 +4624,14 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 114 // DW_AT_decl_line -; CHECK-NEXT:.b32 4737 // DW_AT_type +; CHECK-NEXT:.b32 4740 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1391:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1394:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1396:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1399:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x139c:0x1f DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x139f:0x1f DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4640,12 +4651,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 116 // DW_AT_decl_line -; CHECK-NEXT:.b32 4737 // DW_AT_type +; CHECK-NEXT:.b32 4740 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x13b5:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x13b8:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x13bb:0x25 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x13be:0x25 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4671,12 +4682,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 118 // DW_AT_decl_line -; CHECK-NEXT:.b32 4737 // DW_AT_type +; CHECK-NEXT:.b32 4740 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x13da:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x13dd:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x13e0:0x32 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x13e3:0x32 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4710,14 +4721,14 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 120 // DW_AT_decl_line -; CHECK-NEXT:.b32 4737 // DW_AT_type +; CHECK-NEXT:.b32 4740 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1407:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x140a:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x140c:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x140f:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1412:0x1d DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1415:0x1d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4735,12 +4746,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 121 // DW_AT_decl_line -; CHECK-NEXT:.b32 5167 // DW_AT_type +; CHECK-NEXT:.b32 5170 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1429:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5167 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x142c:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5170 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 10 // Abbrev [10] 0x142f:0xc DW_TAG_base_type +; CHECK-NEXT:.b8 10 // Abbrev [10] 0x1432:0xc DW_TAG_base_type ; CHECK-NEXT:.b8 108 // DW_AT_name ; CHECK-NEXT:.b8 111 ; CHECK-NEXT:.b8 110 @@ -4752,7 +4763,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_encoding ; CHECK-NEXT:.b8 8 // DW_AT_byte_size -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x143b:0x25 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x143e:0x25 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4775,12 +4786,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 123 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1455:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1458:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x145a:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x145d:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1460:0x21 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1463:0x21 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4804,10 +4815,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 125 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x147b:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x147e:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1481:0x1f DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1484:0x1f DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4827,12 +4838,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 126 // DW_AT_decl_line -; CHECK-NEXT:.b32 3767 // DW_AT_type +; CHECK-NEXT:.b32 3770 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x149a:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 3767 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x149d:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 3770 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x14a0:0x21 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x14a3:0x21 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4854,12 +4865,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 128 // DW_AT_decl_line -; CHECK-NEXT:.b32 3767 // DW_AT_type +; CHECK-NEXT:.b32 3770 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x14bb:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x14be:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x14c1:0x1b DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x14c4:0x1b DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4877,10 +4888,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 138 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x14d6:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x14d9:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x14dc:0x1f DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x14df:0x1f DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4902,10 +4913,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 130 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x14f5:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x14f8:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x14fb:0x1f DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x14fe:0x1f DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4927,10 +4938,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 132 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1514:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1517:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x151a:0x1d DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x151d:0x1d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4950,10 +4961,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 134 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1531:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1534:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1537:0x1d DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x153a:0x1d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4973,10 +4984,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 136 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x154e:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1551:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1554:0x1f DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1557:0x1f DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -4996,12 +5007,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 140 // DW_AT_decl_line -; CHECK-NEXT:.b32 5167 // DW_AT_type +; CHECK-NEXT:.b32 5170 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x156d:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1570:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1573:0x21 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1576:0x21 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5023,12 +5034,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 142 // DW_AT_decl_line -; CHECK-NEXT:.b32 5167 // DW_AT_type +; CHECK-NEXT:.b32 5170 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x158e:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1591:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1594:0x23 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1597:0x23 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5052,12 +5063,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 143 // DW_AT_decl_line -; CHECK-NEXT:.b32 3767 // DW_AT_type +; CHECK-NEXT:.b32 3770 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x15b1:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x15b4:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x15b7:0x24 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x15ba:0x24 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5079,12 +5090,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 145 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x15d0:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x15d3:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x15d5:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x15d8:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2109 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x15db:0x1d DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x15de:0x1d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5102,12 +5113,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 146 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x15f2:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5634 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x15f5:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5637 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 10 // Abbrev [10] 0x15f8:0xa DW_TAG_base_type +; CHECK-NEXT:.b8 10 // Abbrev [10] 0x15fb:0xa DW_TAG_base_type ; CHECK-NEXT:.b8 100 // DW_AT_name ; CHECK-NEXT:.b8 111 ; CHECK-NEXT:.b8 117 @@ -5117,11 +5128,11 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_encoding ; CHECK-NEXT:.b8 8 // DW_AT_byte_size -; CHECK-NEXT:.b8 12 // Abbrev [12] 0x1602:0x5 DW_TAG_pointer_type -; CHECK-NEXT:.b32 5639 // DW_AT_type -; CHECK-NEXT:.b8 13 // Abbrev [13] 0x1607:0x5 DW_TAG_const_type -; CHECK-NEXT:.b32 5644 // DW_AT_type -; CHECK-NEXT:.b8 10 // Abbrev [10] 0x160c:0x8 DW_TAG_base_type +; CHECK-NEXT:.b8 12 // Abbrev [12] 0x1605:0x5 DW_TAG_pointer_type +; CHECK-NEXT:.b32 5642 // DW_AT_type +; CHECK-NEXT:.b8 13 // Abbrev [13] 0x160a:0x5 DW_TAG_const_type +; CHECK-NEXT:.b32 5647 // DW_AT_type +; CHECK-NEXT:.b8 10 // Abbrev [10] 0x160f:0x8 DW_TAG_base_type ; CHECK-NEXT:.b8 99 // DW_AT_name ; CHECK-NEXT:.b8 104 ; CHECK-NEXT:.b8 97 @@ -5129,7 +5140,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 8 // DW_AT_encoding ; CHECK-NEXT:.b8 1 // DW_AT_byte_size -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1614:0x1f DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1617:0x1f DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5151,10 +5162,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 147 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x162d:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5634 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1630:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5637 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1633:0x27 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1636:0x27 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5184,10 +5195,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 149 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1654:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1657:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x165a:0x2d DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x165d:0x2d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5218,12 +5229,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 151 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x167c:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x167f:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1681:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1684:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1687:0x21 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x168a:0x21 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5242,12 +5253,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 155 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x169d:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x16a0:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x16a2:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x16a5:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x16a8:0x2d DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x16ab:0x2d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5278,12 +5289,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 157 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x16ca:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x16cd:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x16cf:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x16d2:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x16d5:0x2e DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x16d8:0x2e DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5310,14 +5321,14 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 159 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x16f3:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x16f6:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x16f8:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x16fb:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x16fd:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 4627 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1700:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4630 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1703:0x1d DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1706:0x1d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5337,10 +5348,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 161 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x171a:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x171d:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1720:0x1f DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1723:0x1f DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5362,10 +5373,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 163 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1739:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x173c:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x173f:0x29 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1742:0x29 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5392,12 +5403,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 165 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x175d:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1760:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1762:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5167 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1765:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5170 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1768:0x27 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x176b:0x27 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5422,12 +5433,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 167 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1784:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1787:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1789:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x178c:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x178f:0x23 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1792:0x23 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5451,12 +5462,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_decl_file ; CHECK-NEXT:.b8 169 // DW_AT_decl_line -; CHECK-NEXT:.b32 4737 // DW_AT_type +; CHECK-NEXT:.b32 4740 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x17ac:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x17af:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x17b2:0x1b DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x17b5:0x1b DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5474,10 +5485,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 171 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x17c7:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x17ca:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x17cd:0x1d DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x17d0:0x1d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5497,10 +5508,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 173 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x17e4:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x17e7:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x17ea:0x1d DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x17ed:0x1d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5520,10 +5531,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 175 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1801:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1804:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1807:0x1b DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x180a:0x1b DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5541,10 +5552,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 177 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x181c:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x181f:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1822:0x1d DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1825:0x1d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5564,10 +5575,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 179 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1839:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x183c:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x183f:0x21 DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1842:0x21 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5591,10 +5602,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 181 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x185a:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x185d:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 32 // Abbrev [32] 0x1860:0x1f DW_TAG_subprogram +; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1863:0x1f DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -5616,10 +5627,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 183 // DW_AT_decl_line ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1879:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x187c:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x187f:0x14 DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1882:0x14 DW_TAG_subprogram ; CHECK-NEXT:.b8 97 // DW_AT_name ; CHECK-NEXT:.b8 99 ; CHECK-NEXT:.b8 111 @@ -5627,13 +5638,13 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 54 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x188d:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1890:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1893:0x14 DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1896:0x14 DW_TAG_subprogram ; CHECK-NEXT:.b8 97 // DW_AT_name ; CHECK-NEXT:.b8 115 ; CHECK-NEXT:.b8 105 @@ -5641,13 +5652,13 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 56 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x18a1:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x18a4:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x18a7:0x14 DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x18aa:0x14 DW_TAG_subprogram ; CHECK-NEXT:.b8 97 // DW_AT_name ; CHECK-NEXT:.b8 116 ; CHECK-NEXT:.b8 97 @@ -5655,13 +5666,13 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 58 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x18b5:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x18b8:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x18bb:0x1a DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x18be:0x1a DW_TAG_subprogram ; CHECK-NEXT:.b8 97 // DW_AT_name ; CHECK-NEXT:.b8 116 ; CHECK-NEXT:.b8 97 @@ -5670,15 +5681,15 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 60 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x18ca:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x18cf:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x18cd:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x18d2:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x18d5:0x14 DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x18d8:0x14 DW_TAG_subprogram ; CHECK-NEXT:.b8 99 // DW_AT_name ; CHECK-NEXT:.b8 101 ; CHECK-NEXT:.b8 105 @@ -5686,26 +5697,26 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 178 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x18e3:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x18e6:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x18e9:0x13 DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x18ec:0x13 DW_TAG_subprogram ; CHECK-NEXT:.b8 99 // DW_AT_name ; CHECK-NEXT:.b8 111 ; CHECK-NEXT:.b8 115 ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 63 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x18f6:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x18f9:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x18fc:0x14 DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x18ff:0x14 DW_TAG_subprogram ; CHECK-NEXT:.b8 99 // DW_AT_name ; CHECK-NEXT:.b8 111 ; CHECK-NEXT:.b8 115 @@ -5713,26 +5724,26 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 72 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x190a:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x190d:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1910:0x13 DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1913:0x13 DW_TAG_subprogram ; CHECK-NEXT:.b8 101 // DW_AT_name ; CHECK-NEXT:.b8 120 ; CHECK-NEXT:.b8 112 ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 100 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x191d:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1920:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1923:0x14 DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1926:0x14 DW_TAG_subprogram ; CHECK-NEXT:.b8 102 // DW_AT_name ; CHECK-NEXT:.b8 97 ; CHECK-NEXT:.b8 98 @@ -5740,13 +5751,13 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 181 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1931:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1934:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1937:0x15 DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x193a:0x15 DW_TAG_subprogram ; CHECK-NEXT:.b8 102 // DW_AT_name ; CHECK-NEXT:.b8 108 ; CHECK-NEXT:.b8 111 @@ -5755,13 +5766,13 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 184 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1946:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1949:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x194c:0x19 DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x194f:0x19 DW_TAG_subprogram ; CHECK-NEXT:.b8 102 // DW_AT_name ; CHECK-NEXT:.b8 109 ; CHECK-NEXT:.b8 111 @@ -5769,15 +5780,15 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 187 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x195a:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x195f:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x195d:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1962:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1965:0x1a DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1968:0x1a DW_TAG_subprogram ; CHECK-NEXT:.b8 102 // DW_AT_name ; CHECK-NEXT:.b8 114 ; CHECK-NEXT:.b8 101 @@ -5786,15 +5797,15 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 103 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1974:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1979:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 4627 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1977:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x197c:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4630 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x197f:0x1a DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1982:0x1a DW_TAG_subprogram ; CHECK-NEXT:.b8 108 // DW_AT_name ; CHECK-NEXT:.b8 100 ; CHECK-NEXT:.b8 101 @@ -5803,28 +5814,28 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 106 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x198e:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1993:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1991:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1996:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1999:0x13 DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x199c:0x13 DW_TAG_subprogram ; CHECK-NEXT:.b8 108 // DW_AT_name ; CHECK-NEXT:.b8 111 ; CHECK-NEXT:.b8 103 ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 109 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x19a6:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x19a9:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x19ac:0x15 DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x19af:0x15 DW_TAG_subprogram ; CHECK-NEXT:.b8 108 // DW_AT_name ; CHECK-NEXT:.b8 111 ; CHECK-NEXT:.b8 103 @@ -5833,13 +5844,13 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 112 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x19bb:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x19be:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x19c1:0x19 DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x19c4:0x19 DW_TAG_subprogram ; CHECK-NEXT:.b8 109 // DW_AT_name ; CHECK-NEXT:.b8 111 ; CHECK-NEXT:.b8 100 @@ -5847,45 +5858,45 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 115 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x19cf:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x19d4:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6618 // DW_AT_type -; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 12 // Abbrev [12] 0x19da:0x5 DW_TAG_pointer_type -; CHECK-NEXT:.b32 5624 // DW_AT_type -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x19df:0x18 DW_TAG_subprogram +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x19d2:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x19d7:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6621 // DW_AT_type +; CHECK-NEXT:.b8 0 // End Of Children Mark +; CHECK-NEXT:.b8 12 // Abbrev [12] 0x19dd:0x5 DW_TAG_pointer_type +; CHECK-NEXT:.b32 5627 // DW_AT_type +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x19e2:0x18 DW_TAG_subprogram ; CHECK-NEXT:.b8 112 // DW_AT_name ; CHECK-NEXT:.b8 111 ; CHECK-NEXT:.b8 119 ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 153 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x19ec:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x19f1:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x19ef:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x19f4:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x19f7:0x13 DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x19fa:0x13 DW_TAG_subprogram ; CHECK-NEXT:.b8 115 // DW_AT_name ; CHECK-NEXT:.b8 105 ; CHECK-NEXT:.b8 110 ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 65 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1a04:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1a07:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1a0a:0x14 DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1a0d:0x14 DW_TAG_subprogram ; CHECK-NEXT:.b8 115 // DW_AT_name ; CHECK-NEXT:.b8 105 ; CHECK-NEXT:.b8 110 @@ -5893,13 +5904,13 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 74 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1a18:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1a1b:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1a1e:0x14 DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1a21:0x14 DW_TAG_subprogram ; CHECK-NEXT:.b8 115 // DW_AT_name ; CHECK-NEXT:.b8 113 ; CHECK-NEXT:.b8 114 @@ -5907,26 +5918,26 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 156 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1a2c:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1a2f:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1a32:0x13 DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1a35:0x13 DW_TAG_subprogram ; CHECK-NEXT:.b8 116 // DW_AT_name ; CHECK-NEXT:.b8 97 ; CHECK-NEXT:.b8 110 ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 67 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1a3f:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1a42:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1a45:0x14 DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1a48:0x14 DW_TAG_subprogram ; CHECK-NEXT:.b8 116 // DW_AT_name ; CHECK-NEXT:.b8 97 ; CHECK-NEXT:.b8 110 @@ -5934,14 +5945,14 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_decl_file ; CHECK-NEXT:.b8 76 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1a53:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1a56:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1a59:0xd DW_TAG_typedef -; CHECK-NEXT:.b32 6758 // DW_AT_type +; CHECK-NEXT:.b8 35 // Abbrev [35] 0x1a5c:0xd DW_TAG_typedef +; CHECK-NEXT:.b32 6761 // DW_AT_type ; CHECK-NEXT:.b8 100 // DW_AT_name ; CHECK-NEXT:.b8 105 ; CHECK-NEXT:.b8 118 @@ -5950,10 +5961,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 101 // DW_AT_decl_line -; CHECK-NEXT:.b8 35 // Abbrev [35] 0x1a66:0x2 DW_TAG_structure_type +; CHECK-NEXT:.b8 36 // Abbrev [36] 0x1a69:0x2 DW_TAG_structure_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1a68:0xe DW_TAG_typedef -; CHECK-NEXT:.b32 6774 // DW_AT_type +; CHECK-NEXT:.b8 35 // Abbrev [35] 0x1a6b:0xe DW_TAG_typedef +; CHECK-NEXT:.b32 6777 // DW_AT_type ; CHECK-NEXT:.b8 108 // DW_AT_name ; CHECK-NEXT:.b8 100 ; CHECK-NEXT:.b8 105 @@ -5963,35 +5974,35 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 109 // DW_AT_decl_line -; CHECK-NEXT:.b8 36 // Abbrev [36] 0x1a76:0x22 DW_TAG_structure_type +; CHECK-NEXT:.b8 37 // Abbrev [37] 0x1a79:0x22 DW_TAG_structure_type ; CHECK-NEXT:.b8 16 // DW_AT_byte_size ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 105 // DW_AT_decl_line -; CHECK-NEXT:.b8 11 // Abbrev [11] 0x1a7a:0xf DW_TAG_member +; CHECK-NEXT:.b8 11 // Abbrev [11] 0x1a7d:0xf DW_TAG_member ; CHECK-NEXT:.b8 113 // DW_AT_name ; CHECK-NEXT:.b8 117 ; CHECK-NEXT:.b8 111 ; CHECK-NEXT:.b8 116 ; CHECK-NEXT:.b8 0 -; CHECK-NEXT:.b32 5167 // DW_AT_type +; CHECK-NEXT:.b32 5170 // DW_AT_type ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 107 // DW_AT_decl_line ; CHECK-NEXT:.b8 2 // DW_AT_data_member_location ; CHECK-NEXT:.b8 35 ; CHECK-NEXT:.b8 0 -; CHECK-NEXT:.b8 11 // Abbrev [11] 0x1a89:0xe DW_TAG_member +; CHECK-NEXT:.b8 11 // Abbrev [11] 0x1a8c:0xe DW_TAG_member ; CHECK-NEXT:.b8 114 // DW_AT_name ; CHECK-NEXT:.b8 101 ; CHECK-NEXT:.b8 109 ; CHECK-NEXT:.b8 0 -; CHECK-NEXT:.b32 5167 // DW_AT_type +; CHECK-NEXT:.b32 5170 // DW_AT_type ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 108 // DW_AT_decl_line ; CHECK-NEXT:.b8 2 // DW_AT_data_member_location ; CHECK-NEXT:.b8 35 ; CHECK-NEXT:.b8 8 ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 37 // Abbrev [37] 0x1a98:0xd DW_TAG_subprogram +; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1a9b:0xd DW_TAG_subprogram ; CHECK-NEXT:.b8 97 // DW_AT_name ; CHECK-NEXT:.b8 98 ; CHECK-NEXT:.b8 111 @@ -6004,7 +6015,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external ; CHECK-NEXT:.b8 1 // DW_AT_noreturn -; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1aa5:0x14 DW_TAG_subprogram +; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1aa8:0x14 DW_TAG_subprogram ; CHECK-NEXT:.b8 97 // DW_AT_name ; CHECK-NEXT:.b8 98 ; CHECK-NEXT:.b8 115 @@ -6012,13 +6023,13 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 7 // DW_AT_decl_line ; CHECK-NEXT:.b8 3 -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1ab3:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1ab6:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1ab9:0x17 DW_TAG_subprogram +; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1abc:0x17 DW_TAG_subprogram ; CHECK-NEXT:.b8 97 // DW_AT_name ; CHECK-NEXT:.b8 116 ; CHECK-NEXT:.b8 101 @@ -6029,16 +6040,16 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 7 // DW_AT_decl_line ; CHECK-NEXT:.b8 2 -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1aca:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6864 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1acd:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6867 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 12 // Abbrev [12] 0x1ad0:0x5 DW_TAG_pointer_type -; CHECK-NEXT:.b32 6869 // DW_AT_type -; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1ad5:0x1 DW_TAG_subroutine_type -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1ad6:0x14 DW_TAG_subprogram +; CHECK-NEXT:.b8 12 // Abbrev [12] 0x1ad3:0x5 DW_TAG_pointer_type +; CHECK-NEXT:.b32 6872 // DW_AT_type +; CHECK-NEXT:.b8 40 // Abbrev [40] 0x1ad8:0x1 DW_TAG_subroutine_type +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1ad9:0x14 DW_TAG_subprogram ; CHECK-NEXT:.b8 97 // DW_AT_name ; CHECK-NEXT:.b8 116 ; CHECK-NEXT:.b8 111 @@ -6046,13 +6057,13 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 9 // DW_AT_decl_file ; CHECK-NEXT:.b8 26 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1ae4:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5634 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1ae7:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5637 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1aea:0x15 DW_TAG_subprogram +; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1aed:0x15 DW_TAG_subprogram ; CHECK-NEXT:.b8 97 // DW_AT_name ; CHECK-NEXT:.b8 116 ; CHECK-NEXT:.b8 111 @@ -6061,13 +6072,13 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 22 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1af9:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5634 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1afc:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5637 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1aff:0x15 DW_TAG_subprogram +; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1b02:0x15 DW_TAG_subprogram ; CHECK-NEXT:.b8 97 // DW_AT_name ; CHECK-NEXT:.b8 116 ; CHECK-NEXT:.b8 111 @@ -6076,13 +6087,13 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 27 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 5167 // DW_AT_type +; CHECK-NEXT:.b32 5170 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1b0e:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5634 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1b11:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5637 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1b14:0x2b DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1b17:0x2b DW_TAG_subprogram ; CHECK-NEXT:.b8 98 // DW_AT_name ; CHECK-NEXT:.b8 115 ; CHECK-NEXT:.b8 101 @@ -6093,26 +6104,26 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 10 // DW_AT_decl_file ; CHECK-NEXT:.b8 20 // DW_AT_decl_line -; CHECK-NEXT:.b32 6975 // DW_AT_type +; CHECK-NEXT:.b32 6978 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1b25:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6976 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1b2a:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6976 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1b2f:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6982 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1b34:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6982 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1b39:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 7017 // DW_AT_type -; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 40 // Abbrev [40] 0x1b3f:0x1 DW_TAG_pointer_type -; CHECK-NEXT:.b8 12 // Abbrev [12] 0x1b40:0x5 DW_TAG_pointer_type -; CHECK-NEXT:.b32 6981 // DW_AT_type -; CHECK-NEXT:.b8 41 // Abbrev [41] 0x1b45:0x1 DW_TAG_const_type -; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1b46:0xe DW_TAG_typedef -; CHECK-NEXT:.b32 6996 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1b28:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6979 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1b2d:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6979 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1b32:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6985 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1b37:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6985 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1b3c:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 7020 // DW_AT_type +; CHECK-NEXT:.b8 0 // End Of Children Mark +; CHECK-NEXT:.b8 41 // Abbrev [41] 0x1b42:0x1 DW_TAG_pointer_type +; CHECK-NEXT:.b8 12 // Abbrev [12] 0x1b43:0x5 DW_TAG_pointer_type +; CHECK-NEXT:.b32 6984 // DW_AT_type +; CHECK-NEXT:.b8 42 // Abbrev [42] 0x1b48:0x1 DW_TAG_const_type +; CHECK-NEXT:.b8 35 // Abbrev [35] 0x1b49:0xe DW_TAG_typedef +; CHECK-NEXT:.b32 6999 // DW_AT_type ; CHECK-NEXT:.b8 115 // DW_AT_name ; CHECK-NEXT:.b8 105 ; CHECK-NEXT:.b8 122 @@ -6122,7 +6133,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 11 // DW_AT_decl_file ; CHECK-NEXT:.b8 62 // DW_AT_decl_line -; CHECK-NEXT:.b8 10 // Abbrev [10] 0x1b54:0x15 DW_TAG_base_type +; CHECK-NEXT:.b8 10 // Abbrev [10] 0x1b57:0x15 DW_TAG_base_type ; CHECK-NEXT:.b8 108 // DW_AT_name ; CHECK-NEXT:.b8 111 ; CHECK-NEXT:.b8 110 @@ -6143,8 +6154,8 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 7 // DW_AT_encoding ; CHECK-NEXT:.b8 8 // DW_AT_byte_size -; CHECK-NEXT:.b8 20 // Abbrev [20] 0x1b69:0x16 DW_TAG_typedef -; CHECK-NEXT:.b32 7039 // DW_AT_type +; CHECK-NEXT:.b8 20 // Abbrev [20] 0x1b6c:0x16 DW_TAG_typedef +; CHECK-NEXT:.b32 7042 // DW_AT_type ; CHECK-NEXT:.b8 95 // DW_AT_name ; CHECK-NEXT:.b8 95 ; CHECK-NEXT:.b8 99 @@ -6162,16 +6173,16 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 230 // DW_AT_decl_line ; CHECK-NEXT:.b8 2 -; CHECK-NEXT:.b8 12 // Abbrev [12] 0x1b7f:0x5 DW_TAG_pointer_type -; CHECK-NEXT:.b32 7044 // DW_AT_type -; CHECK-NEXT:.b8 42 // Abbrev [42] 0x1b84:0x10 DW_TAG_subroutine_type -; CHECK-NEXT:.b32 4582 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1b89:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6976 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1b8e:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6976 // DW_AT_type -; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1b94:0x1c DW_TAG_subprogram +; CHECK-NEXT:.b8 12 // Abbrev [12] 0x1b82:0x5 DW_TAG_pointer_type +; CHECK-NEXT:.b32 7047 // DW_AT_type +; CHECK-NEXT:.b8 43 // Abbrev [43] 0x1b87:0x10 DW_TAG_subroutine_type +; CHECK-NEXT:.b32 4585 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1b8c:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6979 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1b91:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6979 // DW_AT_type +; CHECK-NEXT:.b8 0 // End Of Children Mark +; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1b97:0x1c DW_TAG_subprogram ; CHECK-NEXT:.b8 99 // DW_AT_name ; CHECK-NEXT:.b8 97 ; CHECK-NEXT:.b8 108 @@ -6182,15 +6193,15 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 212 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6975 // DW_AT_type +; CHECK-NEXT:.b32 6978 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1ba5:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6982 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1baa:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6982 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1ba8:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6985 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1bad:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6985 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1bb0:0x19 DW_TAG_subprogram +; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1bb3:0x19 DW_TAG_subprogram ; CHECK-NEXT:.b8 100 // DW_AT_name ; CHECK-NEXT:.b8 105 ; CHECK-NEXT:.b8 118 @@ -6198,15 +6209,15 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 21 // DW_AT_decl_line ; CHECK-NEXT:.b8 3 -; CHECK-NEXT:.b32 6745 // DW_AT_type +; CHECK-NEXT:.b32 6748 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1bbe:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 4582 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1bc3:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1bc1:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4585 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1bc6:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 43 // Abbrev [43] 0x1bc9:0x12 DW_TAG_subprogram +; CHECK-NEXT:.b8 44 // Abbrev [44] 0x1bcc:0x12 DW_TAG_subprogram ; CHECK-NEXT:.b8 101 // DW_AT_name ; CHECK-NEXT:.b8 120 ; CHECK-NEXT:.b8 105 @@ -6218,10 +6229,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external ; CHECK-NEXT:.b8 1 // DW_AT_noreturn -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1bd5:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1bd8:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 18 // Abbrev [18] 0x1bdb:0x11 DW_TAG_subprogram +; CHECK-NEXT:.b8 18 // Abbrev [18] 0x1bde:0x11 DW_TAG_subprogram ; CHECK-NEXT:.b8 102 // DW_AT_name ; CHECK-NEXT:.b8 114 ; CHECK-NEXT:.b8 101 @@ -6232,10 +6243,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 1 ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1be6:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6975 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1be9:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6978 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1bec:0x17 DW_TAG_subprogram +; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1bef:0x17 DW_TAG_subprogram ; CHECK-NEXT:.b8 103 // DW_AT_name ; CHECK-NEXT:.b8 101 ; CHECK-NEXT:.b8 116 @@ -6246,15 +6257,15 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 52 // DW_AT_decl_line ; CHECK-NEXT:.b8 2 -; CHECK-NEXT:.b32 7171 // DW_AT_type +; CHECK-NEXT:.b32 7174 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1bfd:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5634 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1c00:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5637 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 12 // Abbrev [12] 0x1c03:0x5 DW_TAG_pointer_type -; CHECK-NEXT:.b32 5644 // DW_AT_type -; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1c08:0x15 DW_TAG_subprogram +; CHECK-NEXT:.b8 12 // Abbrev [12] 0x1c06:0x5 DW_TAG_pointer_type +; CHECK-NEXT:.b32 5647 // DW_AT_type +; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1c0b:0x15 DW_TAG_subprogram ; CHECK-NEXT:.b8 108 // DW_AT_name ; CHECK-NEXT:.b8 97 ; CHECK-NEXT:.b8 98 @@ -6263,13 +6274,13 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 8 // DW_AT_decl_line ; CHECK-NEXT:.b8 3 -; CHECK-NEXT:.b32 5167 // DW_AT_type +; CHECK-NEXT:.b32 5170 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1c17:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5167 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1c1a:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5170 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1c1d:0x1a DW_TAG_subprogram +; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1c20:0x1a DW_TAG_subprogram ; CHECK-NEXT:.b8 108 // DW_AT_name ; CHECK-NEXT:.b8 100 ; CHECK-NEXT:.b8 105 @@ -6278,15 +6289,15 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 23 // DW_AT_decl_line ; CHECK-NEXT:.b8 3 -; CHECK-NEXT:.b32 6760 // DW_AT_type +; CHECK-NEXT:.b32 6763 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1c2c:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5167 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1c31:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5167 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1c2f:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5170 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1c34:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5170 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1c37:0x17 DW_TAG_subprogram +; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1c3a:0x17 DW_TAG_subprogram ; CHECK-NEXT:.b8 109 // DW_AT_name ; CHECK-NEXT:.b8 97 ; CHECK-NEXT:.b8 108 @@ -6297,13 +6308,13 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 210 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6975 // DW_AT_type +; CHECK-NEXT:.b32 6978 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1c48:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6982 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1c4b:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6985 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1c4e:0x1b DW_TAG_subprogram +; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1c51:0x1b DW_TAG_subprogram ; CHECK-NEXT:.b8 109 // DW_AT_name ; CHECK-NEXT:.b8 98 ; CHECK-NEXT:.b8 108 @@ -6313,15 +6324,15 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 95 // DW_AT_decl_line ; CHECK-NEXT:.b8 3 -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1c5e:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5634 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1c63:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6982 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1c61:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5637 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1c66:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6985 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1c69:0x23 DW_TAG_subprogram +; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1c6c:0x23 DW_TAG_subprogram ; CHECK-NEXT:.b8 109 // DW_AT_name ; CHECK-NEXT:.b8 98 ; CHECK-NEXT:.b8 115 @@ -6334,19 +6345,19 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 106 // DW_AT_decl_line ; CHECK-NEXT:.b8 3 -; CHECK-NEXT:.b32 6982 // DW_AT_type +; CHECK-NEXT:.b32 6985 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1c7c:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 7308 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1c81:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5634 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1c86:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6982 // DW_AT_type -; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 12 // Abbrev [12] 0x1c8c:0x5 DW_TAG_pointer_type -; CHECK-NEXT:.b32 7313 // DW_AT_type -; CHECK-NEXT:.b8 10 // Abbrev [10] 0x1c91:0xb DW_TAG_base_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1c7f:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 7311 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1c84:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5637 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1c89:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6985 // DW_AT_type +; CHECK-NEXT:.b8 0 // End Of Children Mark +; CHECK-NEXT:.b8 12 // Abbrev [12] 0x1c8f:0x5 DW_TAG_pointer_type +; CHECK-NEXT:.b32 7316 // DW_AT_type +; CHECK-NEXT:.b8 10 // Abbrev [10] 0x1c94:0xb DW_TAG_base_type ; CHECK-NEXT:.b8 119 // DW_AT_name ; CHECK-NEXT:.b8 99 ; CHECK-NEXT:.b8 104 @@ -6357,7 +6368,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 5 // DW_AT_encoding ; CHECK-NEXT:.b8 4 // DW_AT_byte_size -; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1c9c:0x21 DW_TAG_subprogram +; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1c9f:0x21 DW_TAG_subprogram ; CHECK-NEXT:.b8 109 // DW_AT_name ; CHECK-NEXT:.b8 98 ; CHECK-NEXT:.b8 116 @@ -6368,17 +6379,17 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 98 // DW_AT_decl_line ; CHECK-NEXT:.b8 3 -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1cad:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 7308 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1cb2:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5634 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1cb7:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6982 // DW_AT_type -; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 18 // Abbrev [18] 0x1cbd:0x21 DW_TAG_subprogram +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1cb0:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 7311 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1cb5:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5637 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1cba:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6985 // DW_AT_type +; CHECK-NEXT:.b8 0 // End Of Children Mark +; CHECK-NEXT:.b8 18 // Abbrev [18] 0x1cc0:0x21 DW_TAG_subprogram ; CHECK-NEXT:.b8 113 // DW_AT_name ; CHECK-NEXT:.b8 115 ; CHECK-NEXT:.b8 111 @@ -6390,16 +6401,16 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 2 ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1cc9:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6975 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1cce:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6982 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1cd3:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6982 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1cd8:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 7017 // DW_AT_type -; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 44 // Abbrev [44] 0x1cde:0xf DW_TAG_subprogram +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1ccc:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6978 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1cd1:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6985 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1cd6:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6985 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1cdb:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 7020 // DW_AT_type +; CHECK-NEXT:.b8 0 // End Of Children Mark +; CHECK-NEXT:.b8 45 // Abbrev [45] 0x1ce1:0xf DW_TAG_subprogram ; CHECK-NEXT:.b8 114 // DW_AT_name ; CHECK-NEXT:.b8 97 ; CHECK-NEXT:.b8 110 @@ -6408,10 +6419,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 118 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1ced:0x1d DW_TAG_subprogram +; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1cf0:0x1d DW_TAG_subprogram ; CHECK-NEXT:.b8 114 // DW_AT_name ; CHECK-NEXT:.b8 101 ; CHECK-NEXT:.b8 97 @@ -6423,15 +6434,15 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 224 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 6975 // DW_AT_type +; CHECK-NEXT:.b32 6978 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1cff:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6975 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d04:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6982 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d02:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6978 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d07:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6985 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 18 // Abbrev [18] 0x1d0a:0x12 DW_TAG_subprogram +; CHECK-NEXT:.b8 18 // Abbrev [18] 0x1d0d:0x12 DW_TAG_subprogram ; CHECK-NEXT:.b8 115 // DW_AT_name ; CHECK-NEXT:.b8 114 ; CHECK-NEXT:.b8 97 @@ -6443,10 +6454,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 1 ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d16:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d19:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 603 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1d1c:0x1b DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1d1f:0x1b DW_TAG_subprogram ; CHECK-NEXT:.b8 115 // DW_AT_name ; CHECK-NEXT:.b8 116 ; CHECK-NEXT:.b8 114 @@ -6456,17 +6467,17 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 164 // DW_AT_decl_line -; CHECK-NEXT:.b32 5624 // DW_AT_type +; CHECK-NEXT:.b32 5627 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d2c:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5634 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d31:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 7479 // DW_AT_type -; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 12 // Abbrev [12] 0x1d37:0x5 DW_TAG_pointer_type -; CHECK-NEXT:.b32 7171 // DW_AT_type -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1d3c:0x20 DW_TAG_subprogram +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d2f:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5637 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d34:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 7482 // DW_AT_type +; CHECK-NEXT:.b8 0 // End Of Children Mark +; CHECK-NEXT:.b8 12 // Abbrev [12] 0x1d3a:0x5 DW_TAG_pointer_type +; CHECK-NEXT:.b32 7174 // DW_AT_type +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1d3f:0x20 DW_TAG_subprogram ; CHECK-NEXT:.b8 115 // DW_AT_name ; CHECK-NEXT:.b8 116 ; CHECK-NEXT:.b8 114 @@ -6476,17 +6487,17 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 183 // DW_AT_decl_line -; CHECK-NEXT:.b32 5167 // DW_AT_type +; CHECK-NEXT:.b32 5170 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d4c:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5634 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d51:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 7479 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d56:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 4582 // DW_AT_type -; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1d5c:0x21 DW_TAG_subprogram +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d4f:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5637 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d54:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 7482 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d59:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4585 // DW_AT_type +; CHECK-NEXT:.b8 0 // End Of Children Mark +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1d5f:0x21 DW_TAG_subprogram ; CHECK-NEXT:.b8 115 // DW_AT_name ; CHECK-NEXT:.b8 116 ; CHECK-NEXT:.b8 114 @@ -6497,17 +6508,17 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 187 // DW_AT_decl_line -; CHECK-NEXT:.b32 6996 // DW_AT_type +; CHECK-NEXT:.b32 6999 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d6d:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5634 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d72:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 7479 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d77:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 4582 // DW_AT_type -; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1d7d:0x17 DW_TAG_subprogram +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d70:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5637 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d75:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 7482 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d7a:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4585 // DW_AT_type +; CHECK-NEXT:.b8 0 // End Of Children Mark +; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1d80:0x17 DW_TAG_subprogram ; CHECK-NEXT:.b8 115 // DW_AT_name ; CHECK-NEXT:.b8 121 ; CHECK-NEXT:.b8 115 @@ -6518,13 +6529,13 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 205 // DW_AT_decl_line ; CHECK-NEXT:.b8 2 -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d8e:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5634 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1d91:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5637 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1d94:0x23 DW_TAG_subprogram +; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1d97:0x23 DW_TAG_subprogram ; CHECK-NEXT:.b8 119 // DW_AT_name ; CHECK-NEXT:.b8 99 ; CHECK-NEXT:.b8 115 @@ -6537,21 +6548,21 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 109 // DW_AT_decl_line ; CHECK-NEXT:.b8 3 -; CHECK-NEXT:.b32 6982 // DW_AT_type +; CHECK-NEXT:.b32 6985 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1da7:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 7171 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1dac:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 7607 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1db1:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 6982 // DW_AT_type -; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 12 // Abbrev [12] 0x1db7:0x5 DW_TAG_pointer_type -; CHECK-NEXT:.b32 7612 // DW_AT_type -; CHECK-NEXT:.b8 13 // Abbrev [13] 0x1dbc:0x5 DW_TAG_const_type -; CHECK-NEXT:.b32 7313 // DW_AT_type -; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1dc1:0x1c DW_TAG_subprogram +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1daa:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 7174 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1daf:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 7610 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1db4:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 6985 // DW_AT_type +; CHECK-NEXT:.b8 0 // End Of Children Mark +; CHECK-NEXT:.b8 12 // Abbrev [12] 0x1dba:0x5 DW_TAG_pointer_type +; CHECK-NEXT:.b32 7615 // DW_AT_type +; CHECK-NEXT:.b8 13 // Abbrev [13] 0x1dbf:0x5 DW_TAG_const_type +; CHECK-NEXT:.b32 7316 // DW_AT_type +; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1dc4:0x1c DW_TAG_subprogram ; CHECK-NEXT:.b8 119 // DW_AT_name ; CHECK-NEXT:.b8 99 ; CHECK-NEXT:.b8 116 @@ -6562,15 +6573,15 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 102 // DW_AT_decl_line ; CHECK-NEXT:.b8 3 -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1dd2:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 7171 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1dd7:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 7313 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1dd5:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 7174 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1dda:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 7316 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 29 // Abbrev [29] 0x1ddd:0x78 DW_TAG_namespace +; CHECK-NEXT:.b8 30 // Abbrev [30] 0x1de0:0x78 DW_TAG_namespace ; CHECK-NEXT:.b8 95 // DW_AT_name ; CHECK-NEXT:.b8 95 ; CHECK-NEXT:.b8 103 @@ -6581,43 +6592,43 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 120 ; CHECK-NEXT:.b8 120 ; CHECK-NEXT:.b8 0 -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x1de8:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x1deb:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 201 // DW_AT_decl_line -; CHECK-NEXT:.b32 7765 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x1def:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7768 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x1df2:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 207 // DW_AT_decl_line -; CHECK-NEXT:.b32 7814 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x1df6:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7817 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x1df9:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 211 // DW_AT_decl_line -; CHECK-NEXT:.b32 7833 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x1dfd:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7836 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x1e00:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 217 // DW_AT_decl_line -; CHECK-NEXT:.b32 7855 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x1e04:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7858 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x1e07:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 228 // DW_AT_decl_line -; CHECK-NEXT:.b32 7882 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x1e0b:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7885 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x1e0e:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 229 // DW_AT_decl_line -; CHECK-NEXT:.b32 7904 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x1e12:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7907 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x1e15:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 230 // DW_AT_decl_line -; CHECK-NEXT:.b32 7937 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x1e19:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 7940 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x1e1c:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 232 // DW_AT_decl_line -; CHECK-NEXT:.b32 7997 // DW_AT_import -; CHECK-NEXT:.b8 30 // Abbrev [30] 0x1e20:0x7 DW_TAG_imported_declaration +; CHECK-NEXT:.b32 8000 // DW_AT_import +; CHECK-NEXT:.b8 31 // Abbrev [31] 0x1e23:0x7 DW_TAG_imported_declaration ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 233 // DW_AT_decl_line -; CHECK-NEXT:.b32 8024 // DW_AT_import -; CHECK-NEXT:.b8 4 // Abbrev [4] 0x1e27:0x2d DW_TAG_subprogram +; CHECK-NEXT:.b32 8027 // DW_AT_import +; CHECK-NEXT:.b8 4 // Abbrev [4] 0x1e2a:0x2d DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 78 @@ -6645,17 +6656,17 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 8 // DW_AT_decl_file ; CHECK-NEXT:.b8 214 // DW_AT_decl_line -; CHECK-NEXT:.b32 7765 // DW_AT_type +; CHECK-NEXT:.b32 7768 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1e49:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 3767 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1e4e:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 3767 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1e4c:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 3770 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1e51:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 3770 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1e55:0xf DW_TAG_typedef -; CHECK-NEXT:.b32 7780 // DW_AT_type +; CHECK-NEXT:.b8 35 // Abbrev [35] 0x1e58:0xf DW_TAG_typedef +; CHECK-NEXT:.b32 7783 // DW_AT_type ; CHECK-NEXT:.b8 108 // DW_AT_name ; CHECK-NEXT:.b8 108 ; CHECK-NEXT:.b8 100 @@ -6666,35 +6677,35 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 121 // DW_AT_decl_line -; CHECK-NEXT:.b8 36 // Abbrev [36] 0x1e64:0x22 DW_TAG_structure_type +; CHECK-NEXT:.b8 37 // Abbrev [37] 0x1e67:0x22 DW_TAG_structure_type ; CHECK-NEXT:.b8 16 // DW_AT_byte_size ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 117 // DW_AT_decl_line -; CHECK-NEXT:.b8 11 // Abbrev [11] 0x1e68:0xf DW_TAG_member +; CHECK-NEXT:.b8 11 // Abbrev [11] 0x1e6b:0xf DW_TAG_member ; CHECK-NEXT:.b8 113 // DW_AT_name ; CHECK-NEXT:.b8 117 ; CHECK-NEXT:.b8 111 ; CHECK-NEXT:.b8 116 ; CHECK-NEXT:.b8 0 -; CHECK-NEXT:.b32 3767 // DW_AT_type +; CHECK-NEXT:.b32 3770 // DW_AT_type ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 119 // DW_AT_decl_line ; CHECK-NEXT:.b8 2 // DW_AT_data_member_location ; CHECK-NEXT:.b8 35 ; CHECK-NEXT:.b8 0 -; CHECK-NEXT:.b8 11 // Abbrev [11] 0x1e77:0xe DW_TAG_member +; CHECK-NEXT:.b8 11 // Abbrev [11] 0x1e7a:0xe DW_TAG_member ; CHECK-NEXT:.b8 114 // DW_AT_name ; CHECK-NEXT:.b8 101 ; CHECK-NEXT:.b8 109 ; CHECK-NEXT:.b8 0 -; CHECK-NEXT:.b32 3767 // DW_AT_type +; CHECK-NEXT:.b32 3770 // DW_AT_type ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 120 // DW_AT_decl_line ; CHECK-NEXT:.b8 2 // DW_AT_data_member_location ; CHECK-NEXT:.b8 35 ; CHECK-NEXT:.b8 8 ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 43 // Abbrev [43] 0x1e86:0x13 DW_TAG_subprogram +; CHECK-NEXT:.b8 44 // Abbrev [44] 0x1e89:0x13 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_name ; CHECK-NEXT:.b8 69 ; CHECK-NEXT:.b8 120 @@ -6707,10 +6718,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external ; CHECK-NEXT:.b8 1 // DW_AT_noreturn -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1e93:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1e96:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1e99:0x16 DW_TAG_subprogram +; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1e9c:0x16 DW_TAG_subprogram ; CHECK-NEXT:.b8 108 // DW_AT_name ; CHECK-NEXT:.b8 108 ; CHECK-NEXT:.b8 97 @@ -6720,13 +6731,13 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 12 // DW_AT_decl_line ; CHECK-NEXT:.b8 3 -; CHECK-NEXT:.b32 3767 // DW_AT_type +; CHECK-NEXT:.b32 3770 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1ea9:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 3767 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1eac:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 3770 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1eaf:0x1b DW_TAG_subprogram +; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1eb2:0x1b DW_TAG_subprogram ; CHECK-NEXT:.b8 108 // DW_AT_name ; CHECK-NEXT:.b8 108 ; CHECK-NEXT:.b8 100 @@ -6736,15 +6747,15 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 29 // DW_AT_decl_line ; CHECK-NEXT:.b8 3 -; CHECK-NEXT:.b32 7765 // DW_AT_type +; CHECK-NEXT:.b32 7768 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1ebf:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 3767 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1ec4:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 3767 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1ec2:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 3770 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1ec7:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 3770 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 38 // Abbrev [38] 0x1eca:0x16 DW_TAG_subprogram +; CHECK-NEXT:.b8 39 // Abbrev [39] 0x1ecd:0x16 DW_TAG_subprogram ; CHECK-NEXT:.b8 97 // DW_AT_name ; CHECK-NEXT:.b8 116 ; CHECK-NEXT:.b8 111 @@ -6754,13 +6765,13 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 36 // DW_AT_decl_line ; CHECK-NEXT:.b8 1 -; CHECK-NEXT:.b32 3767 // DW_AT_type +; CHECK-NEXT:.b32 3770 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1eda:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5634 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1edd:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5637 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1ee0:0x21 DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1ee3:0x21 DW_TAG_subprogram ; CHECK-NEXT:.b8 115 // DW_AT_name ; CHECK-NEXT:.b8 116 ; CHECK-NEXT:.b8 114 @@ -6771,17 +6782,17 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 209 // DW_AT_decl_line -; CHECK-NEXT:.b32 3767 // DW_AT_type +; CHECK-NEXT:.b32 3770 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1ef1:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5634 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1ef6:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 7479 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1efb:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 4582 // DW_AT_type -; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1f01:0x22 DW_TAG_subprogram +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1ef4:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5637 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1ef9:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 7482 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1efe:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4585 // DW_AT_type +; CHECK-NEXT:.b8 0 // End Of Children Mark +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1f04:0x22 DW_TAG_subprogram ; CHECK-NEXT:.b8 115 // DW_AT_name ; CHECK-NEXT:.b8 116 ; CHECK-NEXT:.b8 114 @@ -6793,17 +6804,17 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 214 // DW_AT_decl_line -; CHECK-NEXT:.b32 7971 // DW_AT_type +; CHECK-NEXT:.b32 7974 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1f13:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5634 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1f18:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 7479 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1f1d:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 4582 // DW_AT_type -; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 10 // Abbrev [10] 0x1f23:0x1a DW_TAG_base_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1f16:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5637 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1f1b:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 7482 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1f20:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4585 // DW_AT_type +; CHECK-NEXT:.b8 0 // End Of Children Mark +; CHECK-NEXT:.b8 10 // Abbrev [10] 0x1f26:0x1a DW_TAG_base_type ; CHECK-NEXT:.b8 108 // DW_AT_name ; CHECK-NEXT:.b8 111 ; CHECK-NEXT:.b8 110 @@ -6829,7 +6840,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 7 // DW_AT_encoding ; CHECK-NEXT:.b8 8 // DW_AT_byte_size -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1f3d:0x1b DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1f40:0x1b DW_TAG_subprogram ; CHECK-NEXT:.b8 115 // DW_AT_name ; CHECK-NEXT:.b8 116 ; CHECK-NEXT:.b8 114 @@ -6842,12 +6853,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1f4d:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5634 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1f52:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 7479 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1f50:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5637 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1f55:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 7482 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 33 // Abbrev [33] 0x1f58:0x1c DW_TAG_subprogram +; CHECK-NEXT:.b8 34 // Abbrev [34] 0x1f5b:0x1c DW_TAG_subprogram ; CHECK-NEXT:.b8 115 // DW_AT_name ; CHECK-NEXT:.b8 116 ; CHECK-NEXT:.b8 114 @@ -6858,15 +6869,15 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 7 // DW_AT_decl_file ; CHECK-NEXT:.b8 175 // DW_AT_decl_line -; CHECK-NEXT:.b32 8052 // DW_AT_type +; CHECK-NEXT:.b32 8055 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration ; CHECK-NEXT:.b8 1 // DW_AT_external -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1f69:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5634 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1f6e:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 7479 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1f6c:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5637 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1f71:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 7482 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 10 // Abbrev [10] 0x1f74:0xf DW_TAG_base_type +; CHECK-NEXT:.b8 10 // Abbrev [10] 0x1f77:0xf DW_TAG_base_type ; CHECK-NEXT:.b8 108 // DW_AT_name ; CHECK-NEXT:.b8 111 ; CHECK-NEXT:.b8 110 @@ -6881,7 +6892,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 0 ; CHECK-NEXT:.b8 4 // DW_AT_encoding ; CHECK-NEXT:.b8 8 // DW_AT_byte_size -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x1f83:0x20 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x1f86:0x20 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -6904,10 +6915,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1f9d:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1fa0:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x1fa3:0x22 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x1fa6:0x22 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -6932,10 +6943,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1fbf:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1fc2:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x1fc5:0x20 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x1fc8:0x20 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -6958,10 +6969,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1fdf:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x1fe2:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x1fe5:0x22 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x1fe8:0x22 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -6986,10 +6997,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2001:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2004:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x2007:0x28 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x200a:0x28 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7015,12 +7026,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2024:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2027:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2029:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x202c:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x202f:0x20 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x2032:0x20 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7043,10 +7054,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2049:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x204c:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x204f:0x22 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x2052:0x22 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7071,10 +7082,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x206b:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x206e:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x2071:0x20 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x2074:0x20 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7097,10 +7108,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x208b:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x208e:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x2091:0x20 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x2094:0x20 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7123,10 +7134,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 2 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x20ab:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x20ae:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x20b1:0x2e DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x20b4:0x2e DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7158,12 +7169,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 4 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x20d4:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x20d7:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x20d9:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x20dc:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x20df:0x1e DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x20e2:0x1e DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7184,10 +7195,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 4 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x20f7:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x20fa:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x20fd:0x20 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x2100:0x20 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7210,10 +7221,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2117:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x211a:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x211d:0x20 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x2120:0x20 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7236,10 +7247,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2137:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x213a:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x213d:0x1e DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x2140:0x1e DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7260,10 +7271,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2155:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2158:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x215b:0x20 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x215e:0x20 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7286,10 +7297,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 2 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2175:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2178:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x217b:0x1e DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x217e:0x1e DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7310,10 +7321,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2193:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2196:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x2199:0x22 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x219c:0x22 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7338,10 +7349,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x21b5:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x21b8:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x21bb:0x20 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x21be:0x20 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7364,10 +7375,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 2 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x21d5:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x21d8:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x21db:0x26 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x21de:0x26 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7391,12 +7402,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 6 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x21f6:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x21f9:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x21fb:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x21fe:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x2201:0x22 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x2204:0x22 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7421,10 +7432,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 2 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x221d:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2220:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x2223:0x2a DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x2226:0x2a DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7447,14 +7458,14 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 6 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x223d:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2240:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2242:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2245:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2247:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x224a:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x224d:0x26 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x2250:0x26 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7478,12 +7489,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 2 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2268:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x226b:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x226d:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2270:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x2273:0x26 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x2276:0x26 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7507,12 +7518,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 2 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x228e:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2291:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2293:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2296:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x2299:0x26 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x229c:0x26 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7536,12 +7547,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 6 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x22b4:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x22b7:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x22b9:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x22bc:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x22bf:0x29 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x22c2:0x29 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7568,12 +7579,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 6 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x22dd:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x22e0:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x22e2:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 4627 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x22e5:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4630 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x22e8:0x28 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x22eb:0x28 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7599,12 +7610,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2305:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2308:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x230a:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x230d:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x2310:0x22 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x2313:0x22 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7627,12 +7638,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 12 // DW_AT_decl_file ; CHECK-NEXT:.b8 85 // DW_AT_decl_line ; CHECK-NEXT:.b8 6 -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x232c:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x232f:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x2332:0x28 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x2335:0x28 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7658,12 +7669,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x234f:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2352:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2354:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2357:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x235a:0x24 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x235d:0x24 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7690,10 +7701,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2378:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x237b:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x237e:0x24 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x2381:0x24 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7718,12 +7729,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 12 // DW_AT_decl_file ; CHECK-NEXT:.b8 125 // DW_AT_decl_line ; CHECK-NEXT:.b8 4 -; CHECK-NEXT:.b32 3767 // DW_AT_type +; CHECK-NEXT:.b32 3770 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x239c:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x239f:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x23a2:0x26 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x23a5:0x26 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7750,12 +7761,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 12 // DW_AT_decl_file ; CHECK-NEXT:.b8 66 // DW_AT_decl_line ; CHECK-NEXT:.b8 6 -; CHECK-NEXT:.b32 3767 // DW_AT_type +; CHECK-NEXT:.b32 3770 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x23c2:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x23c5:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x23c8:0x22 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x23cb:0x22 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7780,10 +7791,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x23e4:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x23e7:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x23ea:0x22 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x23ed:0x22 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7808,10 +7819,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2406:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2409:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x240c:0x20 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x240f:0x20 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7834,10 +7845,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2426:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2429:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x242c:0x20 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x242f:0x20 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7860,10 +7871,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 6 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2446:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2449:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x244c:0x1e DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x244f:0x1e DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7884,10 +7895,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2464:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2467:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x246a:0x22 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x246d:0x22 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7910,12 +7921,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 12 // DW_AT_decl_file ; CHECK-NEXT:.b8 116 // DW_AT_decl_line ; CHECK-NEXT:.b8 4 -; CHECK-NEXT:.b32 5167 // DW_AT_type +; CHECK-NEXT:.b32 5170 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2486:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2489:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x248c:0x24 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x248f:0x24 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7940,12 +7951,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 12 // DW_AT_decl_file ; CHECK-NEXT:.b8 71 // DW_AT_decl_line ; CHECK-NEXT:.b8 6 -; CHECK-NEXT:.b32 5167 // DW_AT_type +; CHECK-NEXT:.b32 5170 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x24aa:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x24ad:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x24b0:0x27 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x24b3:0x27 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -7970,12 +7981,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 6 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x24cc:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x24cf:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x24d1:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x24d4:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2109 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x24d7:0x2b DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x24da:0x2b DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -8009,10 +8020,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 4 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x24fc:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x24ff:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x2502:0x31 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x2505:0x31 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -8047,12 +8058,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 4 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2528:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x252b:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x252d:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2530:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x2533:0x24 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x2536:0x24 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -8074,12 +8085,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 6 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x254c:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x254f:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2551:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2554:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x2557:0x31 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x255a:0x31 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -8114,12 +8125,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 6 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x257d:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2580:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2582:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2585:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x2588:0x31 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x258b:0x31 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -8149,14 +8160,14 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 6 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x25a9:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x25ac:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x25ae:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x25b1:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x25b3:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 4627 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x25b6:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4630 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x25b9:0x20 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x25bc:0x20 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -8179,10 +8190,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 4 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x25d3:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x25d6:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x25d9:0x22 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x25dc:0x22 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -8207,10 +8218,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 6 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x25f5:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x25f8:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x25fb:0x2c DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x25fe:0x2c DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -8240,12 +8251,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x261c:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x261f:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2621:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 5167 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2624:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 5170 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x2627:0x2a DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x262a:0x2a DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -8273,12 +8284,12 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2646:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2649:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x264b:0x5 DW_TAG_formal_parameter -; CHECK-NEXT:.b32 4582 // DW_AT_type +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x264e:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b32 4585 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x2651:0x1e DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x2654:0x1e DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -8299,10 +8310,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 4 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2669:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x266c:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x266f:0x20 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x2672:0x20 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -8325,10 +8336,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2689:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x268c:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x268f:0x20 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x2692:0x20 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -8351,10 +8362,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 3 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x26a9:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x26ac:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x26af:0x1e DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x26b2:0x1e DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -8375,10 +8386,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 4 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x26c7:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x26ca:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x26cd:0x20 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x26d0:0x20 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -8401,10 +8412,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 5 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x26e7:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x26ea:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x26ed:0x24 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x26f0:0x24 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -8431,10 +8442,10 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 6 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x270b:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x270e:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark -; CHECK-NEXT:.b8 45 // Abbrev [45] 0x2711:0x22 DW_TAG_subprogram +; CHECK-NEXT:.b8 46 // Abbrev [46] 0x2714:0x22 DW_TAG_subprogram ; CHECK-NEXT:.b8 95 // DW_AT_MIPS_linkage_name ; CHECK-NEXT:.b8 90 ; CHECK-NEXT:.b8 76 @@ -8459,7 +8470,7 @@ if.end: ; preds = %if.then, %entry ; CHECK-NEXT:.b8 2 ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 1 // DW_AT_declaration -; CHECK-NEXT:.b8 7 // Abbrev [7] 0x272d:0x5 DW_TAG_formal_parameter +; CHECK-NEXT:.b8 7 // Abbrev [7] 0x2730:0x5 DW_TAG_formal_parameter ; CHECK-NEXT:.b32 2100 // DW_AT_type ; CHECK-NEXT:.b8 0 // End Of Children Mark ; CHECK-NEXT:.b8 0 // End Of Children Mark From 64a22b3e69587c83566a83e793764f2a13733f0b Mon Sep 17 00:00:00 2001 From: William G Hatch Date: Tue, 8 Oct 2024 19:39:16 -0600 Subject: [PATCH 016/129] [NVPTX] fix debug register encoding of special %Depot register (#111596) cuda-gdb doesn't seem to be able to read the `%Depot` register, but because we always copy it to `%SP` in lowering, simply switching to use it fixes the problem. --- llvm/lib/Target/NVPTX/NVPTXRegisterInfo.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/llvm/lib/Target/NVPTX/NVPTXRegisterInfo.cpp b/llvm/lib/Target/NVPTX/NVPTXRegisterInfo.cpp index c30372fed1832d..dc2584645b314c 100644 --- a/llvm/lib/Target/NVPTX/NVPTXRegisterInfo.cpp +++ b/llvm/lib/Target/NVPTX/NVPTXRegisterInfo.cpp @@ -176,6 +176,11 @@ void NVPTXRegisterInfo::addToDebugRegisterMap( int64_t NVPTXRegisterInfo::getDwarfRegNum(MCRegister RegNum, bool isEH) const { if (Register::isPhysicalRegister(RegNum)) { std::string name = NVPTXInstPrinter::getRegisterName(RegNum.id()); + // In NVPTXFrameLowering.cpp, we do arrange for %Depot to be accessible from + // %SP. Using the %Depot register doesn't provide any debug info in + // cuda-gdb, but switching it to %SP does. + if (RegNum.id() == NVPTX::VRDepot) + name = "%SP"; return encodeRegisterForDwarf(name); } uint64_t lookup = debugRegisterMap.lookup(RegNum.id()); From bb8df02dfbb40c5a6717ad3b7e8e5811acc6d164 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 8 Oct 2024 19:21:58 -0700 Subject: [PATCH 017/129] [RISCV] Use the MCStreamer reference passed to RISCVAsmPrinter::EmitToStreamer. NFCI (#111607) We passed a MCStreamer to the function but hardcoded *OutStreamer instead of using it. It's very likely that OutStreamer is the only streamer used, but lets not assume that without doing the audit. --- llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp b/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp index 52d0a70d335e97..3bed8c4349dac0 100644 --- a/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp +++ b/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp @@ -247,7 +247,7 @@ bool RISCVAsmPrinter::EmitToStreamer(MCStreamer &S, const MCInst &Inst) { bool Res = RISCVRVC::compress(CInst, Inst, *STI); if (Res) ++RISCVNumInstrsCompressed; - AsmPrinter::EmitToStreamer(*OutStreamer, Res ? CInst : Inst); + AsmPrinter::EmitToStreamer(S, Res ? CInst : Inst); return Res; } From 267e852109381fe35cff0a92915a0418b872213f Mon Sep 17 00:00:00 2001 From: Vasileios Porpodas Date: Tue, 8 Oct 2024 20:01:43 -0700 Subject: [PATCH 018/129] [SandboxVec][DAG][NFC] Rename enumerators --- .../SandboxVectorizer/DependencyGraph.h | 14 ++++---- .../SandboxVectorizer/DependencyGraph.cpp | 36 +++++++++---------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h index ab49c3aa27143c..b1fe67d446be0a 100644 --- a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h +++ b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h @@ -171,13 +171,13 @@ class DependencyGraph { std::unique_ptr BatchAA; enum class DependencyType { - RAW, ///> Read After Write - WAW, ///> Write After Write - RAR, ///> Read After Read - WAR, ///> Write After Read - CTRL, ///> Control-related dependencies, like with PHIs/Terminators - OTHER, ///> Currently used for stack related instrs - NONE, ///> No memory/other dependency + ReadAfterWrite, ///> Memory dependency write -> read + WriteAfterWrite, ///> Memory dependency write -> write + ReadAfterRead, ///> Memory dependency read -> read + WriteAfterRead, ///> Memory dependency read -> write + Control, ///> Control-related dependency, like with PHI/Terminator + Other, ///> Currently used for stack related instrs + None, ///> No memory/other dependency }; /// \Returns the dependency type depending on whether instructions may /// read/write memory or whether they are some specific opcode-related diff --git a/llvm/lib/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.cpp b/llvm/lib/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.cpp index 845fadefc9bf03..35ea28697424a6 100644 --- a/llvm/lib/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.cpp +++ b/llvm/lib/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.cpp @@ -56,23 +56,23 @@ DependencyGraph::getRoughDepType(Instruction *FromI, Instruction *ToI) { // TODO: Perhaps compile-time improvement by skipping if neither is mem? if (FromI->mayWriteToMemory()) { if (ToI->mayReadFromMemory()) - return DependencyType::RAW; + return DependencyType::ReadAfterWrite; if (ToI->mayWriteToMemory()) - return DependencyType::WAW; + return DependencyType::WriteAfterWrite; } else if (FromI->mayReadFromMemory()) { if (ToI->mayWriteToMemory()) - return DependencyType::WAR; + return DependencyType::WriteAfterRead; if (ToI->mayReadFromMemory()) - return DependencyType::RAR; + return DependencyType::ReadAfterRead; } if (isa(FromI) || isa(ToI)) - return DependencyType::CTRL; + return DependencyType::Control; if (ToI->isTerminator()) - return DependencyType::CTRL; + return DependencyType::Control; if (DGNode::isStackSaveOrRestoreIntrinsic(FromI) || DGNode::isStackSaveOrRestoreIntrinsic(ToI)) - return DependencyType::OTHER; - return DependencyType::NONE; + return DependencyType::Other; + return DependencyType::None; } static bool isOrdered(Instruction *I) { @@ -106,10 +106,10 @@ bool DependencyGraph::alias(Instruction *SrcI, Instruction *DstI, ? ModRefInfo::Mod : Utils::aliasAnalysisGetModRefInfo(*BatchAA, SrcI, *DstLocOpt); switch (DepType) { - case DependencyType::RAW: - case DependencyType::WAW: + case DependencyType::ReadAfterWrite: + case DependencyType::WriteAfterWrite: return isModSet(SrcModRef); - case DependencyType::WAR: + case DependencyType::WriteAfterRead: return isRefSet(SrcModRef); default: llvm_unreachable("Expected only RAW, WAW and WAR!"); @@ -119,21 +119,21 @@ bool DependencyGraph::alias(Instruction *SrcI, Instruction *DstI, bool DependencyGraph::hasDep(Instruction *SrcI, Instruction *DstI) { DependencyType RoughDepType = getRoughDepType(SrcI, DstI); switch (RoughDepType) { - case DependencyType::RAR: + case DependencyType::ReadAfterRead: return false; - case DependencyType::RAW: - case DependencyType::WAW: - case DependencyType::WAR: + case DependencyType::ReadAfterWrite: + case DependencyType::WriteAfterWrite: + case DependencyType::WriteAfterRead: return alias(SrcI, DstI, RoughDepType); - case DependencyType::CTRL: + case DependencyType::Control: // Adding actual dep edges from PHIs/to terminator would just create too // many edges, which would be bad for compile-time. // So we ignore them in the DAG formation but handle them in the // scheduler, while sorting the ready list. return false; - case DependencyType::OTHER: + case DependencyType::Other: return true; - case DependencyType::NONE: + case DependencyType::None: return false; } } From 1e81056b31749f7b60d56260089f75a4813749c0 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 8 Oct 2024 20:37:11 -0700 Subject: [PATCH 019/129] [Coroutines] Avoid repeated hash lookups (NFC) (#111617) --- llvm/lib/Transforms/Coroutines/CoroFrame.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Transforms/Coroutines/CoroFrame.cpp b/llvm/lib/Transforms/Coroutines/CoroFrame.cpp index 91530503a7e1ed..2b43b7a5d027d1 100644 --- a/llvm/lib/Transforms/Coroutines/CoroFrame.cpp +++ b/llvm/lib/Transforms/Coroutines/CoroFrame.cpp @@ -797,8 +797,8 @@ static void buildFrameDebugInfo(Function &F, coro::Shape &Shape, AlignInBits = OffsetCache[Index].first * 8; OffsetInBits = OffsetCache[Index].second * 8; - if (NameCache.contains(Index)) { - Name = NameCache[Index].str(); + if (auto It = NameCache.find(Index); It != NameCache.end()) { + Name = It->second.str(); DITy = TyCache[Index]; } else { DITy = solveDIType(DBuilder, Ty, Layout, FrameDITy, LineNum, DITypeCache); From 2d8cd32ae5a69a9f3baaeca18a8318115586b3b8 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 8 Oct 2024 20:37:33 -0700 Subject: [PATCH 020/129] [InstCombine] Avoid repeated hash lookups (NFC) (#111618) --- llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp index 6c3fc987d9add2..d1eb84b5ca5c10 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -602,8 +602,9 @@ static Value *rewriteGEPAsOffset(Value *Start, Value *Base, GEPNoWrapFlags NW, for (unsigned I = 0, E = PHI->getNumIncomingValues(); I < E; ++I) { Value *NewIncoming = PHI->getIncomingValue(I); - if (NewInsts.contains(NewIncoming)) - NewIncoming = NewInsts[NewIncoming]; + auto It = NewInsts.find(NewIncoming); + if (It != NewInsts.end()) + NewIncoming = It->second; NewPhi->addIncoming(NewIncoming, PHI->getIncomingBlock(I)); } From 0ee5c869fc003b09e464e079d6bbaab1baf59aba Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 8 Oct 2024 20:38:19 -0700 Subject: [PATCH 021/129] [mlir][spirv] Avoid repeated hash lookups (NFC) (#111619) --- mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp b/mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp index c8386fecea038a..dd0a872e05dcbb 100644 --- a/mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp +++ b/mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp @@ -1538,11 +1538,8 @@ LogicalResult spirv::ModuleOp::verifyRegions() { auto key = std::pair( funcOp, entryPointOp.getExecutionModel()); - auto entryPtIt = entryPoints.find(key); - if (entryPtIt != entryPoints.end()) { + if (!entryPoints.try_emplace(key, entryPointOp).second) return entryPointOp.emitError("duplicate of a previous EntryPointOp"); - } - entryPoints[key] = entryPointOp; } else if (auto funcOp = dyn_cast(op)) { // If the function is external and does not have 'Import' // linkage_attributes(LinkageAttributes), throw an error. 'Import' From a579782a775ebc2bfe6203d7178ee524b3559006 Mon Sep 17 00:00:00 2001 From: Timm Baeder Date: Wed, 9 Oct 2024 05:44:19 +0200 Subject: [PATCH 022/129] [llvm] Add serialization to uint32_t for FixedPointSemantics (#110288) FixedPointSemantics is exactly 32bits and this static_assert'ed after its declaration. Add support for converting it to and from a uint32_t. --- llvm/include/llvm/ADT/APFixedPoint.h | 9 +++++++ llvm/lib/Support/APFixedPoint.cpp | 10 ++++++++ llvm/unittests/ADT/APFixedPointTest.cpp | 31 +++++++++++++++++++++++++ 3 files changed, 50 insertions(+) diff --git a/llvm/include/llvm/ADT/APFixedPoint.h b/llvm/include/llvm/ADT/APFixedPoint.h index ae40db96e4818c..e4aa82d7a41c31 100644 --- a/llvm/include/llvm/ADT/APFixedPoint.h +++ b/llvm/include/llvm/ADT/APFixedPoint.h @@ -114,6 +114,15 @@ class FixedPointSemantics { } bool operator!=(FixedPointSemantics Other) const { return !(*this == Other); } + /// Convert the semantics to a 32-bit unsigned integer. + /// The result is dependent on the host endianness and not stable across LLVM + /// versions. See getFromOpaqueInt() to convert it back to a + /// FixedPointSemantics object. + uint32_t toOpaqueInt() const; + /// Create a FixedPointSemantics object from an integer created via + /// toOpaqueInt(). + static FixedPointSemantics getFromOpaqueInt(uint32_t); + private: unsigned Width : WidthBitWidth; signed int LsbWeight : LsbWeightBitWidth; diff --git a/llvm/lib/Support/APFixedPoint.cpp b/llvm/lib/Support/APFixedPoint.cpp index 249c4f1e2153da..f395919287b729 100644 --- a/llvm/lib/Support/APFixedPoint.cpp +++ b/llvm/lib/Support/APFixedPoint.cpp @@ -29,6 +29,16 @@ void FixedPointSemantics::print(llvm::raw_ostream &OS) const { OS << "IsSaturated=" << IsSaturated; } +uint32_t FixedPointSemantics::toOpaqueInt() const { + return llvm::bit_cast(*this); +} + +FixedPointSemantics FixedPointSemantics::getFromOpaqueInt(uint32_t I) { + FixedPointSemantics F(0, 0, false, false, false); + std::memcpy(&F, &I, sizeof(F)); + return F; +} + APFixedPoint APFixedPoint::convert(const FixedPointSemantics &DstSema, bool *Overflow) const { APSInt NewVal = Val; diff --git a/llvm/unittests/ADT/APFixedPointTest.cpp b/llvm/unittests/ADT/APFixedPointTest.cpp index ecb89fbf76c8bb..e7aa58a8325773 100644 --- a/llvm/unittests/ADT/APFixedPointTest.cpp +++ b/llvm/unittests/ADT/APFixedPointTest.cpp @@ -1274,4 +1274,35 @@ TEST(FixedPoint, div) { true, false, false))); } +TEST(FixedPoint, semanticsSerialization) { + auto roundTrip = [](FixedPointSemantics FPS) -> bool { + uint32_t I = FPS.toOpaqueInt(); + FixedPointSemantics FPS2 = FixedPointSemantics::getFromOpaqueInt(I); + return FPS == FPS2; + }; + + ASSERT_TRUE(roundTrip(getS32Pos2())); + ASSERT_TRUE(roundTrip(getU8Pos4())); + ASSERT_TRUE(roundTrip(getS16Neg18())); + ASSERT_TRUE(roundTrip(getU8Neg10())); + ASSERT_TRUE(roundTrip(getPadULFractSema())); + ASSERT_TRUE(roundTrip(getPadUFractSema())); + ASSERT_TRUE(roundTrip(getPadUSFractSema())); + ASSERT_TRUE(roundTrip(getPadULAccumSema())); + ASSERT_TRUE(roundTrip(getPadUAccumSema())); + ASSERT_TRUE(roundTrip(getPadUSAccumSema())); + ASSERT_TRUE(roundTrip(getULFractSema())); + ASSERT_TRUE(roundTrip(getUFractSema())); + ASSERT_TRUE(roundTrip(getUSFractSema())); + ASSERT_TRUE(roundTrip(getULAccumSema())); + ASSERT_TRUE(roundTrip(getUAccumSema())); + ASSERT_TRUE(roundTrip(getUSAccumSema())); + ASSERT_TRUE(roundTrip(getLFractSema())); + ASSERT_TRUE(roundTrip(getFractSema())); + ASSERT_TRUE(roundTrip(getSFractSema())); + ASSERT_TRUE(roundTrip(getLAccumSema())); + ASSERT_TRUE(roundTrip(getAccumSema())); + ASSERT_TRUE(roundTrip(getSAccumSema())); +} + } // namespace From 1809d0fa1c15b16ca94381d8be3ef70c4a83c36b Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 8 Oct 2024 21:24:17 -0700 Subject: [PATCH 023/129] [clang-format] Insert a space between l_paren and ref-qualifier (#111465) Fixes #111346. --- clang/lib/Format/TokenAnnotator.cpp | 4 ++++ clang/unittests/Format/FormatTest.cpp | 1 + 2 files changed, 5 insertions(+) diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index f6e5798057bbd2..364d7e9855e8cf 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -5454,6 +5454,10 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line, } if ((Left.is(TT_TemplateOpener)) != (Right.is(TT_TemplateCloser))) return ShouldAddSpacesInAngles(); + if (Left.is(tok::r_paren) && Right.is(TT_PointerOrReference) && + Right.isOneOf(tok::amp, tok::ampamp)) { + return true; + } // Space before TT_StructuredBindingLSquare. if (Right.is(TT_StructuredBindingLSquare)) { return !Left.isOneOf(tok::amp, tok::ampamp) || diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 61287aafe8273d..2c5e5857445c35 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -11519,6 +11519,7 @@ TEST_F(FormatTest, UnderstandsFunctionRefQualification) { AlignLeft); verifyFormat("template void operator=(T) & {}", AlignLeft); verifyFormat("template void operator=(T) && {}", AlignLeft); + verifyFormat("for (foo& cb : X)", AlignLeft); FormatStyle AlignMiddle = getLLVMStyle(); AlignMiddle.PointerAlignment = FormatStyle::PAS_Middle; From d0b9c2c5647656738cda3fb670aa5d3b3a69d784 Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Wed, 9 Oct 2024 05:47:00 +0100 Subject: [PATCH 024/129] [compiler-rt] Remove SHA2 interceptions for NetBSD/FreeBSD. (#110246) To Fix #110215 Interceptors introduced with 18a7ebda99044473fdbce6376993714ff54e6690 --- .../sanitizer_common_interceptors.inc | 180 --------------- .../sanitizer_platform_interceptors.h | 2 - .../TestCases/FreeBSD/md5.cpp | 119 ---------- .../TestCases/FreeBSD/sha2.cpp | 214 ------------------ .../sanitizer_common/TestCases/NetBSD/md5.cpp | 114 ---------- .../TestCases/NetBSD/sha2.cpp | 206 ----------------- 6 files changed, 835 deletions(-) delete mode 100644 compiler-rt/test/sanitizer_common/TestCases/FreeBSD/md5.cpp delete mode 100644 compiler-rt/test/sanitizer_common/TestCases/FreeBSD/sha2.cpp delete mode 100644 compiler-rt/test/sanitizer_common/TestCases/NetBSD/md5.cpp delete mode 100644 compiler-rt/test/sanitizer_common/TestCases/NetBSD/sha2.cpp diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc index a6dd2bbf45f520..b8627f8557afe2 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc @@ -8877,83 +8877,6 @@ INTERCEPTOR(char *, RMD160Data, u8 *data, SIZE_T len, char *buf) { #define INIT_RMD160 #endif -#if SANITIZER_INTERCEPT_MD5 -INTERCEPTOR(void, MD5Init, void *context) { - void *ctx; - COMMON_INTERCEPTOR_ENTER(ctx, MD5Init, context); - REAL(MD5Init)(context); - if (context) - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, context, MD5_CTX_sz); -} - -INTERCEPTOR(void, MD5Update, void *context, const unsigned char *data, - unsigned int len) { - void *ctx; - COMMON_INTERCEPTOR_ENTER(ctx, MD5Update, context, data, len); - if (data && len > 0) - COMMON_INTERCEPTOR_READ_RANGE(ctx, data, len); - if (context) - COMMON_INTERCEPTOR_READ_RANGE(ctx, context, MD5_CTX_sz); - REAL(MD5Update)(context, data, len); - if (context) - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, context, MD5_CTX_sz); -} - -INTERCEPTOR(void, MD5Final, unsigned char digest[16], void *context) { - void *ctx; - COMMON_INTERCEPTOR_ENTER(ctx, MD5Final, digest, context); - if (context) - COMMON_INTERCEPTOR_READ_RANGE(ctx, context, MD5_CTX_sz); - REAL(MD5Final)(digest, context); - if (digest) - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, digest, sizeof(unsigned char) * 16); -} - -INTERCEPTOR(char *, MD5End, void *context, char *buf) { - void *ctx; - COMMON_INTERCEPTOR_ENTER(ctx, MD5End, context, buf); - if (context) - COMMON_INTERCEPTOR_READ_RANGE(ctx, context, MD5_CTX_sz); - char *ret = REAL(MD5End)(context, buf); - if (ret) - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ret, MD5_return_length); - return ret; -} - -INTERCEPTOR(char *, MD5File, const char *filename, char *buf) { - void *ctx; - COMMON_INTERCEPTOR_ENTER(ctx, MD5File, filename, buf); - if (filename) - COMMON_INTERCEPTOR_READ_RANGE(ctx, filename, internal_strlen(filename) + 1); - char *ret = REAL(MD5File)(filename, buf); - if (ret) - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ret, MD5_return_length); - return ret; -} - -INTERCEPTOR(char *, MD5Data, const unsigned char *data, unsigned int len, - char *buf) { - void *ctx; - COMMON_INTERCEPTOR_ENTER(ctx, MD5Data, data, len, buf); - if (data && len > 0) - COMMON_INTERCEPTOR_READ_RANGE(ctx, data, len); - char *ret = REAL(MD5Data)(data, len, buf); - if (ret) - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ret, MD5_return_length); - return ret; -} - -#define INIT_MD5 \ - COMMON_INTERCEPT_FUNCTION(MD5Init); \ - COMMON_INTERCEPT_FUNCTION(MD5Update); \ - COMMON_INTERCEPT_FUNCTION(MD5Final); \ - COMMON_INTERCEPT_FUNCTION(MD5End); \ - COMMON_INTERCEPT_FUNCTION(MD5File); \ - COMMON_INTERCEPT_FUNCTION(MD5Data) -#else -#define INIT_MD5 -#endif - #if SANITIZER_INTERCEPT_FSEEK INTERCEPTOR(int, fseek, __sanitizer_FILE *stream, long int offset, int whence) { void *ctx; @@ -9084,107 +9007,6 @@ INTERCEPTOR(char *, MD2Data, const unsigned char *data, unsigned int len, #define INIT_MD2 #endif -#if SANITIZER_INTERCEPT_SHA2 -#define SHA2_INTERCEPTORS(LEN, SHA2_STATE_T) \ - INTERCEPTOR(void, SHA##LEN##_Init, void *context) { \ - void *ctx; \ - COMMON_INTERCEPTOR_ENTER(ctx, SHA##LEN##_Init, context); \ - REAL(SHA##LEN##_Init)(context); \ - if (context) \ - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, context, SHA##LEN##_CTX_sz); \ - } \ - INTERCEPTOR(void, SHA##LEN##_Update, void *context, \ - const u8 *data, SIZE_T len) { \ - void *ctx; \ - COMMON_INTERCEPTOR_ENTER(ctx, SHA##LEN##_Update, context, data, len); \ - if (data && len > 0) \ - COMMON_INTERCEPTOR_READ_RANGE(ctx, data, len); \ - if (context) \ - COMMON_INTERCEPTOR_READ_RANGE(ctx, context, SHA##LEN##_CTX_sz); \ - REAL(SHA##LEN##_Update)(context, data, len); \ - if (context) \ - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, context, SHA##LEN##_CTX_sz); \ - } \ - INTERCEPTOR(void, SHA##LEN##_Final, u8 digest[LEN/8], \ - void *context) { \ - void *ctx; \ - CHECK_EQ(SHA##LEN##_digest_length, LEN/8); \ - COMMON_INTERCEPTOR_ENTER(ctx, SHA##LEN##_Final, digest, context); \ - if (context) \ - COMMON_INTERCEPTOR_READ_RANGE(ctx, context, SHA##LEN##_CTX_sz); \ - REAL(SHA##LEN##_Final)(digest, context); \ - if (digest) \ - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, digest, \ - sizeof(digest[0]) * \ - SHA##LEN##_digest_length); \ - } \ - INTERCEPTOR(char *, SHA##LEN##_End, void *context, char *buf) { \ - void *ctx; \ - COMMON_INTERCEPTOR_ENTER(ctx, SHA##LEN##_End, context, buf); \ - if (context) \ - COMMON_INTERCEPTOR_READ_RANGE(ctx, context, SHA##LEN##_CTX_sz); \ - char *ret = REAL(SHA##LEN##_End)(context, buf); \ - if (ret) \ - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ret, SHA##LEN##_return_length); \ - return ret; \ - } \ - INTERCEPTOR(char *, SHA##LEN##_File, const char *filename, char *buf) { \ - void *ctx; \ - COMMON_INTERCEPTOR_ENTER(ctx, SHA##LEN##_File, filename, buf); \ - if (filename) \ - COMMON_INTERCEPTOR_READ_RANGE(ctx, filename, internal_strlen(filename) + 1);\ - char *ret = REAL(SHA##LEN##_File)(filename, buf); \ - if (ret) \ - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ret, SHA##LEN##_return_length); \ - return ret; \ - } \ - INTERCEPTOR(char *, SHA##LEN##_FileChunk, const char *filename, char *buf, \ - OFF_T offset, OFF_T length) { \ - void *ctx; \ - COMMON_INTERCEPTOR_ENTER(ctx, SHA##LEN##_FileChunk, filename, buf, offset, \ - length); \ - if (filename) \ - COMMON_INTERCEPTOR_READ_RANGE(ctx, filename, internal_strlen(filename) + 1);\ - char *ret = REAL(SHA##LEN##_FileChunk)(filename, buf, offset, length); \ - if (ret) \ - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ret, SHA##LEN##_return_length); \ - return ret; \ - } \ - INTERCEPTOR(char *, SHA##LEN##_Data, u8 *data, SIZE_T len, char *buf) { \ - void *ctx; \ - COMMON_INTERCEPTOR_ENTER(ctx, SHA##LEN##_Data, data, len, buf); \ - if (data && len > 0) \ - COMMON_INTERCEPTOR_READ_RANGE(ctx, data, len); \ - char *ret = REAL(SHA##LEN##_Data)(data, len, buf); \ - if (ret) \ - COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ret, SHA##LEN##_return_length); \ - return ret; \ - } - -SHA2_INTERCEPTORS(224, u32) -SHA2_INTERCEPTORS(256, u32) -SHA2_INTERCEPTORS(384, u64) -SHA2_INTERCEPTORS(512, u64) - -#define INIT_SHA2_INTECEPTORS(LEN) \ - COMMON_INTERCEPT_FUNCTION(SHA##LEN##_Init); \ - COMMON_INTERCEPT_FUNCTION(SHA##LEN##_Update); \ - COMMON_INTERCEPT_FUNCTION(SHA##LEN##_Final); \ - COMMON_INTERCEPT_FUNCTION(SHA##LEN##_End); \ - COMMON_INTERCEPT_FUNCTION(SHA##LEN##_File); \ - COMMON_INTERCEPT_FUNCTION(SHA##LEN##_FileChunk); \ - COMMON_INTERCEPT_FUNCTION(SHA##LEN##_Data) - -#define INIT_SHA2 \ - INIT_SHA2_INTECEPTORS(224); \ - INIT_SHA2_INTECEPTORS(256); \ - INIT_SHA2_INTECEPTORS(384); \ - INIT_SHA2_INTECEPTORS(512) -#undef SHA2_INTERCEPTORS -#else -#define INIT_SHA2 -#endif - #if SANITIZER_INTERCEPT_VIS INTERCEPTOR(char *, vis, char *dst, int c, int flag, int nextc) { void *ctx; @@ -10659,10 +10481,8 @@ static void InitializeCommonInterceptors() { INIT_SHA1; INIT_MD4; INIT_RMD160; - INIT_MD5; INIT_FSEEK; INIT_MD2; - INIT_SHA2; INIT_VIS; INIT_CDB; INIT_GETFSENT; diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h index 28bb6384daf2cd..6959a6d52d604e 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h @@ -565,10 +565,8 @@ #define SANITIZER_INTERCEPT_SHA1 SI_NETBSD #define SANITIZER_INTERCEPT_MD4 SI_NETBSD #define SANITIZER_INTERCEPT_RMD160 SI_NETBSD -#define SANITIZER_INTERCEPT_MD5 (SI_NETBSD || SI_FREEBSD) #define SANITIZER_INTERCEPT_FSEEK (SI_NETBSD || SI_FREEBSD) #define SANITIZER_INTERCEPT_MD2 SI_NETBSD -#define SANITIZER_INTERCEPT_SHA2 (SI_NETBSD || SI_FREEBSD) #define SANITIZER_INTERCEPT_CDB SI_NETBSD #define SANITIZER_INTERCEPT_VIS (SI_NETBSD || SI_FREEBSD) #define SANITIZER_INTERCEPT_POPEN SI_POSIX diff --git a/compiler-rt/test/sanitizer_common/TestCases/FreeBSD/md5.cpp b/compiler-rt/test/sanitizer_common/TestCases/FreeBSD/md5.cpp deleted file mode 100644 index 13325880a023a1..00000000000000 --- a/compiler-rt/test/sanitizer_common/TestCases/FreeBSD/md5.cpp +++ /dev/null @@ -1,119 +0,0 @@ -// RUN: %clangxx -O0 -g %s -o %t -lmd && %run %t 2>&1 | FileCheck %s - -#include - -#include -#include -#include -#include -#include - -void test1() { - MD5_CTX ctx; - uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; - uint8_t digest[MD5_DIGEST_LENGTH]; - size_t entropysz = sizeof(entropy); - size_t digestsz = sizeof(digest); - - MD5Init(&ctx); - MD5Update(&ctx, entropy, entropysz); - MD5Final(digest, &ctx); - - printf("test1: '"); - for (size_t i = 0; i < digestsz; i++) - printf("%02x", digest[i]); - printf("'\n"); -} - -void test2() { - MD5_CTX ctx; - uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; - char digest[MD5_DIGEST_STRING_LENGTH]; - size_t entropysz = sizeof(entropy); - - MD5Init(&ctx); - MD5Update(&ctx, entropy, entropysz); - char *p = MD5End(&ctx, digest); - assert(p); - - printf("test2: '%s'\n", digest); -} - -void test3() { - MD5_CTX ctx; - uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; - size_t entropysz = sizeof(entropy); - - MD5Init(&ctx); - MD5Update(&ctx, entropy, entropysz); - char *p = MD5End(&ctx, NULL); - assert(strlen(p) == MD5_DIGEST_STRING_LENGTH - 1); - - printf("test3: '%s'\n", p); - - free(p); -} - -void test4() { - char digest[MD5_DIGEST_STRING_LENGTH]; - - char *p = MD5File("/etc/fstab", digest); - assert(p == digest); - - printf("test4: '%s'\n", p); -} - -void test5() { - char *p = MD5File("/etc/fstab", NULL); - assert(strlen(p) == MD5_DIGEST_STRING_LENGTH - 1); - - printf("test5: '%s'\n", p); - - free(p); -} - -void test6() { - uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; - char digest[MD5_DIGEST_STRING_LENGTH]; - size_t entropysz = sizeof(entropy); - - char *p = MD5Data(entropy, entropysz, digest); - assert(p == digest); - - printf("test6: '%s'\n", p); -} - -void test7() { - uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; - size_t entropysz = sizeof(entropy); - - char *p = MD5Data(entropy, entropysz, NULL); - assert(strlen(p) == MD5_DIGEST_STRING_LENGTH - 1); - - printf("test7: '%s'\n", p); - - free(p); -} - -int main(void) { - printf("MD5\n"); - - test1(); - test2(); - test3(); - test4(); - test5(); - test6(); - test7(); - - // CHECK: MD5 - // CHECK: test1: '86e65b1ef4a830af347ac05ab4f0e999' - // CHECK: test2: '86e65b1ef4a830af347ac05ab4f0e999' - // CHECK: test3: '86e65b1ef4a830af347ac05ab4f0e999' - // CHECK: test4: '{{.*}}' - // CHECK: test5: '{{.*}}' - // CHECK: test6: '86e65b1ef4a830af347ac05ab4f0e999' - // CHECK: test7: '86e65b1ef4a830af347ac05ab4f0e999' - - return 0; -} diff --git a/compiler-rt/test/sanitizer_common/TestCases/FreeBSD/sha2.cpp b/compiler-rt/test/sanitizer_common/TestCases/FreeBSD/sha2.cpp deleted file mode 100644 index 3012aca7d72072..00000000000000 --- a/compiler-rt/test/sanitizer_common/TestCases/FreeBSD/sha2.cpp +++ /dev/null @@ -1,214 +0,0 @@ -// RUN: %clangxx -O0 -g %s -DSHASIZE=224 -o %t -lmd && %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-224 -// RUN: %clangxx -O0 -g %s -DSHASIZE=256 -o %t -lmd && %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-256 -// RUN: %clangxx -O0 -g %s -DSHASIZE=384 -o %t -lmd && %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-384 -// RUN: %clangxx -O0 -g %s -DSHASIZE=512 -o %t -lmd && %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-512 - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef SHASIZE -#error SHASIZE must be defined -#endif - -#define _SHA_CTX(x) SHA##x##_CTX -#define SHA_CTX(x) _SHA_CTX(x) - -#define _SHA_DIGEST_LENGTH(x) SHA##x##_DIGEST_LENGTH -#define SHA_DIGEST_LENGTH(x) _SHA_DIGEST_LENGTH(x) - -#define _SHA_DIGEST_STRING_LENGTH(x) SHA##x##_DIGEST_STRING_LENGTH -#define SHA_DIGEST_STRING_LENGTH(x) _SHA_DIGEST_STRING_LENGTH(x) - -#define _SHA_Init(x) SHA##x##_Init -#define SHA_Init(x) _SHA_Init(x) - -#define _SHA_Update(x) SHA##x##_Update -#define SHA_Update(x) _SHA_Update(x) - -#define _SHA_Final(x) SHA##x##_Final -#define SHA_Final(x) _SHA_Final(x) - -#define _SHA_End(x) SHA##x##_End -#define SHA_End(x) _SHA_End(x) - -#define _SHA_File(x) SHA##x##_File -#define SHA_File(x) _SHA_File(x) - -#define _SHA_FileChunk(x) SHA##x##_FileChunk -#define SHA_FileChunk(x) _SHA_FileChunk(x) - -#define _SHA_Data(x) SHA##x##_Data -#define SHA_Data(x) _SHA_Data(x) - -void test1() { - SHA_CTX(SHASIZE) ctx; - uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; - uint8_t digest[SHA_DIGEST_LENGTH(SHASIZE)]; - size_t entropysz = sizeof(entropy); - size_t digestsz = sizeof(digest); - - SHA_Init(SHASIZE)(&ctx); - SHA_Update(SHASIZE)(&ctx, entropy, entropysz); - SHA_Final(SHASIZE)(digest, &ctx); - - printf("test1: '"); - for (size_t i = 0; i < digestsz; i++) - printf("%02x", digest[i]); - printf("'\n"); -} - -void test2() { - SHA_CTX(SHASIZE) ctx; - uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; - char digest[SHA_DIGEST_STRING_LENGTH(SHASIZE)]; - size_t entropysz = sizeof(entropy); - - SHA_Init(SHASIZE)(&ctx); - SHA_Update(SHASIZE)(&ctx, entropy, entropysz); - char *p = SHA_End(SHASIZE)(&ctx, digest); - assert(p == digest); - - printf("test2: '%s'\n", digest); -} - -void test3() { - SHA_CTX(SHASIZE) ctx; - uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; - size_t entropysz = sizeof(entropy); - - SHA_Init(SHASIZE)(&ctx); - SHA_Update(SHASIZE)(&ctx, entropy, entropysz); - char *p = SHA_End(SHASIZE)(&ctx, NULL); - assert(strlen(p) == SHA_DIGEST_STRING_LENGTH(SHASIZE) - 1); - - printf("test3: '%s'\n", p); - - free(p); -} - -void test4() { - char digest[SHA_DIGEST_STRING_LENGTH(SHASIZE)]; - - char *p = SHA_File(SHASIZE)("/etc/fstab", digest); - assert(p == digest); - - printf("test4: '%s'\n", p); -} - -void test5() { - char *p = SHA_File(SHASIZE)("/etc/fstab", NULL); - assert(strlen(p) == SHA_DIGEST_STRING_LENGTH(SHASIZE) - 1); - - printf("test5: '%s'\n", p); - - free(p); -} - -void test6() { - char digest[SHA_DIGEST_STRING_LENGTH(SHASIZE)]; - - char *p = SHA_FileChunk(SHASIZE)("/etc/fstab", digest, 10, 20); - assert(p == digest); - - printf("test6: '%s'\n", p); -} - -void test7() { - char *p = SHA_FileChunk(SHASIZE)("/etc/fstab", NULL, 10, 20); - assert(strlen(p) == SHA_DIGEST_STRING_LENGTH(SHASIZE) - 1); - - printf("test7: '%s'\n", p); - - free(p); -} - -void test8() { - uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; - char digest[SHA_DIGEST_STRING_LENGTH(SHASIZE)]; - size_t entropysz = sizeof(entropy); - - char *p = SHA_Data(SHASIZE)(entropy, entropysz, digest); - assert(p == digest); - - printf("test8: '%s'\n", p); -} - -void test9() { - uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; - size_t entropysz = sizeof(entropy); - - char *p = SHA_Data(SHASIZE)(entropy, entropysz, NULL); - assert(strlen(p) == SHA_DIGEST_STRING_LENGTH(SHASIZE) - 1); - - printf("test9: '%s'\n", p); - - free(p); -} - -int main(void) { - printf("SHA%d\n", SHASIZE); - - test1(); - test2(); - test3(); - test4(); - test5(); - test6(); - test7(); - test8(); - test9(); - - // CHECK-224: SHA224 - // CHECK-224: test1: '760dfb93100a6bf5996c90f678e529dc945bb2f74a211eedcf0f3a48' - // CHECK-224: test2: '760dfb93100a6bf5996c90f678e529dc945bb2f74a211eedcf0f3a48' - // CHECK-224: test3: '760dfb93100a6bf5996c90f678e529dc945bb2f74a211eedcf0f3a48' - // CHECK-224: test4: '{{.*}}' - // CHECK-224: test5: '{{.*}}' - // CHECK-224: test6: '{{.*}}' - // CHECK-224: test7: '{{.*}}' - // CHECK-224: test8: '760dfb93100a6bf5996c90f678e529dc945bb2f74a211eedcf0f3a48' - // CHECK-224: test9: '760dfb93100a6bf5996c90f678e529dc945bb2f74a211eedcf0f3a48' - - // CHECK-256: SHA256 - // CHECK-256: test1: 'bb000ddd92a0a2a346f0b531f278af06e370f86932ccafccc892d68d350f80f8' - // CHECK-256: test2: 'bb000ddd92a0a2a346f0b531f278af06e370f86932ccafccc892d68d350f80f8' - // CHECK-256: test3: 'bb000ddd92a0a2a346f0b531f278af06e370f86932ccafccc892d68d350f80f8' - // CHECK-256: test4: '{{.*}}' - // CHECK-256: test5: '{{.*}}' - // CHECK-256: test6: '{{.*}}' - // CHECK-256: test7: '{{.*}}' - // CHECK-256: test8: 'bb000ddd92a0a2a346f0b531f278af06e370f86932ccafccc892d68d350f80f8' - // CHECK-256: test9: 'bb000ddd92a0a2a346f0b531f278af06e370f86932ccafccc892d68d350f80f8' - - // CHECK-384: SHA384 - // CHECK-384: test1: 'f450c023b168ebd56ff916ca9b1f1f0010b8c592d28205cc91fa3056f629eed108e8bac864f01ca37a3edee596739e12' - // CHECK-384: test2: 'f450c023b168ebd56ff916ca9b1f1f0010b8c592d28205cc91fa3056f629eed108e8bac864f01ca37a3edee596739e12' - // CHECK-384: test3: 'f450c023b168ebd56ff916ca9b1f1f0010b8c592d28205cc91fa3056f629eed108e8bac864f01ca37a3edee596739e12' - // CHECK-384: test4: '{{.*}}' - // CHECK-384: test5: '{{.*}}' - // CHECK-384: test6: '{{.*}}' - // CHECK-384: test7: '{{.*}}' - // CHECK-384: test8: 'f450c023b168ebd56ff916ca9b1f1f0010b8c592d28205cc91fa3056f629eed108e8bac864f01ca37a3edee596739e12' - // CHECK-384: test9: 'f450c023b168ebd56ff916ca9b1f1f0010b8c592d28205cc91fa3056f629eed108e8bac864f01ca37a3edee596739e12' - - // CHECK-512: SHA512 - // CHECK-512: test1: '0e3f68731c0e2a6a4eab5d713c9a80dc78086b5fa7d2b5ab127277958e68d1b1dee1882b083b0106cd4319de42c0c8f452871364f5baa8a6379690612c6b844e' - // CHECK-512: test2: '0e3f68731c0e2a6a4eab5d713c9a80dc78086b5fa7d2b5ab127277958e68d1b1dee1882b083b0106cd4319de42c0c8f452871364f5baa8a6379690612c6b844e' - // CHECK-512: test3: '0e3f68731c0e2a6a4eab5d713c9a80dc78086b5fa7d2b5ab127277958e68d1b1dee1882b083b0106cd4319de42c0c8f452871364f5baa8a6379690612c6b844e' - // CHECK-512: test4: '{{.*}}' - // CHECK-512: test5: '{{.*}}' - // CHECK-512: test6: '{{.*}}' - // CHECK-512: test7: '{{.*}}' - // CHECK-512: test8: '0e3f68731c0e2a6a4eab5d713c9a80dc78086b5fa7d2b5ab127277958e68d1b1dee1882b083b0106cd4319de42c0c8f452871364f5baa8a6379690612c6b844e' - // CHECK-512: test9: '0e3f68731c0e2a6a4eab5d713c9a80dc78086b5fa7d2b5ab127277958e68d1b1dee1882b083b0106cd4319de42c0c8f452871364f5baa8a6379690612c6b844e' - - return 0; -} diff --git a/compiler-rt/test/sanitizer_common/TestCases/NetBSD/md5.cpp b/compiler-rt/test/sanitizer_common/TestCases/NetBSD/md5.cpp deleted file mode 100644 index aee21681800d89..00000000000000 --- a/compiler-rt/test/sanitizer_common/TestCases/NetBSD/md5.cpp +++ /dev/null @@ -1,114 +0,0 @@ -// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s - -#include - -#include -#include -#include -#include -#include -#include - -void test1() { - MD5_CTX ctx; - uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; - uint8_t digest[MD5_DIGEST_LENGTH]; - - MD5Init(&ctx); - MD5Update(&ctx, entropy, __arraycount(entropy)); - MD5Final(digest, &ctx); - - printf("test1: '"); - for (size_t i = 0; i < __arraycount(digest); i++) - printf("%02x", digest[i]); - printf("'\n"); -} - -void test2() { - MD5_CTX ctx; - uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; - char digest[MD5_DIGEST_STRING_LENGTH]; - - MD5Init(&ctx); - MD5Update(&ctx, entropy, __arraycount(entropy)); - char *p = MD5End(&ctx, digest); - assert(p); - - printf("test2: '%s'\n", digest); -} - -void test3() { - MD5_CTX ctx; - uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; - - MD5Init(&ctx); - MD5Update(&ctx, entropy, __arraycount(entropy)); - char *p = MD5End(&ctx, NULL); - assert(strlen(p) == MD5_DIGEST_STRING_LENGTH - 1); - - printf("test3: '%s'\n", p); - - free(p); -} - -void test4() { - char digest[MD5_DIGEST_STRING_LENGTH]; - - char *p = MD5File("/etc/fstab", digest); - assert(p == digest); - - printf("test4: '%s'\n", p); -} - -void test5() { - char *p = MD5File("/etc/fstab", NULL); - assert(strlen(p) == MD5_DIGEST_STRING_LENGTH - 1); - - printf("test5: '%s'\n", p); - - free(p); -} - -void test6() { - uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; - char digest[MD5_DIGEST_STRING_LENGTH]; - - char *p = MD5Data(entropy, __arraycount(entropy), digest); - assert(p == digest); - - printf("test6: '%s'\n", p); -} - -void test7() { - uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; - - char *p = MD5Data(entropy, __arraycount(entropy), NULL); - assert(strlen(p) == MD5_DIGEST_STRING_LENGTH - 1); - - printf("test7: '%s'\n", p); - - free(p); -} - -int main(void) { - printf("MD5\n"); - - test1(); - test2(); - test3(); - test4(); - test5(); - test6(); - test7(); - - // CHECK: MD5 - // CHECK: test1: '86e65b1ef4a830af347ac05ab4f0e999' - // CHECK: test2: '86e65b1ef4a830af347ac05ab4f0e999' - // CHECK: test3: '86e65b1ef4a830af347ac05ab4f0e999' - // CHECK: test4: '{{.*}}' - // CHECK: test5: '{{.*}}' - // CHECK: test6: '86e65b1ef4a830af347ac05ab4f0e999' - // CHECK: test7: '86e65b1ef4a830af347ac05ab4f0e999' - - return 0; -} diff --git a/compiler-rt/test/sanitizer_common/TestCases/NetBSD/sha2.cpp b/compiler-rt/test/sanitizer_common/TestCases/NetBSD/sha2.cpp deleted file mode 100644 index e905e3b610fd37..00000000000000 --- a/compiler-rt/test/sanitizer_common/TestCases/NetBSD/sha2.cpp +++ /dev/null @@ -1,206 +0,0 @@ -// RUN: %clangxx -O0 -g %s -DSHASIZE=224 -o %t && %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-224 -// RUN: %clangxx -O0 -g %s -DSHASIZE=256 -o %t && %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-256 -// RUN: %clangxx -O0 -g %s -DSHASIZE=384 -o %t && %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-384 -// RUN: %clangxx -O0 -g %s -DSHASIZE=512 -o %t && %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-512 - -#include - -#include -#include -#include -#include -#include -#include - -#ifndef SHASIZE -#error SHASIZE must be defined -#endif - -#define _SHA_CTX(x) SHA##x##_CTX -#define SHA_CTX(x) _SHA_CTX(x) - -#define _SHA_DIGEST_LENGTH(x) SHA##x##_DIGEST_LENGTH -#define SHA_DIGEST_LENGTH(x) _SHA_DIGEST_LENGTH(x) - -#define _SHA_DIGEST_STRING_LENGTH(x) SHA##x##_DIGEST_STRING_LENGTH -#define SHA_DIGEST_STRING_LENGTH(x) _SHA_DIGEST_STRING_LENGTH(x) - -#define _SHA_Init(x) SHA##x##_Init -#define SHA_Init(x) _SHA_Init(x) - -#define _SHA_Update(x) SHA##x##_Update -#define SHA_Update(x) _SHA_Update(x) - -#define _SHA_Final(x) SHA##x##_Final -#define SHA_Final(x) _SHA_Final(x) - -#define _SHA_End(x) SHA##x##_End -#define SHA_End(x) _SHA_End(x) - -#define _SHA_File(x) SHA##x##_File -#define SHA_File(x) _SHA_File(x) - -#define _SHA_FileChunk(x) SHA##x##_FileChunk -#define SHA_FileChunk(x) _SHA_FileChunk(x) - -#define _SHA_Data(x) SHA##x##_Data -#define SHA_Data(x) _SHA_Data(x) - -void test1() { - SHA_CTX(SHASIZE) ctx; - uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; - uint8_t digest[SHA_DIGEST_LENGTH(SHASIZE)]; - - SHA_Init(SHASIZE)(&ctx); - SHA_Update(SHASIZE)(&ctx, entropy, __arraycount(entropy)); - SHA_Final(SHASIZE)(digest, &ctx); - - printf("test1: '"); - for (size_t i = 0; i < __arraycount(digest); i++) - printf("%02x", digest[i]); - printf("'\n"); -} - -void test2() { - SHA_CTX(SHASIZE) ctx; - uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; - char digest[SHA_DIGEST_STRING_LENGTH(SHASIZE)]; - - SHA_Init(SHASIZE)(&ctx); - SHA_Update(SHASIZE)(&ctx, entropy, __arraycount(entropy)); - char *p = SHA_End(SHASIZE)(&ctx, digest); - assert(p == digest); - - printf("test2: '%s'\n", digest); -} - -void test3() { - SHA_CTX(SHASIZE) ctx; - uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; - - SHA_Init(SHASIZE)(&ctx); - SHA_Update(SHASIZE)(&ctx, entropy, __arraycount(entropy)); - char *p = SHA_End(SHASIZE)(&ctx, NULL); - assert(strlen(p) == SHA_DIGEST_STRING_LENGTH(SHASIZE) - 1); - - printf("test3: '%s'\n", p); - - free(p); -} - -void test4() { - char digest[SHA_DIGEST_STRING_LENGTH(SHASIZE)]; - - char *p = SHA_File(SHASIZE)("/etc/fstab", digest); - assert(p == digest); - - printf("test4: '%s'\n", p); -} - -void test5() { - char *p = SHA_File(SHASIZE)("/etc/fstab", NULL); - assert(strlen(p) == SHA_DIGEST_STRING_LENGTH(SHASIZE) - 1); - - printf("test5: '%s'\n", p); - - free(p); -} - -void test6() { - char digest[SHA_DIGEST_STRING_LENGTH(SHASIZE)]; - - char *p = SHA_FileChunk(SHASIZE)("/etc/fstab", digest, 10, 20); - assert(p == digest); - - printf("test6: '%s'\n", p); -} - -void test7() { - char *p = SHA_FileChunk(SHASIZE)("/etc/fstab", NULL, 10, 20); - assert(strlen(p) == SHA_DIGEST_STRING_LENGTH(SHASIZE) - 1); - - printf("test7: '%s'\n", p); - - free(p); -} - -void test8() { - uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; - char digest[SHA_DIGEST_STRING_LENGTH(SHASIZE)]; - - char *p = SHA_Data(SHASIZE)(entropy, __arraycount(entropy), digest); - assert(p == digest); - - printf("test8: '%s'\n", p); -} - -void test9() { - uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; - - char *p = SHA_Data(SHASIZE)(entropy, __arraycount(entropy), NULL); - assert(strlen(p) == SHA_DIGEST_STRING_LENGTH(SHASIZE) - 1); - - printf("test9: '%s'\n", p); - - free(p); -} - -int main(void) { - printf("SHA" ___STRING(SHASIZE) "\n"); - - test1(); - test2(); - test3(); - test4(); - test5(); - test6(); - test7(); - test8(); - test9(); - - // CHECK-224: SHA224 - // CHECK-224: test1: '760dfb93100a6bf5996c90f678e529dc945bb2f74a211eedcf0f3a48' - // CHECK-224: test2: '760dfb93100a6bf5996c90f678e529dc945bb2f74a211eedcf0f3a48' - // CHECK-224: test3: '760dfb93100a6bf5996c90f678e529dc945bb2f74a211eedcf0f3a48' - // CHECK-224: test4: '{{.*}}' - // CHECK-224: test5: '{{.*}}' - // CHECK-224: test6: '{{.*}}' - // CHECK-224: test7: '{{.*}}' - // CHECK-224: test8: '760dfb93100a6bf5996c90f678e529dc945bb2f74a211eedcf0f3a48' - // CHECK-224: test9: '760dfb93100a6bf5996c90f678e529dc945bb2f74a211eedcf0f3a48' - - // CHECK-256: SHA256 - // CHECK-256: test1: 'bb000ddd92a0a2a346f0b531f278af06e370f86932ccafccc892d68d350f80f8' - // CHECK-256: test2: 'bb000ddd92a0a2a346f0b531f278af06e370f86932ccafccc892d68d350f80f8' - // CHECK-256: test3: 'bb000ddd92a0a2a346f0b531f278af06e370f86932ccafccc892d68d350f80f8' - // CHECK-256: test4: '{{.*}}' - // CHECK-256: test5: '{{.*}}' - // CHECK-256: test6: '{{.*}}' - // CHECK-256: test7: '{{.*}}' - // CHECK-256: test8: 'bb000ddd92a0a2a346f0b531f278af06e370f86932ccafccc892d68d350f80f8' - // CHECK-256: test9: 'bb000ddd92a0a2a346f0b531f278af06e370f86932ccafccc892d68d350f80f8' - - // CHECK-384: SHA384 - // CHECK-384: test1: 'f450c023b168ebd56ff916ca9b1f1f0010b8c592d28205cc91fa3056f629eed108e8bac864f01ca37a3edee596739e12' - // CHECK-384: test2: 'f450c023b168ebd56ff916ca9b1f1f0010b8c592d28205cc91fa3056f629eed108e8bac864f01ca37a3edee596739e12' - // CHECK-384: test3: 'f450c023b168ebd56ff916ca9b1f1f0010b8c592d28205cc91fa3056f629eed108e8bac864f01ca37a3edee596739e12' - // CHECK-384: test4: '{{.*}}' - // CHECK-384: test5: '{{.*}}' - // CHECK-384: test6: '{{.*}}' - // CHECK-384: test7: '{{.*}}' - // CHECK-384: test8: 'f450c023b168ebd56ff916ca9b1f1f0010b8c592d28205cc91fa3056f629eed108e8bac864f01ca37a3edee596739e12' - // CHECK-384: test9: 'f450c023b168ebd56ff916ca9b1f1f0010b8c592d28205cc91fa3056f629eed108e8bac864f01ca37a3edee596739e12' - - // CHECK-512: SHA512 - // CHECK-512: test1: '0e3f68731c0e2a6a4eab5d713c9a80dc78086b5fa7d2b5ab127277958e68d1b1dee1882b083b0106cd4319de42c0c8f452871364f5baa8a6379690612c6b844e' - // CHECK-512: test2: '0e3f68731c0e2a6a4eab5d713c9a80dc78086b5fa7d2b5ab127277958e68d1b1dee1882b083b0106cd4319de42c0c8f452871364f5baa8a6379690612c6b844e' - // CHECK-512: test3: '0e3f68731c0e2a6a4eab5d713c9a80dc78086b5fa7d2b5ab127277958e68d1b1dee1882b083b0106cd4319de42c0c8f452871364f5baa8a6379690612c6b844e' - // CHECK-512: test4: '{{.*}}' - // CHECK-512: test5: '{{.*}}' - // CHECK-512: test6: '{{.*}}' - // CHECK-512: test7: '{{.*}}' - // CHECK-512: test8: '0e3f68731c0e2a6a4eab5d713c9a80dc78086b5fa7d2b5ab127277958e68d1b1dee1882b083b0106cd4319de42c0c8f452871364f5baa8a6379690612c6b844e' - // CHECK-512: test9: '0e3f68731c0e2a6a4eab5d713c9a80dc78086b5fa7d2b5ab127277958e68d1b1dee1882b083b0106cd4319de42c0c8f452871364f5baa8a6379690612c6b844e' - - return 0; -} From d50302f31cee86d3270a34f5739c63a41f60f2c1 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Wed, 9 Oct 2024 08:52:32 +0400 Subject: [PATCH 025/129] clang/AMDGPU: Stop emitting amdgpu-unsafe-fp-atomics attribute (#111579) --- clang/lib/CodeGen/Targets/AMDGPU.cpp | 3 --- clang/test/CodeGenCUDA/amdgpu-func-attrs.cu | 22 --------------------- clang/test/OpenMP/amdgcn-attributes.cpp | 3 --- 3 files changed, 28 deletions(-) delete mode 100644 clang/test/CodeGenCUDA/amdgpu-func-attrs.cu diff --git a/clang/lib/CodeGen/Targets/AMDGPU.cpp b/clang/lib/CodeGen/Targets/AMDGPU.cpp index 37e6af3d4196a8..b852dcffb295c9 100644 --- a/clang/lib/CodeGen/Targets/AMDGPU.cpp +++ b/clang/lib/CodeGen/Targets/AMDGPU.cpp @@ -452,9 +452,6 @@ void AMDGPUTargetCodeGenInfo::setTargetAttributes( if (FD) setFunctionDeclAttributes(FD, F, M); - if (M.getContext().getTargetInfo().allowAMDGPUUnsafeFPAtomics()) - F->addFnAttr("amdgpu-unsafe-fp-atomics", "true"); - if (!getABIInfo().getCodeGenOpts().EmitIEEENaNCompliantInsts) F->addFnAttr("amdgpu-ieee", "false"); } diff --git a/clang/test/CodeGenCUDA/amdgpu-func-attrs.cu b/clang/test/CodeGenCUDA/amdgpu-func-attrs.cu deleted file mode 100644 index 89add87919c12d..00000000000000 --- a/clang/test/CodeGenCUDA/amdgpu-func-attrs.cu +++ /dev/null @@ -1,22 +0,0 @@ -// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa \ -// RUN: -fcuda-is-device -emit-llvm -o - -x hip %s \ -// RUN: | FileCheck -check-prefixes=NO-UNSAFE-FP-ATOMICS %s -// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa \ -// RUN: -fcuda-is-device -emit-llvm -o - -x hip %s \ -// RUN: -munsafe-fp-atomics \ -// RUN: | FileCheck -check-prefixes=UNSAFE-FP-ATOMICS %s -// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm \ -// RUN: -o - -x hip %s -munsafe-fp-atomics \ -// RUN: | FileCheck -check-prefix=NO-UNSAFE-FP-ATOMICS %s - -#include "Inputs/cuda.h" - -__device__ void test() { -// UNSAFE-FP-ATOMICS: define{{.*}} void @_Z4testv() [[ATTR:#[0-9]+]] -} - - -// Make sure this is silently accepted on other targets. -// NO-UNSAFE-FP-ATOMICS-NOT: "amdgpu-unsafe-fp-atomics" - -// UNSAFE-FP-ATOMICS-DAG: attributes [[ATTR]] = {{.*}}"amdgpu-unsafe-fp-atomics"="true" diff --git a/clang/test/OpenMP/amdgcn-attributes.cpp b/clang/test/OpenMP/amdgcn-attributes.cpp index 5ddc34537d12fb..2c9e16a4f5098e 100644 --- a/clang/test/OpenMP/amdgcn-attributes.cpp +++ b/clang/test/OpenMP/amdgcn-attributes.cpp @@ -5,7 +5,6 @@ // RUN: %clang_cc1 -target-cpu gfx900 -fopenmp -x c++ -std=c++11 -triple amdgcn-amd-amdhsa -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck -check-prefixes=CPU,ALL %s // RUN: %clang_cc1 -menable-no-nans -mno-amdgpu-ieee -fopenmp -x c++ -std=c++11 -triple amdgcn-amd-amdhsa -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck -check-prefixes=NOIEEE,ALL %s -// RUN: %clang_cc1 -munsafe-fp-atomics -fopenmp -x c++ -std=c++11 -triple amdgcn-amd-amdhsa -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck -check-prefixes=UNSAFEATOMIC,ALL %s // expected-no-diagnostics @@ -35,9 +34,7 @@ int callable(int x) { // DEFAULT: attributes #0 = { convergent mustprogress noinline norecurse nounwind optnone "amdgpu-flat-work-group-size"="1,42" "kernel" "no-trapping-math"="true" "omp_target_thread_limit"="42" "stack-protector-buffer-size"="8" "uniform-work-group-size"="true" } // CPU: attributes #0 = { convergent mustprogress noinline norecurse nounwind optnone "amdgpu-flat-work-group-size"="1,42" "kernel" "no-trapping-math"="true" "omp_target_thread_limit"="42" "stack-protector-buffer-size"="8" "target-cpu"="gfx900" "target-features"="+16-bit-insts,+ci-insts,+dpp,+gfx8-insts,+gfx9-insts,+s-memrealtime,+s-memtime-inst,+wavefrontsize64" "uniform-work-group-size"="true" } // NOIEEE: attributes #0 = { convergent mustprogress noinline norecurse nounwind optnone "amdgpu-flat-work-group-size"="1,42" "amdgpu-ieee"="false" "kernel" "no-nans-fp-math"="true" "no-trapping-math"="true" "omp_target_thread_limit"="42" "stack-protector-buffer-size"="8" "uniform-work-group-size"="true" } -// UNSAFEATOMIC: attributes #0 = { convergent mustprogress noinline norecurse nounwind optnone "amdgpu-flat-work-group-size"="1,42" "amdgpu-unsafe-fp-atomics"="true" "kernel" "no-trapping-math"="true" "omp_target_thread_limit"="42" "stack-protector-buffer-size"="8" "uniform-work-group-size"="true" } // DEFAULT: attributes #2 = { convergent mustprogress noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" } // CPU: attributes #2 = { convergent mustprogress noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="gfx900" "target-features"="+16-bit-insts,+ci-insts,+dpp,+gfx8-insts,+gfx9-insts,+s-memrealtime,+s-memtime-inst,+wavefrontsize64" } // NOIEEE: attributes #2 = { convergent mustprogress noinline nounwind optnone "amdgpu-ieee"="false" "no-nans-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" } -// UNSAFEATOMIC: attributes #2 = { convergent mustprogress noinline nounwind optnone "amdgpu-unsafe-fp-atomics"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" } From 4336f00f2156970cc0af2816331387a0a4039317 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 9 Oct 2024 01:55:21 -0300 Subject: [PATCH 026/129] [clang] Track function template instantiation from definition (#110387) This fixes instantiation of definition for friend function templates, when the declaration found and the one containing the definition have different template contexts. In these cases, the the function declaration corresponding to the definition is not available; it may not even be instantiated at all. So this patch adds a bit which tracks which function template declaration was instantiated from the member template. It's used to find which primary template serves as a context for the purpose of obtaining the template arguments needed to instantiate the definition. Fixes #55509 --- clang/docs/ReleaseNotes.rst | 1 + clang/include/clang/AST/Decl.h | 7 ++ clang/include/clang/AST/DeclBase.h | 10 +- clang/include/clang/AST/DeclTemplate.h | 9 ++ clang/include/clang/Sema/Sema.h | 6 ++ clang/lib/AST/Decl.cpp | 1 + clang/lib/Sema/SemaTemplateDeduction.cpp | 17 +-- clang/lib/Sema/SemaTemplateInstantiate.cpp | 17 ++- .../lib/Sema/SemaTemplateInstantiateDecl.cpp | 22 +++- clang/lib/Serialization/ASTReaderDecl.cpp | 1 + clang/lib/Serialization/ASTWriterDecl.cpp | 3 +- clang/test/SemaTemplate/GH55509.cpp | 101 ++++++++++++++++++ 12 files changed, 169 insertions(+), 26 deletions(-) create mode 100644 clang/test/SemaTemplate/GH55509.cpp diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index c1122e1180ab91..8d02cc3eae9fd9 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -474,6 +474,7 @@ Bug Fixes to C++ Support - Fixed an assertion failure in debug mode, and potential crashes in release mode, when diagnosing a failed cast caused indirectly by a failed implicit conversion to the type of the constructor parameter. - Fixed an assertion failure by adjusting integral to boolean vector conversions (#GH108326) +- Clang is now better at keeping track of friend function template instance contexts. (#GH55509) - Fixed an issue deducing non-type template arguments of reference type. (#GH73460) - Fixed an issue in constraint evaluation, where type constraints on the lambda expression containing outer unexpanded parameters were not correctly expanded. (#GH101754) diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h index 7ff35d73df5997..6afc86710a8137 100644 --- a/clang/include/clang/AST/Decl.h +++ b/clang/include/clang/AST/Decl.h @@ -2299,6 +2299,13 @@ class FunctionDecl : public DeclaratorDecl, FunctionDeclBits.IsLateTemplateParsed = ILT; } + bool isInstantiatedFromMemberTemplate() const { + return FunctionDeclBits.IsInstantiatedFromMemberTemplate; + } + void setInstantiatedFromMemberTemplate(bool Val = true) { + FunctionDeclBits.IsInstantiatedFromMemberTemplate = Val; + } + /// Whether this function is "trivial" in some specialized C++ senses. /// Can only be true for default constructors, copy constructors, /// copy assignment operators, and destructors. Not meaningful until diff --git a/clang/include/clang/AST/DeclBase.h b/clang/include/clang/AST/DeclBase.h index ee662ed73d7e0e..eb67dc03157e64 100644 --- a/clang/include/clang/AST/DeclBase.h +++ b/clang/include/clang/AST/DeclBase.h @@ -1763,6 +1763,8 @@ class DeclContext { uint64_t HasImplicitReturnZero : 1; LLVM_PREFERRED_TYPE(bool) uint64_t IsLateTemplateParsed : 1; + LLVM_PREFERRED_TYPE(bool) + uint64_t IsInstantiatedFromMemberTemplate : 1; /// Kind of contexpr specifier as defined by ConstexprSpecKind. LLVM_PREFERRED_TYPE(ConstexprSpecKind) @@ -1813,7 +1815,7 @@ class DeclContext { }; /// Number of inherited and non-inherited bits in FunctionDeclBitfields. - enum { NumFunctionDeclBits = NumDeclContextBits + 31 }; + enum { NumFunctionDeclBits = NumDeclContextBits + 32 }; /// Stores the bits used by CXXConstructorDecl. If modified /// NumCXXConstructorDeclBits and the accessor @@ -1824,12 +1826,12 @@ class DeclContext { LLVM_PREFERRED_TYPE(FunctionDeclBitfields) uint64_t : NumFunctionDeclBits; - /// 20 bits to fit in the remaining available space. + /// 19 bits to fit in the remaining available space. /// Note that this makes CXXConstructorDeclBitfields take /// exactly 64 bits and thus the width of NumCtorInitializers /// will need to be shrunk if some bit is added to NumDeclContextBitfields, /// NumFunctionDeclBitfields or CXXConstructorDeclBitfields. - uint64_t NumCtorInitializers : 17; + uint64_t NumCtorInitializers : 16; LLVM_PREFERRED_TYPE(bool) uint64_t IsInheritingConstructor : 1; @@ -1843,7 +1845,7 @@ class DeclContext { }; /// Number of inherited and non-inherited bits in CXXConstructorDeclBitfields. - enum { NumCXXConstructorDeclBits = NumFunctionDeclBits + 20 }; + enum { NumCXXConstructorDeclBits = NumFunctionDeclBits + 19 }; /// Stores the bits used by ObjCMethodDecl. /// If modified NumObjCMethodDeclBits and the accessor diff --git a/clang/include/clang/AST/DeclTemplate.h b/clang/include/clang/AST/DeclTemplate.h index 05739f39d2a496..2fb49ec1aea0d0 100644 --- a/clang/include/clang/AST/DeclTemplate.h +++ b/clang/include/clang/AST/DeclTemplate.h @@ -1008,6 +1008,15 @@ class FunctionTemplateDecl : public RedeclarableTemplateDecl { return getTemplatedDecl()->isThisDeclarationADefinition(); } + bool isCompatibleWithDefinition() const { + return getTemplatedDecl()->isInstantiatedFromMemberTemplate() || + isThisDeclarationADefinition(); + } + void setInstantiatedFromMemberTemplate(FunctionTemplateDecl *D) { + getTemplatedDecl()->setInstantiatedFromMemberTemplate(); + RedeclarableTemplateDecl::setInstantiatedFromMemberTemplate(D); + } + /// Return the specialization with the provided arguments if it exists, /// otherwise return the insertion point. FunctionDecl *findSpecialization(ArrayRef Args, diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index 7ff9c2754a6fe0..043456438b6d03 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -13027,6 +13027,12 @@ class Sema final : public SemaBase { std::optional> Innermost = std::nullopt, bool RelativeToPrimary = false, bool ForConstraintInstantiation = false); + void getTemplateInstantiationArgs( + MultiLevelTemplateArgumentList &Result, const NamedDecl *D, + const DeclContext *DC = nullptr, bool Final = false, + std::optional> Innermost = std::nullopt, + bool RelativeToPrimary = false, bool ForConstraintInstantiation = false); + /// RAII object to handle the state changes required to synthesize /// a function body. class SynthesizedFunctionScope { diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 58d11a0312c505..8f54b5f1589d4f 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -3067,6 +3067,7 @@ FunctionDecl::FunctionDecl(Kind DK, ASTContext &C, DeclContext *DC, FunctionDeclBits.IsIneligibleOrNotSelected = false; FunctionDeclBits.HasImplicitReturnZero = false; FunctionDeclBits.IsLateTemplateParsed = false; + FunctionDeclBits.IsInstantiatedFromMemberTemplate = false; FunctionDeclBits.ConstexprKind = static_cast(ConstexprKind); FunctionDeclBits.BodyContainsImmediateEscalatingExpression = false; FunctionDeclBits.InstantiationIsPending = false; diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp index 8e80ab730ac342..f9a8d2d9ff0b1d 100644 --- a/clang/lib/Sema/SemaTemplateDeduction.cpp +++ b/clang/lib/Sema/SemaTemplateDeduction.cpp @@ -4007,22 +4007,7 @@ TemplateDeductionResult Sema::FinishTemplateArgumentDeduction( if (FunctionTemplate->getFriendObjectKind()) Owner = FunctionTemplate->getLexicalDeclContext(); FunctionDecl *FD = FunctionTemplate->getTemplatedDecl(); - // additional check for inline friend, - // ``` - // template int foo(F1 X); - // template struct A { - // template friend int foo(F1 X) { return A1; } - // }; - // template struct A<1>; - // int a = foo(1.0); - // ``` - const FunctionDecl *FDFriend; - if (FD->getFriendObjectKind() == Decl::FriendObjectKind::FOK_None && - FD->isDefined(FDFriend, /*CheckForPendingFriendDefinition*/ true) && - FDFriend->getFriendObjectKind() != Decl::FriendObjectKind::FOK_None) { - FD = const_cast(FDFriend); - Owner = FD->getLexicalDeclContext(); - } + MultiLevelTemplateArgumentList SubstArgs( FunctionTemplate, CanonicalDeducedArgumentList->asArray(), /*Final=*/false); diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp index f2007fc5d85a50..9c5b3e7c9066c7 100644 --- a/clang/lib/Sema/SemaTemplateInstantiate.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp @@ -512,13 +512,13 @@ struct TemplateInstantiationArgumentCollecter } // namespace -MultiLevelTemplateArgumentList Sema::getTemplateInstantiationArgs( - const NamedDecl *ND, const DeclContext *DC, bool Final, +void Sema::getTemplateInstantiationArgs( + MultiLevelTemplateArgumentList &Result, const NamedDecl *ND, + const DeclContext *DC, bool Final, std::optional> Innermost, bool RelativeToPrimary, bool ForConstraintInstantiation) { assert((ND || DC) && "Can't find arguments for a decl if one isn't provided"); // Accumulate the set of template argument lists in this structure. - MultiLevelTemplateArgumentList Result; const Decl *CurDecl = ND; if (!CurDecl) @@ -529,6 +529,17 @@ MultiLevelTemplateArgumentList Sema::getTemplateInstantiationArgs( do { CurDecl = Collecter.Visit(const_cast(CurDecl)); } while (CurDecl); +} + +MultiLevelTemplateArgumentList Sema::getTemplateInstantiationArgs( + const NamedDecl *ND, const DeclContext *DC, bool Final, + std::optional> Innermost, bool RelativeToPrimary, + bool ForConstraintInstantiation) { + assert((ND || DC) && "Can't find arguments for a decl if one isn't provided"); + // Accumulate the set of template argument lists in this structure. + MultiLevelTemplateArgumentList Result; + getTemplateInstantiationArgs(Result, ND, DC, Final, Innermost, + RelativeToPrimary, ForConstraintInstantiation); return Result; } diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index d29434486dcb06..17d167b3a5e0c6 100644 --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -5214,8 +5214,26 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, RebuildTypeSourceInfoForDefaultSpecialMembers(); SetDeclDefaulted(Function, PatternDecl->getLocation()); } else { - MultiLevelTemplateArgumentList TemplateArgs = getTemplateInstantiationArgs( - Function, Function->getLexicalDeclContext()); + DeclContext *DC = Function; + MultiLevelTemplateArgumentList TemplateArgs; + if (auto *Primary = Function->getPrimaryTemplate(); + Primary && + !isGenericLambdaCallOperatorOrStaticInvokerSpecialization(Function)) { + auto It = llvm::find_if(Primary->redecls(), + [](const RedeclarableTemplateDecl *RTD) { + return cast(RTD) + ->isCompatibleWithDefinition(); + }); + assert(It != Primary->redecls().end() && + "Should't get here without a definition"); + DC = (*It)->getLexicalDeclContext(); + if (Function->getTemplateSpecializationKind() != + TSK_ExplicitSpecialization) + TemplateArgs.addOuterTemplateArguments( + Function, Function->getTemplateSpecializationArgs()->asArray(), + /*Final=*/false); + } + getTemplateInstantiationArgs(TemplateArgs, /*D=*/nullptr, DC); // Substitute into the qualifier; we can get a substitution failure here // through evil use of alias templates. diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp index 1ccc810f415eb4..a44df84a8bcef2 100644 --- a/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/clang/lib/Serialization/ASTReaderDecl.cpp @@ -1087,6 +1087,7 @@ void ASTDeclReader::VisitFunctionDecl(FunctionDecl *FD) { FD->setHasImplicitReturnZero(FunctionDeclBits.getNextBit()); FD->setIsMultiVersion(FunctionDeclBits.getNextBit()); FD->setLateTemplateParsed(FunctionDeclBits.getNextBit()); + FD->setInstantiatedFromMemberTemplate(FunctionDeclBits.getNextBit()); FD->setFriendConstraintRefersToEnclosingTemplate( FunctionDeclBits.getNextBit()); FD->setUsesSEHTry(FunctionDeclBits.getNextBit()); diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp index f21cbd11b6ab89..dec93317dc7b37 100644 --- a/clang/lib/Serialization/ASTWriterDecl.cpp +++ b/clang/lib/Serialization/ASTWriterDecl.cpp @@ -626,7 +626,7 @@ void ASTDeclWriter::VisitDeclaratorDecl(DeclaratorDecl *D) { } void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) { - static_assert(DeclContext::NumFunctionDeclBits == 44, + static_assert(DeclContext::NumFunctionDeclBits == 45, "You need to update the serializer after you change the " "FunctionDeclBits"); @@ -732,6 +732,7 @@ void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) { FunctionDeclBits.addBit(D->hasImplicitReturnZero()); FunctionDeclBits.addBit(D->isMultiVersion()); FunctionDeclBits.addBit(D->isLateTemplateParsed()); + FunctionDeclBits.addBit(D->isInstantiatedFromMemberTemplate()); FunctionDeclBits.addBit(D->FriendConstraintRefersToEnclosingTemplate()); FunctionDeclBits.addBit(D->usesSEHTry()); Record.push_back(FunctionDeclBits); diff --git a/clang/test/SemaTemplate/GH55509.cpp b/clang/test/SemaTemplate/GH55509.cpp new file mode 100644 index 00000000000000..f95833fbed7b19 --- /dev/null +++ b/clang/test/SemaTemplate/GH55509.cpp @@ -0,0 +1,101 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++26 %s + +namespace t1 { + template struct A { + template friend auto cica(const A&, C) { + return N; + } + }; + + template<> struct A<0> { + template friend auto cica(const A<0>&, C); + // expected-note@-1 {{declared here}} + }; + + void test() { + cica(A<0>{}, 0); + // expected-error@-1 {{function 'cica' with deduced return type cannot be used before it is defined}} + + (void)A<1>{}; + cica(A<0>{}, 0); + } +} // namespace t1 +namespace t2 { + template struct A { + template friend auto cica(const A&, C) { + return N; + } + }; + + template<> struct A<0> { + template friend auto cica(const A<0>&, C); + }; + + template {}, nullptr))> + void MakeCica(); + // expected-note@-1 {{candidate function}} + + template void MakeCica(A = {}); + // expected-note@-1 {{candidate function}} + + void test() { + MakeCica<0>(); + + MakeCica<0>(); + // expected-error@-1 {{call to 'MakeCica' is ambiguous}} + } +} // namespace t2 +namespace t3 { + template struct A { + template friend auto cica(const A&, C) { + return N-1; + } + }; + + template<> struct A<0> { + template friend auto cica(const A<0>&, C); + }; + + template + static constexpr bool MakeCica(int); + + template + static constexpr bool MakeCica(short, A = {}); + + template , class Val = decltype(MakeCica(0))> + static constexpr bool has_cica = Val{}; + + constexpr bool cica2 = has_cica<0> || has_cica<0>; +} // namespace t3 +namespace t4 { + template struct A { + template friend auto cica(const A&, C); + }; + + template<> struct A<0> { + template friend auto cica(const A<0>&, C) { + C a; + } + }; + + template struct A<1>; + + void test() { + cica(A<0>{}, 0); + } +} // namespace t4 +namespace regression1 { + template class A; + + template [[gnu::abi_tag("TAG")]] void foo(A); + + template struct A { + friend void foo <>(A); + }; + + template struct A; + + template [[gnu::abi_tag("TAG")]] void foo(A) {} + + template void foo(A); +} // namespace regression1 From fbd2a918652894b31199dffe1ce5335b019332d7 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Wed, 9 Oct 2024 09:24:37 +0400 Subject: [PATCH 027/129] InferAddressSpaces: Handle llvm.fake.use (#109567) --- .../Transforms/Scalar/InferAddressSpaces.cpp | 14 +++ .../Transforms/InferAddressSpaces/fake-use.ll | 97 +++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 llvm/test/Transforms/InferAddressSpaces/fake-use.ll diff --git a/llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp b/llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp index 566cdc51f6e74a..60fd2a286119b3 100644 --- a/llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp +++ b/llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp @@ -414,6 +414,10 @@ bool InferAddressSpacesImpl::rewriteIntrinsicOperands(IntrinsicInst *II, II->setCalledFunction(NewDecl); return true; } + case Intrinsic::fake_use: { + II->replaceUsesOfWith(OldV, NewV); + return true; + } default: { Value *Rewrite = TTI->rewriteIntrinsicWithAddressSpace(II, OldV, NewV); if (!Rewrite) @@ -455,6 +459,16 @@ void InferAddressSpacesImpl::collectRewritableIntrinsicOperands( appendsFlatAddressExpressionToPostorderStack(II->getArgOperand(1), PostorderStack, Visited); break; + case Intrinsic::fake_use: { + for (Value *Op : II->operands()) { + if (Op->getType()->isPtrOrPtrVectorTy()) { + appendsFlatAddressExpressionToPostorderStack(Op, PostorderStack, + Visited); + } + } + + break; + } default: SmallVector OpIndexes; if (TTI->collectFlatAddressOperands(OpIndexes, IID)) { diff --git a/llvm/test/Transforms/InferAddressSpaces/fake-use.ll b/llvm/test/Transforms/InferAddressSpaces/fake-use.ll new file mode 100644 index 00000000000000..ad7f621dc40e85 --- /dev/null +++ b/llvm/test/Transforms/InferAddressSpaces/fake-use.ll @@ -0,0 +1,97 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt -S -passes=infer-address-spaces -assume-default-is-flat-addrspace %s | FileCheck %s + +declare void @llvm.fake.use(...) + +@gv = internal addrspace(3) global float 0.0, align 4 + +define void @one_fake_use(ptr addrspace(1) %global.ptr) { +; CHECK-LABEL: define void @one_fake_use( +; CHECK-SAME: ptr addrspace(1) [[GLOBAL_PTR:%.*]]) { +; CHECK-NEXT: call void (...) @llvm.fake.use(ptr addrspace(1) [[GLOBAL_PTR]]) +; CHECK-NEXT: ret void +; + %cast0 = addrspacecast ptr addrspace(1) %global.ptr to ptr + call void (...) @llvm.fake.use(ptr %cast0) + ret void +} + +define void @one_fake_use_repeat_operands(ptr addrspace(1) %global.ptr) { +; CHECK-LABEL: define void @one_fake_use_repeat_operands( +; CHECK-SAME: ptr addrspace(1) [[GLOBAL_PTR:%.*]]) { +; CHECK-NEXT: call void (...) @llvm.fake.use(ptr addrspace(1) [[GLOBAL_PTR]], ptr addrspace(1) [[GLOBAL_PTR]]) +; CHECK-NEXT: ret void +; + %cast0 = addrspacecast ptr addrspace(1) %global.ptr to ptr + call void (...) @llvm.fake.use(ptr %cast0, ptr %cast0) + ret void +} + +define void @one_fake_use_refers_original_ptr(ptr addrspace(1) %global.ptr) { +; CHECK-LABEL: define void @one_fake_use_refers_original_ptr( +; CHECK-SAME: ptr addrspace(1) [[GLOBAL_PTR:%.*]]) { +; CHECK-NEXT: call void (...) @llvm.fake.use(ptr addrspace(1) [[GLOBAL_PTR]], ptr addrspace(1) [[GLOBAL_PTR]]) +; CHECK-NEXT: ret void +; + %cast0 = addrspacecast ptr addrspace(1) %global.ptr to ptr + call void (...) @llvm.fake.use(ptr %cast0, ptr addrspace(1) %global.ptr) + ret void +} + +define void @multiple_inferrable_fake_use(ptr addrspace(1) %global.ptr0, ptr addrspace(1) %global.ptr1) { +; CHECK-LABEL: define void @multiple_inferrable_fake_use( +; CHECK-SAME: ptr addrspace(1) [[GLOBAL_PTR0:%.*]], ptr addrspace(1) [[GLOBAL_PTR1:%.*]]) { +; CHECK-NEXT: call void (...) @llvm.fake.use(ptr addrspace(1) [[GLOBAL_PTR0]], ptr addrspace(1) [[GLOBAL_PTR1]]) +; CHECK-NEXT: ret void +; + %cast0 = addrspacecast ptr addrspace(1) %global.ptr0 to ptr + %cast1 = addrspacecast ptr addrspace(1) %global.ptr1 to ptr + call void (...) @llvm.fake.use(ptr %cast0, ptr %cast1) + ret void +} + +define void @multiple_fake_use_one_inferrable(ptr %flat.ptr0, ptr addrspace(1) %global.ptr1) { +; CHECK-LABEL: define void @multiple_fake_use_one_inferrable( +; CHECK-SAME: ptr [[FLAT_PTR0:%.*]], ptr addrspace(1) [[GLOBAL_PTR1:%.*]]) { +; CHECK-NEXT: call void (...) @llvm.fake.use(ptr [[FLAT_PTR0]], ptr addrspace(1) [[GLOBAL_PTR1]]) +; CHECK-NEXT: call void (...) @llvm.fake.use(ptr addrspace(1) [[GLOBAL_PTR1]], ptr [[FLAT_PTR0]]) +; CHECK-NEXT: ret void +; + %cast1 = addrspacecast ptr addrspace(1) %global.ptr1 to ptr + call void (...) @llvm.fake.use(ptr %flat.ptr0, ptr %cast1) + call void (...) @llvm.fake.use(ptr %cast1, ptr %flat.ptr0) + ret void +} + +define void @vector_of_pointers(<2 x ptr addrspace(1)> %global.ptr) { +; CHECK-LABEL: define void @vector_of_pointers( +; CHECK-SAME: <2 x ptr addrspace(1)> [[GLOBAL_PTR:%.*]]) { +; CHECK-NEXT: call void (...) @llvm.fake.use(<2 x ptr addrspace(1)> [[GLOBAL_PTR]]) +; CHECK-NEXT: ret void +; + %cast0 = addrspacecast <2 x ptr addrspace(1)> %global.ptr to <2 x ptr> + call void (...) @llvm.fake.use(<2 x ptr> %cast0) + ret void +} + +define void @use_global_var() { +; CHECK-LABEL: define void @use_global_var() { +; CHECK-NEXT: call void (...) @llvm.fake.use(ptr addrspace(3) @gv) +; CHECK-NEXT: ret void +; + call void (...) @llvm.fake.use(ptr addrspacecast (ptr addrspace(3) @gv to ptr)) + ret void +} + +define void @use_gep_cast(ptr addrspace(1) %global.ptr) { +; CHECK-LABEL: define void @use_gep_cast( +; CHECK-SAME: ptr addrspace(1) [[GLOBAL_PTR:%.*]]) { +; CHECK-NEXT: [[GEP:%.*]] = getelementptr i8, ptr addrspace(1) [[GLOBAL_PTR]], i64 16 +; CHECK-NEXT: call void (...) @llvm.fake.use(ptr addrspace(1) [[GEP]], ptr addrspace(1) [[GLOBAL_PTR]]) +; CHECK-NEXT: ret void +; + %cast0 = addrspacecast ptr addrspace(1) %global.ptr to ptr + %gep = getelementptr i8, ptr %cast0, i64 16 + call void (...) @llvm.fake.use(ptr %gep, ptr %cast0) + ret void +} From c198f775cdcd731f68fb482c223702c7273d41ca Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Wed, 9 Oct 2024 09:27:28 +0400 Subject: [PATCH 028/129] AMDGPU: Remove flat/global fmin/fmax intrinsics (#105642) These have been replaced with atomicrmw --- llvm/include/llvm/IR/IntrinsicsAMDGPU.td | 5 - llvm/lib/IR/AutoUpgrade.cpp | 25 +- llvm/lib/Target/AMDGPU/AMDGPUInstructions.td | 4 - .../Target/AMDGPU/AMDGPURegisterBankInfo.cpp | 4 - .../Target/AMDGPU/AMDGPUSearchableTables.td | 4 - .../AMDGPU/AMDGPUTargetTransformInfo.cpp | 4 - llvm/lib/Target/AMDGPU/FLATInstructions.td | 11 - llvm/lib/Target/AMDGPU/SIISelLowering.cpp | 16 - llvm/test/Bitcode/amdgcn-atomic.ll | 64 +++ .../AMDGPU/GlobalISel/fp64-atomics-gfx90a.ll | 236 ++---------- .../CodeGen/AMDGPU/dag-divergence-atomic.ll | 9 +- .../AMDGPU/fp-min-max-flat-atomics-f64.ll | 51 --- .../CodeGen/AMDGPU/fp-min-max-flat-atomics.ll | 83 ---- .../AMDGPU/fp-min-max-global-atomics-f64.ll | 51 --- .../AMDGPU/fp-min-max-global-atomics.ll | 87 ----- .../CodeGen/AMDGPU/fp64-atomics-gfx90a.ll | 364 +----------------- .../AMDGPU/flat-fadd-fmin-fmax-intrinsics.ll | 224 ----------- .../InferAddressSpaces/AMDGPU/flat_atomic.ll | 63 +-- 18 files changed, 127 insertions(+), 1178 deletions(-) delete mode 100644 llvm/test/CodeGen/AMDGPU/fp-min-max-flat-atomics-f64.ll delete mode 100644 llvm/test/CodeGen/AMDGPU/fp-min-max-flat-atomics.ll delete mode 100644 llvm/test/CodeGen/AMDGPU/fp-min-max-global-atomics-f64.ll delete mode 100644 llvm/test/CodeGen/AMDGPU/fp-min-max-global-atomics.ll delete mode 100644 llvm/test/Transforms/InferAddressSpaces/AMDGPU/flat-fadd-fmin-fmax-intrinsics.ll diff --git a/llvm/include/llvm/IR/IntrinsicsAMDGPU.td b/llvm/include/llvm/IR/IntrinsicsAMDGPU.td index 50179c1ceddb47..2738eb77b675ab 100644 --- a/llvm/include/llvm/IR/IntrinsicsAMDGPU.td +++ b/llvm/include/llvm/IR/IntrinsicsAMDGPU.td @@ -2966,11 +2966,6 @@ def int_amdgcn_mfma_f32_16x16x8bf16 : AMDGPUMfmaIntrinsic; -def int_amdgcn_global_atomic_fmax : AMDGPUAtomicRtn; -def int_amdgcn_flat_atomic_fmin : AMDGPUAtomicRtn; -def int_amdgcn_flat_atomic_fmax : AMDGPUAtomicRtn; - defset list AMDGPUMFMAIntrinsics90A = { def int_amdgcn_mfma_f32_32x32x4bf16_1k : AMDGPUMfmaIntrinsic; def int_amdgcn_mfma_f32_16x16x4bf16_1k : AMDGPUMfmaIntrinsic; diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp index 3753509f9aa718..215bfc8c6cfe3e 100644 --- a/llvm/lib/IR/AutoUpgrade.cpp +++ b/llvm/lib/IR/AutoUpgrade.cpp @@ -1041,14 +1041,17 @@ static bool upgradeIntrinsicFunction1(Function *F, Function *&NewFn, break; // No other 'amdgcn.atomic.*' } - if (Name.starts_with("ds.fadd") || Name.starts_with("ds.fmin") || - Name.starts_with("ds.fmax") || - Name.starts_with("global.atomic.fadd") || - Name.starts_with("flat.atomic.fadd")) { - // Replaced with atomicrmw fadd/fmin/fmax, so there's no new - // declaration. - NewFn = nullptr; - return true; + if (Name.consume_front("ds.") || Name.consume_front("global.atomic.") || + Name.consume_front("flat.atomic.")) { + if (Name.starts_with("fadd") || + // FIXME: We should also remove fmin.num and fmax.num intrinsics. + (Name.starts_with("fmin") && !Name.starts_with("fmin.num")) || + (Name.starts_with("fmax") && !Name.starts_with("fmax.num"))) { + // Replaced with atomicrmw fadd/fmin/fmax, so there's no new + // declaration. + NewFn = nullptr; + return true; + } } if (Name.starts_with("ldexp.")) { @@ -4218,7 +4221,11 @@ static Value *upgradeAMDGCNIntrinsicCall(StringRef Name, CallBase *CI, .StartsWith("atomic.inc.", AtomicRMWInst::UIncWrap) .StartsWith("atomic.dec.", AtomicRMWInst::UDecWrap) .StartsWith("global.atomic.fadd", AtomicRMWInst::FAdd) - .StartsWith("flat.atomic.fadd", AtomicRMWInst::FAdd); + .StartsWith("flat.atomic.fadd", AtomicRMWInst::FAdd) + .StartsWith("global.atomic.fmin", AtomicRMWInst::FMin) + .StartsWith("flat.atomic.fmin", AtomicRMWInst::FMin) + .StartsWith("global.atomic.fmax", AtomicRMWInst::FMax) + .StartsWith("flat.atomic.fmax", AtomicRMWInst::FMax); unsigned NumOperands = CI->getNumOperands(); if (NumOperands < 3) // Malformed bitcode. diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td b/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td index aa5b151adef3a4..09987a6504b9d0 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td +++ b/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td @@ -618,10 +618,6 @@ multiclass local_addr_space_atomic_op { } } -defm int_amdgcn_flat_atomic_fmin : noret_op; -defm int_amdgcn_flat_atomic_fmax : noret_op; -defm int_amdgcn_global_atomic_fmin : noret_op; -defm int_amdgcn_global_atomic_fmax : noret_op; defm int_amdgcn_global_atomic_csub : noret_op; defm int_amdgcn_global_atomic_ordered_add_b64 : noret_op; defm int_amdgcn_flat_atomic_fmin_num : noret_op; diff --git a/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp index f597c1ae68a175..32dfbc98df581a 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp @@ -4913,12 +4913,8 @@ AMDGPURegisterBankInfo::getInstrMapping(const MachineInstr &MI) const { break; } case Intrinsic::amdgcn_global_atomic_csub: - case Intrinsic::amdgcn_global_atomic_fmin: - case Intrinsic::amdgcn_global_atomic_fmax: case Intrinsic::amdgcn_global_atomic_fmin_num: case Intrinsic::amdgcn_global_atomic_fmax_num: - case Intrinsic::amdgcn_flat_atomic_fmin: - case Intrinsic::amdgcn_flat_atomic_fmax: case Intrinsic::amdgcn_flat_atomic_fmin_num: case Intrinsic::amdgcn_flat_atomic_fmax_num: case Intrinsic::amdgcn_atomic_cond_sub_u32: diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSearchableTables.td b/llvm/lib/Target/AMDGPU/AMDGPUSearchableTables.td index 2cd5fb2b94285c..60fa2adc62dc8c 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUSearchableTables.td +++ b/llvm/lib/Target/AMDGPU/AMDGPUSearchableTables.td @@ -239,13 +239,9 @@ def : SourceOfDivergence; def : SourceOfDivergence; def : SourceOfDivergence; def : SourceOfDivergence; -def : SourceOfDivergence; -def : SourceOfDivergence; def : SourceOfDivergence; def : SourceOfDivergence; def : SourceOfDivergence; -def : SourceOfDivergence; -def : SourceOfDivergence; def : SourceOfDivergence; def : SourceOfDivergence; def : SourceOfDivergence; diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp index d348166c2d9a04..0a2d4e6494305f 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp @@ -1045,8 +1045,6 @@ bool GCNTTIImpl::collectFlatAddressOperands(SmallVectorImpl &OpIndexes, switch (IID) { case Intrinsic::amdgcn_is_shared: case Intrinsic::amdgcn_is_private: - case Intrinsic::amdgcn_flat_atomic_fmax: - case Intrinsic::amdgcn_flat_atomic_fmin: case Intrinsic::amdgcn_flat_atomic_fmax_num: case Intrinsic::amdgcn_flat_atomic_fmin_num: OpIndexes.push_back(0); @@ -1106,8 +1104,6 @@ Value *GCNTTIImpl::rewriteIntrinsicWithAddressSpace(IntrinsicInst *II, return B.CreateIntrinsic(Intrinsic::ptrmask, {NewV->getType(), MaskTy}, {NewV, MaskOp}); } - case Intrinsic::amdgcn_flat_atomic_fmax: - case Intrinsic::amdgcn_flat_atomic_fmin: case Intrinsic::amdgcn_flat_atomic_fmax_num: case Intrinsic::amdgcn_flat_atomic_fmin_num: { Type *DestTy = II->getType(); diff --git a/llvm/lib/Target/AMDGPU/FLATInstructions.td b/llvm/lib/Target/AMDGPU/FLATInstructions.td index 6b5e47902c5a53..a9ab0c5a453e8e 100644 --- a/llvm/lib/Target/AMDGPU/FLATInstructions.td +++ b/llvm/lib/Target/AMDGPU/FLATInstructions.td @@ -1604,15 +1604,11 @@ let OtherPredicates = [isGFX12Plus] in { let SubtargetPredicate = HasAtomicFMinFMaxF32GlobalInsts, OtherPredicates = [HasFlatGlobalInsts] in { defm : GlobalFLATAtomicPats <"GLOBAL_ATOMIC_FMIN", "atomic_load_fmin_global", f32>; defm : GlobalFLATAtomicPats <"GLOBAL_ATOMIC_FMAX", "atomic_load_fmax_global", f32>; -defm : GlobalFLATAtomicIntrPats <"GLOBAL_ATOMIC_FMIN", "int_amdgcn_global_atomic_fmin", f32>; -defm : GlobalFLATAtomicIntrPats <"GLOBAL_ATOMIC_FMAX", "int_amdgcn_global_atomic_fmax", f32>; } let SubtargetPredicate = HasAtomicFMinFMaxF32FlatInsts in { defm : FlatAtomicPat <"FLAT_ATOMIC_FMIN", "atomic_load_fmin_flat", f32>; defm : FlatAtomicPat <"FLAT_ATOMIC_FMAX", "atomic_load_fmax_flat", f32>; -defm : FlatAtomicIntrPat <"FLAT_ATOMIC_FMIN", "int_amdgcn_flat_atomic_fmin", f32>; -defm : FlatAtomicIntrPat <"FLAT_ATOMIC_FMAX", "int_amdgcn_flat_atomic_fmax", f32>; } let OtherPredicates = [isGFX12Only] in { @@ -1642,13 +1638,6 @@ defm : GlobalFLATAtomicPats <"GLOBAL_ATOMIC_PK_ADD_F16", "atomic_load_fadd_globa let SubtargetPredicate = HasAtomicFMinFMaxF64GlobalInsts, OtherPredicates = [HasFlatGlobalInsts] in { defm : GlobalFLATAtomicPats <"GLOBAL_ATOMIC_MIN_F64", "atomic_load_fmin_global", f64>; defm : GlobalFLATAtomicPats <"GLOBAL_ATOMIC_MAX_F64", "atomic_load_fmax_global", f64>; -defm : GlobalFLATAtomicIntrPats <"GLOBAL_ATOMIC_MIN_F64", "int_amdgcn_global_atomic_fmin", f64>; -defm : GlobalFLATAtomicIntrPats <"GLOBAL_ATOMIC_MAX_F64", "int_amdgcn_global_atomic_fmax", f64>; -} - -let SubtargetPredicate = HasAtomicFMinFMaxF64FlatInsts in { -defm : FlatAtomicIntrPat <"FLAT_ATOMIC_MIN_F64", "int_amdgcn_flat_atomic_fmin", f64>; -defm : FlatAtomicIntrPat <"FLAT_ATOMIC_MAX_F64", "int_amdgcn_flat_atomic_fmax", f64>; } let OtherPredicates = [HasFlatBufferGlobalAtomicFaddF64Inst] in { diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp index 6172687f4b4abf..bbdc006b9afcf0 100644 --- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp +++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp @@ -1367,13 +1367,9 @@ bool SITargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info, MachineMemOperand::MODereferenceable; return true; } - case Intrinsic::amdgcn_global_atomic_fmin: - case Intrinsic::amdgcn_global_atomic_fmax: case Intrinsic::amdgcn_global_atomic_fmin_num: case Intrinsic::amdgcn_global_atomic_fmax_num: case Intrinsic::amdgcn_global_atomic_ordered_add_b64: - case Intrinsic::amdgcn_flat_atomic_fmin: - case Intrinsic::amdgcn_flat_atomic_fmax: case Intrinsic::amdgcn_flat_atomic_fmin_num: case Intrinsic::amdgcn_flat_atomic_fmax_num: case Intrinsic::amdgcn_atomic_cond_sub_u32: { @@ -1485,14 +1481,10 @@ bool SITargetLowering::getAddrModeArguments(IntrinsicInst *II, case Intrinsic::amdgcn_ds_consume: case Intrinsic::amdgcn_ds_ordered_add: case Intrinsic::amdgcn_ds_ordered_swap: - case Intrinsic::amdgcn_flat_atomic_fmax: case Intrinsic::amdgcn_flat_atomic_fmax_num: - case Intrinsic::amdgcn_flat_atomic_fmin: case Intrinsic::amdgcn_flat_atomic_fmin_num: case Intrinsic::amdgcn_global_atomic_csub: - case Intrinsic::amdgcn_global_atomic_fmax: case Intrinsic::amdgcn_global_atomic_fmax_num: - case Intrinsic::amdgcn_global_atomic_fmin: case Intrinsic::amdgcn_global_atomic_fmin_num: case Intrinsic::amdgcn_global_atomic_ordered_add_b64: case Intrinsic::amdgcn_global_load_tr_b64: @@ -9397,12 +9389,8 @@ SDValue SITargetLowering::LowerINTRINSIC_W_CHAIN(SDValue Op, DAG.setNodeMemRefs(NewNode, {MemRef}); return SDValue(NewNode, 0); } - case Intrinsic::amdgcn_global_atomic_fmin: - case Intrinsic::amdgcn_global_atomic_fmax: case Intrinsic::amdgcn_global_atomic_fmin_num: case Intrinsic::amdgcn_global_atomic_fmax_num: - case Intrinsic::amdgcn_flat_atomic_fmin: - case Intrinsic::amdgcn_flat_atomic_fmax: case Intrinsic::amdgcn_flat_atomic_fmin_num: case Intrinsic::amdgcn_flat_atomic_fmax_num: { MemSDNode *M = cast(Op); @@ -9413,16 +9401,12 @@ SDValue SITargetLowering::LowerINTRINSIC_W_CHAIN(SDValue Op, }; unsigned Opcode = 0; switch (IntrID) { - case Intrinsic::amdgcn_global_atomic_fmin: case Intrinsic::amdgcn_global_atomic_fmin_num: - case Intrinsic::amdgcn_flat_atomic_fmin: case Intrinsic::amdgcn_flat_atomic_fmin_num: { Opcode = ISD::ATOMIC_LOAD_FMIN; break; } - case Intrinsic::amdgcn_global_atomic_fmax: case Intrinsic::amdgcn_global_atomic_fmax_num: - case Intrinsic::amdgcn_flat_atomic_fmax: case Intrinsic::amdgcn_flat_atomic_fmax_num: { Opcode = ISD::ATOMIC_LOAD_FMAX; break; diff --git a/llvm/test/Bitcode/amdgcn-atomic.ll b/llvm/test/Bitcode/amdgcn-atomic.ll index 87ca1e3a617ed9..3e28cd050fc880 100644 --- a/llvm/test/Bitcode/amdgcn-atomic.ll +++ b/llvm/test/Bitcode/amdgcn-atomic.ll @@ -354,6 +354,70 @@ define float @upgrade_amdgcn_global_atomic_fadd_f32_p1_f32(ptr addrspace(1) %ptr ret float %result } +declare float @llvm.amdgcn.flat.atomic.fmin.f32.p0.f32(ptr nocapture, float) #0 + +define float @upgrade_amdgcn_flat_atomic_fmin_f32_p0_f32(ptr %ptr, float %data) { + ; CHECK: %{{.+}} = atomicrmw fmin ptr %ptr, float %data syncscope("agent") seq_cst, align 4, !noalias.addrspace !0, !amdgpu.no.fine.grained.memory !{{[0-9]+$}} + %result = call float @llvm.amdgcn.flat.atomic.fmin.f32.p0.f32(ptr %ptr, float %data) + ret float %result +} + +declare float @llvm.amdgcn.global.atomic.fmin.f32.p1.f32(ptr addrspace(1) nocapture, float) #0 + +define float @upgrade_amdgcn_global_atomic_fmin_f32_p1_f32(ptr addrspace(1) %ptr, float %data) { + ; CHECK: %{{.+}} = atomicrmw fmin ptr addrspace(1) %ptr, float %data syncscope("agent") seq_cst, align 4, !amdgpu.no.fine.grained.memory !{{[0-9]+$}} + %result = call float @llvm.amdgcn.global.atomic.fmin.f32.p1.f32(ptr addrspace(1) %ptr, float %data) + ret float %result +} + +declare double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr nocapture, double) #0 + +define double @upgrade_amdgcn_flat_atomic_fmin_f64_p0_f64(ptr %ptr, double %data) { + ; CHECK: %{{.+}} = atomicrmw fmin ptr %ptr, double %data syncscope("agent") seq_cst, align 8, !noalias.addrspace !0, !amdgpu.no.fine.grained.memory !{{[0-9]+$}} + %result = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %ptr, double %data) + ret double %result +} + +declare double @llvm.amdgcn.global.atomic.fmin.f64.p1.f64(ptr addrspace(1) nocapture, double) #0 + +define double @upgrade_amdgcn_global_atomic_fmin_f64_p1_f64(ptr addrspace(1) %ptr, double %data) { + ; CHECK: %{{.+}} = atomicrmw fmin ptr addrspace(1) %ptr, double %data syncscope("agent") seq_cst, align 8, !amdgpu.no.fine.grained.memory !{{[0-9]+$}} + %result = call double @llvm.amdgcn.global.atomic.fmin.f64.p1.f64(ptr addrspace(1) %ptr, double %data) + ret double %result +} + +declare float @llvm.amdgcn.flat.atomic.fmax.f32.p0.f32(ptr nocapture, float) #0 + +define float @upgrade_amdgcn_flat_atomic_fmax_f32_p0_f32(ptr %ptr, float %data) { + ; CHECK: %{{.+}} = atomicrmw fmax ptr %ptr, float %data syncscope("agent") seq_cst, align 4, !noalias.addrspace !0, !amdgpu.no.fine.grained.memory !{{[0-9]+$}} + %result = call float @llvm.amdgcn.flat.atomic.fmax.f32.p0.f32(ptr %ptr, float %data) + ret float %result +} + +declare float @llvm.amdgcn.global.atomic.fmax.f32.p1.f32(ptr addrspace(1) nocapture, float) #0 + +define float @upgrade_amdgcn_global_atomic_fmax_f32_p1_f32(ptr addrspace(1) %ptr, float %data) { + ; CHECK: %{{.+}} = atomicrmw fmax ptr addrspace(1) %ptr, float %data syncscope("agent") seq_cst, align 4, !amdgpu.no.fine.grained.memory !{{[0-9]+$}} + %result = call float @llvm.amdgcn.global.atomic.fmax.f32.p1.f32(ptr addrspace(1) %ptr, float %data) + ret float %result +} + +declare double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr nocapture, double) #0 + +define double @upgrade_amdgcn_flat_atomic_fmax_f64_p0_f64(ptr %ptr, double %data) { + ; CHECK: %{{.+}} = atomicrmw fmax ptr %ptr, double %data syncscope("agent") seq_cst, align 8, !noalias.addrspace !0, !amdgpu.no.fine.grained.memory !{{[0-9]+$}} + %result = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %ptr, double %data) + ret double %result +} + +declare double @llvm.amdgcn.global.atomic.fmax.f64.p1.f64(ptr addrspace(1) nocapture, double) #0 + +define double @upgrade_amdgcn_global_atomic_fmax_f64_p1_f64(ptr addrspace(1) %ptr, double %data) { + ; CHECK: %{{.+}} = atomicrmw fmax ptr addrspace(1) %ptr, double %data syncscope("agent") seq_cst, align 8, !amdgpu.no.fine.grained.memory !{{[0-9]+$}} + %result = call double @llvm.amdgcn.global.atomic.fmax.f64.p1.f64(ptr addrspace(1) %ptr, double %data) + ret double %result +} + attributes #0 = { argmemonly nounwind willreturn } ; CHECK: !0 = !{i32 5, i32 6} diff --git a/llvm/test/CodeGen/AMDGPU/GlobalISel/fp64-atomics-gfx90a.ll b/llvm/test/CodeGen/AMDGPU/GlobalISel/fp64-atomics-gfx90a.ll index eb39ca2d7daa7f..92ce2af47e22ad 100644 --- a/llvm/test/CodeGen/AMDGPU/GlobalISel/fp64-atomics-gfx90a.ll +++ b/llvm/test/CodeGen/AMDGPU/GlobalISel/fp64-atomics-gfx90a.ll @@ -14,10 +14,6 @@ declare double @llvm.amdgcn.struct.buffer.atomic.fmax.f64(double, <4 x i32>, i32 declare double @llvm.amdgcn.struct.ptr.buffer.atomic.fmax.f64(double, ptr addrspace(8), i32, i32, i32, i32 immarg) declare double @llvm.amdgcn.raw.buffer.atomic.fmax.f64(double, <4 x i32>, i32, i32, i32 immarg) declare double @llvm.amdgcn.raw.ptr.buffer.atomic.fmax.f64(double, ptr addrspace(8), i32, i32, i32 immarg) -declare double @llvm.amdgcn.global.atomic.fmin.f64.p1.f64(ptr addrspace(1) %ptr, double %data) -declare double @llvm.amdgcn.global.atomic.fmax.f64.p1.f64(ptr addrspace(1) %ptr, double %data) -declare double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %ptr, double %data) -declare double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %ptr, double %data) define amdgpu_kernel void @raw_buffer_atomic_add_noret_f64(<4 x i32> %rsrc, double %data, i32 %vindex) { ; GFX90A-LABEL: raw_buffer_atomic_add_noret_f64: @@ -1015,52 +1011,6 @@ main_body: ret void } -define amdgpu_kernel void @global_atomic_fmin_f64_noret(ptr addrspace(1) %ptr, double %data) { -; GFX90A-LABEL: global_atomic_fmin_f64_noret: -; GFX90A: ; %bb.0: ; %main_body -; GFX90A-NEXT: s_load_dwordx4 s[4:7], s[2:3], 0x24 -; GFX90A-NEXT: v_mov_b32_e32 v2, 0 -; GFX90A-NEXT: s_waitcnt lgkmcnt(0) -; GFX90A-NEXT: v_pk_mov_b32 v[0:1], s[6:7], s[6:7] op_sel:[0,1] -; GFX90A-NEXT: global_atomic_min_f64 v2, v[0:1], s[4:5] -; GFX90A-NEXT: s_endpgm -; -; GFX940-LABEL: global_atomic_fmin_f64_noret: -; GFX940: ; %bb.0: ; %main_body -; GFX940-NEXT: s_load_dwordx4 s[4:7], s[2:3], 0x24 -; GFX940-NEXT: v_mov_b32_e32 v2, 0 -; GFX940-NEXT: s_waitcnt lgkmcnt(0) -; GFX940-NEXT: v_mov_b64_e32 v[0:1], s[6:7] -; GFX940-NEXT: global_atomic_min_f64 v2, v[0:1], s[4:5] -; GFX940-NEXT: s_endpgm -main_body: - %ret = call double @llvm.amdgcn.global.atomic.fmin.f64.p1.f64(ptr addrspace(1) %ptr, double %data) - ret void -} - -define amdgpu_kernel void @global_atomic_fmax_f64_noret(ptr addrspace(1) %ptr, double %data) { -; GFX90A-LABEL: global_atomic_fmax_f64_noret: -; GFX90A: ; %bb.0: ; %main_body -; GFX90A-NEXT: s_load_dwordx4 s[4:7], s[2:3], 0x24 -; GFX90A-NEXT: v_mov_b32_e32 v2, 0 -; GFX90A-NEXT: s_waitcnt lgkmcnt(0) -; GFX90A-NEXT: v_pk_mov_b32 v[0:1], s[6:7], s[6:7] op_sel:[0,1] -; GFX90A-NEXT: global_atomic_max_f64 v2, v[0:1], s[4:5] -; GFX90A-NEXT: s_endpgm -; -; GFX940-LABEL: global_atomic_fmax_f64_noret: -; GFX940: ; %bb.0: ; %main_body -; GFX940-NEXT: s_load_dwordx4 s[4:7], s[2:3], 0x24 -; GFX940-NEXT: v_mov_b32_e32 v2, 0 -; GFX940-NEXT: s_waitcnt lgkmcnt(0) -; GFX940-NEXT: v_mov_b64_e32 v[0:1], s[6:7] -; GFX940-NEXT: global_atomic_max_f64 v2, v[0:1], s[4:5] -; GFX940-NEXT: s_endpgm -main_body: - %ret = call double @llvm.amdgcn.global.atomic.fmax.f64.p1.f64(ptr addrspace(1) %ptr, double %data) - ret void -} - define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat(ptr addrspace(1) %ptr) #1 { ; GFX90A-LABEL: global_atomic_fadd_f64_noret_pat: ; GFX90A: ; %bb.0: ; %main_body @@ -1070,7 +1020,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat(ptr addrspace(1) %pt ; GFX90A-NEXT: v_mbcnt_hi_u32_b32 v0, s4, v0 ; GFX90A-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0 ; GFX90A-NEXT: s_and_saveexec_b64 s[4:5], vcc -; GFX90A-NEXT: s_cbranch_execz .LBB38_2 +; GFX90A-NEXT: s_cbranch_execz .LBB36_2 ; GFX90A-NEXT: ; %bb.1: ; GFX90A-NEXT: s_load_dwordx2 s[4:5], s[2:3], 0x24 ; GFX90A-NEXT: s_bcnt1_i32_b64 s0, s[0:1] @@ -1083,7 +1033,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat(ptr addrspace(1) %pt ; GFX90A-NEXT: s_waitcnt vmcnt(0) ; GFX90A-NEXT: buffer_invl2 ; GFX90A-NEXT: buffer_wbinvl1_vol -; GFX90A-NEXT: .LBB38_2: +; GFX90A-NEXT: .LBB36_2: ; GFX90A-NEXT: s_endpgm ; ; GFX940-LABEL: global_atomic_fadd_f64_noret_pat: @@ -1094,7 +1044,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat(ptr addrspace(1) %pt ; GFX940-NEXT: v_mbcnt_hi_u32_b32 v0, s4, v0 ; GFX940-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0 ; GFX940-NEXT: s_and_saveexec_b64 s[4:5], vcc -; GFX940-NEXT: s_cbranch_execz .LBB38_2 +; GFX940-NEXT: s_cbranch_execz .LBB36_2 ; GFX940-NEXT: ; %bb.1: ; GFX940-NEXT: s_load_dwordx2 s[4:5], s[2:3], 0x24 ; GFX940-NEXT: s_bcnt1_i32_b64 s0, s[0:1] @@ -1106,7 +1056,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat(ptr addrspace(1) %pt ; GFX940-NEXT: global_atomic_add_f64 v2, v[0:1], s[4:5] sc1 ; GFX940-NEXT: s_waitcnt vmcnt(0) ; GFX940-NEXT: buffer_inv sc0 sc1 -; GFX940-NEXT: .LBB38_2: +; GFX940-NEXT: .LBB36_2: ; GFX940-NEXT: s_endpgm main_body: %ret = atomicrmw fadd ptr addrspace(1) %ptr, double 4.0 seq_cst, !amdgpu.no.fine.grained.memory !0 @@ -1122,7 +1072,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat_agent(ptr addrspace( ; GFX90A-NEXT: v_mbcnt_hi_u32_b32 v0, s4, v0 ; GFX90A-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0 ; GFX90A-NEXT: s_and_saveexec_b64 s[4:5], vcc -; GFX90A-NEXT: s_cbranch_execz .LBB39_2 +; GFX90A-NEXT: s_cbranch_execz .LBB37_2 ; GFX90A-NEXT: ; %bb.1: ; GFX90A-NEXT: s_load_dwordx2 s[4:5], s[2:3], 0x24 ; GFX90A-NEXT: s_bcnt1_i32_b64 s0, s[0:1] @@ -1133,7 +1083,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat_agent(ptr addrspace( ; GFX90A-NEXT: global_atomic_add_f64 v2, v[0:1], s[4:5] ; GFX90A-NEXT: s_waitcnt vmcnt(0) ; GFX90A-NEXT: buffer_wbinvl1_vol -; GFX90A-NEXT: .LBB39_2: +; GFX90A-NEXT: .LBB37_2: ; GFX90A-NEXT: s_endpgm ; ; GFX940-LABEL: global_atomic_fadd_f64_noret_pat_agent: @@ -1144,7 +1094,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat_agent(ptr addrspace( ; GFX940-NEXT: v_mbcnt_hi_u32_b32 v0, s4, v0 ; GFX940-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0 ; GFX940-NEXT: s_and_saveexec_b64 s[4:5], vcc -; GFX940-NEXT: s_cbranch_execz .LBB39_2 +; GFX940-NEXT: s_cbranch_execz .LBB37_2 ; GFX940-NEXT: ; %bb.1: ; GFX940-NEXT: s_load_dwordx2 s[4:5], s[2:3], 0x24 ; GFX940-NEXT: s_bcnt1_i32_b64 s0, s[0:1] @@ -1156,7 +1106,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat_agent(ptr addrspace( ; GFX940-NEXT: global_atomic_add_f64 v2, v[0:1], s[4:5] ; GFX940-NEXT: s_waitcnt vmcnt(0) ; GFX940-NEXT: buffer_inv sc1 -; GFX940-NEXT: .LBB39_2: +; GFX940-NEXT: .LBB37_2: ; GFX940-NEXT: s_endpgm main_body: %ret = atomicrmw fadd ptr addrspace(1) %ptr, double 4.0 syncscope("agent") seq_cst, !amdgpu.no.fine.grained.memory !0 @@ -1172,7 +1122,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat_system(ptr addrspace ; GFX90A-NEXT: v_mbcnt_hi_u32_b32 v0, s4, v0 ; GFX90A-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0 ; GFX90A-NEXT: s_and_saveexec_b64 s[4:5], vcc -; GFX90A-NEXT: s_cbranch_execz .LBB40_2 +; GFX90A-NEXT: s_cbranch_execz .LBB38_2 ; GFX90A-NEXT: ; %bb.1: ; GFX90A-NEXT: s_load_dwordx2 s[4:5], s[2:3], 0x24 ; GFX90A-NEXT: s_bcnt1_i32_b64 s0, s[0:1] @@ -1185,7 +1135,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat_system(ptr addrspace ; GFX90A-NEXT: s_waitcnt vmcnt(0) ; GFX90A-NEXT: buffer_invl2 ; GFX90A-NEXT: buffer_wbinvl1_vol -; GFX90A-NEXT: .LBB40_2: +; GFX90A-NEXT: .LBB38_2: ; GFX90A-NEXT: s_endpgm ; ; GFX940-LABEL: global_atomic_fadd_f64_noret_pat_system: @@ -1196,7 +1146,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat_system(ptr addrspace ; GFX940-NEXT: v_mbcnt_hi_u32_b32 v0, s4, v0 ; GFX940-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0 ; GFX940-NEXT: s_and_saveexec_b64 s[4:5], vcc -; GFX940-NEXT: s_cbranch_execz .LBB40_2 +; GFX940-NEXT: s_cbranch_execz .LBB38_2 ; GFX940-NEXT: ; %bb.1: ; GFX940-NEXT: s_load_dwordx2 s[4:5], s[2:3], 0x24 ; GFX940-NEXT: s_bcnt1_i32_b64 s0, s[0:1] @@ -1208,7 +1158,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat_system(ptr addrspace ; GFX940-NEXT: global_atomic_add_f64 v2, v[0:1], s[4:5] sc1 ; GFX940-NEXT: s_waitcnt vmcnt(0) ; GFX940-NEXT: buffer_inv sc0 sc1 -; GFX940-NEXT: .LBB40_2: +; GFX940-NEXT: .LBB38_2: ; GFX940-NEXT: s_endpgm main_body: %ret = atomicrmw fadd ptr addrspace(1) %ptr, double 4.0 syncscope("one-as") seq_cst, !amdgpu.no.fine.grained.memory !0 @@ -1224,7 +1174,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat_flush(ptr addrspace( ; GFX90A-NEXT: v_mbcnt_hi_u32_b32 v0, s4, v0 ; GFX90A-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0 ; GFX90A-NEXT: s_and_saveexec_b64 s[4:5], vcc -; GFX90A-NEXT: s_cbranch_execz .LBB41_2 +; GFX90A-NEXT: s_cbranch_execz .LBB39_2 ; GFX90A-NEXT: ; %bb.1: ; GFX90A-NEXT: s_load_dwordx2 s[4:5], s[2:3], 0x24 ; GFX90A-NEXT: s_bcnt1_i32_b64 s0, s[0:1] @@ -1235,7 +1185,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat_flush(ptr addrspace( ; GFX90A-NEXT: global_atomic_add_f64 v2, v[0:1], s[4:5] ; GFX90A-NEXT: s_waitcnt vmcnt(0) ; GFX90A-NEXT: buffer_wbinvl1_vol -; GFX90A-NEXT: .LBB41_2: +; GFX90A-NEXT: .LBB39_2: ; GFX90A-NEXT: s_endpgm ; ; GFX940-LABEL: global_atomic_fadd_f64_noret_pat_flush: @@ -1246,7 +1196,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat_flush(ptr addrspace( ; GFX940-NEXT: v_mbcnt_hi_u32_b32 v0, s4, v0 ; GFX940-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0 ; GFX940-NEXT: s_and_saveexec_b64 s[4:5], vcc -; GFX940-NEXT: s_cbranch_execz .LBB41_2 +; GFX940-NEXT: s_cbranch_execz .LBB39_2 ; GFX940-NEXT: ; %bb.1: ; GFX940-NEXT: s_load_dwordx2 s[4:5], s[2:3], 0x24 ; GFX940-NEXT: s_bcnt1_i32_b64 s0, s[0:1] @@ -1258,7 +1208,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat_flush(ptr addrspace( ; GFX940-NEXT: global_atomic_add_f64 v2, v[0:1], s[4:5] ; GFX940-NEXT: s_waitcnt vmcnt(0) ; GFX940-NEXT: buffer_inv sc1 -; GFX940-NEXT: .LBB41_2: +; GFX940-NEXT: .LBB39_2: ; GFX940-NEXT: s_endpgm main_body: %ret = atomicrmw fadd ptr addrspace(1) %ptr, double 4.0 syncscope("agent") seq_cst, !amdgpu.no.fine.grained.memory !0 @@ -1344,44 +1294,6 @@ main_body: ret double %ret } -define double @global_atomic_fmax_f64_rtn(ptr addrspace(1) %ptr, double %data) { -; GFX90A-LABEL: global_atomic_fmax_f64_rtn: -; GFX90A: ; %bb.0: ; %main_body -; GFX90A-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX90A-NEXT: global_atomic_max_f64 v[0:1], v[0:1], v[2:3], off glc -; GFX90A-NEXT: s_waitcnt vmcnt(0) -; GFX90A-NEXT: s_setpc_b64 s[30:31] -; -; GFX940-LABEL: global_atomic_fmax_f64_rtn: -; GFX940: ; %bb.0: ; %main_body -; GFX940-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX940-NEXT: global_atomic_max_f64 v[0:1], v[0:1], v[2:3], off sc0 -; GFX940-NEXT: s_waitcnt vmcnt(0) -; GFX940-NEXT: s_setpc_b64 s[30:31] -main_body: - %ret = call double @llvm.amdgcn.global.atomic.fmax.f64.p1.f64(ptr addrspace(1) %ptr, double %data) - ret double %ret -} - -define double @global_atomic_fmin_f64_rtn(ptr addrspace(1) %ptr, double %data) { -; GFX90A-LABEL: global_atomic_fmin_f64_rtn: -; GFX90A: ; %bb.0: ; %main_body -; GFX90A-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX90A-NEXT: global_atomic_min_f64 v[0:1], v[0:1], v[2:3], off glc -; GFX90A-NEXT: s_waitcnt vmcnt(0) -; GFX90A-NEXT: s_setpc_b64 s[30:31] -; -; GFX940-LABEL: global_atomic_fmin_f64_rtn: -; GFX940: ; %bb.0: ; %main_body -; GFX940-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX940-NEXT: global_atomic_min_f64 v[0:1], v[0:1], v[2:3], off sc0 -; GFX940-NEXT: s_waitcnt vmcnt(0) -; GFX940-NEXT: s_setpc_b64 s[30:31] -main_body: - %ret = call double @llvm.amdgcn.global.atomic.fmin.f64.p1.f64(ptr addrspace(1) %ptr, double %data) - ret double %ret -} - define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat_agent_safe(ptr addrspace(1) %ptr) { ; GFX90A-LABEL: global_atomic_fadd_f64_noret_pat_agent_safe: ; GFX90A: ; %bb.0: ; %main_body @@ -1391,7 +1303,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat_agent_safe(ptr addrs ; GFX90A-NEXT: v_mbcnt_hi_u32_b32 v0, s4, v0 ; GFX90A-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0 ; GFX90A-NEXT: s_and_saveexec_b64 s[4:5], vcc -; GFX90A-NEXT: s_cbranch_execz .LBB47_2 +; GFX90A-NEXT: s_cbranch_execz .LBB43_2 ; GFX90A-NEXT: ; %bb.1: ; GFX90A-NEXT: s_load_dwordx2 s[4:5], s[2:3], 0x24 ; GFX90A-NEXT: s_bcnt1_i32_b64 s0, s[0:1] @@ -1402,7 +1314,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat_agent_safe(ptr addrs ; GFX90A-NEXT: global_atomic_add_f64 v2, v[0:1], s[4:5] ; GFX90A-NEXT: s_waitcnt vmcnt(0) ; GFX90A-NEXT: buffer_wbinvl1_vol -; GFX90A-NEXT: .LBB47_2: +; GFX90A-NEXT: .LBB43_2: ; GFX90A-NEXT: s_endpgm ; ; GFX940-LABEL: global_atomic_fadd_f64_noret_pat_agent_safe: @@ -1413,7 +1325,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat_agent_safe(ptr addrs ; GFX940-NEXT: v_mbcnt_hi_u32_b32 v0, s4, v0 ; GFX940-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0 ; GFX940-NEXT: s_and_saveexec_b64 s[4:5], vcc -; GFX940-NEXT: s_cbranch_execz .LBB47_2 +; GFX940-NEXT: s_cbranch_execz .LBB43_2 ; GFX940-NEXT: ; %bb.1: ; GFX940-NEXT: s_load_dwordx2 s[4:5], s[2:3], 0x24 ; GFX940-NEXT: s_bcnt1_i32_b64 s0, s[0:1] @@ -1425,7 +1337,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat_agent_safe(ptr addrs ; GFX940-NEXT: global_atomic_add_f64 v2, v[0:1], s[4:5] ; GFX940-NEXT: s_waitcnt vmcnt(0) ; GFX940-NEXT: buffer_inv sc1 -; GFX940-NEXT: .LBB47_2: +; GFX940-NEXT: .LBB43_2: ; GFX940-NEXT: s_endpgm main_body: %ret = atomicrmw fadd ptr addrspace(1) %ptr, double 4.0 syncscope("agent") seq_cst, !amdgpu.no.fine.grained.memory !0 @@ -1633,90 +1545,6 @@ main_body: ret void } -define amdgpu_kernel void @flat_atomic_fmin_f64_noret(ptr %ptr, double %data) { -; GFX90A-LABEL: flat_atomic_fmin_f64_noret: -; GFX90A: ; %bb.0: ; %main_body -; GFX90A-NEXT: s_load_dwordx4 s[4:7], s[2:3], 0x24 -; GFX90A-NEXT: s_waitcnt lgkmcnt(0) -; GFX90A-NEXT: v_pk_mov_b32 v[0:1], s[4:5], s[4:5] op_sel:[0,1] -; GFX90A-NEXT: v_pk_mov_b32 v[2:3], s[6:7], s[6:7] op_sel:[0,1] -; GFX90A-NEXT: flat_atomic_min_f64 v[0:1], v[2:3] -; GFX90A-NEXT: s_endpgm -; -; GFX940-LABEL: flat_atomic_fmin_f64_noret: -; GFX940: ; %bb.0: ; %main_body -; GFX940-NEXT: s_load_dwordx4 s[4:7], s[2:3], 0x24 -; GFX940-NEXT: s_waitcnt lgkmcnt(0) -; GFX940-NEXT: v_mov_b64_e32 v[0:1], s[4:5] -; GFX940-NEXT: v_mov_b64_e32 v[2:3], s[6:7] -; GFX940-NEXT: flat_atomic_min_f64 v[0:1], v[2:3] -; GFX940-NEXT: s_endpgm -main_body: - %ret = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %ptr, double %data) - ret void -} - -define double @flat_atomic_fmin_f64_rtn(ptr %ptr, double %data) { -; GFX90A-LABEL: flat_atomic_fmin_f64_rtn: -; GFX90A: ; %bb.0: ; %main_body -; GFX90A-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX90A-NEXT: flat_atomic_min_f64 v[0:1], v[0:1], v[2:3] glc -; GFX90A-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX90A-NEXT: s_setpc_b64 s[30:31] -; -; GFX940-LABEL: flat_atomic_fmin_f64_rtn: -; GFX940: ; %bb.0: ; %main_body -; GFX940-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX940-NEXT: flat_atomic_min_f64 v[0:1], v[0:1], v[2:3] sc0 -; GFX940-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX940-NEXT: s_setpc_b64 s[30:31] -main_body: - %ret = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %ptr, double %data) - ret double %ret -} - -define amdgpu_kernel void @flat_atomic_fmax_f64_noret(ptr %ptr, double %data) { -; GFX90A-LABEL: flat_atomic_fmax_f64_noret: -; GFX90A: ; %bb.0: ; %main_body -; GFX90A-NEXT: s_load_dwordx4 s[4:7], s[2:3], 0x24 -; GFX90A-NEXT: s_waitcnt lgkmcnt(0) -; GFX90A-NEXT: v_pk_mov_b32 v[0:1], s[4:5], s[4:5] op_sel:[0,1] -; GFX90A-NEXT: v_pk_mov_b32 v[2:3], s[6:7], s[6:7] op_sel:[0,1] -; GFX90A-NEXT: flat_atomic_max_f64 v[0:1], v[2:3] -; GFX90A-NEXT: s_endpgm -; -; GFX940-LABEL: flat_atomic_fmax_f64_noret: -; GFX940: ; %bb.0: ; %main_body -; GFX940-NEXT: s_load_dwordx4 s[4:7], s[2:3], 0x24 -; GFX940-NEXT: s_waitcnt lgkmcnt(0) -; GFX940-NEXT: v_mov_b64_e32 v[0:1], s[4:5] -; GFX940-NEXT: v_mov_b64_e32 v[2:3], s[6:7] -; GFX940-NEXT: flat_atomic_max_f64 v[0:1], v[2:3] -; GFX940-NEXT: s_endpgm -main_body: - %ret = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %ptr, double %data) - ret void -} - -define double @flat_atomic_fmax_f64_rtn(ptr %ptr, double %data) { -; GFX90A-LABEL: flat_atomic_fmax_f64_rtn: -; GFX90A: ; %bb.0: ; %main_body -; GFX90A-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX90A-NEXT: flat_atomic_max_f64 v[0:1], v[0:1], v[2:3] glc -; GFX90A-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX90A-NEXT: s_setpc_b64 s[30:31] -; -; GFX940-LABEL: flat_atomic_fmax_f64_rtn: -; GFX940: ; %bb.0: ; %main_body -; GFX940-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX940-NEXT: flat_atomic_max_f64 v[0:1], v[0:1], v[2:3] sc0 -; GFX940-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX940-NEXT: s_setpc_b64 s[30:31] -main_body: - %ret = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %ptr, double %data) - ret double %ret -} - define amdgpu_kernel void @local_atomic_fadd_f64_noret_pat(ptr addrspace(3) %ptr) #1 { ; GFX90A-LABEL: local_atomic_fadd_f64_noret_pat: ; GFX90A: ; %bb.0: ; %main_body @@ -1726,7 +1554,7 @@ define amdgpu_kernel void @local_atomic_fadd_f64_noret_pat(ptr addrspace(3) %ptr ; GFX90A-NEXT: v_mbcnt_hi_u32_b32 v0, s4, v0 ; GFX90A-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0 ; GFX90A-NEXT: s_and_saveexec_b64 s[4:5], vcc -; GFX90A-NEXT: s_cbranch_execz .LBB59_2 +; GFX90A-NEXT: s_cbranch_execz .LBB51_2 ; GFX90A-NEXT: ; %bb.1: ; GFX90A-NEXT: s_load_dword s2, s[2:3], 0x24 ; GFX90A-NEXT: s_bcnt1_i32_b64 s0, s[0:1] @@ -1736,7 +1564,7 @@ define amdgpu_kernel void @local_atomic_fadd_f64_noret_pat(ptr addrspace(3) %ptr ; GFX90A-NEXT: v_mov_b32_e32 v2, s2 ; GFX90A-NEXT: ds_add_f64 v2, v[0:1] ; GFX90A-NEXT: s_waitcnt lgkmcnt(0) -; GFX90A-NEXT: .LBB59_2: +; GFX90A-NEXT: .LBB51_2: ; GFX90A-NEXT: s_endpgm ; ; GFX940-LABEL: local_atomic_fadd_f64_noret_pat: @@ -1747,7 +1575,7 @@ define amdgpu_kernel void @local_atomic_fadd_f64_noret_pat(ptr addrspace(3) %ptr ; GFX940-NEXT: v_mbcnt_hi_u32_b32 v0, s4, v0 ; GFX940-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0 ; GFX940-NEXT: s_and_saveexec_b64 s[4:5], vcc -; GFX940-NEXT: s_cbranch_execz .LBB59_2 +; GFX940-NEXT: s_cbranch_execz .LBB51_2 ; GFX940-NEXT: ; %bb.1: ; GFX940-NEXT: s_load_dword s2, s[2:3], 0x24 ; GFX940-NEXT: s_bcnt1_i32_b64 s0, s[0:1] @@ -1757,7 +1585,7 @@ define amdgpu_kernel void @local_atomic_fadd_f64_noret_pat(ptr addrspace(3) %ptr ; GFX940-NEXT: v_mov_b32_e32 v2, s2 ; GFX940-NEXT: ds_add_f64 v2, v[0:1] ; GFX940-NEXT: s_waitcnt lgkmcnt(0) -; GFX940-NEXT: .LBB59_2: +; GFX940-NEXT: .LBB51_2: ; GFX940-NEXT: s_endpgm main_body: %ret = atomicrmw fadd ptr addrspace(3) %ptr, double 4.0 seq_cst, !amdgpu.no.fine.grained.memory !0 @@ -1773,7 +1601,7 @@ define amdgpu_kernel void @local_atomic_fadd_f64_noret_pat_flush(ptr addrspace(3 ; GFX90A-NEXT: v_mbcnt_hi_u32_b32 v0, s4, v0 ; GFX90A-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0 ; GFX90A-NEXT: s_and_saveexec_b64 s[4:5], vcc -; GFX90A-NEXT: s_cbranch_execz .LBB60_2 +; GFX90A-NEXT: s_cbranch_execz .LBB52_2 ; GFX90A-NEXT: ; %bb.1: ; GFX90A-NEXT: s_load_dword s2, s[2:3], 0x24 ; GFX90A-NEXT: s_bcnt1_i32_b64 s0, s[0:1] @@ -1783,7 +1611,7 @@ define amdgpu_kernel void @local_atomic_fadd_f64_noret_pat_flush(ptr addrspace(3 ; GFX90A-NEXT: v_mov_b32_e32 v2, s2 ; GFX90A-NEXT: ds_add_f64 v2, v[0:1] ; GFX90A-NEXT: s_waitcnt lgkmcnt(0) -; GFX90A-NEXT: .LBB60_2: +; GFX90A-NEXT: .LBB52_2: ; GFX90A-NEXT: s_endpgm ; ; GFX940-LABEL: local_atomic_fadd_f64_noret_pat_flush: @@ -1794,7 +1622,7 @@ define amdgpu_kernel void @local_atomic_fadd_f64_noret_pat_flush(ptr addrspace(3 ; GFX940-NEXT: v_mbcnt_hi_u32_b32 v0, s4, v0 ; GFX940-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0 ; GFX940-NEXT: s_and_saveexec_b64 s[4:5], vcc -; GFX940-NEXT: s_cbranch_execz .LBB60_2 +; GFX940-NEXT: s_cbranch_execz .LBB52_2 ; GFX940-NEXT: ; %bb.1: ; GFX940-NEXT: s_load_dword s2, s[2:3], 0x24 ; GFX940-NEXT: s_bcnt1_i32_b64 s0, s[0:1] @@ -1804,7 +1632,7 @@ define amdgpu_kernel void @local_atomic_fadd_f64_noret_pat_flush(ptr addrspace(3 ; GFX940-NEXT: v_mov_b32_e32 v2, s2 ; GFX940-NEXT: ds_add_f64 v2, v[0:1] ; GFX940-NEXT: s_waitcnt lgkmcnt(0) -; GFX940-NEXT: .LBB60_2: +; GFX940-NEXT: .LBB52_2: ; GFX940-NEXT: s_endpgm main_body: %ret = atomicrmw fadd ptr addrspace(3) %ptr, double 4.0 seq_cst, !amdgpu.no.fine.grained.memory !0 @@ -1820,7 +1648,7 @@ define amdgpu_kernel void @local_atomic_fadd_f64_noret_pat_flush_safe(ptr addrsp ; GFX90A-NEXT: v_mbcnt_hi_u32_b32 v0, s4, v0 ; GFX90A-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0 ; GFX90A-NEXT: s_and_saveexec_b64 s[4:5], vcc -; GFX90A-NEXT: s_cbranch_execz .LBB61_2 +; GFX90A-NEXT: s_cbranch_execz .LBB53_2 ; GFX90A-NEXT: ; %bb.1: ; GFX90A-NEXT: s_load_dword s2, s[2:3], 0x24 ; GFX90A-NEXT: s_bcnt1_i32_b64 s0, s[0:1] @@ -1830,7 +1658,7 @@ define amdgpu_kernel void @local_atomic_fadd_f64_noret_pat_flush_safe(ptr addrsp ; GFX90A-NEXT: v_mov_b32_e32 v2, s2 ; GFX90A-NEXT: ds_add_f64 v2, v[0:1] ; GFX90A-NEXT: s_waitcnt lgkmcnt(0) -; GFX90A-NEXT: .LBB61_2: +; GFX90A-NEXT: .LBB53_2: ; GFX90A-NEXT: s_endpgm ; ; GFX940-LABEL: local_atomic_fadd_f64_noret_pat_flush_safe: @@ -1841,7 +1669,7 @@ define amdgpu_kernel void @local_atomic_fadd_f64_noret_pat_flush_safe(ptr addrsp ; GFX940-NEXT: v_mbcnt_hi_u32_b32 v0, s4, v0 ; GFX940-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0 ; GFX940-NEXT: s_and_saveexec_b64 s[4:5], vcc -; GFX940-NEXT: s_cbranch_execz .LBB61_2 +; GFX940-NEXT: s_cbranch_execz .LBB53_2 ; GFX940-NEXT: ; %bb.1: ; GFX940-NEXT: s_load_dword s2, s[2:3], 0x24 ; GFX940-NEXT: s_bcnt1_i32_b64 s0, s[0:1] @@ -1851,7 +1679,7 @@ define amdgpu_kernel void @local_atomic_fadd_f64_noret_pat_flush_safe(ptr addrsp ; GFX940-NEXT: v_mov_b32_e32 v2, s2 ; GFX940-NEXT: ds_add_f64 v2, v[0:1] ; GFX940-NEXT: s_waitcnt lgkmcnt(0) -; GFX940-NEXT: .LBB61_2: +; GFX940-NEXT: .LBB53_2: ; GFX940-NEXT: s_endpgm main_body: %ret = atomicrmw fadd ptr addrspace(3) %ptr, double 4.0 seq_cst, !amdgpu.no.fine.grained.memory !0 diff --git a/llvm/test/CodeGen/AMDGPU/dag-divergence-atomic.ll b/llvm/test/CodeGen/AMDGPU/dag-divergence-atomic.ll index de14d64dbf7e9d..017a1f047bb5f3 100644 --- a/llvm/test/CodeGen/AMDGPU/dag-divergence-atomic.ll +++ b/llvm/test/CodeGen/AMDGPU/dag-divergence-atomic.ll @@ -508,7 +508,8 @@ define protected amdgpu_kernel void @fmin(ptr addrspace(1) %p, ptr addrspace(1) ; CHECK-NEXT: v_mov_b32_e32 v2, 1.0 ; CHECK-NEXT: global_store_dword v[0:1], v2, off ; CHECK-NEXT: s_endpgm - %f64 = call double @llvm.amdgcn.global.atomic.fmin.f64.p1.f64(ptr addrspace(1) %p, double 1.0) + + %f64 = atomicrmw fmin ptr addrspace(1) %p, double 1.0 syncscope("agent") monotonic, !amdgpu.no.fine.grained.memory !0 %n32 = fptoui double %f64 to i32 %n64 = zext i32 %n32 to i64 %p1 = getelementptr inbounds %S, ptr addrspace(1) %q, i64 %n64, i32 0 @@ -533,7 +534,7 @@ define protected amdgpu_kernel void @fmax(ptr addrspace(1) %p, ptr addrspace(1) ; CHECK-NEXT: v_mov_b32_e32 v2, 1.0 ; CHECK-NEXT: global_store_dword v[0:1], v2, off ; CHECK-NEXT: s_endpgm - %f64 = call double @llvm.amdgcn.global.atomic.fmax.f64.p1.f64(ptr addrspace(1) %p, double 1.0) + %f64 = atomicrmw fmax ptr addrspace(1) %p, double 1.0 syncscope("agent") monotonic, !amdgpu.no.fine.grained.memory !0 %n32 = fptoui double %f64 to i32 %n64 = zext i32 %n32 to i64 %p1 = getelementptr inbounds %S, ptr addrspace(1) %q, i64 %n64, i32 0 @@ -905,8 +906,6 @@ define protected amdgpu_kernel void @buffer.ptr.atomic.fmax(ptr addrspace(8) %rs ret void } -declare double @llvm.amdgcn.global.atomic.fmin.f64.p1.f64(ptr addrspace(1), double) -declare double @llvm.amdgcn.global.atomic.fmax.f64.p1.f64(ptr addrspace(1), double) declare i32 @llvm.amdgcn.raw.ptr.buffer.atomic.swap.i32(i32, ptr addrspace(8), i32, i32, i32) declare i32 @llvm.amdgcn.raw.ptr.buffer.atomic.add.i32(i32, ptr addrspace(8), i32, i32, i32) declare i32 @llvm.amdgcn.raw.ptr.buffer.atomic.sub.i32(i32, ptr addrspace(8), i32, i32, i32) @@ -923,3 +922,5 @@ declare i32 @llvm.amdgcn.raw.ptr.buffer.atomic.cmpswap.i32(i32, i32, ptr addrspa declare float @llvm.amdgcn.raw.ptr.buffer.atomic.fadd.f32(float, ptr addrspace(8), i32, i32, i32) declare double @llvm.amdgcn.raw.ptr.buffer.atomic.fmin.f64(double, ptr addrspace(8), i32, i32, i32) declare double @llvm.amdgcn.raw.ptr.buffer.atomic.fmax.f64(double, ptr addrspace(8), i32, i32, i32) + +!0 = !{} diff --git a/llvm/test/CodeGen/AMDGPU/fp-min-max-flat-atomics-f64.ll b/llvm/test/CodeGen/AMDGPU/fp-min-max-flat-atomics-f64.ll deleted file mode 100644 index 8633a3965259bf..00000000000000 --- a/llvm/test/CodeGen/AMDGPU/fp-min-max-flat-atomics-f64.ll +++ /dev/null @@ -1,51 +0,0 @@ -; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py -; RUN: llc < %s -global-isel=0 -mtriple=amdgcn -mcpu=gfx1010 -verify-machineinstrs | FileCheck %s -check-prefixes=GFX10,GFX10-SDAG -; RUN: llc < %s -global-isel=1 -mtriple=amdgcn -mcpu=gfx1010 -verify-machineinstrs | FileCheck %s -check-prefixes=GFX10,GFX10-GISEL - -declare double @llvm.amdgcn.flat.atomic.fmin.f64.p1.f64(ptr %ptr, double %data) -declare double @llvm.amdgcn.flat.atomic.fmax.f64.p1.f64(ptr %ptr, double %data) - -define amdgpu_cs void @flat_atomic_fmin_f64_noret(ptr %ptr, double %data) { -; GFX10-LABEL: flat_atomic_fmin_f64_noret: -; GFX10: ; %bb.0: -; GFX10-NEXT: flat_atomic_fmin_x2 v[0:1], v[2:3] -; GFX10-NEXT: s_endpgm - %ret = call double @llvm.amdgcn.flat.atomic.fmin.f64.p1.f64(ptr %ptr, double %data) - ret void -} - -define amdgpu_cs void @flat_atomic_fmax_f64_noret(ptr %ptr, double %data) { -; GFX10-LABEL: flat_atomic_fmax_f64_noret: -; GFX10: ; %bb.0: -; GFX10-NEXT: flat_atomic_fmax_x2 v[0:1], v[2:3] -; GFX10-NEXT: s_endpgm - %ret = call double @llvm.amdgcn.flat.atomic.fmax.f64.p1.f64(ptr %ptr, double %data) - ret void -} - -define amdgpu_cs void @flat_atomic_fmin_f64_rtn(ptr %ptr, double %data, ptr %out) { -; GFX10-LABEL: flat_atomic_fmin_f64_rtn: -; GFX10: ; %bb.0: -; GFX10-NEXT: flat_atomic_fmin_x2 v[0:1], v[0:1], v[2:3] glc -; GFX10-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX10-NEXT: flat_store_dwordx2 v[4:5], v[0:1] -; GFX10-NEXT: s_endpgm - %ret = call double @llvm.amdgcn.flat.atomic.fmin.f64.p1.f64(ptr %ptr, double %data) - store double %ret, ptr %out - ret void -} - -define amdgpu_cs void @flat_atomic_fmax_f64_rtn(ptr %ptr, double %data, ptr %out) { -; GFX10-LABEL: flat_atomic_fmax_f64_rtn: -; GFX10: ; %bb.0: -; GFX10-NEXT: flat_atomic_fmax_x2 v[0:1], v[0:1], v[2:3] glc -; GFX10-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX10-NEXT: flat_store_dwordx2 v[4:5], v[0:1] -; GFX10-NEXT: s_endpgm - %ret = call double @llvm.amdgcn.flat.atomic.fmax.f64.p1.f64(ptr %ptr, double %data) - store double %ret, ptr %out - ret void -} -;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: -; GFX10-GISEL: {{.*}} -; GFX10-SDAG: {{.*}} diff --git a/llvm/test/CodeGen/AMDGPU/fp-min-max-flat-atomics.ll b/llvm/test/CodeGen/AMDGPU/fp-min-max-flat-atomics.ll deleted file mode 100644 index 1d2e3fc636f44a..00000000000000 --- a/llvm/test/CodeGen/AMDGPU/fp-min-max-flat-atomics.ll +++ /dev/null @@ -1,83 +0,0 @@ -; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py -; RUN: llc < %s -global-isel=0 -mtriple=amdgcn -mcpu=gfx1010 -verify-machineinstrs | FileCheck %s -check-prefixes=GFX10,GFX10-SDAG -; RUN: llc < %s -global-isel=0 -mtriple=amdgcn -mcpu=gfx1100 -verify-machineinstrs | FileCheck %s -check-prefixes=GFX11,GFX11-SDAG -; RUN: llc < %s -global-isel=1 -mtriple=amdgcn -mcpu=gfx1010 -verify-machineinstrs | FileCheck %s -check-prefixes=GFX10,GFX10-GISEL -; RUN: llc < %s -global-isel=1 -mtriple=amdgcn -mcpu=gfx1100 -verify-machineinstrs | FileCheck %s -check-prefixes=GFX11,GFX11-GISEL - -declare float @llvm.amdgcn.flat.atomic.fmin.f32.p1.f32(ptr %ptr, float %data) -declare float @llvm.amdgcn.flat.atomic.fmax.f32.p1.f32(ptr %ptr, float %data) - -define amdgpu_cs void @flat_atomic_fmin_f32_noret(ptr %ptr, float %data) { -; GFX10-LABEL: flat_atomic_fmin_f32_noret: -; GFX10: ; %bb.0: -; GFX10-NEXT: flat_atomic_fmin v[0:1], v2 -; GFX10-NEXT: s_endpgm -; -; GFX11-LABEL: flat_atomic_fmin_f32_noret: -; GFX11: ; %bb.0: -; GFX11-NEXT: flat_atomic_min_f32 v[0:1], v2 -; GFX11-NEXT: s_endpgm - %ret = call float @llvm.amdgcn.flat.atomic.fmin.f32.p1.f32(ptr %ptr, float %data) - ret void -} - -define amdgpu_cs void @flat_atomic_fmax_f32_noret(ptr %ptr, float %data) { -; GFX10-LABEL: flat_atomic_fmax_f32_noret: -; GFX10: ; %bb.0: -; GFX10-NEXT: flat_atomic_fmax v[0:1], v2 -; GFX10-NEXT: s_endpgm -; -; GFX11-LABEL: flat_atomic_fmax_f32_noret: -; GFX11: ; %bb.0: -; GFX11-NEXT: flat_atomic_max_f32 v[0:1], v2 -; GFX11-NEXT: s_endpgm - %ret = call float @llvm.amdgcn.flat.atomic.fmax.f32.p1.f32(ptr %ptr, float %data) - ret void -} - -define amdgpu_cs float @flat_atomic_fmin_f32_rtn(ptr %ptr, float %data, ptr %out) { -; GFX10-LABEL: flat_atomic_fmin_f32_rtn: -; GFX10: ; %bb.0: -; GFX10-NEXT: flat_atomic_fmin v0, v[0:1], v2 glc -; GFX10-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX10-NEXT: flat_store_dword v[3:4], v0 -; GFX10-NEXT: s_waitcnt lgkmcnt(0) -; GFX10-NEXT: ; return to shader part epilog -; -; GFX11-LABEL: flat_atomic_fmin_f32_rtn: -; GFX11: ; %bb.0: -; GFX11-NEXT: flat_atomic_min_f32 v0, v[0:1], v2 glc -; GFX11-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX11-NEXT: flat_store_b32 v[3:4], v0 -; GFX11-NEXT: s_waitcnt lgkmcnt(0) -; GFX11-NEXT: ; return to shader part epilog - %ret = call float @llvm.amdgcn.flat.atomic.fmin.f32.p1.f32(ptr %ptr, float %data) - store float %ret, ptr %out - ret float %ret -} - -define amdgpu_cs float @flat_atomic_fmax_f32_rtn(ptr %ptr, float %data, ptr %out) { -; GFX10-LABEL: flat_atomic_fmax_f32_rtn: -; GFX10: ; %bb.0: -; GFX10-NEXT: flat_atomic_fmax v0, v[0:1], v2 glc -; GFX10-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX10-NEXT: flat_store_dword v[3:4], v0 -; GFX10-NEXT: s_waitcnt lgkmcnt(0) -; GFX10-NEXT: ; return to shader part epilog -; -; GFX11-LABEL: flat_atomic_fmax_f32_rtn: -; GFX11: ; %bb.0: -; GFX11-NEXT: flat_atomic_max_f32 v0, v[0:1], v2 glc -; GFX11-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX11-NEXT: flat_store_b32 v[3:4], v0 -; GFX11-NEXT: s_waitcnt lgkmcnt(0) -; GFX11-NEXT: ; return to shader part epilog - %ret = call float @llvm.amdgcn.flat.atomic.fmax.f32.p1.f32(ptr %ptr, float %data) - store float %ret, ptr %out - ret float %ret -} -;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: -; GFX10-GISEL: {{.*}} -; GFX10-SDAG: {{.*}} -; GFX11-GISEL: {{.*}} -; GFX11-SDAG: {{.*}} diff --git a/llvm/test/CodeGen/AMDGPU/fp-min-max-global-atomics-f64.ll b/llvm/test/CodeGen/AMDGPU/fp-min-max-global-atomics-f64.ll deleted file mode 100644 index bb06ee3165e3ac..00000000000000 --- a/llvm/test/CodeGen/AMDGPU/fp-min-max-global-atomics-f64.ll +++ /dev/null @@ -1,51 +0,0 @@ -; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py -; RUN: llc < %s -global-isel=0 -mtriple=amdgcn -mcpu=gfx1010 -verify-machineinstrs | FileCheck %s -check-prefixes=GFX10,GFX10-SDAG -; RUN: llc < %s -global-isel=1 -mtriple=amdgcn -mcpu=gfx1010 -verify-machineinstrs | FileCheck %s -check-prefixes=GFX10,GFX10-GISEL - -declare double @llvm.amdgcn.global.atomic.fmin.f64.p1.f64(ptr addrspace(1) %ptr, double %data) -declare double @llvm.amdgcn.global.atomic.fmax.f64.p1.f64(ptr addrspace(1) %ptr, double %data) - -define amdgpu_cs void @global_atomic_fmin_f64_noret(ptr addrspace(1) %ptr, double %data) { -; GFX10-LABEL: global_atomic_fmin_f64_noret: -; GFX10: ; %bb.0: -; GFX10-NEXT: global_atomic_fmin_x2 v[0:1], v[2:3], off -; GFX10-NEXT: s_endpgm - %ret = call double @llvm.amdgcn.global.atomic.fmin.f64.p1.f64(ptr addrspace(1) %ptr, double %data) - ret void -} - -define amdgpu_cs void @global_atomic_fmax_f64_noret(ptr addrspace(1) %ptr, double %data) { -; GFX10-LABEL: global_atomic_fmax_f64_noret: -; GFX10: ; %bb.0: -; GFX10-NEXT: global_atomic_fmax_x2 v[0:1], v[2:3], off -; GFX10-NEXT: s_endpgm - %ret = call double @llvm.amdgcn.global.atomic.fmax.f64.p1.f64(ptr addrspace(1) %ptr, double %data) - ret void -} - -define amdgpu_cs void @global_atomic_fmin_f64_rtn(ptr addrspace(1) %ptr, double %data, ptr addrspace(1) %out) { -; GFX10-LABEL: global_atomic_fmin_f64_rtn: -; GFX10: ; %bb.0: -; GFX10-NEXT: global_atomic_fmin_x2 v[0:1], v[0:1], v[2:3], off glc -; GFX10-NEXT: s_waitcnt vmcnt(0) -; GFX10-NEXT: global_store_dwordx2 v[4:5], v[0:1], off -; GFX10-NEXT: s_endpgm - %ret = call double @llvm.amdgcn.global.atomic.fmin.f64.p1.f64(ptr addrspace(1) %ptr, double %data) - store double %ret, ptr addrspace(1) %out - ret void -} - -define amdgpu_cs void @global_atomic_fmax_f64_rtn(ptr addrspace(1) %ptr, double %data, ptr addrspace(1) %out) { -; GFX10-LABEL: global_atomic_fmax_f64_rtn: -; GFX10: ; %bb.0: -; GFX10-NEXT: global_atomic_fmax_x2 v[0:1], v[0:1], v[2:3], off glc -; GFX10-NEXT: s_waitcnt vmcnt(0) -; GFX10-NEXT: global_store_dwordx2 v[4:5], v[0:1], off -; GFX10-NEXT: s_endpgm - %ret = call double @llvm.amdgcn.global.atomic.fmax.f64.p1.f64(ptr addrspace(1) %ptr, double %data) - store double %ret, ptr addrspace(1) %out - ret void -} -;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: -; GFX10-GISEL: {{.*}} -; GFX10-SDAG: {{.*}} diff --git a/llvm/test/CodeGen/AMDGPU/fp-min-max-global-atomics.ll b/llvm/test/CodeGen/AMDGPU/fp-min-max-global-atomics.ll deleted file mode 100644 index 699bb8b41b69d4..00000000000000 --- a/llvm/test/CodeGen/AMDGPU/fp-min-max-global-atomics.ll +++ /dev/null @@ -1,87 +0,0 @@ -; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py -; RUN: llc < %s -global-isel=0 -mtriple=amdgcn -mcpu=gfx1010 -verify-machineinstrs | FileCheck %s -check-prefixes=GFX10,GFX10-SDAG -; RUN: llc < %s -global-isel=0 -mtriple=amdgcn -mcpu=gfx1100 -verify-machineinstrs | FileCheck %s -check-prefixes=GFX11,GFX11-SDAG -; RUN: llc < %s -global-isel=1 -mtriple=amdgcn -mcpu=gfx1010 -verify-machineinstrs | FileCheck %s -check-prefixes=GFX10,GFX10-GISEL -; RUN: llc < %s -global-isel=1 -mtriple=amdgcn -mcpu=gfx1100 -verify-machineinstrs | FileCheck %s -check-prefixes=GFX11,GFX11-GISEL - -declare float @llvm.amdgcn.global.atomic.fmin.f32.p1.f32(ptr addrspace(1) %ptr, float %data) -declare float @llvm.amdgcn.global.atomic.fmax.f32.p1.f32(ptr addrspace(1) %ptr, float %data) - -define amdgpu_cs void @global_atomic_fmin_f32_noret(ptr addrspace(1) %ptr, float %data) { -; GFX10-LABEL: global_atomic_fmin_f32_noret: -; GFX10: ; %bb.0: -; GFX10-NEXT: global_atomic_fmin v[0:1], v2, off -; GFX10-NEXT: s_endpgm -; -; GFX11-LABEL: global_atomic_fmin_f32_noret: -; GFX11: ; %bb.0: -; GFX11-NEXT: global_atomic_min_f32 v[0:1], v2, off -; GFX11-NEXT: s_nop 0 -; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) -; GFX11-NEXT: s_endpgm - %ret = call float @llvm.amdgcn.global.atomic.fmin.f32.p1.f32(ptr addrspace(1) %ptr, float %data) - ret void -} - -define amdgpu_cs void @global_atomic_fmax_f32_noret(ptr addrspace(1) %ptr, float %data) { -; GFX10-LABEL: global_atomic_fmax_f32_noret: -; GFX10: ; %bb.0: -; GFX10-NEXT: global_atomic_fmax v[0:1], v2, off -; GFX10-NEXT: s_endpgm -; -; GFX11-LABEL: global_atomic_fmax_f32_noret: -; GFX11: ; %bb.0: -; GFX11-NEXT: global_atomic_max_f32 v[0:1], v2, off -; GFX11-NEXT: s_nop 0 -; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) -; GFX11-NEXT: s_endpgm - %ret = call float @llvm.amdgcn.global.atomic.fmax.f32.p1.f32(ptr addrspace(1) %ptr, float %data) - ret void -} - -define amdgpu_cs void @global_atomic_fmax_f32_rtn(ptr addrspace(1) %ptr, float %data, ptr addrspace(1) %out) { -; GFX10-LABEL: global_atomic_fmax_f32_rtn: -; GFX10: ; %bb.0: -; GFX10-NEXT: global_atomic_fmax v0, v[0:1], v2, off glc -; GFX10-NEXT: s_waitcnt vmcnt(0) -; GFX10-NEXT: global_store_dword v[3:4], v0, off -; GFX10-NEXT: s_endpgm -; -; GFX11-LABEL: global_atomic_fmax_f32_rtn: -; GFX11: ; %bb.0: -; GFX11-NEXT: global_atomic_max_f32 v0, v[0:1], v2, off glc -; GFX11-NEXT: s_waitcnt vmcnt(0) -; GFX11-NEXT: global_store_b32 v[3:4], v0, off -; GFX11-NEXT: s_nop 0 -; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) -; GFX11-NEXT: s_endpgm - %ret = call float @llvm.amdgcn.global.atomic.fmax.f32.p1.f32(ptr addrspace(1) %ptr, float %data) - store float %ret, ptr addrspace(1) %out - ret void -} - -define amdgpu_cs void @global_atomic_fmin_f32_rtn(ptr addrspace(1) %ptr, float %data, ptr addrspace(1) %out) { -; GFX10-LABEL: global_atomic_fmin_f32_rtn: -; GFX10: ; %bb.0: -; GFX10-NEXT: global_atomic_fmin v0, v[0:1], v2, off glc -; GFX10-NEXT: s_waitcnt vmcnt(0) -; GFX10-NEXT: global_store_dword v[3:4], v0, off -; GFX10-NEXT: s_endpgm -; -; GFX11-LABEL: global_atomic_fmin_f32_rtn: -; GFX11: ; %bb.0: -; GFX11-NEXT: global_atomic_min_f32 v0, v[0:1], v2, off glc -; GFX11-NEXT: s_waitcnt vmcnt(0) -; GFX11-NEXT: global_store_b32 v[3:4], v0, off -; GFX11-NEXT: s_nop 0 -; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) -; GFX11-NEXT: s_endpgm - %ret = call float @llvm.amdgcn.global.atomic.fmin.f32.p1.f32(ptr addrspace(1) %ptr, float %data) - store float %ret, ptr addrspace(1) %out - ret void -} -;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: -; GFX10-GISEL: {{.*}} -; GFX10-SDAG: {{.*}} -; GFX11-GISEL: {{.*}} -; GFX11-SDAG: {{.*}} diff --git a/llvm/test/CodeGen/AMDGPU/fp64-atomics-gfx90a.ll b/llvm/test/CodeGen/AMDGPU/fp64-atomics-gfx90a.ll index 957c10ddf85e5d..e45b5cb30ab894 100644 --- a/llvm/test/CodeGen/AMDGPU/fp64-atomics-gfx90a.ll +++ b/llvm/test/CodeGen/AMDGPU/fp64-atomics-gfx90a.ll @@ -14,10 +14,6 @@ declare double @llvm.amdgcn.struct.buffer.atomic.fmax.f64(double, <4 x i32>, i32 declare double @llvm.amdgcn.struct.ptr.buffer.atomic.fmax.f64(double, ptr addrspace(8), i32, i32, i32, i32 immarg) declare double @llvm.amdgcn.raw.buffer.atomic.fmax.f64(double, <4 x i32>, i32, i32, i32 immarg) declare double @llvm.amdgcn.raw.ptr.buffer.atomic.fmax.f64(double, ptr addrspace(8), i32, i32, i32 immarg) -declare double @llvm.amdgcn.global.atomic.fmin.f64.p1.f64(ptr addrspace(1) %ptr, double %data) -declare double @llvm.amdgcn.global.atomic.fmax.f64.p1.f64(ptr addrspace(1) %ptr, double %data) -declare double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %ptr, double %data) -declare double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %ptr, double %data) declare double @llvm.amdgcn.ds.fadd.f64(ptr addrspace(3) nocapture, double, i32, i32, i1) define amdgpu_kernel void @raw_buffer_atomic_add_noret_f64(<4 x i32> %rsrc, double %data, i32 %vindex) { @@ -1016,56 +1012,6 @@ main_body: ret void } -define amdgpu_kernel void @global_atomic_fmin_f64_noret(ptr addrspace(1) %ptr, double %data) { -; GFX90A-LABEL: global_atomic_fmin_f64_noret: -; GFX90A: ; %bb.0: ; %main_body -; GFX90A-NEXT: s_load_dwordx4 s[4:7], s[2:3], 0x24 -; GFX90A-NEXT: v_mov_b32_e32 v2, 0 -; GFX90A-NEXT: s_waitcnt lgkmcnt(0) -; GFX90A-NEXT: v_mov_b32_e32 v0, s6 -; GFX90A-NEXT: v_mov_b32_e32 v1, s7 -; GFX90A-NEXT: global_atomic_min_f64 v2, v[0:1], s[4:5] -; GFX90A-NEXT: s_endpgm -; -; GFX940-LABEL: global_atomic_fmin_f64_noret: -; GFX940: ; %bb.0: ; %main_body -; GFX940-NEXT: s_load_dwordx4 s[4:7], s[2:3], 0x24 -; GFX940-NEXT: v_mov_b32_e32 v2, 0 -; GFX940-NEXT: s_waitcnt lgkmcnt(0) -; GFX940-NEXT: v_mov_b32_e32 v0, s6 -; GFX940-NEXT: v_mov_b32_e32 v1, s7 -; GFX940-NEXT: global_atomic_min_f64 v2, v[0:1], s[4:5] -; GFX940-NEXT: s_endpgm -main_body: - %ret = call double @llvm.amdgcn.global.atomic.fmin.f64.p1.f64(ptr addrspace(1) %ptr, double %data) - ret void -} - -define amdgpu_kernel void @global_atomic_fmax_f64_noret(ptr addrspace(1) %ptr, double %data) { -; GFX90A-LABEL: global_atomic_fmax_f64_noret: -; GFX90A: ; %bb.0: ; %main_body -; GFX90A-NEXT: s_load_dwordx4 s[4:7], s[2:3], 0x24 -; GFX90A-NEXT: v_mov_b32_e32 v2, 0 -; GFX90A-NEXT: s_waitcnt lgkmcnt(0) -; GFX90A-NEXT: v_mov_b32_e32 v0, s6 -; GFX90A-NEXT: v_mov_b32_e32 v1, s7 -; GFX90A-NEXT: global_atomic_max_f64 v2, v[0:1], s[4:5] -; GFX90A-NEXT: s_endpgm -; -; GFX940-LABEL: global_atomic_fmax_f64_noret: -; GFX940: ; %bb.0: ; %main_body -; GFX940-NEXT: s_load_dwordx4 s[4:7], s[2:3], 0x24 -; GFX940-NEXT: v_mov_b32_e32 v2, 0 -; GFX940-NEXT: s_waitcnt lgkmcnt(0) -; GFX940-NEXT: v_mov_b32_e32 v0, s6 -; GFX940-NEXT: v_mov_b32_e32 v1, s7 -; GFX940-NEXT: global_atomic_max_f64 v2, v[0:1], s[4:5] -; GFX940-NEXT: s_endpgm -main_body: - %ret = call double @llvm.amdgcn.global.atomic.fmax.f64.p1.f64(ptr addrspace(1) %ptr, double %data) - ret void -} - define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat(ptr addrspace(1) %ptr) #1 { ; GFX90A-LABEL: global_atomic_fadd_f64_noret_pat: ; GFX90A: ; %bb.0: ; %main_body @@ -1265,44 +1211,6 @@ main_body: ret double %ret } -define double @global_atomic_fmax_f64_rtn(ptr addrspace(1) %ptr, double %data) { -; GFX90A-LABEL: global_atomic_fmax_f64_rtn: -; GFX90A: ; %bb.0: ; %main_body -; GFX90A-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX90A-NEXT: global_atomic_max_f64 v[0:1], v[0:1], v[2:3], off glc -; GFX90A-NEXT: s_waitcnt vmcnt(0) -; GFX90A-NEXT: s_setpc_b64 s[30:31] -; -; GFX940-LABEL: global_atomic_fmax_f64_rtn: -; GFX940: ; %bb.0: ; %main_body -; GFX940-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX940-NEXT: global_atomic_max_f64 v[0:1], v[0:1], v[2:3], off sc0 -; GFX940-NEXT: s_waitcnt vmcnt(0) -; GFX940-NEXT: s_setpc_b64 s[30:31] -main_body: - %ret = call double @llvm.amdgcn.global.atomic.fmax.f64.p1.f64(ptr addrspace(1) %ptr, double %data) - ret double %ret -} - -define double @global_atomic_fmin_f64_rtn(ptr addrspace(1) %ptr, double %data) { -; GFX90A-LABEL: global_atomic_fmin_f64_rtn: -; GFX90A: ; %bb.0: ; %main_body -; GFX90A-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX90A-NEXT: global_atomic_min_f64 v[0:1], v[0:1], v[2:3], off glc -; GFX90A-NEXT: s_waitcnt vmcnt(0) -; GFX90A-NEXT: s_setpc_b64 s[30:31] -; -; GFX940-LABEL: global_atomic_fmin_f64_rtn: -; GFX940: ; %bb.0: ; %main_body -; GFX940-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX940-NEXT: global_atomic_min_f64 v[0:1], v[0:1], v[2:3], off sc0 -; GFX940-NEXT: s_waitcnt vmcnt(0) -; GFX940-NEXT: s_setpc_b64 s[30:31] -main_body: - %ret = call double @llvm.amdgcn.global.atomic.fmin.f64.p1.f64(ptr addrspace(1) %ptr, double %data) - ret double %ret -} - define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat_agent_safe(ptr addrspace(1) %ptr) { ; GFX90A-LABEL: global_atomic_fadd_f64_noret_pat_agent_safe: ; GFX90A: ; %bb.0: ; %main_body @@ -1313,7 +1221,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat_agent_safe(ptr addrs ; GFX90A-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x0 ; GFX90A-NEXT: s_waitcnt lgkmcnt(0) ; GFX90A-NEXT: v_pk_mov_b32 v[2:3], s[4:5], s[4:5] op_sel:[0,1] -; GFX90A-NEXT: .LBB47_1: ; %atomicrmw.start +; GFX90A-NEXT: .LBB43_1: ; %atomicrmw.start ; GFX90A-NEXT: ; =>This Inner Loop Header: Depth=1 ; GFX90A-NEXT: v_add_f64 v[0:1], v[2:3], 4.0 ; GFX90A-NEXT: global_atomic_cmpswap_x2 v[0:1], v4, v[0:3], s[0:1] glc @@ -1323,7 +1231,7 @@ define amdgpu_kernel void @global_atomic_fadd_f64_noret_pat_agent_safe(ptr addrs ; GFX90A-NEXT: s_or_b64 s[2:3], vcc, s[2:3] ; GFX90A-NEXT: v_pk_mov_b32 v[2:3], v[0:1], v[0:1] op_sel:[0,1] ; GFX90A-NEXT: s_andn2_b64 exec, exec, s[2:3] -; GFX90A-NEXT: s_cbranch_execnz .LBB47_1 +; GFX90A-NEXT: s_cbranch_execnz .LBB43_1 ; GFX90A-NEXT: ; %bb.2: ; %atomicrmw.end ; GFX90A-NEXT: s_endpgm ; @@ -1524,7 +1432,7 @@ define amdgpu_kernel void @flat_atomic_fadd_f64_noret_pat_agent_safe(ptr %ptr) { ; GFX90A-NEXT: v_pk_mov_b32 v[0:1], s[4:5], s[4:5] op_sel:[0,1] ; GFX90A-NEXT: flat_load_dwordx2 v[2:3], v[0:1] ; GFX90A-NEXT: v_pk_mov_b32 v[4:5], s[4:5], s[4:5] op_sel:[0,1] -; GFX90A-NEXT: .LBB54_1: ; %atomicrmw.start +; GFX90A-NEXT: .LBB50_1: ; %atomicrmw.start ; GFX90A-NEXT: ; =>This Inner Loop Header: Depth=1 ; GFX90A-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) ; GFX90A-NEXT: v_add_f64 v[0:1], v[2:3], 4.0 @@ -1535,7 +1443,7 @@ define amdgpu_kernel void @flat_atomic_fadd_f64_noret_pat_agent_safe(ptr %ptr) { ; GFX90A-NEXT: s_or_b64 s[0:1], vcc, s[0:1] ; GFX90A-NEXT: v_pk_mov_b32 v[2:3], v[0:1], v[0:1] op_sel:[0,1] ; GFX90A-NEXT: s_andn2_b64 exec, exec, s[0:1] -; GFX90A-NEXT: s_cbranch_execnz .LBB54_1 +; GFX90A-NEXT: s_cbranch_execnz .LBB50_1 ; GFX90A-NEXT: ; %bb.2: ; %atomicrmw.end ; GFX90A-NEXT: s_endpgm ; @@ -1555,98 +1463,6 @@ main_body: ret void } -define amdgpu_kernel void @flat_atomic_fmin_f64_noret(ptr %ptr, double %data) { -; GFX90A-LABEL: flat_atomic_fmin_f64_noret: -; GFX90A: ; %bb.0: ; %main_body -; GFX90A-NEXT: s_load_dwordx4 s[4:7], s[2:3], 0x24 -; GFX90A-NEXT: s_waitcnt lgkmcnt(0) -; GFX90A-NEXT: v_mov_b32_e32 v0, s4 -; GFX90A-NEXT: v_mov_b32_e32 v1, s5 -; GFX90A-NEXT: v_mov_b32_e32 v2, s6 -; GFX90A-NEXT: v_mov_b32_e32 v3, s7 -; GFX90A-NEXT: flat_atomic_min_f64 v[0:1], v[2:3] -; GFX90A-NEXT: s_endpgm -; -; GFX940-LABEL: flat_atomic_fmin_f64_noret: -; GFX940: ; %bb.0: ; %main_body -; GFX940-NEXT: s_load_dwordx4 s[4:7], s[2:3], 0x24 -; GFX940-NEXT: s_waitcnt lgkmcnt(0) -; GFX940-NEXT: v_mov_b32_e32 v0, s4 -; GFX940-NEXT: v_mov_b32_e32 v1, s5 -; GFX940-NEXT: v_mov_b32_e32 v2, s6 -; GFX940-NEXT: v_mov_b32_e32 v3, s7 -; GFX940-NEXT: flat_atomic_min_f64 v[0:1], v[2:3] -; GFX940-NEXT: s_endpgm -main_body: - %ret = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %ptr, double %data) - ret void -} - -define double @flat_atomic_fmin_f64_rtn(ptr %ptr, double %data) { -; GFX90A-LABEL: flat_atomic_fmin_f64_rtn: -; GFX90A: ; %bb.0: ; %main_body -; GFX90A-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX90A-NEXT: flat_atomic_min_f64 v[0:1], v[0:1], v[2:3] glc -; GFX90A-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX90A-NEXT: s_setpc_b64 s[30:31] -; -; GFX940-LABEL: flat_atomic_fmin_f64_rtn: -; GFX940: ; %bb.0: ; %main_body -; GFX940-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX940-NEXT: flat_atomic_min_f64 v[0:1], v[0:1], v[2:3] sc0 -; GFX940-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX940-NEXT: s_setpc_b64 s[30:31] -main_body: - %ret = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %ptr, double %data) - ret double %ret -} - -define amdgpu_kernel void @flat_atomic_fmax_f64_noret(ptr %ptr, double %data) { -; GFX90A-LABEL: flat_atomic_fmax_f64_noret: -; GFX90A: ; %bb.0: ; %main_body -; GFX90A-NEXT: s_load_dwordx4 s[4:7], s[2:3], 0x24 -; GFX90A-NEXT: s_waitcnt lgkmcnt(0) -; GFX90A-NEXT: v_mov_b32_e32 v0, s4 -; GFX90A-NEXT: v_mov_b32_e32 v1, s5 -; GFX90A-NEXT: v_mov_b32_e32 v2, s6 -; GFX90A-NEXT: v_mov_b32_e32 v3, s7 -; GFX90A-NEXT: flat_atomic_max_f64 v[0:1], v[2:3] -; GFX90A-NEXT: s_endpgm -; -; GFX940-LABEL: flat_atomic_fmax_f64_noret: -; GFX940: ; %bb.0: ; %main_body -; GFX940-NEXT: s_load_dwordx4 s[4:7], s[2:3], 0x24 -; GFX940-NEXT: s_waitcnt lgkmcnt(0) -; GFX940-NEXT: v_mov_b32_e32 v0, s4 -; GFX940-NEXT: v_mov_b32_e32 v1, s5 -; GFX940-NEXT: v_mov_b32_e32 v2, s6 -; GFX940-NEXT: v_mov_b32_e32 v3, s7 -; GFX940-NEXT: flat_atomic_max_f64 v[0:1], v[2:3] -; GFX940-NEXT: s_endpgm -main_body: - %ret = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %ptr, double %data) - ret void -} - -define double @flat_atomic_fmax_f64_rtn(ptr %ptr, double %data) { -; GFX90A-LABEL: flat_atomic_fmax_f64_rtn: -; GFX90A: ; %bb.0: ; %main_body -; GFX90A-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX90A-NEXT: flat_atomic_max_f64 v[0:1], v[0:1], v[2:3] glc -; GFX90A-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX90A-NEXT: s_setpc_b64 s[30:31] -; -; GFX940-LABEL: flat_atomic_fmax_f64_rtn: -; GFX940: ; %bb.0: ; %main_body -; GFX940-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX940-NEXT: flat_atomic_max_f64 v[0:1], v[0:1], v[2:3] sc0 -; GFX940-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX940-NEXT: s_setpc_b64 s[30:31] -main_body: - %ret = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %ptr, double %data) - ret double %ret -} - define amdgpu_kernel void @local_atomic_fadd_f64_noret(ptr addrspace(3) %ptr, double %data) { ; GFX90A-LABEL: local_atomic_fadd_f64_noret: ; GFX90A: ; %bb.0: ; %main_body @@ -1843,178 +1659,6 @@ main_body: ret double %ret } -define double @flat_atomic_fmin_f64_intrinsic_rtn__posoffset(ptr %ptr, double %data) #1 { -; GFX90A-LABEL: flat_atomic_fmin_f64_intrinsic_rtn__posoffset: -; GFX90A: ; %bb.0: -; GFX90A-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX90A-NEXT: flat_atomic_min_f64 v[0:1], v[0:1], v[2:3] glc -; GFX90A-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX90A-NEXT: s_setpc_b64 s[30:31] -; -; GFX940-LABEL: flat_atomic_fmin_f64_intrinsic_rtn__posoffset: -; GFX940: ; %bb.0: -; GFX940-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX940-NEXT: flat_atomic_min_f64 v[0:1], v[0:1], v[2:3] sc0 -; GFX940-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX940-NEXT: s_setpc_b64 s[30:31] - %gep = getelementptr double, ptr %ptr, i64 511 - %ret = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %ptr, double %data) - ret double %ret -} - -define double @flat_atomic_fmin_f64_intrinsic_rtn__negoffset(ptr %ptr, double %data) #1 { -; GFX90A-LABEL: flat_atomic_fmin_f64_intrinsic_rtn__negoffset: -; GFX90A: ; %bb.0: -; GFX90A-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX90A-NEXT: v_add_co_u32_e32 v0, vcc, 0xfffff008, v0 -; GFX90A-NEXT: v_addc_co_u32_e32 v1, vcc, -1, v1, vcc -; GFX90A-NEXT: flat_atomic_min_f64 v[0:1], v[0:1], v[2:3] glc -; GFX90A-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX90A-NEXT: s_setpc_b64 s[30:31] -; -; GFX940-LABEL: flat_atomic_fmin_f64_intrinsic_rtn__negoffset: -; GFX940: ; %bb.0: -; GFX940-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX940-NEXT: v_add_co_u32_e32 v0, vcc, 0xfffff008, v0 -; GFX940-NEXT: s_nop 1 -; GFX940-NEXT: v_addc_co_u32_e32 v1, vcc, -1, v1, vcc -; GFX940-NEXT: flat_atomic_min_f64 v[0:1], v[0:1], v[2:3] sc0 -; GFX940-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX940-NEXT: s_setpc_b64 s[30:31] - %gep = getelementptr double, ptr %ptr, i64 -511 - %ret = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %gep, double %data) - ret double %ret -} - -define void @flat_atomic_fmin_f64_intrinsic_noret__posoffset(ptr %ptr, double %data) #1 { -; GFX90A-LABEL: flat_atomic_fmin_f64_intrinsic_noret__posoffset: -; GFX90A: ; %bb.0: -; GFX90A-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX90A-NEXT: flat_atomic_min_f64 v[0:1], v[2:3] -; GFX90A-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX90A-NEXT: s_setpc_b64 s[30:31] -; -; GFX940-LABEL: flat_atomic_fmin_f64_intrinsic_noret__posoffset: -; GFX940: ; %bb.0: -; GFX940-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX940-NEXT: flat_atomic_min_f64 v[0:1], v[2:3] -; GFX940-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX940-NEXT: s_setpc_b64 s[30:31] - %gep = getelementptr double, ptr %ptr, i64 511 - %unused = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %ptr, double %data) - ret void -} - -define void @flat_atomic_fmin_f64_intrinsic_noret__negoffset(ptr %ptr, double %data) #1 { -; GFX90A-LABEL: flat_atomic_fmin_f64_intrinsic_noret__negoffset: -; GFX90A: ; %bb.0: -; GFX90A-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX90A-NEXT: v_add_co_u32_e32 v0, vcc, 0xfffff008, v0 -; GFX90A-NEXT: v_addc_co_u32_e32 v1, vcc, -1, v1, vcc -; GFX90A-NEXT: flat_atomic_min_f64 v[0:1], v[2:3] -; GFX90A-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX90A-NEXT: s_setpc_b64 s[30:31] -; -; GFX940-LABEL: flat_atomic_fmin_f64_intrinsic_noret__negoffset: -; GFX940: ; %bb.0: -; GFX940-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX940-NEXT: v_add_co_u32_e32 v0, vcc, 0xfffff008, v0 -; GFX940-NEXT: s_nop 1 -; GFX940-NEXT: v_addc_co_u32_e32 v1, vcc, -1, v1, vcc -; GFX940-NEXT: flat_atomic_min_f64 v[0:1], v[2:3] -; GFX940-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX940-NEXT: s_setpc_b64 s[30:31] - %gep = getelementptr double, ptr %ptr, i64 -511 - %unused = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %gep, double %data) - ret void -} - -define double @flat_atomic_fmax_f64_intrinsic_rtn__posoffset(ptr %ptr, double %data) #1 { -; GFX90A-LABEL: flat_atomic_fmax_f64_intrinsic_rtn__posoffset: -; GFX90A: ; %bb.0: -; GFX90A-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX90A-NEXT: flat_atomic_max_f64 v[0:1], v[0:1], v[2:3] glc -; GFX90A-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX90A-NEXT: s_setpc_b64 s[30:31] -; -; GFX940-LABEL: flat_atomic_fmax_f64_intrinsic_rtn__posoffset: -; GFX940: ; %bb.0: -; GFX940-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX940-NEXT: flat_atomic_max_f64 v[0:1], v[0:1], v[2:3] sc0 -; GFX940-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX940-NEXT: s_setpc_b64 s[30:31] - %gep = getelementptr double, ptr %ptr, i64 511 - %ret = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %ptr, double %data) - ret double %ret -} - -define double @flat_atomic_fmax_f64_intrinsic_rtn__negoffset(ptr %ptr, double %data) #1 { -; GFX90A-LABEL: flat_atomic_fmax_f64_intrinsic_rtn__negoffset: -; GFX90A: ; %bb.0: -; GFX90A-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX90A-NEXT: v_add_co_u32_e32 v0, vcc, 0xfffff008, v0 -; GFX90A-NEXT: v_addc_co_u32_e32 v1, vcc, -1, v1, vcc -; GFX90A-NEXT: flat_atomic_max_f64 v[0:1], v[0:1], v[2:3] glc -; GFX90A-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX90A-NEXT: s_setpc_b64 s[30:31] -; -; GFX940-LABEL: flat_atomic_fmax_f64_intrinsic_rtn__negoffset: -; GFX940: ; %bb.0: -; GFX940-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX940-NEXT: v_add_co_u32_e32 v0, vcc, 0xfffff008, v0 -; GFX940-NEXT: s_nop 1 -; GFX940-NEXT: v_addc_co_u32_e32 v1, vcc, -1, v1, vcc -; GFX940-NEXT: flat_atomic_max_f64 v[0:1], v[0:1], v[2:3] sc0 -; GFX940-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX940-NEXT: s_setpc_b64 s[30:31] - %gep = getelementptr double, ptr %ptr, i64 -511 - %ret = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %gep, double %data) - ret double %ret -} - -define void @flat_atomic_fmax_f64_intrinsic_noret__posoffset(ptr %ptr, double %data) #1 { -; GFX90A-LABEL: flat_atomic_fmax_f64_intrinsic_noret__posoffset: -; GFX90A: ; %bb.0: -; GFX90A-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX90A-NEXT: flat_atomic_max_f64 v[0:1], v[2:3] -; GFX90A-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX90A-NEXT: s_setpc_b64 s[30:31] -; -; GFX940-LABEL: flat_atomic_fmax_f64_intrinsic_noret__posoffset: -; GFX940: ; %bb.0: -; GFX940-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX940-NEXT: flat_atomic_max_f64 v[0:1], v[2:3] -; GFX940-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX940-NEXT: s_setpc_b64 s[30:31] - %gep = getelementptr double, ptr %ptr, i64 511 - %unused = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %ptr, double %data) - ret void -} - -define void @flat_atomic_fmax_f64_intrinsic_noret__negoffset(ptr %ptr, double %data) #1 { -; GFX90A-LABEL: flat_atomic_fmax_f64_intrinsic_noret__negoffset: -; GFX90A: ; %bb.0: -; GFX90A-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX90A-NEXT: v_add_co_u32_e32 v0, vcc, 0xfffff008, v0 -; GFX90A-NEXT: v_addc_co_u32_e32 v1, vcc, -1, v1, vcc -; GFX90A-NEXT: flat_atomic_max_f64 v[0:1], v[2:3] -; GFX90A-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX90A-NEXT: s_setpc_b64 s[30:31] -; -; GFX940-LABEL: flat_atomic_fmax_f64_intrinsic_noret__negoffset: -; GFX940: ; %bb.0: -; GFX940-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX940-NEXT: v_add_co_u32_e32 v0, vcc, 0xfffff008, v0 -; GFX940-NEXT: s_nop 1 -; GFX940-NEXT: v_addc_co_u32_e32 v1, vcc, -1, v1, vcc -; GFX940-NEXT: flat_atomic_max_f64 v[0:1], v[2:3] -; GFX940-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0) -; GFX940-NEXT: s_setpc_b64 s[30:31] - %gep = getelementptr double, ptr %ptr, i64 -511 - %unused = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %gep, double %data) - ret void -} - attributes #0 = { "denormal-fp-math"="preserve-sign,preserve-sign" } attributes #1 = { nounwind } attributes #2 = { "denormal-fp-math"="ieee,ieee" } diff --git a/llvm/test/Transforms/InferAddressSpaces/AMDGPU/flat-fadd-fmin-fmax-intrinsics.ll b/llvm/test/Transforms/InferAddressSpaces/AMDGPU/flat-fadd-fmin-fmax-intrinsics.ll deleted file mode 100644 index 3d529a2c6ef69a..00000000000000 --- a/llvm/test/Transforms/InferAddressSpaces/AMDGPU/flat-fadd-fmin-fmax-intrinsics.ll +++ /dev/null @@ -1,224 +0,0 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2 -; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes=infer-address-spaces %s | FileCheck %s - -declare float @llvm.amdgcn.flat.atomic.fmax.f32.p0.f32(ptr %ptr, float %data) -declare float @llvm.amdgcn.flat.atomic.fmin.f32.p0.f32(ptr %ptr, float %data) - -define amdgpu_kernel void @flat_atomic_fadd_f32_p1(ptr addrspace(1) %ptr, float %data) { -; CHECK-LABEL: define amdgpu_kernel void @flat_atomic_fadd_f32_p1 -; CHECK-SAME: (ptr addrspace(1) [[PTR:%.*]], float [[DATA:%.*]]) { -; CHECK-NEXT: [[MAX:%.*]] = call float @llvm.amdgcn.flat.atomic.fmax.f32.p1.f32(ptr addrspace(1) [[PTR]], float [[DATA]]) -; CHECK-NEXT: [[MIN:%.*]] = call float @llvm.amdgcn.flat.atomic.fmin.f32.p1.f32(ptr addrspace(1) [[PTR]], float [[DATA]]) -; CHECK-NEXT: ret void -; - %cast = addrspacecast ptr addrspace(1) %ptr to ptr - %max = call float @llvm.amdgcn.flat.atomic.fmax.f32.p0.f32(ptr %cast, float %data) - %min = call float @llvm.amdgcn.flat.atomic.fmin.f32.p0.f32(ptr %cast, float %data) - ret void -} - -define amdgpu_kernel void @flat_atomic_fadd_f32_p2(ptr addrspace(2) %ptr, float %data) { -; CHECK-LABEL: define amdgpu_kernel void @flat_atomic_fadd_f32_p2 -; CHECK-SAME: (ptr addrspace(2) [[PTR:%.*]], float [[DATA:%.*]]) { -; CHECK-NEXT: [[CAST:%.*]] = addrspacecast ptr addrspace(2) [[PTR]] to ptr -; CHECK-NEXT: [[MAX:%.*]] = call float @llvm.amdgcn.flat.atomic.fmax.f32.p0.f32(ptr [[CAST]], float [[DATA]]) -; CHECK-NEXT: [[MIN:%.*]] = call float @llvm.amdgcn.flat.atomic.fmin.f32.p0.f32(ptr [[CAST]], float [[DATA]]) -; CHECK-NEXT: ret void -; - %cast = addrspacecast ptr addrspace(2) %ptr to ptr - %max = call float @llvm.amdgcn.flat.atomic.fmax.f32.p0.f32(ptr %cast, float %data) - %min = call float @llvm.amdgcn.flat.atomic.fmin.f32.p0.f32(ptr %cast, float %data) - ret void -} - -define amdgpu_kernel void @flat_atomic_fadd_f32_p3(ptr addrspace(3) %ptr, float %data) { -; CHECK-LABEL: define amdgpu_kernel void @flat_atomic_fadd_f32_p3 -; CHECK-SAME: (ptr addrspace(3) [[PTR:%.*]], float [[DATA:%.*]]) { -; CHECK-NEXT: [[CAST:%.*]] = addrspacecast ptr addrspace(3) [[PTR]] to ptr -; CHECK-NEXT: [[MAX:%.*]] = call float @llvm.amdgcn.flat.atomic.fmax.f32.p0.f32(ptr [[CAST]], float [[DATA]]) -; CHECK-NEXT: [[MIN:%.*]] = call float @llvm.amdgcn.flat.atomic.fmin.f32.p0.f32(ptr [[CAST]], float [[DATA]]) -; CHECK-NEXT: ret void -; - %cast = addrspacecast ptr addrspace(3) %ptr to ptr - %max = call float @llvm.amdgcn.flat.atomic.fmax.f32.p0.f32(ptr %cast, float %data) - %min = call float @llvm.amdgcn.flat.atomic.fmin.f32.p0.f32(ptr %cast, float %data) - ret void -} - -define amdgpu_kernel void @flat_atomic_fadd_f32_p4(ptr addrspace(4) %ptr, float %data) { -; CHECK-LABEL: define amdgpu_kernel void @flat_atomic_fadd_f32_p4 -; CHECK-SAME: (ptr addrspace(4) [[PTR:%.*]], float [[DATA:%.*]]) { -; CHECK-NEXT: [[MAX:%.*]] = call float @llvm.amdgcn.flat.atomic.fmax.f32.p4.f32(ptr addrspace(4) [[PTR]], float [[DATA]]) -; CHECK-NEXT: [[MIN:%.*]] = call float @llvm.amdgcn.flat.atomic.fmin.f32.p4.f32(ptr addrspace(4) [[PTR]], float [[DATA]]) -; CHECK-NEXT: ret void -; - %cast = addrspacecast ptr addrspace(4) %ptr to ptr - %max = call float @llvm.amdgcn.flat.atomic.fmax.f32.p0.f32(ptr %cast, float %data) - %min = call float @llvm.amdgcn.flat.atomic.fmin.f32.p0.f32(ptr %cast, float %data) - ret void -} - -define amdgpu_kernel void @flat_atomic_fadd_f32_p5(ptr addrspace(5) %ptr, float %data) { -; CHECK-LABEL: define amdgpu_kernel void @flat_atomic_fadd_f32_p5 -; CHECK-SAME: (ptr addrspace(5) [[PTR:%.*]], float [[DATA:%.*]]) { -; CHECK-NEXT: [[CAST:%.*]] = addrspacecast ptr addrspace(5) [[PTR]] to ptr -; CHECK-NEXT: [[MAX:%.*]] = call float @llvm.amdgcn.flat.atomic.fmax.f32.p0.f32(ptr [[CAST]], float [[DATA]]) -; CHECK-NEXT: [[MIN:%.*]] = call float @llvm.amdgcn.flat.atomic.fmin.f32.p0.f32(ptr [[CAST]], float [[DATA]]) -; CHECK-NEXT: ret void -; - %cast = addrspacecast ptr addrspace(5) %ptr to ptr - %max = call float @llvm.amdgcn.flat.atomic.fmax.f32.p0.f32(ptr %cast, float %data) - %min = call float @llvm.amdgcn.flat.atomic.fmin.f32.p0.f32(ptr %cast, float %data) - ret void -} - -define amdgpu_kernel void @flat_atomic_fadd_f32_p6(ptr addrspace(6) %ptr, float %data) { -; CHECK-LABEL: define amdgpu_kernel void @flat_atomic_fadd_f32_p6 -; CHECK-SAME: (ptr addrspace(6) [[PTR:%.*]], float [[DATA:%.*]]) { -; CHECK-NEXT: [[MAX:%.*]] = call float @llvm.amdgcn.flat.atomic.fmax.f32.p6.f32(ptr addrspace(6) [[PTR]], float [[DATA]]) -; CHECK-NEXT: [[MIN:%.*]] = call float @llvm.amdgcn.flat.atomic.fmin.f32.p6.f32(ptr addrspace(6) [[PTR]], float [[DATA]]) -; CHECK-NEXT: ret void -; - %cast = addrspacecast ptr addrspace(6) %ptr to ptr - %max = call float @llvm.amdgcn.flat.atomic.fmax.f32.p0.f32(ptr %cast, float %data) - %min = call float @llvm.amdgcn.flat.atomic.fmin.f32.p0.f32(ptr %cast, float %data) - ret void -} - -define amdgpu_kernel void @flat_atomic_fadd_f32_p7(ptr addrspace(7) %ptr, float %data) { -; CHECK-LABEL: define amdgpu_kernel void @flat_atomic_fadd_f32_p7 -; CHECK-SAME: (ptr addrspace(7) [[PTR:%.*]], float [[DATA:%.*]]) { -; CHECK-NEXT: [[CAST:%.*]] = addrspacecast ptr addrspace(7) [[PTR]] to ptr -; CHECK-NEXT: [[MAX:%.*]] = call float @llvm.amdgcn.flat.atomic.fmax.f32.p0.f32(ptr [[CAST]], float [[DATA]]) -; CHECK-NEXT: [[MIN:%.*]] = call float @llvm.amdgcn.flat.atomic.fmin.f32.p0.f32(ptr [[CAST]], float [[DATA]]) -; CHECK-NEXT: ret void -; - %cast = addrspacecast ptr addrspace(7) %ptr to ptr - %max = call float @llvm.amdgcn.flat.atomic.fmax.f32.p0.f32(ptr %cast, float %data) - %min = call float @llvm.amdgcn.flat.atomic.fmin.f32.p0.f32(ptr %cast, float %data) - ret void -} - -define amdgpu_kernel void @flat_atomic_fadd_f32_p99(ptr addrspace(99) %ptr, float %data) { -; CHECK-LABEL: define amdgpu_kernel void @flat_atomic_fadd_f32_p99 -; CHECK-SAME: (ptr addrspace(99) [[PTR:%.*]], float [[DATA:%.*]]) { -; CHECK-NEXT: [[MAX:%.*]] = call float @llvm.amdgcn.flat.atomic.fmax.f32.p99.f32(ptr addrspace(99) [[PTR]], float [[DATA]]) -; CHECK-NEXT: [[MIN:%.*]] = call float @llvm.amdgcn.flat.atomic.fmin.f32.p99.f32(ptr addrspace(99) [[PTR]], float [[DATA]]) -; CHECK-NEXT: ret void -; - %cast = addrspacecast ptr addrspace(99) %ptr to ptr - %max = call float @llvm.amdgcn.flat.atomic.fmax.f32.p0.f32(ptr %cast, float %data) - %min = call float @llvm.amdgcn.flat.atomic.fmin.f32.p0.f32(ptr %cast, float %data) - ret void -} - -declare double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %ptr, double %data) -declare double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %ptr, double %data) - -define amdgpu_kernel void @flat_atomic_fadd_f64_p1(ptr addrspace(1) %ptr, double %data) { -; CHECK-LABEL: define amdgpu_kernel void @flat_atomic_fadd_f64_p1 -; CHECK-SAME: (ptr addrspace(1) [[PTR:%.*]], double [[DATA:%.*]]) { -; CHECK-NEXT: [[MAX:%.*]] = call double @llvm.amdgcn.flat.atomic.fmax.f64.p1.f64(ptr addrspace(1) [[PTR]], double [[DATA]]) -; CHECK-NEXT: [[MIN:%.*]] = call double @llvm.amdgcn.flat.atomic.fmin.f64.p1.f64(ptr addrspace(1) [[PTR]], double [[DATA]]) -; CHECK-NEXT: ret void -; - %cast = addrspacecast ptr addrspace(1) %ptr to ptr - %max = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %cast, double %data) - %min = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %cast, double %data) - ret void -} - -define amdgpu_kernel void @flat_atomic_fadd_f64_p2(ptr addrspace(2) %ptr, double %data) { -; CHECK-LABEL: define amdgpu_kernel void @flat_atomic_fadd_f64_p2 -; CHECK-SAME: (ptr addrspace(2) [[PTR:%.*]], double [[DATA:%.*]]) { -; CHECK-NEXT: [[CAST:%.*]] = addrspacecast ptr addrspace(2) [[PTR]] to ptr -; CHECK-NEXT: [[MAX:%.*]] = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr [[CAST]], double [[DATA]]) -; CHECK-NEXT: [[MIN:%.*]] = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr [[CAST]], double [[DATA]]) -; CHECK-NEXT: ret void -; - %cast = addrspacecast ptr addrspace(2) %ptr to ptr - %max = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %cast, double %data) - %min = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %cast, double %data) - ret void -} - -define amdgpu_kernel void @flat_atomic_fadd_f64_p3(ptr addrspace(3) %ptr, double %data) { -; CHECK-LABEL: define amdgpu_kernel void @flat_atomic_fadd_f64_p3 -; CHECK-SAME: (ptr addrspace(3) [[PTR:%.*]], double [[DATA:%.*]]) { -; CHECK-NEXT: [[CAST:%.*]] = addrspacecast ptr addrspace(3) [[PTR]] to ptr -; CHECK-NEXT: [[MAX:%.*]] = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr [[CAST]], double [[DATA]]) -; CHECK-NEXT: [[MIN:%.*]] = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr [[CAST]], double [[DATA]]) -; CHECK-NEXT: ret void -; - %cast = addrspacecast ptr addrspace(3) %ptr to ptr - %max = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %cast, double %data) - %min = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %cast, double %data) - ret void -} - -define amdgpu_kernel void @flat_atomic_fadd_f64_p4(ptr addrspace(4) %ptr, double %data) { -; CHECK-LABEL: define amdgpu_kernel void @flat_atomic_fadd_f64_p4 -; CHECK-SAME: (ptr addrspace(4) [[PTR:%.*]], double [[DATA:%.*]]) { -; CHECK-NEXT: [[MAX:%.*]] = call double @llvm.amdgcn.flat.atomic.fmax.f64.p4.f64(ptr addrspace(4) [[PTR]], double [[DATA]]) -; CHECK-NEXT: [[MIN:%.*]] = call double @llvm.amdgcn.flat.atomic.fmin.f64.p4.f64(ptr addrspace(4) [[PTR]], double [[DATA]]) -; CHECK-NEXT: ret void -; - %cast = addrspacecast ptr addrspace(4) %ptr to ptr - %max = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %cast, double %data) - %min = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %cast, double %data) - ret void -} - -define amdgpu_kernel void @flat_atomic_fadd_f64_p5(ptr addrspace(5) %ptr, double %data) { -; CHECK-LABEL: define amdgpu_kernel void @flat_atomic_fadd_f64_p5 -; CHECK-SAME: (ptr addrspace(5) [[PTR:%.*]], double [[DATA:%.*]]) { -; CHECK-NEXT: [[CAST:%.*]] = addrspacecast ptr addrspace(5) [[PTR]] to ptr -; CHECK-NEXT: [[MAX:%.*]] = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr [[CAST]], double [[DATA]]) -; CHECK-NEXT: [[MIN:%.*]] = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr [[CAST]], double [[DATA]]) -; CHECK-NEXT: ret void -; - %cast = addrspacecast ptr addrspace(5) %ptr to ptr - %max = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %cast, double %data) - %min = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %cast, double %data) - ret void -} - -define amdgpu_kernel void @flat_atomic_fadd_f64_p6(ptr addrspace(6) %ptr, double %data) { -; CHECK-LABEL: define amdgpu_kernel void @flat_atomic_fadd_f64_p6 -; CHECK-SAME: (ptr addrspace(6) [[PTR:%.*]], double [[DATA:%.*]]) { -; CHECK-NEXT: [[MAX:%.*]] = call double @llvm.amdgcn.flat.atomic.fmax.f64.p6.f64(ptr addrspace(6) [[PTR]], double [[DATA]]) -; CHECK-NEXT: [[MIN:%.*]] = call double @llvm.amdgcn.flat.atomic.fmin.f64.p6.f64(ptr addrspace(6) [[PTR]], double [[DATA]]) -; CHECK-NEXT: ret void -; - %cast = addrspacecast ptr addrspace(6) %ptr to ptr - %max = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %cast, double %data) - %min = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %cast, double %data) - ret void -} - -define amdgpu_kernel void @flat_atomic_fadd_f64_p7(ptr addrspace(7) %ptr, double %data) { -; CHECK-LABEL: define amdgpu_kernel void @flat_atomic_fadd_f64_p7 -; CHECK-SAME: (ptr addrspace(7) [[PTR:%.*]], double [[DATA:%.*]]) { -; CHECK-NEXT: [[CAST:%.*]] = addrspacecast ptr addrspace(7) [[PTR]] to ptr -; CHECK-NEXT: [[MAX:%.*]] = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr [[CAST]], double [[DATA]]) -; CHECK-NEXT: [[MIN:%.*]] = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr [[CAST]], double [[DATA]]) -; CHECK-NEXT: ret void -; - %cast = addrspacecast ptr addrspace(7) %ptr to ptr - %max = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %cast, double %data) - %min = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %cast, double %data) - ret void -} - -define amdgpu_kernel void @flat_atomic_fadd_f64_p99(ptr addrspace(99) %ptr, double %data) { -; CHECK-LABEL: define amdgpu_kernel void @flat_atomic_fadd_f64_p99 -; CHECK-SAME: (ptr addrspace(99) [[PTR:%.*]], double [[DATA:%.*]]) { -; CHECK-NEXT: [[MAX:%.*]] = call double @llvm.amdgcn.flat.atomic.fmax.f64.p99.f64(ptr addrspace(99) [[PTR]], double [[DATA]]) -; CHECK-NEXT: [[MIN:%.*]] = call double @llvm.amdgcn.flat.atomic.fmin.f64.p99.f64(ptr addrspace(99) [[PTR]], double [[DATA]]) -; CHECK-NEXT: ret void -; - %cast = addrspacecast ptr addrspace(99) %ptr to ptr - %max = call double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %cast, double %data) - %min = call double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %cast, double %data) - ret void -} diff --git a/llvm/test/Transforms/InferAddressSpaces/AMDGPU/flat_atomic.ll b/llvm/test/Transforms/InferAddressSpaces/AMDGPU/flat_atomic.ll index 57e6fdb35113e6..a0856ac9127e65 100644 --- a/llvm/test/Transforms/InferAddressSpaces/AMDGPU/flat_atomic.ll +++ b/llvm/test/Transforms/InferAddressSpaces/AMDGPU/flat_atomic.ll @@ -1,9 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc -mtriple=amdgcn -mcpu=gfx90a < %s | FileCheck %s -declare double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr nocapture, double) #0 -declare double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr nocapture, double) #0 - define protected amdgpu_kernel void @InferNothing(i32 %a, ptr %b, double %c) { ; CHECK-LABEL: InferNothing: ; CHECK: ; %bb.0: ; %entry @@ -66,54 +63,6 @@ entry: ret void } -define protected amdgpu_kernel void @InferFmax(i32 %a, ptr addrspace(1) %b, double %c) { -; CHECK-LABEL: InferFmax: -; CHECK: ; %bb.0: ; %entry -; CHECK-NEXT: s_load_dword s0, s[2:3], 0x24 -; CHECK-NEXT: s_load_dwordx4 s[4:7], s[2:3], 0x2c -; CHECK-NEXT: v_mov_b32_e32 v2, 0 -; CHECK-NEXT: s_waitcnt lgkmcnt(0) -; CHECK-NEXT: s_ashr_i32 s1, s0, 31 -; CHECK-NEXT: s_lshl_b64 s[0:1], s[0:1], 3 -; CHECK-NEXT: s_add_u32 s0, s4, s0 -; CHECK-NEXT: v_mov_b32_e32 v0, s6 -; CHECK-NEXT: v_mov_b32_e32 v1, s7 -; CHECK-NEXT: s_addc_u32 s1, s5, s1 -; CHECK-NEXT: global_atomic_max_f64 v2, v[0:1], s[0:1] offset:-8 -; CHECK-NEXT: s_endpgm -entry: - %i = add nsw i32 %a, -1 - %i.2 = sext i32 %i to i64 - %i.3 = getelementptr inbounds double, ptr addrspace(1) %b, i64 %i.2 - %i.4 = addrspacecast ptr addrspace(1) %i.3 to ptr - %i.5 = tail call contract double @llvm.amdgcn.flat.atomic.fmax.f64.p0.f64(ptr %i.4, double %c) #1 - ret void -} - -define protected amdgpu_kernel void @InferFmin(i32 %a, ptr addrspace(1) %b, double %c) { -; CHECK-LABEL: InferFmin: -; CHECK: ; %bb.0: ; %entry -; CHECK-NEXT: s_load_dword s0, s[2:3], 0x24 -; CHECK-NEXT: s_load_dwordx4 s[4:7], s[2:3], 0x2c -; CHECK-NEXT: v_mov_b32_e32 v2, 0 -; CHECK-NEXT: s_waitcnt lgkmcnt(0) -; CHECK-NEXT: s_ashr_i32 s1, s0, 31 -; CHECK-NEXT: s_lshl_b64 s[0:1], s[0:1], 3 -; CHECK-NEXT: s_add_u32 s0, s4, s0 -; CHECK-NEXT: v_mov_b32_e32 v0, s6 -; CHECK-NEXT: v_mov_b32_e32 v1, s7 -; CHECK-NEXT: s_addc_u32 s1, s5, s1 -; CHECK-NEXT: global_atomic_min_f64 v2, v[0:1], s[0:1] offset:-8 -; CHECK-NEXT: s_endpgm -entry: - %i = add nsw i32 %a, -1 - %i.2 = sext i32 %i to i64 - %i.3 = getelementptr inbounds double, ptr addrspace(1) %b, i64 %i.2 - %i.4 = addrspacecast ptr addrspace(1) %i.3 to ptr - %i.5 = tail call contract double @llvm.amdgcn.flat.atomic.fmin.f64.p0.f64(ptr %i.4, double %c) #1 - ret void -} - define protected amdgpu_kernel void @InferMixed(i32 %a, ptr addrspace(1) %b, double %c, ptr %d) { ; CHECK-LABEL: InferMixed: ; CHECK: ; %bb.0: ; %entry @@ -131,7 +80,7 @@ define protected amdgpu_kernel void @InferMixed(i32 %a, ptr addrspace(1) %b, dou ; CHECK-NEXT: v_mbcnt_hi_u32_b32 v0, s1, v0 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0 ; CHECK-NEXT: s_and_saveexec_b64 s[8:9], vcc -; CHECK-NEXT: s_cbranch_execz .LBB4_2 +; CHECK-NEXT: s_cbranch_execz .LBB2_2 ; CHECK-NEXT: ; %bb.1: ; CHECK-NEXT: s_load_dword s2, s[2:3], 0x24 ; CHECK-NEXT: v_mov_b32_e32 v2, 0 @@ -146,7 +95,7 @@ define protected amdgpu_kernel void @InferMixed(i32 %a, ptr addrspace(1) %b, dou ; CHECK-NEXT: global_atomic_add_f64 v2, v[0:1], s[2:3] offset:-7 ; CHECK-NEXT: s_waitcnt vmcnt(0) ; CHECK-NEXT: buffer_wbinvl1_vol -; CHECK-NEXT: .LBB4_2: +; CHECK-NEXT: .LBB2_2: ; CHECK-NEXT: s_endpgm entry: %i = add nsw i32 %a, -1 @@ -180,17 +129,17 @@ define protected amdgpu_kernel void @InferPHI(i32 %a, ptr addrspace(1) %b, doubl ; CHECK-NEXT: s_cselect_b64 s[0:1], -1, 0 ; CHECK-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[0:1] ; CHECK-NEXT: v_cmp_ne_u32_e64 s[0:1], 1, v0 -; CHECK-NEXT: .LBB5_1: ; %bb0 +; CHECK-NEXT: .LBB3_1: ; %bb0 ; CHECK-NEXT: ; =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: s_and_b64 vcc, exec, s[0:1] -; CHECK-NEXT: s_cbranch_vccnz .LBB5_1 +; CHECK-NEXT: s_cbranch_vccnz .LBB3_1 ; CHECK-NEXT: ; %bb.2: ; %bb1 ; CHECK-NEXT: s_mov_b64 s[0:1], exec ; CHECK-NEXT: v_mbcnt_lo_u32_b32 v0, s0, 0 ; CHECK-NEXT: v_mbcnt_hi_u32_b32 v0, s1, v0 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0 ; CHECK-NEXT: s_and_saveexec_b64 s[4:5], vcc -; CHECK-NEXT: s_cbranch_execz .LBB5_4 +; CHECK-NEXT: s_cbranch_execz .LBB3_4 ; CHECK-NEXT: ; %bb.3: ; CHECK-NEXT: s_bcnt1_i32_b64 s0, s[0:1] ; CHECK-NEXT: v_cvt_f64_u32_e32 v[0:1], s0 @@ -199,7 +148,7 @@ define protected amdgpu_kernel void @InferPHI(i32 %a, ptr addrspace(1) %b, doubl ; CHECK-NEXT: global_atomic_add_f64 v2, v[0:1], s[2:3] ; CHECK-NEXT: s_waitcnt vmcnt(0) ; CHECK-NEXT: buffer_wbinvl1_vol -; CHECK-NEXT: .LBB5_4: +; CHECK-NEXT: .LBB3_4: ; CHECK-NEXT: s_endpgm entry: %i = add nsw i32 %a, -1 From 3dba4ca155e0b460ca82917b25d3624eb5825940 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Wed, 9 Oct 2024 14:22:24 +1100 Subject: [PATCH 029/129] [ORC][MachO] Remove the ExecutionSession& argument to MachOPlatform constructor. We can get a reference to the ExecutionSession from the ObjectLinkingLayer argument, so there's no need to pass it in separately. --- llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h | 3 +-- llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h b/llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h index 565f5aef0f4924..19f935d6658234 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h @@ -292,8 +292,7 @@ class MachOPlatform : public Platform { static MachOExecutorSymbolFlags flagsForSymbol(jitlink::Symbol &Sym); - MachOPlatform(ExecutionSession &ES, ObjectLinkingLayer &ObjLinkingLayer, - JITDylib &PlatformJD, + MachOPlatform(ObjectLinkingLayer &ObjLinkingLayer, JITDylib &PlatformJD, std::unique_ptr OrcRuntimeGenerator, HeaderOptions PlatformJDOpts, MachOHeaderMUBuilder BuildMachOHeaderMU, Error &Err); diff --git a/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp b/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp index f728323d460eb9..e5609053c74d7b 100644 --- a/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp +++ b/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp @@ -329,7 +329,7 @@ MachOPlatform::Create(ObjectLinkingLayer &ObjLinkingLayer, JITDylib &PlatformJD, // Create the instance. Error Err = Error::success(); auto P = std::unique_ptr(new MachOPlatform( - ES, ObjLinkingLayer, PlatformJD, std::move(OrcRuntime), + ObjLinkingLayer, PlatformJD, std::move(OrcRuntime), std::move(PlatformJDOpts), std::move(BuildMachOHeaderMU), Err)); if (Err) return std::move(Err); @@ -473,12 +473,12 @@ MachOPlatform::flagsForSymbol(jitlink::Symbol &Sym) { } MachOPlatform::MachOPlatform( - ExecutionSession &ES, ObjectLinkingLayer &ObjLinkingLayer, - JITDylib &PlatformJD, + ObjectLinkingLayer &ObjLinkingLayer, JITDylib &PlatformJD, std::unique_ptr OrcRuntimeGenerator, HeaderOptions PlatformJDOpts, MachOHeaderMUBuilder BuildMachOHeaderMU, Error &Err) - : ES(ES), PlatformJD(PlatformJD), ObjLinkingLayer(ObjLinkingLayer), + : ES(ObjLinkingLayer.getExecutionSession()), PlatformJD(PlatformJD), + ObjLinkingLayer(ObjLinkingLayer), BuildMachOHeaderMU(std::move(BuildMachOHeaderMU)) { ErrorAsOutParameter _(&Err); ObjLinkingLayer.addPlugin(std::make_unique(*this)); From 55dd29c61d1bd5509504ef0c6014b3879567eb17 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 8 Oct 2024 23:02:04 -0700 Subject: [PATCH 030/129] [llvm-profdata] Avoid repeated hash lookups (NFC) (#111629) --- llvm/tools/llvm-profdata/llvm-profdata.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/llvm/tools/llvm-profdata/llvm-profdata.cpp b/llvm/tools/llvm-profdata/llvm-profdata.cpp index 8a36726769f221..17933e4500ead6 100644 --- a/llvm/tools/llvm-profdata/llvm-profdata.cpp +++ b/llvm/tools/llvm-profdata/llvm-profdata.cpp @@ -1220,11 +1220,9 @@ adjustInstrProfile(std::unique_ptr &WC, } } - if (!StaticFuncMap.contains(NewName)) { - StaticFuncMap[NewName] = Name; - } else { - StaticFuncMap[NewName] = DuplicateNameStr; - } + auto [It, Inserted] = StaticFuncMap.try_emplace(NewName, Name); + if (!Inserted) + It->second = DuplicateNameStr; }; // We need to flatten the SampleFDO profile as the InstrFDO From b26aac5a440d03791a367a1ee19d0341b68a28bc Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Tue, 8 Oct 2024 22:44:11 -0700 Subject: [PATCH 031/129] [sanitizer] Report -> VReport for ThreadLister failure --- .../sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp index 73ba884052a3a3..d9f803a276dadc 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp +++ b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp @@ -217,7 +217,7 @@ bool ThreadSuspender::SuspendAllThreads() { switch (thread_lister.ListThreads(&threads)) { case ThreadLister::Error: ResumeAllThreads(); - Report("Failed to list threads\n"); + VReport(1, "Failed to list threads\n"); return false; case ThreadLister::Incomplete: retry = true; From a06591b4d4fb270b587fc5ef67b5a03dad752b40 Mon Sep 17 00:00:00 2001 From: Hristo Hristov Date: Wed, 9 Oct 2024 09:19:14 +0300 Subject: [PATCH 032/129] [libc++][type_traits] P2674R1: A trait for implicit lifetime types (#106870) Implements P2674R1: https://wg21.link/P2674R1 - https://eel.is/c++draft/type.traits - https://eel.is/c++draft/meta.type.synop - https://eel.is/c++draft/meta.unary.prop - https://eel.is/c++draft/support.limits - https://eel.is/c++draft/version.syn Implementation details: - Uses compiler intrinsic `__builtin_is_implicit_lifetime`: - https://github.com/llvm/llvm-project/pull/101807 - Tests based on: - https://github.com/llvm/llvm-project/blob/d213981c80626698a07b11ce872acba098a863d4/clang/test/SemaCXX/type-traits.cpp#L1989 References: - Implicit-lifetime - Implicit-lifetime types [basic.types.general]/9: https://eel.is/c++draft/basic.types.general - Implicit-lifetime class [class.prop]/9: https://eel.is/c++draft/class.prop - P0593R6 Implicit creation of objects for low-level object manipulation: https://wg21.link/P0593R6 - P1010R1 Container support for implicit lifetime types: https://wg21.link/P1010R1 - P0593R6 Implicit creation of objects for low-level object manipulation: https://wg21.link/P0593R6 Closes: #105259 --------- Co-authored-by: Hristo Hristov --- libcxx/docs/FeatureTestMacroTable.rst | 2 + libcxx/docs/ReleaseNotes/20.rst | 1 + libcxx/docs/Status/Cxx23Papers.csv | 2 +- libcxx/include/CMakeLists.txt | 1 + .../__type_traits/is_implicit_lifetime.h | 35 +++ libcxx/include/module.modulemap | 4 + libcxx/include/type_traits | 8 + libcxx/include/version | 4 + libcxx/modules/std/type_traits.inc | 8 +- .../type_traits.version.compile.pass.cpp | 43 ++++ .../version.version.compile.pass.cpp | 43 ++++ .../is_implicit_lifetime.pass.cpp | 237 ++++++++++++++++++ .../is_implicit_lifetime.verify.cpp | 26 ++ .../generate_feature_test_macro_components.py | 7 + 14 files changed, 418 insertions(+), 3 deletions(-) create mode 100644 libcxx/include/__type_traits/is_implicit_lifetime.h create mode 100644 libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp create mode 100644 libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.verify.cpp diff --git a/libcxx/docs/FeatureTestMacroTable.rst b/libcxx/docs/FeatureTestMacroTable.rst index c909a4300db1a6..05b08da5215350 100644 --- a/libcxx/docs/FeatureTestMacroTable.rst +++ b/libcxx/docs/FeatureTestMacroTable.rst @@ -336,6 +336,8 @@ Status ---------------------------------------------------------- ----------------- ``__cpp_lib_ios_noreplace`` ``202207L`` ---------------------------------------------------------- ----------------- + ``__cpp_lib_is_implicit_lifetime`` ``202302L`` + ---------------------------------------------------------- ----------------- ``__cpp_lib_is_scoped_enum`` ``202011L`` ---------------------------------------------------------- ----------------- ``__cpp_lib_mdspan`` ``202207L`` diff --git a/libcxx/docs/ReleaseNotes/20.rst b/libcxx/docs/ReleaseNotes/20.rst index 82c8286b69e23c..dcb1102d81d641 100644 --- a/libcxx/docs/ReleaseNotes/20.rst +++ b/libcxx/docs/ReleaseNotes/20.rst @@ -42,6 +42,7 @@ Implemented Papers - P2609R3: Relaxing Ranges Just A Smidge (`Github `__) - P2985R0: A type trait for detecting virtual base classes (`Github `__) - ``std::jthread`` and ```` are not guarded behind ``-fexperimental-library`` anymore +- P2674R1: A trait for implicit lifetime types (`Github `__) Improvements and New Features ----------------------------- diff --git a/libcxx/docs/Status/Cxx23Papers.csv b/libcxx/docs/Status/Cxx23Papers.csv index e1d7bb8f37863e..da7b5881877135 100644 --- a/libcxx/docs/Status/Cxx23Papers.csv +++ b/libcxx/docs/Status/Cxx23Papers.csv @@ -113,7 +113,7 @@ "`P2572R1 `__","``std::format`` fill character allowances","2023-02 (Issaquah)","|Complete|","17.0","" "`P2693R1 `__","Formatting ``thread::id`` and ``stacktrace``","2023-02 (Issaquah)","|Partial|","","The formatter for ``stacktrace`` is not implemented, since ``stacktrace`` is not implemented yet" "`P2679R2 `__","Fixing ``std::start_lifetime_as`` for arrays","2023-02 (Issaquah)","","","" -"`P2674R1 `__","A trait for implicit lifetime types","2023-02 (Issaquah)","","","" +"`P2674R1 `__","A trait for implicit lifetime types","2023-02 (Issaquah)","|Complete|","20.0","" "`P2655R3 `__","``common_reference_t`` of ``reference_wrapper`` Should Be a Reference Type","2023-02 (Issaquah)","","","" "`P2652R2 `__","Disallow User Specialization of ``allocator_traits``","2023-02 (Issaquah)","|Complete|","19.0","" "`P2787R1 `__","``pmr::generator`` - Promise Types are not Values","2023-02 (Issaquah)","","","" diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt index 9bd1b41b8bfac4..c2a597f49e317f 100644 --- a/libcxx/include/CMakeLists.txt +++ b/libcxx/include/CMakeLists.txt @@ -787,6 +787,7 @@ set(files __type_traits/is_floating_point.h __type_traits/is_function.h __type_traits/is_fundamental.h + __type_traits/is_implicit_lifetime.h __type_traits/is_implicitly_default_constructible.h __type_traits/is_integral.h __type_traits/is_literal_type.h diff --git a/libcxx/include/__type_traits/is_implicit_lifetime.h b/libcxx/include/__type_traits/is_implicit_lifetime.h new file mode 100644 index 00000000000000..2aba420bd2b59d --- /dev/null +++ b/libcxx/include/__type_traits/is_implicit_lifetime.h @@ -0,0 +1,35 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___TYPE_TRAITS_IS_IMPLICIT_LIFETIME_H +#define _LIBCPP___TYPE_TRAITS_IS_IMPLICIT_LIFETIME_H + +#include <__config> +#include <__type_traits/integral_constant.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +#if _LIBCPP_STD_VER >= 23 +# if __has_builtin(__builtin_is_implicit_lifetime) + +template +struct _LIBCPP_TEMPLATE_VIS is_implicit_lifetime : public bool_constant<__builtin_is_implicit_lifetime(_Tp)> {}; + +template +inline constexpr bool is_implicit_lifetime_v = __builtin_is_implicit_lifetime(_Tp); + +# endif +#endif + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___TYPE_TRAITS_IS_IMPLICIT_LIFETIME_H diff --git a/libcxx/include/module.modulemap b/libcxx/include/module.modulemap index dee9b0b88b7948..22a1313498e73e 100644 --- a/libcxx/include/module.modulemap +++ b/libcxx/include/module.modulemap @@ -200,6 +200,10 @@ module std_core [system] { header "__type_traits/is_fundamental.h" export std_core.type_traits.integral_constant } + module is_implicit_lifetime { + header "__type_traits/is_implicit_lifetime.h" + export std_core.type_traits.integral_constant + } module is_implicitly_default_constructible { header "__type_traits/is_implicitly_default_constructible.h" export std_core.type_traits.integral_constant diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits index 26c85f2284e2fd..baeed35ca8508b 100644 --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -137,6 +137,8 @@ namespace std template struct is_nothrow_swappable; // C++17 template struct is_nothrow_destructible; + template struct is_implicit_lifetime; // Since C++23 + template struct has_virtual_destructor; template struct has_unique_object_representations; // C++17 @@ -374,6 +376,8 @@ namespace std = is_nothrow_swappable::value; // C++17 template inline constexpr bool is_nothrow_destructible_v = is_nothrow_destructible::value; // C++17 + template + constexpr bool is_implicit_lifetime_v = is_implicit_lifetime::value; // Since C++23 template inline constexpr bool has_virtual_destructor_v = has_virtual_destructor::value; // C++17 template inline constexpr bool has_unique_object_representations_v // C++17 @@ -516,6 +520,10 @@ namespace std # include <__type_traits/unwrap_ref.h> #endif +#if _LIBCPP_STD_VER >= 23 +# include <__type_traits/is_implicit_lifetime.h> +#endif + #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/version b/libcxx/include/version index 5d679caac0b3b7..88387e311636c2 100644 --- a/libcxx/include/version +++ b/libcxx/include/version @@ -138,6 +138,7 @@ __cpp_lib_ios_noreplace 202207L __cpp_lib_is_aggregate 201703L __cpp_lib_is_constant_evaluated 201811L __cpp_lib_is_final 201402L +__cpp_lib_is_implicit_lifetime 202302L __cpp_lib_is_invocable 201703L __cpp_lib_is_layout_compatible 201907L __cpp_lib_is_nothrow_convertible 201806L @@ -473,6 +474,9 @@ __cpp_lib_void_t 201411L # define __cpp_lib_forward_like 202207L # define __cpp_lib_invoke_r 202106L # define __cpp_lib_ios_noreplace 202207L +# if __has_builtin(__builtin_is_implicit_lifetime) +# define __cpp_lib_is_implicit_lifetime 202302L +# endif # define __cpp_lib_is_scoped_enum 202011L # define __cpp_lib_mdspan 202207L # define __cpp_lib_modules 202207L diff --git a/libcxx/modules/std/type_traits.inc b/libcxx/modules/std/type_traits.inc index 485a5ddf63aed0..f544f95c7aaaae 100644 --- a/libcxx/modules/std/type_traits.inc +++ b/libcxx/modules/std/type_traits.inc @@ -98,7 +98,9 @@ export namespace std { using std::is_nothrow_destructible; - // using std::is_implicit_lifetime; +#if _LIBCPP_STD_VER >= 23 && __has_builtin(__builtin_is_implicit_lifetime) + using std::is_implicit_lifetime; +#endif using std::has_virtual_destructor; @@ -246,7 +248,9 @@ export namespace std { using std::is_destructible_v; using std::is_empty_v; using std::is_final_v; - // using std::is_implicit_lifetime_v; +#if _LIBCPP_STD_VER >= 23 && __has_builtin(__builtin_is_implicit_lifetime) + using std::is_implicit_lifetime_v; +#endif using std::is_move_assignable_v; using std::is_move_constructible_v; using std::is_nothrow_assignable_v; diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.compile.pass.cpp index 1cbf2699a95bcc..d9d698ace2b653 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.compile.pass.cpp @@ -23,6 +23,7 @@ __cpp_lib_is_aggregate 201703L [C++17] __cpp_lib_is_constant_evaluated 201811L [C++20] __cpp_lib_is_final 201402L [C++14] + __cpp_lib_is_implicit_lifetime 202302L [C++23] __cpp_lib_is_invocable 201703L [C++17] __cpp_lib_is_layout_compatible 201907L [C++20] __cpp_lib_is_nothrow_convertible 201806L [C++20] @@ -75,6 +76,10 @@ # error "__cpp_lib_is_final should not be defined before c++14" # endif +# ifdef __cpp_lib_is_implicit_lifetime +# error "__cpp_lib_is_implicit_lifetime should not be defined before c++23" +# endif + # ifdef __cpp_lib_is_invocable # error "__cpp_lib_is_invocable should not be defined before c++17" # endif @@ -179,6 +184,10 @@ # error "__cpp_lib_is_final should have the value 201402L in c++14" # endif +# ifdef __cpp_lib_is_implicit_lifetime +# error "__cpp_lib_is_implicit_lifetime should not be defined before c++23" +# endif + # ifdef __cpp_lib_is_invocable # error "__cpp_lib_is_invocable should not be defined before c++17" # endif @@ -301,6 +310,10 @@ # error "__cpp_lib_is_final should have the value 201402L in c++17" # endif +# ifdef __cpp_lib_is_implicit_lifetime +# error "__cpp_lib_is_implicit_lifetime should not be defined before c++23" +# endif + # ifndef __cpp_lib_is_invocable # error "__cpp_lib_is_invocable should be defined in c++17" # endif @@ -444,6 +457,10 @@ # error "__cpp_lib_is_final should have the value 201402L in c++20" # endif +# ifdef __cpp_lib_is_implicit_lifetime +# error "__cpp_lib_is_implicit_lifetime should not be defined before c++23" +# endif + # ifndef __cpp_lib_is_invocable # error "__cpp_lib_is_invocable should be defined in c++20" # endif @@ -614,6 +631,19 @@ # error "__cpp_lib_is_final should have the value 201402L in c++23" # endif +# if __has_builtin(__builtin_is_implicit_lifetime) +# ifndef __cpp_lib_is_implicit_lifetime +# error "__cpp_lib_is_implicit_lifetime should be defined in c++23" +# endif +# if __cpp_lib_is_implicit_lifetime != 202302L +# error "__cpp_lib_is_implicit_lifetime should have the value 202302L in c++23" +# endif +# else +# ifdef __cpp_lib_is_implicit_lifetime +# error "__cpp_lib_is_implicit_lifetime should not be defined when the requirement '__has_builtin(__builtin_is_implicit_lifetime)' is not met!" +# endif +# endif + # ifndef __cpp_lib_is_invocable # error "__cpp_lib_is_invocable should be defined in c++23" # endif @@ -796,6 +826,19 @@ # error "__cpp_lib_is_final should have the value 201402L in c++26" # endif +# if __has_builtin(__builtin_is_implicit_lifetime) +# ifndef __cpp_lib_is_implicit_lifetime +# error "__cpp_lib_is_implicit_lifetime should be defined in c++26" +# endif +# if __cpp_lib_is_implicit_lifetime != 202302L +# error "__cpp_lib_is_implicit_lifetime should have the value 202302L in c++26" +# endif +# else +# ifdef __cpp_lib_is_implicit_lifetime +# error "__cpp_lib_is_implicit_lifetime should not be defined when the requirement '__has_builtin(__builtin_is_implicit_lifetime)' is not met!" +# endif +# endif + # ifndef __cpp_lib_is_invocable # error "__cpp_lib_is_invocable should be defined in c++26" # endif diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp index 985ffeffab96db..0614f64a2ef04d 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp @@ -125,6 +125,7 @@ __cpp_lib_is_aggregate 201703L [C++17] __cpp_lib_is_constant_evaluated 201811L [C++20] __cpp_lib_is_final 201402L [C++14] + __cpp_lib_is_implicit_lifetime 202302L [C++23] __cpp_lib_is_invocable 201703L [C++17] __cpp_lib_is_layout_compatible 201907L [C++20] __cpp_lib_is_nothrow_convertible 201806L [C++20] @@ -671,6 +672,10 @@ # error "__cpp_lib_is_final should not be defined before c++14" # endif +# ifdef __cpp_lib_is_implicit_lifetime +# error "__cpp_lib_is_implicit_lifetime should not be defined before c++23" +# endif + # ifdef __cpp_lib_is_invocable # error "__cpp_lib_is_invocable should not be defined before c++17" # endif @@ -1550,6 +1555,10 @@ # error "__cpp_lib_is_final should have the value 201402L in c++14" # endif +# ifdef __cpp_lib_is_implicit_lifetime +# error "__cpp_lib_is_implicit_lifetime should not be defined before c++23" +# endif + # ifdef __cpp_lib_is_invocable # error "__cpp_lib_is_invocable should not be defined before c++17" # endif @@ -2564,6 +2573,10 @@ # error "__cpp_lib_is_final should have the value 201402L in c++17" # endif +# ifdef __cpp_lib_is_implicit_lifetime +# error "__cpp_lib_is_implicit_lifetime should not be defined before c++23" +# endif + # ifndef __cpp_lib_is_invocable # error "__cpp_lib_is_invocable should be defined in c++17" # endif @@ -3842,6 +3855,10 @@ # error "__cpp_lib_is_final should have the value 201402L in c++20" # endif +# ifdef __cpp_lib_is_implicit_lifetime +# error "__cpp_lib_is_implicit_lifetime should not be defined before c++23" +# endif + # ifndef __cpp_lib_is_invocable # error "__cpp_lib_is_invocable should be defined in c++20" # endif @@ -5306,6 +5323,19 @@ # error "__cpp_lib_is_final should have the value 201402L in c++23" # endif +# if __has_builtin(__builtin_is_implicit_lifetime) +# ifndef __cpp_lib_is_implicit_lifetime +# error "__cpp_lib_is_implicit_lifetime should be defined in c++23" +# endif +# if __cpp_lib_is_implicit_lifetime != 202302L +# error "__cpp_lib_is_implicit_lifetime should have the value 202302L in c++23" +# endif +# else +# ifdef __cpp_lib_is_implicit_lifetime +# error "__cpp_lib_is_implicit_lifetime should not be defined when the requirement '__has_builtin(__builtin_is_implicit_lifetime)' is not met!" +# endif +# endif + # ifndef __cpp_lib_is_invocable # error "__cpp_lib_is_invocable should be defined in c++23" # endif @@ -7112,6 +7142,19 @@ # error "__cpp_lib_is_final should have the value 201402L in c++26" # endif +# if __has_builtin(__builtin_is_implicit_lifetime) +# ifndef __cpp_lib_is_implicit_lifetime +# error "__cpp_lib_is_implicit_lifetime should be defined in c++26" +# endif +# if __cpp_lib_is_implicit_lifetime != 202302L +# error "__cpp_lib_is_implicit_lifetime should have the value 202302L in c++26" +# endif +# else +# ifdef __cpp_lib_is_implicit_lifetime +# error "__cpp_lib_is_implicit_lifetime should not be defined when the requirement '__has_builtin(__builtin_is_implicit_lifetime)' is not met!" +# endif +# endif + # ifndef __cpp_lib_is_invocable # error "__cpp_lib_is_invocable should be defined in c++26" # endif diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp new file mode 100644 index 00000000000000..a6ab77158aae1d --- /dev/null +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp @@ -0,0 +1,237 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20 + +// These compilers don't support __builtin_is_implicit_lifetime yet. +// UNSUPPORTED: clang-17, clang-18, clang-19, gcc-14, apple-clang-15, apple-clang-16 + +// + +// template struct is_implicit_lifetime; + +#include +#include +#include +#include +#include + +#include "test_macros.h" +#include "type_algorithms.h" + +enum Enum { EV }; +enum SignedEnum : signed int {}; +enum UnsignedEnum : unsigned int {}; + +enum class EnumClass { EV }; +enum class SignedEnumClass : signed int {}; +enum class UnsignedEnumClass : unsigned int {}; + +struct EmptyStruct {}; +struct IncompleteStruct; + +struct NoEligibleTrivialContructor { + NoEligibleTrivialContructor() {}; + NoEligibleTrivialContructor(const NoEligibleTrivialContructor&) {} + NoEligibleTrivialContructor(NoEligibleTrivialContructor&&) {} +}; + +struct OnlyDefaultConstructorIsTrivial { + OnlyDefaultConstructorIsTrivial() = default; + OnlyDefaultConstructorIsTrivial(const OnlyDefaultConstructorIsTrivial&) {} + OnlyDefaultConstructorIsTrivial(OnlyDefaultConstructorIsTrivial&&) {} +}; + +struct AllContstructorsAreTrivial { + AllContstructorsAreTrivial() = default; + AllContstructorsAreTrivial(const AllContstructorsAreTrivial&) = default; + AllContstructorsAreTrivial(AllContstructorsAreTrivial&&) = default; +}; + +struct InheritedNoEligibleTrivialConstructor : NoEligibleTrivialContructor { + using NoEligibleTrivialContructor::NoEligibleTrivialContructor; +}; + +struct InheritedOnlyDefaultConstructorIsTrivial : OnlyDefaultConstructorIsTrivial { + using OnlyDefaultConstructorIsTrivial::OnlyDefaultConstructorIsTrivial; +}; + +struct InheritedAllContstructorsAreTrivial : AllContstructorsAreTrivial { + using AllContstructorsAreTrivial::AllContstructorsAreTrivial; +}; + +struct UserDeclaredDestructor { + ~UserDeclaredDestructor() = default; +}; + +struct UserProvidedDestructor { + ~UserProvidedDestructor() {} +}; + +struct UserDeletedDestructorInAggregate { + ~UserDeletedDestructorInAggregate() = delete; +}; + +struct UserDeletedDestructorInNonAggregate { + virtual void NonAggregate(); + ~UserDeletedDestructorInNonAggregate() = delete; +}; + +struct DeletedDestructorViaBaseInAggregate : UserDeletedDestructorInAggregate {}; +struct DeletedDestructorViaBaseInNonAggregate : UserDeletedDestructorInNonAggregate {}; + +template +struct ConstrainedUserDeclaredDefaultConstructor { + ConstrainedUserDeclaredDefaultConstructor() + requires B + = default; + ConstrainedUserDeclaredDefaultConstructor(const ConstrainedUserDeclaredDefaultConstructor&) {} +}; + +template +struct ConstrainedUserProvidedDestructor { + ~ConstrainedUserProvidedDestructor() = default; + ~ConstrainedUserProvidedDestructor() + requires B + {} +}; + +struct StructWithFlexibleArrayMember { + int arr[]; +}; + +struct StructWithZeroSizedArray { + int arr[0]; +}; + +// Test implicit-lifetime type +template +constexpr void test_is_implicit_lifetime() { + assert(std::is_implicit_lifetime::value == Expected); + assert(std::is_implicit_lifetime_v == Expected); +} + +// Test pointer, reference, array, etc. types +template +constexpr void test_is_implicit_lifetime() { + test_is_implicit_lifetime(); + + // cv-qualified + test_is_implicit_lifetime(); + test_is_implicit_lifetime(); + + test_is_implicit_lifetime(); + test_is_implicit_lifetime(); + + // Pointer types + test_is_implicit_lifetime(); + + // Arrays + test_is_implicit_lifetime(); + test_is_implicit_lifetime(); +} + +struct AritmeticTypesTest { + template + constexpr void operator()() { + test_is_implicit_lifetime(); + } +}; + +constexpr bool test() { + // Standard fundamental C++ types + + test_is_implicit_lifetime(); + + test_is_implicit_lifetime(); + test_is_implicit_lifetime(); + test_is_implicit_lifetime(); + + types::for_each(types::arithmetic_types(), AritmeticTypesTest{}); + + test_is_implicit_lifetime(); + test_is_implicit_lifetime(); + test_is_implicit_lifetime(); + + test_is_implicit_lifetime(); + test_is_implicit_lifetime(); + test_is_implicit_lifetime(); + + test_is_implicit_lifetime(); + test_is_implicit_lifetime(); + test_is_implicit_lifetime(); + test_is_implicit_lifetime(); + test_is_implicit_lifetime(); + + // Implicit-lifetime class types + + test_is_implicit_lifetime(); + test_is_implicit_lifetime(); // Pointer-to-member + test_is_implicit_lifetime(); + test_is_implicit_lifetime(); + test_is_implicit_lifetime(); + test_is_implicit_lifetime(); + + test_is_implicit_lifetime(); + test_is_implicit_lifetime(); + + test_is_implicit_lifetime(); + + test_is_implicit_lifetime(); + + test_is_implicit_lifetime(); + + test_is_implicit_lifetime(); + + test_is_implicit_lifetime(); + + test_is_implicit_lifetime(); + + test_is_implicit_lifetime(); + + test_is_implicit_lifetime(); + + test_is_implicit_lifetime(); + + test_is_implicit_lifetime(); + + test_is_implicit_lifetime(); + + test_is_implicit_lifetime(); + + test_is_implicit_lifetime, true>(); + test_is_implicit_lifetime, false>(); + + test_is_implicit_lifetime, false>(); + test_is_implicit_lifetime, true>(); + + test_is_implicit_lifetime(); + + test_is_implicit_lifetime(); + + // C++ standard library types + + test_is_implicit_lifetime>(); + test_is_implicit_lifetime>(); + + // Standard C23 types + +#ifdef TEST_COMPILER_CLANG + test_is_implicit_lifetime<_BitInt(8)>(); + test_is_implicit_lifetime<_BitInt(128)>(); +#endif + + return true; +} + +int main(int, char**) { + test(); + static_assert(test()); + + return 0; +} diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.verify.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.verify.cpp new file mode 100644 index 00000000000000..25bba30da612e6 --- /dev/null +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.verify.cpp @@ -0,0 +1,26 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20 + +// These compilers don't support __builtin_is_implicit_lifetime yet. +// UNSUPPORTED: clang-17, clang-18, clang-19, gcc-14, apple-clang-15, apple-clang-16 + +// + +// template struct is_implicit_lifetime; + +#include + +struct IncompleteStruct; + +// expected-error@*:* {{incomplete type 'IncompleteStruct' used in type trait expression}} +static_assert(!std::is_implicit_lifetime::value); + +// expected-error@*:* {{incomplete type 'IncompleteStruct' used in type trait expression}} +static_assert(!std::is_implicit_lifetime_v); diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py index 3b8a52362ede68..db14c1781dc35a 100755 --- a/libcxx/utils/generate_feature_test_macro_components.py +++ b/libcxx/utils/generate_feature_test_macro_components.py @@ -742,6 +742,13 @@ def add_version_header(tc): "values": {"c++14": 201402}, "headers": ["type_traits"], }, + { + "name": "__cpp_lib_is_implicit_lifetime", + "values": {"c++23": 202302}, + "headers": ["type_traits"], + "test_suite_guard": "__has_builtin(__builtin_is_implicit_lifetime)", + "libcxx_guard": "__has_builtin(__builtin_is_implicit_lifetime)", + }, { "name": "__cpp_lib_is_invocable", "values": {"c++17": 201703}, From 3c1d9b8ec7474f076ddd842d2b6c562728e9b90a Mon Sep 17 00:00:00 2001 From: LLVM GN Syncbot Date: Wed, 9 Oct 2024 06:19:45 +0000 Subject: [PATCH 033/129] [gn build] Port a06591b4d4fb --- llvm/utils/gn/secondary/libcxx/include/BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm/utils/gn/secondary/libcxx/include/BUILD.gn b/llvm/utils/gn/secondary/libcxx/include/BUILD.gn index d850a7f20952d9..5f2e0dd90da072 100644 --- a/llvm/utils/gn/secondary/libcxx/include/BUILD.gn +++ b/llvm/utils/gn/secondary/libcxx/include/BUILD.gn @@ -859,6 +859,7 @@ if (current_toolchain == default_toolchain) { "__type_traits/is_floating_point.h", "__type_traits/is_function.h", "__type_traits/is_fundamental.h", + "__type_traits/is_implicit_lifetime.h", "__type_traits/is_implicitly_default_constructible.h", "__type_traits/is_integral.h", "__type_traits/is_literal_type.h", From fb2960aad93f6c02e0ea8de0568c0aef8896eee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 9 Oct 2024 09:30:32 +0300 Subject: [PATCH 034/129] [compiler-rt] [profile] Add missing (void) to prototypes, for C sources (#110642) If built as part of the main llvm build, via ENABLE_LLVM_PROJECTS=compiler-rt, the code gets built with more warning options than if built standalone. Some of these trigger warnings like: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] --- compiler-rt/lib/profile/InstrProfiling.h | 16 ++++++++-------- compiler-rt/lib/profile/InstrProfilingInternal.h | 6 +++--- compiler-rt/lib/profile/InstrProfilingPort.h | 2 +- compiler-rt/lib/profile/InstrProfilingUtil.h | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/compiler-rt/lib/profile/InstrProfiling.h b/compiler-rt/lib/profile/InstrProfiling.h index 6906d52eacaf1b..9e43fd7c4789d8 100644 --- a/compiler-rt/lib/profile/InstrProfiling.h +++ b/compiler-rt/lib/profile/InstrProfiling.h @@ -114,11 +114,11 @@ char *__llvm_profile_begin_counters(void); char *__llvm_profile_end_counters(void); char *__llvm_profile_begin_bitmap(void); char *__llvm_profile_end_bitmap(void); -ValueProfNode *__llvm_profile_begin_vnodes(); -ValueProfNode *__llvm_profile_end_vnodes(); -const VTableProfData *__llvm_profile_begin_vtables(); -const VTableProfData *__llvm_profile_end_vtables(); -uint32_t *__llvm_profile_begin_orderfile(); +ValueProfNode *__llvm_profile_begin_vnodes(void); +ValueProfNode *__llvm_profile_end_vnodes(void); +const VTableProfData *__llvm_profile_begin_vtables(void); +const VTableProfData *__llvm_profile_end_vtables(void); +uint32_t *__llvm_profile_begin_orderfile(void); /*! * \brief Merge profile data from buffer. @@ -216,7 +216,7 @@ void __llvm_profile_initialize(void); * merge mode is turned on for instrumented programs with shared libs). * Side-effect: this API call will invoke malloc with dynamic memory allocation. */ -const char *__llvm_profile_get_path_prefix(); +const char *__llvm_profile_get_path_prefix(void); /*! * \brief Return filename (including path) of the profile data. Note that if the @@ -229,7 +229,7 @@ const char *__llvm_profile_get_path_prefix(); * instrumented image/DSO). This API only retrieves the filename from the copy * of the runtime available to the calling image. */ -const char *__llvm_profile_get_filename(); +const char *__llvm_profile_get_filename(void); /*! \brief Get the magic token for the file format. */ uint64_t __llvm_profile_get_magic(void); @@ -293,7 +293,7 @@ int __llvm_profile_get_padding_sizes_for_counters( * certain processes in case the processes don't have permission to write to * the disks, and trying to do so would result in side effects such as crashes. */ -void __llvm_profile_set_dumped(); +void __llvm_profile_set_dumped(void); /*! * This variable is defined in InstrProfilingRuntime.cpp as a hidden diff --git a/compiler-rt/lib/profile/InstrProfilingInternal.h b/compiler-rt/lib/profile/InstrProfilingInternal.h index d5bd0e41fb1291..b100343ca04f9e 100644 --- a/compiler-rt/lib/profile/InstrProfilingInternal.h +++ b/compiler-rt/lib/profile/InstrProfilingInternal.h @@ -167,20 +167,20 @@ int lprofWriteDataImpl(ProfDataWriter *Writer, void lprofMergeValueProfData(struct ValueProfData *SrcValueProfData, __llvm_profile_data *DstData); -VPDataReaderType *lprofGetVPDataReader(); +VPDataReaderType *lprofGetVPDataReader(void); /* Internal interface used by test to reset the max number of * tracked values per value site to be \p MaxVals. */ void lprofSetMaxValsPerSite(uint32_t MaxVals); -void lprofSetupValueProfiler(); +void lprofSetupValueProfiler(void); /* Return the profile header 'signature' value associated with the current * executable or shared library. The signature value can be used to for * a profile name that is unique to this load module so that it does not * collide with profiles from other binaries. It also allows shared libraries * to dump merged profile data into its own profile file. */ -uint64_t lprofGetLoadModuleSignature(); +uint64_t lprofGetLoadModuleSignature(void); /* * Return non zero value if the profile data has already been diff --git a/compiler-rt/lib/profile/InstrProfilingPort.h b/compiler-rt/lib/profile/InstrProfilingPort.h index ed0905cc5f2022..f77699ee8d59cf 100644 --- a/compiler-rt/lib/profile/InstrProfilingPort.h +++ b/compiler-rt/lib/profile/InstrProfilingPort.h @@ -111,7 +111,7 @@ #if defined(_WIN32) #include -static inline size_t getpagesize() { +static inline size_t getpagesize(void) { SYSTEM_INFO S; GetNativeSystemInfo(&S); return S.dwPageSize; diff --git a/compiler-rt/lib/profile/InstrProfilingUtil.h b/compiler-rt/lib/profile/InstrProfilingUtil.h index 841204b6ea8a38..227c2aa0a7caea 100644 --- a/compiler-rt/lib/profile/InstrProfilingUtil.h +++ b/compiler-rt/lib/profile/InstrProfilingUtil.h @@ -69,10 +69,10 @@ void *lprofPtrFetchAdd(void **Mem, long ByteIncr); /* Temporarily suspend SIGKILL. Return value of 1 means a restore is needed. * Other return values mean no restore is needed. */ -int lprofSuspendSigKill(); +int lprofSuspendSigKill(void); /* Restore previously suspended SIGKILL. */ -void lprofRestoreSigKill(); +void lprofRestoreSigKill(void); static inline size_t lprofRoundUpTo(size_t x, size_t boundary) { return (x + boundary - 1) & ~(boundary - 1); From 3be691651a2143f23bcf8f2704e55b01bbaa2550 Mon Sep 17 00:00:00 2001 From: Thomas Fransham Date: Wed, 9 Oct 2024 07:41:28 +0100 Subject: [PATCH 035/129] Add symbol visibility macros to abi-breaking.h.cmake (#110898) Annotating these symbols will fix missing symbols errors for Bugpoint when when the default symbol visibility is set to hidden for LLVM. This is part of the work to enable LLVM_BUILD_LLVM_DYLIB and plugins on window. Co-authored-by: Tom Stellard --- llvm/include/llvm/Config/abi-breaking.h.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/Config/abi-breaking.h.cmake b/llvm/include/llvm/Config/abi-breaking.h.cmake index 2d27e02b1d5457..81495f0569752c 100644 --- a/llvm/include/llvm/Config/abi-breaking.h.cmake +++ b/llvm/include/llvm/Config/abi-breaking.h.cmake @@ -12,6 +12,8 @@ #ifndef LLVM_ABI_BREAKING_CHECKS_H #define LLVM_ABI_BREAKING_CHECKS_H +#include "llvm/Support/Compiler.h" + /* Define to enable checks that alter the LLVM C++ ABI */ #cmakedefine01 LLVM_ENABLE_ABI_BREAKING_CHECKS @@ -43,12 +45,12 @@ #endif namespace llvm { #if LLVM_ENABLE_ABI_BREAKING_CHECKS -extern int EnableABIBreakingChecks; +LLVM_ABI extern int EnableABIBreakingChecks; LLVM_HIDDEN_VISIBILITY __attribute__((weak)) int *VerifyEnableABIBreakingChecks = &EnableABIBreakingChecks; #else -extern int DisableABIBreakingChecks; +LLVM_ABI extern int DisableABIBreakingChecks; LLVM_HIDDEN_VISIBILITY __attribute__((weak)) int *VerifyDisableABIBreakingChecks = &DisableABIBreakingChecks; From ada6372e52547ba0090f52a2e9e9d95d7eca28d3 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Mon, 7 Oct 2024 15:33:30 +0200 Subject: [PATCH 036/129] Revert "[clang] Finish implementation of P0522 (#96023)" This caused Clang to reject valid code, see discussion on the PR https://github.com/llvm/llvm-project/pull/96023#issuecomment-2393228464 and https://github.com/llvm/llvm-project/issues/111363 This reverts commit 6afe56732a172d3f2cbd0330b1fcb34bbfd002a9 and follow-up commit 9abb97f9663a27fe5b8e346ed557b3435aa9ec2f. --- clang/docs/ReleaseNotes.rst | 10 - .../clang/Basic/DiagnosticSemaKinds.td | 7 - clang/include/clang/Sema/Sema.h | 14 +- clang/lib/Frontend/FrontendActions.cpp | 2 - clang/lib/Sema/SemaTemplate.cpp | 115 +++--- clang/lib/Sema/SemaTemplateDeduction.cpp | 362 +++++------------- clang/lib/Sema/SemaTemplateInstantiate.cpp | 15 - .../temp/temp.arg/temp.arg.template/p3-0x.cpp | 31 +- .../temp.deduct/temp.deduct.type/p9-0x.cpp | 4 - clang/test/CXX/temp/temp.param/p12.cpp | 21 +- clang/test/Modules/cxx-templates.cpp | 15 +- clang/test/SemaCXX/make_integer_seq.cpp | 5 +- clang/test/SemaTemplate/cwg2398.cpp | 166 +------- clang/test/SemaTemplate/temp_arg_nontype.cpp | 26 +- clang/test/SemaTemplate/temp_arg_template.cpp | 38 +- .../SemaTemplate/temp_arg_template_p0522.cpp | 80 ++-- .../Templight/templight-empty-entries-fix.cpp | 12 - .../templight-prior-template-arg.cpp | 33 +- .../type_traits/is_specialization.verify.cpp | 2 +- 19 files changed, 277 insertions(+), 681 deletions(-) diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 8d02cc3eae9fd9..36e8126bcda6ad 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -174,10 +174,6 @@ C++23 Feature Support C++20 Feature Support ^^^^^^^^^^^^^^^^^^^^^ -C++17 Feature Support -^^^^^^^^^^^^^^^^^^^^^ -- The implementation of the relaxed template template argument matching rules is - more complete and reliable, and should provide more accurate diagnostics. Resolutions to C++ Defect Reports ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -335,10 +331,6 @@ Improvements to Clang's diagnostics - Clang now diagnoses when the result of a [[nodiscard]] function is discarded after being cast in C. Fixes #GH104391. -- Clang now properly explains the reason a template template argument failed to - match a template template parameter, in terms of the C++17 relaxed matching rules - instead of the old ones. - - Don't emit duplicated dangling diagnostics. (#GH93386). - Improved diagnostic when trying to befriend a concept. (#GH45182). @@ -444,8 +436,6 @@ Bug Fixes to C++ Support - Correctly check constraints of explicit instantiations of member functions. (#GH46029) - When performing partial ordering of function templates, clang now checks that the deduction was consistent. Fixes (#GH18291). -- Fixes to several issues in partial ordering of template template parameters, which - were documented in the test suite. - Fixed an assertion failure about a constraint of a friend function template references to a value with greater template depth than the friend function template. (#GH98258) - Clang now rebuilds the template parameters of out-of-line declarations and specializations in the context diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 583475327c5227..057c3e6861a5fb 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -5262,13 +5262,6 @@ def note_template_arg_refers_here_func : Note< def err_template_arg_template_params_mismatch : Error< "template template argument has different template parameters than its " "corresponding template template parameter">; -def note_template_arg_template_params_mismatch : Note< - "template template argument has different template parameters than its " - "corresponding template template parameter">; -def err_non_deduced_mismatch : Error< - "could not match %diff{$ against $|types}0,1">; -def err_inconsistent_deduction : Error< - "conflicting deduction %diff{$ against $|types}0,1 for parameter">; def err_template_arg_not_integral_or_enumeral : Error< "non-type template argument of type %0 must have an integral or enumeration" " type">; diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index 043456438b6d03..86053bd7da1725 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -12417,9 +12417,8 @@ class Sema final : public SemaBase { sema::TemplateDeductionInfo &Info); bool isTemplateTemplateParameterAtLeastAsSpecializedAs( - TemplateParameterList *PParam, TemplateDecl *PArg, TemplateDecl *AArg, - const DefaultArguments &DefaultArgs, SourceLocation ArgLoc, - bool IsDeduced); + TemplateParameterList *PParam, TemplateDecl *AArg, + const DefaultArguments &DefaultArgs, SourceLocation Loc, bool IsDeduced); /// Mark which template parameters are used in a given expression. /// @@ -12728,9 +12727,6 @@ class Sema final : public SemaBase { /// We are instantiating a type alias template declaration. TypeAliasTemplateInstantiation, - - /// We are performing partial ordering for template template parameters. - PartialOrderingTTP, } Kind; /// Was the enclosing context a non-instantiation SFINAE context? @@ -12952,12 +12948,6 @@ class Sema final : public SemaBase { TemplateDecl *Entity, BuildingDeductionGuidesTag, SourceRange InstantiationRange = SourceRange()); - struct PartialOrderingTTP {}; - /// \brief Note that we are partial ordering template template parameters. - InstantiatingTemplate(Sema &SemaRef, SourceLocation ArgLoc, - PartialOrderingTTP, TemplateDecl *PArg, - SourceRange InstantiationRange = SourceRange()); - /// Note that we have finished instantiating this template. void Clear(); diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp index e4b462b9b0fd81..64f90c493c1055 100644 --- a/clang/lib/Frontend/FrontendActions.cpp +++ b/clang/lib/Frontend/FrontendActions.cpp @@ -457,8 +457,6 @@ class DefaultTemplateInstCallback : public TemplateInstantiationCallback { return "BuildingDeductionGuides"; case CodeSynthesisContext::TypeAliasTemplateInstantiation: return "TypeAliasTemplateInstantiation"; - case CodeSynthesisContext::PartialOrderingTTP: - return "PartialOrderingTTP"; } return ""; } diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index b1a34edba9150b..dfd56debc75e99 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -5498,7 +5498,8 @@ bool Sema::CheckTemplateArgumentList( DefaultArgs && ParamIdx >= DefaultArgs.StartPos) { // All written arguments should have been consumed by this point. assert(ArgIdx == NumArgs && "bad default argument deduction"); - if (ParamIdx == DefaultArgs.StartPos) { + // FIXME: Don't ignore parameter packs. + if (ParamIdx == DefaultArgs.StartPos && !(*Param)->isParameterPack()) { assert(Param + DefaultArgs.Args.size() <= ParamEnd); // Default arguments from a DeducedTemplateName are already converted. for (const TemplateArgument &DefArg : DefaultArgs.Args) { @@ -5575,6 +5576,9 @@ bool Sema::CheckTemplateArgumentList( return true; } + // We're now done with this argument. + ++ArgIdx; + if ((*Param)->isTemplateParameterPack()) { // The template parameter was a template parameter pack, so take the // deduced argument and place it on the argument pack. Note that we @@ -5585,19 +5589,8 @@ bool Sema::CheckTemplateArgumentList( } else { // Move to the next template parameter. ++Param; - if (PartialOrderingTTP && PackExpansionIntoNonPack) { - // Keep converting the pattern in the argument against - // subsequent parameters. The argument is converted - // in place and will be added back when we are done. - SugaredConverted.pop_back(); - CanonicalConverted.pop_back(); - continue; - } } - // We're now done with this argument. - ++ArgIdx; - // If we just saw a pack expansion into a non-pack, then directly convert // the remaining arguments, because we don't know what parameters they'll // match up with. @@ -5731,10 +5724,14 @@ bool Sema::CheckTemplateArgumentList( // pack expansions; they might be empty. This can happen even if // PartialTemplateArgs is false (the list of arguments is complete but // still dependent). - while (ArgIdx < NumArgs && NewArgs[ArgIdx].getArgument().isPackExpansion()) { - const TemplateArgument &Arg = NewArgs[ArgIdx++].getArgument(); - SugaredConverted.push_back(Arg); - CanonicalConverted.push_back(Context.getCanonicalTemplateArgument(Arg)); + if (ArgIdx < NumArgs && CurrentInstantiationScope && + CurrentInstantiationScope->getPartiallySubstitutedPack()) { + while (ArgIdx < NumArgs && + NewArgs[ArgIdx].getArgument().isPackExpansion()) { + const TemplateArgument &Arg = NewArgs[ArgIdx++].getArgument(); + SugaredConverted.push_back(Arg); + CanonicalConverted.push_back(Context.getCanonicalTemplateArgument(Arg)); + } } // If we have any leftover arguments, then there were too many arguments. @@ -7324,46 +7321,64 @@ bool Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param, << Template; } - if (!getLangOpts().RelaxedTemplateTemplateArgs) - return !TemplateParameterListsAreEqual( - Template->getTemplateParameters(), Params, /*Complain=*/true, - TPL_TemplateTemplateArgumentMatch, Arg.getLocation()); - // C++1z [temp.arg.template]p3: (DR 150) // A template-argument matches a template template-parameter P when P // is at least as specialized as the template-argument A. - if (!isTemplateTemplateParameterAtLeastAsSpecializedAs( - Params, Param, Template, DefaultArgs, Arg.getLocation(), IsDeduced)) - return true; - // P2113 - // C++20[temp.func.order]p2 - // [...] If both deductions succeed, the partial ordering selects the - // more constrained template (if one exists) as determined below. - SmallVector ParamsAC, TemplateAC; - Params->getAssociatedConstraints(ParamsAC); - // C++20[temp.arg.template]p3 - // [...] In this comparison, if P is unconstrained, the constraints on A - // are not considered. - if (ParamsAC.empty()) - return false; + if (getLangOpts().RelaxedTemplateTemplateArgs) { + // Quick check for the common case: + // If P contains a parameter pack, then A [...] matches P if each of A's + // template parameters matches the corresponding template parameter in + // the template-parameter-list of P. + if (TemplateParameterListsAreEqual( + Template->getTemplateParameters(), Params, false, + TPL_TemplateTemplateArgumentMatch, Arg.getLocation()) && + // If the argument has no associated constraints, then the parameter is + // definitely at least as specialized as the argument. + // Otherwise - we need a more thorough check. + !Template->hasAssociatedConstraints()) + return false; - Template->getAssociatedConstraints(TemplateAC); + if (isTemplateTemplateParameterAtLeastAsSpecializedAs( + Params, Template, DefaultArgs, Arg.getLocation(), IsDeduced)) { + // P2113 + // C++20[temp.func.order]p2 + // [...] If both deductions succeed, the partial ordering selects the + // more constrained template (if one exists) as determined below. + SmallVector ParamsAC, TemplateAC; + Params->getAssociatedConstraints(ParamsAC); + // C++2a[temp.arg.template]p3 + // [...] In this comparison, if P is unconstrained, the constraints on A + // are not considered. + if (ParamsAC.empty()) + return false; - bool IsParamAtLeastAsConstrained; - if (IsAtLeastAsConstrained(Param, ParamsAC, Template, TemplateAC, - IsParamAtLeastAsConstrained)) - return true; - if (!IsParamAtLeastAsConstrained) { - Diag(Arg.getLocation(), - diag::err_template_template_parameter_not_at_least_as_constrained) - << Template << Param << Arg.getSourceRange(); - Diag(Param->getLocation(), diag::note_entity_declared_at) << Param; - Diag(Template->getLocation(), diag::note_entity_declared_at) << Template; - MaybeEmitAmbiguousAtomicConstraintsDiagnostic(Param, ParamsAC, Template, - TemplateAC); - return true; + Template->getAssociatedConstraints(TemplateAC); + + bool IsParamAtLeastAsConstrained; + if (IsAtLeastAsConstrained(Param, ParamsAC, Template, TemplateAC, + IsParamAtLeastAsConstrained)) + return true; + if (!IsParamAtLeastAsConstrained) { + Diag(Arg.getLocation(), + diag::err_template_template_parameter_not_at_least_as_constrained) + << Template << Param << Arg.getSourceRange(); + Diag(Param->getLocation(), diag::note_entity_declared_at) << Param; + Diag(Template->getLocation(), diag::note_entity_declared_at) + << Template; + MaybeEmitAmbiguousAtomicConstraintsDiagnostic(Param, ParamsAC, Template, + TemplateAC); + return true; + } + return false; + } + // FIXME: Produce better diagnostics for deduction failures. } - return false; + + return !TemplateParameterListsAreEqual(Template->getTemplateParameters(), + Params, + true, + TPL_TemplateTemplateArgumentMatch, + Arg.getLocation()); } static Sema::SemaDiagnosticBuilder noteLocation(Sema &S, const NamedDecl &Decl, diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp index f9a8d2d9ff0b1d..dfae0d6cda0d9b 100644 --- a/clang/lib/Sema/SemaTemplateDeduction.cpp +++ b/clang/lib/Sema/SemaTemplateDeduction.cpp @@ -145,9 +145,7 @@ static TemplateDeductionResult DeduceTemplateArgumentsByTypeMatch( PartialOrderingKind POK, bool DeducedFromArrayBound, bool *HasDeducedAnyParam); -/// What directions packs are allowed to match non-packs. -enum class PackFold { ParameterToArgument, ArgumentToParameter, Both }; - +enum class PackFold { ParameterToArgument, ArgumentToParameter }; static TemplateDeductionResult DeduceTemplateArguments(Sema &S, TemplateParameterList *TemplateParams, ArrayRef Ps, @@ -1713,21 +1711,7 @@ static TemplateDeductionResult DeduceTemplateArgumentsByTypeMatch( DeducedTemplateArgument Result = checkDeducedTemplateArguments(S.Context, Deduced[Index], NewDeduced); if (Result.isNull()) { - // We can also get inconsistencies when matching NTTP type. - switch (NamedDecl *Param = TemplateParams->getParam(Index); - Param->getKind()) { - case Decl::TemplateTypeParm: - Info.Param = cast(Param); - break; - case Decl::NonTypeTemplateParm: - Info.Param = cast(Param); - break; - case Decl::TemplateTemplateParm: - Info.Param = cast(Param); - break; - default: - llvm_unreachable("unexpected kind"); - } + Info.Param = cast(TemplateParams->getParam(Index)); Info.FirstArg = Deduced[Index]; Info.SecondArg = NewDeduced; return TemplateDeductionResult::Inconsistent; @@ -2565,31 +2549,8 @@ DeduceTemplateArguments(Sema &S, TemplateParameterList *TemplateParams, if (const NonTypeTemplateParmDecl *NTTP = getDeducedParameterFromExpr(Info, P.getAsExpr())) { switch (A.getKind()) { - case TemplateArgument::Expression: { - const Expr *E = A.getAsExpr(); - // When checking NTTP, if either the parameter or the argument is - // dependent, as there would be otherwise nothing to deduce, we force - // the argument to the parameter type using this dependent implicit - // cast, in order to maintain invariants. Now we can deduce the - // resulting type from the original type, and deduce the original type - // against the parameter we are checking. - if (const auto *ICE = dyn_cast(E); - ICE && ICE->getCastKind() == clang::CK_Dependent) { - E = ICE->getSubExpr(); - if (auto Result = DeduceTemplateArgumentsByTypeMatch( - S, TemplateParams, ICE->getType(), E->getType(), Info, - Deduced, TDF_SkipNonDependent, - PartialOrdering ? PartialOrderingKind::NonCall - : PartialOrderingKind::None, - /*DeducedFromArrayBound=*/false, HasDeducedAnyParam); - Result != TemplateDeductionResult::Success) - return Result; - } - return DeduceNonTypeTemplateArgument( - S, TemplateParams, NTTP, DeducedTemplateArgument(A), E->getType(), - Info, PartialOrdering, Deduced, HasDeducedAnyParam); - } case TemplateArgument::Integral: + case TemplateArgument::Expression: case TemplateArgument::StructuralValue: return DeduceNonTypeTemplateArgument( S, TemplateParams, NTTP, DeducedTemplateArgument(A), @@ -2678,75 +2639,50 @@ DeduceTemplateArguments(Sema &S, TemplateParameterList *TemplateParams, SmallVectorImpl &Deduced, bool NumberOfArgumentsMustMatch, bool PartialOrdering, PackFold PackFold, bool *HasDeducedAnyParam) { - bool FoldPackParameter = PackFold == PackFold::ParameterToArgument || - PackFold == PackFold::Both, - FoldPackArgument = PackFold == PackFold::ArgumentToParameter || - PackFold == PackFold::Both; - + if (PackFold == PackFold::ArgumentToParameter) + std::swap(Ps, As); // C++0x [temp.deduct.type]p9: // If the template argument list of P contains a pack expansion that is not // the last template argument, the entire template argument list is a // non-deduced context. - if (FoldPackParameter && hasPackExpansionBeforeEnd(Ps)) - return TemplateDeductionResult::Success; - - if (FoldPackArgument && hasPackExpansionBeforeEnd(As)) + if (hasPackExpansionBeforeEnd(Ps)) return TemplateDeductionResult::Success; // C++0x [temp.deduct.type]p9: // If P has a form that contains or , then each argument Pi of the // respective template argument list P is compared with the corresponding // argument Ai of the corresponding template argument list of A. - for (unsigned ArgIdx = 0, ParamIdx = 0; /**/; /**/) { - if (!hasTemplateArgumentForDeduction(Ps, ParamIdx)) - return !FoldPackParameter && hasTemplateArgumentForDeduction(As, ArgIdx) - ? TemplateDeductionResult::MiscellaneousDeductionFailure - : TemplateDeductionResult::Success; - - if (!Ps[ParamIdx].isPackExpansion()) { + unsigned ArgIdx = 0, ParamIdx = 0; + for (; hasTemplateArgumentForDeduction(Ps, ParamIdx); ++ParamIdx) { + const TemplateArgument &P = Ps[ParamIdx]; + if (!P.isPackExpansion()) { // The simple case: deduce template arguments by matching Pi and Ai. // Check whether we have enough arguments. if (!hasTemplateArgumentForDeduction(As, ArgIdx)) - return !FoldPackArgument && NumberOfArgumentsMustMatch + return NumberOfArgumentsMustMatch ? TemplateDeductionResult::MiscellaneousDeductionFailure : TemplateDeductionResult::Success; - if (As[ArgIdx].isPackExpansion()) { - // C++1z [temp.deduct.type]p9: - // During partial ordering, if Ai was originally a pack expansion - // [and] Pi is not a pack expansion, template argument deduction - // fails. - if (!FoldPackArgument) - return TemplateDeductionResult::MiscellaneousDeductionFailure; - - TemplateArgument Pattern = As[ArgIdx].getPackExpansionPattern(); - for (;;) { - // Deduce template parameters from the pattern. - if (auto Result = DeduceTemplateArguments( - S, TemplateParams, Ps[ParamIdx], Pattern, Info, - PartialOrdering, Deduced, HasDeducedAnyParam); - Result != TemplateDeductionResult::Success) - return Result; + // C++1z [temp.deduct.type]p9: + // During partial ordering, if Ai was originally a pack expansion [and] + // Pi is not a pack expansion, template argument deduction fails. + if (As[ArgIdx].isPackExpansion()) + return TemplateDeductionResult::MiscellaneousDeductionFailure; - ++ParamIdx; - if (!hasTemplateArgumentForDeduction(Ps, ParamIdx)) - return TemplateDeductionResult::Success; - if (Ps[ParamIdx].isPackExpansion()) - break; - } - } else { - // Perform deduction for this Pi/Ai pair. - if (auto Result = DeduceTemplateArguments( - S, TemplateParams, Ps[ParamIdx], As[ArgIdx], Info, - PartialOrdering, Deduced, HasDeducedAnyParam); - Result != TemplateDeductionResult::Success) - return Result; + // Perform deduction for this Pi/Ai pair. + TemplateArgument Pi = P, Ai = As[ArgIdx]; + if (PackFold == PackFold::ArgumentToParameter) + std::swap(Pi, Ai); + if (auto Result = DeduceTemplateArguments(S, TemplateParams, Pi, Ai, Info, + PartialOrdering, Deduced, + HasDeducedAnyParam); + Result != TemplateDeductionResult::Success) + return Result; - ++ArgIdx; - ++ParamIdx; - continue; - } + // Move to the next argument. + ++ArgIdx; + continue; } // The parameter is a pack expansion. @@ -2756,7 +2692,7 @@ DeduceTemplateArguments(Sema &S, TemplateParameterList *TemplateParams, // each remaining argument in the template argument list of A. Each // comparison deduces template arguments for subsequent positions in the // template parameter packs expanded by Pi. - TemplateArgument Pattern = Ps[ParamIdx].getPackExpansionPattern(); + TemplateArgument Pattern = P.getPackExpansionPattern(); // Prepare to deduce the packs within the pattern. PackDeductionScope PackScope(S, TemplateParams, Deduced, Info, Pattern); @@ -2767,12 +2703,13 @@ DeduceTemplateArguments(Sema &S, TemplateParameterList *TemplateParams, for (; hasTemplateArgumentForDeduction(As, ArgIdx) && PackScope.hasNextElement(); ++ArgIdx) { - if (!FoldPackParameter && !As[ArgIdx].isPackExpansion()) - return TemplateDeductionResult::MiscellaneousDeductionFailure; + TemplateArgument Pi = Pattern, Ai = As[ArgIdx]; + if (PackFold == PackFold::ArgumentToParameter) + std::swap(Pi, Ai); // Deduce template arguments from the pattern. - if (auto Result = DeduceTemplateArguments( - S, TemplateParams, Pattern, As[ArgIdx], Info, PartialOrdering, - Deduced, HasDeducedAnyParam); + if (auto Result = DeduceTemplateArguments(S, TemplateParams, Pi, Ai, Info, + PartialOrdering, Deduced, + HasDeducedAnyParam); Result != TemplateDeductionResult::Success) return Result; @@ -2781,8 +2718,12 @@ DeduceTemplateArguments(Sema &S, TemplateParameterList *TemplateParams, // Build argument packs for each of the parameter packs expanded by this // pack expansion. - return PackScope.finish(); + if (auto Result = PackScope.finish(); + Result != TemplateDeductionResult::Success) + return Result; } + + return TemplateDeductionResult::Success; } TemplateDeductionResult Sema::DeduceTemplateArguments( @@ -3334,6 +3275,7 @@ static TemplateDeductionResult FinishTemplateArgumentDeduction( // Unevaluated SFINAE context. EnterExpressionEvaluationContext Unevaluated( S, Sema::ExpressionEvaluationContext::Unevaluated); + Sema::SFINAETrap Trap(S); Sema::ContextRAII SavedContext(S, getAsDeclContextOrEnclosing(Template)); @@ -3350,42 +3292,21 @@ static TemplateDeductionResult FinishTemplateArgumentDeduction( return Result; // Check that we produced the correct argument list. - for (ArrayRef Ps = TemplateArgs, As = CanonicalBuilder; - !Ps.empty() && !As.empty(); - /**/) { - TemplateArgument P = Ps.front(), A = As.front(); - if (P.getKind() == TemplateArgument::Pack) { - assert(Ps.size() == 1 && "Pack not last element?"); - Ps = P.getPackAsArray(); - continue; - } - if (A.getKind() == TemplateArgument::Pack) { - assert(As.size() == 1 && "Pack not last element?"); - As = A.getPackAsArray(); - continue; + TemplateParameterList *TemplateParams = Template->getTemplateParameters(); + for (unsigned I = 0, E = TemplateParams->size(); I != E; ++I) { + TemplateArgument InstArg = CanonicalBuilder[I]; + if (!isSameTemplateArg(S.Context, TemplateArgs[I], InstArg, PartialOrdering, + /*PackExpansionMatchesPack=*/true)) { + Info.Param = makeTemplateParameter(TemplateParams->getParam(I)); + Info.FirstArg = TemplateArgs[I]; + Info.SecondArg = InstArg; + return TemplateDeductionResult::NonDeducedMismatch; } - - if (P.isPackExpansion()) - P = P.getPackExpansionPattern(); - else - Ps = Ps.drop_front(); - if (A.isPackExpansion()) - A = A.getPackExpansionPattern(); - else - As = As.drop_front(); - - if (isSameTemplateArg(S.Context, P, A, PartialOrdering)) - continue; - unsigned I = As.end() == CanonicalBuilder.end() - ? As.begin() - CanonicalBuilder.begin() - : CanonicalBuilder.size() - 1; - Info.Param = - makeTemplateParameter(Template->getTemplateParameters()->getParam(I)); - Info.FirstArg = P; - Info.SecondArg = A; - return TemplateDeductionResult::NonDeducedMismatch; } + if (Trap.hasErrorOccurred()) + return TemplateDeductionResult::SubstitutionFailure; + if (!PartialOrdering) { if (auto Result = CheckDeducedArgumentConstraints( S, Template, SugaredBuilder, CanonicalBuilder, Info); @@ -3406,6 +3327,7 @@ static TemplateDeductionResult FinishTemplateArgumentDeduction( // Unevaluated SFINAE context. EnterExpressionEvaluationContext Unevaluated( S, Sema::ExpressionEvaluationContext::Unevaluated); + Sema::SFINAETrap Trap(S); Sema::ContextRAII SavedContext(S, getAsDeclContextOrEnclosing(TD)); @@ -3414,13 +3336,20 @@ static TemplateDeductionResult FinishTemplateArgumentDeduction( // explicitly specified, template argument deduction fails. SmallVector SugaredBuilder, CanonicalBuilder; if (auto Result = ConvertDeducedTemplateArguments( - S, TD, /*IsDeduced=*/false, Deduced, Info, SugaredBuilder, + S, TD, /*IsPartialOrdering=*/false, Deduced, Info, SugaredBuilder, CanonicalBuilder); Result != TemplateDeductionResult::Success) return Result; - return ::CheckDeducedArgumentConstraints(S, TD, SugaredBuilder, - CanonicalBuilder, Info); + if (Trap.hasErrorOccurred()) + return TemplateDeductionResult::SubstitutionFailure; + + if (auto Result = CheckDeducedArgumentConstraints(S, TD, SugaredBuilder, + CanonicalBuilder, Info); + Result != TemplateDeductionResult::Success) + return Result; + + return TemplateDeductionResult::Success; } /// Perform template argument deduction to determine whether the given template @@ -3467,20 +3396,16 @@ DeduceTemplateArguments(Sema &S, T *Partial, if (Inst.isInvalid()) return TemplateDeductionResult::InstantiationDepth; + if (Trap.hasErrorOccurred()) + return TemplateDeductionResult::SubstitutionFailure; + TemplateDeductionResult Result; S.runWithSufficientStackSpace(Info.getLocation(), [&] { Result = ::FinishTemplateArgumentDeduction(S, Partial, /*IsPartialOrdering=*/false, TemplateArgs, Deduced, Info); }); - - if (Result != TemplateDeductionResult::Success) - return Result; - - if (Trap.hasErrorOccurred()) - return TemplateDeductionResult::SubstitutionFailure; - - return TemplateDeductionResult::Success; + return Result; } TemplateDeductionResult @@ -3536,18 +3461,14 @@ Sema::DeduceTemplateArgumentsFromType(TemplateDecl *TD, QualType FromType, if (Inst.isInvalid()) return TemplateDeductionResult::InstantiationDepth; + if (Trap.hasErrorOccurred()) + return TemplateDeductionResult::SubstitutionFailure; + TemplateDeductionResult Result; runWithSufficientStackSpace(Info.getLocation(), [&] { Result = ::FinishTemplateArgumentDeduction(*this, TD, Deduced, Info); }); - - if (Result != TemplateDeductionResult::Success) - return Result; - - if (Trap.hasErrorOccurred()) - return TemplateDeductionResult::SubstitutionFailure; - - return TemplateDeductionResult::Success; + return Result; } /// Determine whether the given type T is a simple-template-id type. @@ -6173,23 +6094,14 @@ static bool isAtLeastAsSpecializedAs(Sema &S, QualType T1, QualType T2, return false; const auto *TST1 = cast(T1); - - Sema::SFINAETrap Trap(S); - - TemplateDeductionResult Result; + bool AtLeastAsSpecialized; S.runWithSufficientStackSpace(Info.getLocation(), [&] { - Result = ::FinishTemplateArgumentDeduction( - S, P2, /*IsPartialOrdering=*/true, TST1->template_arguments(), Deduced, - Info); + AtLeastAsSpecialized = + FinishTemplateArgumentDeduction( + S, P2, /*IsPartialOrdering=*/true, TST1->template_arguments(), + Deduced, Info) == TemplateDeductionResult::Success; }); - - if (Result != TemplateDeductionResult::Success) - return false; - - if (Trap.hasErrorOccurred()) - return false; - - return true; + return AtLeastAsSpecialized; } namespace { @@ -6427,9 +6339,8 @@ bool Sema::isMoreSpecializedThanPrimary( } bool Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs( - TemplateParameterList *P, TemplateDecl *PArg, TemplateDecl *AArg, - const DefaultArguments &DefaultArgs, SourceLocation ArgLoc, - bool IsDeduced) { + TemplateParameterList *P, TemplateDecl *AArg, + const DefaultArguments &DefaultArgs, SourceLocation Loc, bool IsDeduced) { // C++1z [temp.arg.template]p4: (DR 150) // A template template-parameter P is at least as specialized as a // template template-argument A if, given the following rewrite to two @@ -6441,12 +6352,6 @@ bool Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs( // TemplateParameterList *A = AArg->getTemplateParameters(); - Sema::InstantiatingTemplate Inst( - *this, ArgLoc, Sema::InstantiatingTemplate::PartialOrderingTTP(), PArg, - SourceRange(P->getTemplateLoc(), P->getRAngleLoc())); - if (Inst.isInvalid()) - return false; - // Given an invented class template X with the template parameter list of // A (including default arguments): // - Each function template has a single function parameter whose type is @@ -6461,6 +6366,8 @@ bool Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs( // templates. SmallVector PArgs; { + SFINAETrap Trap(*this); + Context.getInjectedTemplateArgs(P, PArgs); TemplateArgumentListInfo PArgList(P->getLAngleLoc(), P->getRAngleLoc()); @@ -6480,17 +6387,18 @@ bool Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs( // C++1z [temp.arg.template]p3: // If the rewrite produces an invalid type, then P is not at least as // specialized as A. - SmallVector CanonicalPArgs; - if (CheckTemplateArgumentList(AArg, ArgLoc, PArgList, DefaultArgs, false, - PArgs, CanonicalPArgs, + SmallVector SugaredPArgs; + if (CheckTemplateArgumentList(AArg, Loc, PArgList, DefaultArgs, false, + SugaredPArgs, PArgs, /*UpdateArgsWithConversions=*/true, /*ConstraintsNotSatisfied=*/nullptr, - /*PartialOrderingTTP=*/true)) + /*PartialOrderTTP=*/true) || + Trap.hasErrorOccurred()) return false; } // Determine whether P1 is at least as specialized as P2. - TemplateDeductionInfo Info(ArgLoc, A->getDepth()); + TemplateDeductionInfo Info(Loc, A->getDepth()); SmallVector Deduced; Deduced.resize(A->size()); @@ -6505,89 +6413,29 @@ bool Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs( // be inverted between Ps and As. On non-deduced context, matching needs to // happen both ways, according to [temp.arg.template]p3, but this is // currently implemented as a special case elsewhere. - switch (::DeduceTemplateArguments( - *this, A, AArgs, PArgs, Info, Deduced, - /*NumberOfArgumentsMustMatch=*/false, /*PartialOrdering=*/true, - IsDeduced ? PackFold::ArgumentToParameter : PackFold::Both, - /*HasDeducedAnyParam=*/nullptr)) { - case clang::TemplateDeductionResult::Success: - break; - - case TemplateDeductionResult::MiscellaneousDeductionFailure: - Diag(AArg->getLocation(), diag::err_template_param_list_different_arity) - << (A->size() > P->size()) << /*isTemplateTemplateParameter=*/true - << SourceRange(A->getTemplateLoc(), P->getRAngleLoc()); + if (::DeduceTemplateArguments(*this, A, AArgs, PArgs, Info, Deduced, + /*NumberOfArgumentsMustMatch=*/false, + /*PartialOrdering=*/true, + IsDeduced ? PackFold::ArgumentToParameter + : PackFold::ParameterToArgument, + /*HasDeducedAnyParam=*/nullptr) != + TemplateDeductionResult::Success) return false; - case TemplateDeductionResult::NonDeducedMismatch: - Diag(AArg->getLocation(), diag::err_non_deduced_mismatch) - << Info.FirstArg << Info.SecondArg; - return false; - case TemplateDeductionResult::Inconsistent: - Diag(getAsNamedDecl(Info.Param)->getLocation(), - diag::err_inconsistent_deduction) - << Info.FirstArg << Info.SecondArg; - return false; - case TemplateDeductionResult::AlreadyDiagnosed: - return false; - - // None of these should happen for a plain deduction. - case TemplateDeductionResult::Invalid: - case TemplateDeductionResult::InstantiationDepth: - case TemplateDeductionResult::Incomplete: - case TemplateDeductionResult::IncompletePack: - case TemplateDeductionResult::Underqualified: - case TemplateDeductionResult::SubstitutionFailure: - case TemplateDeductionResult::DeducedMismatch: - case TemplateDeductionResult::DeducedMismatchNested: - case TemplateDeductionResult::TooManyArguments: - case TemplateDeductionResult::TooFewArguments: - case TemplateDeductionResult::InvalidExplicitArguments: - case TemplateDeductionResult::NonDependentConversionFailure: - case TemplateDeductionResult::ConstraintsNotSatisfied: - case TemplateDeductionResult::CUDATargetMismatch: - llvm_unreachable("Unexpected Result"); - } SmallVector DeducedArgs(Deduced.begin(), Deduced.end()); + Sema::InstantiatingTemplate Inst(*this, Info.getLocation(), AArg, DeducedArgs, + Info); + if (Inst.isInvalid()) + return false; - TemplateDeductionResult TDK; + bool AtLeastAsSpecialized; runWithSufficientStackSpace(Info.getLocation(), [&] { - TDK = ::FinishTemplateArgumentDeduction( - *this, AArg, /*IsPartialOrdering=*/true, PArgs, Deduced, Info); + AtLeastAsSpecialized = + ::FinishTemplateArgumentDeduction( + *this, AArg, /*IsPartialOrdering=*/true, PArgs, Deduced, Info) == + TemplateDeductionResult::Success; }); - switch (TDK) { - case TemplateDeductionResult::Success: - return true; - - // It doesn't seem possible to get a non-deduced mismatch when partial - // ordering TTPs. - case TemplateDeductionResult::NonDeducedMismatch: - llvm_unreachable("Unexpected NonDeducedMismatch"); - - // Substitution failures should have already been diagnosed. - case TemplateDeductionResult::AlreadyDiagnosed: - case TemplateDeductionResult::SubstitutionFailure: - case TemplateDeductionResult::InstantiationDepth: - return false; - - // None of these should happen when just converting deduced arguments. - case TemplateDeductionResult::Invalid: - case TemplateDeductionResult::Incomplete: - case TemplateDeductionResult::IncompletePack: - case TemplateDeductionResult::Inconsistent: - case TemplateDeductionResult::Underqualified: - case TemplateDeductionResult::DeducedMismatch: - case TemplateDeductionResult::DeducedMismatchNested: - case TemplateDeductionResult::TooManyArguments: - case TemplateDeductionResult::TooFewArguments: - case TemplateDeductionResult::InvalidExplicitArguments: - case TemplateDeductionResult::NonDependentConversionFailure: - case TemplateDeductionResult::ConstraintsNotSatisfied: - case TemplateDeductionResult::MiscellaneousDeductionFailure: - case TemplateDeductionResult::CUDATargetMismatch: - llvm_unreachable("Unexpected Result"); - } - llvm_unreachable("Unexpected TDK"); + return AtLeastAsSpecialized; } namespace { diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp index 9c5b3e7c9066c7..261ef4edf17593 100644 --- a/clang/lib/Sema/SemaTemplateInstantiate.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp @@ -573,7 +573,6 @@ bool Sema::CodeSynthesisContext::isInstantiationRecord() const { case LambdaExpressionSubstitution: case BuildingDeductionGuides: case TypeAliasTemplateInstantiation: - case PartialOrderingTTP: return false; // This function should never be called when Kind's value is Memoization. @@ -806,11 +805,6 @@ Sema::InstantiatingTemplate::InstantiatingTemplate( SemaRef, CodeSynthesisContext::BuildingDeductionGuides, PointOfInstantiation, InstantiationRange, Entity) {} -Sema::InstantiatingTemplate::InstantiatingTemplate( - Sema &SemaRef, SourceLocation ArgLoc, PartialOrderingTTP, - TemplateDecl *PArg, SourceRange InstantiationRange) - : InstantiatingTemplate(SemaRef, CodeSynthesisContext::PartialOrderingTTP, - ArgLoc, InstantiationRange, PArg) {} void Sema::pushCodeSynthesisContext(CodeSynthesisContext Ctx) { Ctx.SavedInNonInstantiationSFINAEContext = InNonInstantiationSFINAEContext; @@ -1250,14 +1244,6 @@ void Sema::PrintInstantiationStack() { << cast(Active->Entity) << Active->InstantiationRange; break; - case CodeSynthesisContext::PartialOrderingTTP: - Diags.Report(Active->PointOfInstantiation, - diag::note_template_arg_template_params_mismatch); - if (SourceLocation ParamLoc = Active->Entity->getLocation(); - ParamLoc.isValid()) - Diags.Report(ParamLoc, diag::note_template_prev_declaration) - << /*isTemplateTemplateParam=*/true << Active->InstantiationRange; - break; } } } @@ -1300,7 +1286,6 @@ std::optional Sema::isSFINAEContext() const { case CodeSynthesisContext::PriorTemplateArgumentSubstitution: case CodeSynthesisContext::DefaultTemplateArgumentChecking: case CodeSynthesisContext::RewritingOperatorAsSpaceship: - case CodeSynthesisContext::PartialOrderingTTP: // A default template argument instantiation and substitution into // template parameters with arguments for prior parameters may or may // not be a SFINAE context; look further up the stack. diff --git a/clang/test/CXX/temp/temp.arg/temp.arg.template/p3-0x.cpp b/clang/test/CXX/temp/temp.arg/temp.arg.template/p3-0x.cpp index ce27e6aa83c3b9..19793fe8263726 100644 --- a/clang/test/CXX/temp/temp.arg/temp.arg.template/p3-0x.cpp +++ b/clang/test/CXX/temp/temp.arg/temp.arg.template/p3-0x.cpp @@ -2,13 +2,13 @@ template struct eval; // expected-note 3{{template is declared here}} -template