summaryrefslogtreecommitdiff
path: root/llvm/examples/IRTransforms/SimplifyCFG.cpp
AgeCommit message (Collapse)Author
2025-01-28[NFC][DebugInfo] Use iterators for insertion at some final callsitesJeremy Morse
These are the callsites that have materialised in the last three weeks since I last built with deprecation warnings.
2024-09-20[DebugInfo] Enable deprecation of iterator-insertion methods (#102608)Jeremy Morse
This is an almost-final step in eliminating debug-intrinsics -- read more about that here: https://llvm.org/docs/RemoveDIsDebugInfo.html . To correctly update variable location information in the background when inserting instructions, we need some information carried at runtime in BasicBlock::iterator, hence deprecating pointer-insertion. An immediate fix for any deprecation warnings is to call "getIterator" on the insertion position pointer. If you intend on inserting at the start of a block, use BB->begin() or similar methods to fetch the appropriate iterator.
2023-01-10[LegacyPM] Port example pass SimplifyCFG to new PMSebastian Peryt
This is part of effort in removing -enable-new-pm flag. As a prat of this effort one of example passes SimplifyCFG must be ported to new PM which will allow to remove the flag calls from the tests that are using this pass. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D137103
2022-08-01[Examples] Fix SimplifyCFG exampleNikita Popov
After fffabd53482f34f96ab9273486538f587e3d91fc, the v2 and v3 versions produce poison instead of undef. Also adjust the v1 version, as well as the test expectations, to make the example pass again.
2021-10-18Suppress some bitwise-or-of-bool warnings with explicit int castDavid Blaikie
These look like they have intentional side effects that would break from shortcircuiting.
2020-07-27[llvm][examples][SimplifyCFG] Fix pass's IR changed reportingJon Roelofs
... under the EXPENSIVE_CHECKS build, this fails the assert in the LegacyPM that verifies whether a pass really did leave the IR alone when it reports no changes back from its return status.
2020-01-04Re-apply "[Examples] Add IRTransformations directory to examples."Florian Hahn
This reverts commit 19fd8925a4afe6efd248688cce06aceff50efe0c. Should include a fix for PR44197.
2019-12-01Revert "[Examples] Add IRTransformations directory to examples."Florian Hahn
This breaks LLVMExports.cmake in some build configurations. PR44197 This reverts commits ceb72d07b004af9c428c4a3c73a98ea97d49a713 7d0b1d77b3d4d47df477519fd1bf099b3df6f899.
2019-11-13Sink all InitializePasses.h includesReid Kleckner
This file lists every pass in LLVM, and is included by Pass.h, which is very popular. Every time we add, remove, or rename a pass in LLVM, it caused lots of recompilation. I found this fact by looking at this table, which is sorted by the number of times a file was changed over the last 100,000 git commits multiplied by the number of object files that depend on it in the current checkout: recompiles touches affected_files header 342380 95 3604 llvm/include/llvm/ADT/STLExtras.h 314730 234 1345 llvm/include/llvm/InitializePasses.h 307036 118 2602 llvm/include/llvm/ADT/APInt.h 213049 59 3611 llvm/include/llvm/Support/MathExtras.h 170422 47 3626 llvm/include/llvm/Support/Compiler.h 162225 45 3605 llvm/include/llvm/ADT/Optional.h 158319 63 2513 llvm/include/llvm/ADT/Triple.h 140322 39 3598 llvm/include/llvm/ADT/StringRef.h 137647 59 2333 llvm/include/llvm/Support/Error.h 131619 73 1803 llvm/include/llvm/Support/FileSystem.h Before this change, touching InitializePasses.h would cause 1345 files to recompile. After this change, touching it only causes 550 compiles in an incremental rebuild. Reviewers: bkramer, asbirlea, bollu, jdoerfert Differential Revision: https://reviews.llvm.org/D70211
2019-11-12[Examples] Add IRTransformations directory to examples.Florian Hahn
This patch adds a new IRTransformations directory to llvm/examples/. This is intended to serve as a new home for example transformations/analysis code used by various tutorials. If LLVM_BUILD_EXAMPLES is enabled, the ExamplesIRTransforms library is linked into the opt binary and the example passes become available. To start off with, it contains the CFG simplifications used in the IR part of the 'Getting Started With LLVM: Basics' tutorial at the US LLVM Developers Meeting 2019. Reviewers: paquette, jfb, meikeb, lhames, kbarton Reviewed By: paquette Differential Revision: https://reviews.llvm.org/D69416