Commit Graph

9 Commits

Author SHA1 Message Date
Tim Kientzle
1d961ba22d Add #include "swift/Basic/Assertions.h" to a lot of source files
Although I don't plan to bring over new assertions wholesale
into the current qualification branch, it's entirely possible
that various minor changes in main will use the new assertions;
having this basic support in the release branch will simplify that.
(This is why I'm adding the includes as a separate pass from
rewriting the individual assertions)
2024-06-05 19:37:30 -07:00
Nate Chandler
a1d10997da [SIL] Promoted least-common ancestor to Dominance.
It's a general purpose helper and there will soon be another user.
2023-07-24 16:57:14 -07:00
Erik Eckstein
5b3c34b9e7 fix a linking problem in swift-frontend
Sometimes when building the SwiftCompilerSources with a host compiler, linking fails with unresolved symbols for DenseMap and unique_ptr destroys.
This looks like a problem with C++ interop: the compiler thinks that destructors for some Analysis classes are materialized in the SwiftCompilerSources, but they are not.
Explicitly defining those destructors fixes the problem.
2023-07-21 08:01:31 +02:00
Nate Chandler
ee3cbde8fe [SIL] computeDominatedBoundaryBlocks on non-OSSA.
The algorithm requires no critical edges, but that doesn't mean
require ownership.  Remove the assert to allow the utility to be called
from code where the caller has manually split edges.

In the fullness of time, there should no passes should introduce
critical edges.
2023-06-05 08:11:28 -07:00
Meghana Gupta
7cf67e7eb4 Fix computation of dominance frontier (#59278) 2022-06-07 10:52:29 -07:00
Andrew Trick
8f20da7024 Add computeDominanceFrontier().
A trivial utility that returns the leaf blocks in a dominance subtree.
2022-02-16 12:23:01 -08:00
Meghana Gupta
0598957cb9 Add a useful overload of properlyDominates to PostDominanceInfo (#34666) 2020-11-11 18:25:05 -08:00
Nathan Hawes
3957574a7b Fixup code that was using the now-removed DominatorTreeBase::getRoots()
Use the new roots(), roots_begin(), etc. instead.
2020-07-07 17:55:28 -07:00
Michael Gottesman
e1a19e4173 [sil] Split library into subfolders, while still building as a single library still.
Specifically, I split it into 3 initial categories: IR, Utils, Verifier. I just
did this quickly, we can always split it more later if we want.

I followed the model that we use in SILOptimizer: ./lib/SIL/CMakeLists.txt vends
 a macro (sil_register_sources) to the sub-folders that register the sources of
 the subdirectory with a global state variable that ./lib/SIL/CMakeLists.txt
 defines. Then after including those subdirs, the parent cmake declares the SIL
 library. So the output is the same, but we have the flexibility of having
 subdirectories to categorize source files.
2020-03-30 11:01:00 -07:00