summaryrefslogtreecommitdiff
path: root/polly/lib/CodeGen/LoopGeneratorsKMP.cpp
AgeCommit message (Collapse)Author
2025-04-24[RemoveDI][Polly] Use iterators instead of instruction pointers to ↵Karthika Devi C
SetInsertPoint (#135336) As part of the effort to transition to using Debug Records instead of Debug intrinsics, some API/argument changes are necessary to achieve the desired behavior from Debug Records. This particular fix involves passing iterators instead of instruction pointers to the SetInsertPoint function. While this is crucial in certain areas, it may be more than needed in others, but it does not cause any harm.
2024-10-17[Polly] Remove unused variable 'IdentTy' in LoopGeneratorsKMP.cpp (NFC)Jie Fu
/llvm-project/polly/lib/CodeGen/LoopGeneratorsKMP.cpp:396:15: error: unused variable 'IdentTy' [-Werror,-Wunused-variable] StructType *IdentTy = ^ /llvm-project/polly/lib/CodeGen/LoopGeneratorsKMP.cpp:460:15: error: unused variable 'IdentTy' [-Werror,-Wunused-variable] StructType *IdentTy = ^ 2 errors generated.
2024-10-17[polly] Avoid llvm::Type::getPointerTo() (NFC) (#112651)Youngsuk Kim
`llvm::Type::getPointerTo()` is to be deprecated & removed soon.
2024-08-10[Polly] Use separate DT/LI/SE for outlined subfn. NFC. (#102460)Michael Kruse
DominatorTree, LoopInfo, and ScalarEvolution are function-level analyses that expect to be called only on instructions and basic blocks of the function they were original created for. When Polly outlined a parallel loop body into a separate function, it reused the same analyses seemed to work until new checks to be added in #101198. This patch creates new analyses for the subfunctions. GenDT, GenLI, and GenSE now refer to the analyses of the current region of code. Outside of an outlined function, they refer to the same analysis as used for the SCoP, but are substituted within an outlined function. Additionally to the cross-function queries of DT/LI/SE, we must not create SCEVs that refer to a mix of expressions for old and generated values. Currently, SCEVs themselves do not "remember" which ScalarEvolution analysis they were created for, but mixing them is just as unexpected as using DT/LI across function boundaries. Hence `SCEVLoopAddRecRewriter` was combined into `ScopExpander`. `SCEVLoopAddRecRewriter` only replaced induction variables but left SCEVUnknowns to reference the old function. `SCEVParameterRewriter` would have done so but its job was effectively superseded by `ScopExpander`, and now also `SCEVLoopAddRecRewriter`. Some issues persist put marked with a FIXME in the code. Changing them would possibly cause this patch to be not NFC anymore.
2023-11-27[mlir,polly] Replace uses of IRBuilder::getInt8PtrTy with getPtrTy. NFCFangrui Song
2023-03-17[Polly] Remove some bitcasts (NFC)Nikita Popov
No longer relevant with opaque pointers.
2022-07-26[Polly] Insert !dbg metadata for emitted CallInsts.Michael Kruse
The IR Verifier requires that every call instruction to an inlineable function (among other things, its implementation must be visible in the translation unit) must also have !dbg metadata attached to it. When parallelizing, Polly emits calls to OpenMP runtime function out of thin air, or at least not directly derived from a bounded list of previous instruction. While we could search for instructions in the SCoP that has some debug info attached to it, there is no guarantee that we find any. Our solution is to generate a new DILocation that points to line 0 to represent optimized code. The OpenMP function implementation is usually not available in the user's translation unit, but can become visible in an LTO build. For the bug to appear, libomp must also be built with debug symbols. IMHO, the IR verifier rule is too strict. Runtime functions can also be inserted by other optimization passes, such as LoopIdiomRecognize. When inserting a call to e.g. memset, it uses the DebugLoc from a StoreInst from the unoptimized code. It is not required to have !dbg metadata attached either. Fixes #56692
2022-01-07Use nullptr instead of 0 or NULL (NFC)Kazu Hirata
Identified with modernize-use-nullptr.
2021-03-11[OpaquePtrs] Remove some uses of type-less CreateLoad APIs (NFC)Nikita Popov
Explicitly pass loaded type when creating loads, in preparation for the deprecation of these APIs. There are still a couple of uses left.
2020-11-30Creating a named struct requires only a Context and a name, but looking up a ↵Nick Lewycky
struct by name requires a Module. The method on Module merely accesses the LLVMContextImpl and no data from the module itself, so this patch moves getTypeByName to a static method on StructType that takes a Context and a name. There's a small number of users of this function, they are all updated. This updates the C API adding a new method LLVMGetTypeByName2 that takes a context and a name. Differential Revision: https://reviews.llvm.org/D78793
2020-04-03[polly][opaque pointers] Remove use of deprecated APIs.Eli Friedman
(See also D76269.)
2020-02-11[Polly] LLVM OpenMP Backend -- Fix "static chunked" scheduling.Michael Halkenhäuser
Static chunked OpenMP scheduling has not been treated correctly. This patch fixes the problem that threads would not process their (work-)chunks as intended. Differential Revision: https://reviews.llvm.org/D61081
2020-01-24[Alignment][NFC] Deprecate Align::None()Guillaume Chatelet
Summary: This is a follow up on https://reviews.llvm.org/D71473#inline-647262. There's a caveat here that `Align(1)` relies on the compiler understanding of `Log2_64` implementation to produce good code. One could use `Align()` as a replacement but I believe it is less clear that the alignment is one in that case. Reviewers: xbolva00, courbet, bollu Subscribers: arsenm, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, jrtc27, atanasyan, jsji, Jim, kerbowa, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D73099
2020-01-23[Alignment][NFC] Use Align with CreateAlignedStoreGuillaume Chatelet
Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet, bollu Subscribers: arsenm, jvesely, nhaehnle, hiraditya, kerbowa, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D73274
2019-10-15[Alignment][NFC] Remove dependency on GlobalObject::setAlignment(unsigned)Guillaume Chatelet
Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet Subscribers: arsenm, mehdi_amini, jvesely, nhaehnle, hiraditya, steven_wu, dexonsmith, dang, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68944 llvm-svn: 374880
2019-03-28Apply include-what-you-use #include removal suggestions. NFC.Michael Kruse
This removes unused includes (and forward declarations) as suggested by include-what-you-use. If a transitive include of a removed include is required to compile a file, I added the required header (or forward declaration if suggested by include-what-you-use). This should reduce compilation time and reduce the number of iterative recompilations when a header was changed. llvm-svn: 357209
2019-03-19[CodeGen] LLVM OpenMP Backend.Michael Kruse
The ParallelLoopGenerator class is changed such that GNU OpenMP specific code was removed, allowing to use it as super class in a template-pattern. Therefore, the code has been reorganized and one may not use the ParallelLoopGenerator directly anymore, instead specific implementations have to be provided. These implementations contain the library-specific code. As such, the "GOMP" (code completely taken from the existing backend) and "KMP" variant were created. For "check-polly" all tests that involved "GOMP": equivalents were added that test the new functionalities, like static scheduling and different chunk sizes. "docs/UsingPollyWithClang.rst" shows how the alternative backend may be used. Patch by Michael Halkenhäuser <michaelhalk@web.de> Differential Revision: https://reviews.llvm.org/D59100 llvm-svn: 356434