Cleanup header dependencies in LLVMCoreBased on the output of include-what-you-use.This is a big chunk of changes. It is very likely to break downstream codeunless they took a lot of care in avo
Cleanup header dependencies in LLVMCoreBased on the output of include-what-you-use.This is a big chunk of changes. It is very likely to break downstream codeunless they took a lot of care in avoiding hidden ehader dependencies, somethingthe LLVM codebase doesn't do that well :-/I've tried to summarize the biggest change below:- llvm/include/llvm-c/Core.h: no longer includes llvm-c/ErrorHandling.h- llvm/IR/DIBuilder.h no longer includes llvm/IR/DebugInfo.h- llvm/IR/IRBuilder.h no longer includes llvm/IR/IntrinsicInst.h- llvm/IR/LLVMRemarkStreamer.h no longer includes llvm/Support/ToolOutputFile.h- llvm/IR/LegacyPassManager.h no longer include llvm/Pass.h- llvm/IR/Type.h no longer includes llvm/ADT/SmallPtrSet.h- llvm/IR/PassManager.h no longer includes llvm/Pass.h nor llvm/Support/Debug.hAnd the usual count of preprocessed lines:$ clang++ -E -Iinclude -I../llvm/include ../llvm/lib/IR/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -lbefore: 6400831after: 6189948200k lines less to process is no that bad ;-)Discourse thread on the topic: https://llvm.discourse.group/t/include-what-you-use-include-cleanupDifferential Revision: https://reviews.llvm.org/D118652
show more ...
Suppress some bitwise-or-of-bool warnings with explicit int castThese look like they have intentional side effects that would break fromshortcircuiting.
[llvm][examples][SimplifyCFG] Fix pass's IR changed reporting... under the EXPENSIVE_CHECKS build, this fails the assert in the LegacyPMthat verifies whether a pass really did leave the IR alone w
[llvm][examples][SimplifyCFG] Fix pass's IR changed reporting... under the EXPENSIVE_CHECKS build, this fails the assert in the LegacyPMthat verifies whether a pass really did leave the IR alone when it reports nochanges back from its return status.
Re-apply "[Examples] Add IRTransformations directory to examples."This reverts commit 19fd8925a4afe6efd248688cce06aceff50efe0c.Should include a fix for PR44197.
Revert "[Examples] Add IRTransformations directory to examples."This breaks LLVMExports.cmake in some build configurations.PR44197This reverts commits ceb72d07b004af9c428c4a3c73a98ea97d49a713
Revert "[Examples] Add IRTransformations directory to examples."This breaks LLVMExports.cmake in some build configurations.PR44197This reverts commits ceb72d07b004af9c428c4a3c73a98ea97d49a713 7d0b1d77b3d4d47df477519fd1bf099b3df6f899.
Sink all InitializePasses.h includesThis file lists every pass in LLVM, and is included by Pass.h, which isvery popular. Every time we add, remove, or rename a pass in LLVM, itcaused lots of reco
Sink all InitializePasses.h includesThis file lists every pass in LLVM, and is included by Pass.h, which isvery popular. Every time we add, remove, or rename a pass in LLVM, itcaused lots of recompilation.I found this fact by looking at this table, which is sorted by thenumber of times a file was changed over the last 100,000 git commitsmultiplied by the number of object files that depend on it in thecurrent 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.hBefore this change, touching InitializePasses.h would cause 1345 filesto recompile. After this change, touching it only causes 550 compiles inan incremental rebuild.Reviewers: bkramer, asbirlea, bollu, jdoerfertDifferential Revision: https://reviews.llvm.org/D70211
Fix build with shared libraries. NFC.- Dependent components need linking directly.
[Examples] Add IRTransformations directory to examples.This patch adds a new IRTransformations directory to llvm/examples/. This isintended to serve as a new home for example transformations/analy
[Examples] Add IRTransformations directory to examples.This patch adds a new IRTransformations directory to llvm/examples/. This isintended to serve as a new home for example transformations/analysiscode used by various tutorials.If LLVM_BUILD_EXAMPLES is enabled, the ExamplesIRTransforms library islinked into the opt binary and the example passes become available.To start off with, it contains the CFG simplifications used in the IRpart of the 'Getting Started With LLVM: Basics' tutorial at the US LLVMDevelopers Meeting 2019.Reviewers: paquette, jfb, meikeb, lhames, kbartonReviewed By: paquetteDifferential Revision: https://reviews.llvm.org/D69416