summaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/EdgeBundles.cpp
AgeCommit message (Collapse)Author
2024-11-22[CodeGen][NewPM] Port EdgeBundles analysis to NPM (#116616)Akshat Oke
2024-08-30[EdgeBundles] Correct MBB label name in output graph when ↵Kai Luo
`-view-edge-bundles`. NFC. (#106661) With `-view-edge-bundles`, before the change, the dot file output is kinda like ```dot digraph { "%bb.0" [ shape=box ] 0 -> "%bb.0" "%bb.0" -> 1 "%bb.0" -> "%bb.1" [ color=lightgray ] "%bb.0" -> "%bb.6" [ color=lightgray ] "%bb.1" [ shape=box ] 1 -> "%bb.1" "%bb.1" -> 1 "%bb.1" -> "%bb.2" [ color=lightgray ] "%bb.1" -> "%bb.6" [ color=lightgray ] "%bb.2" [ shape=box ] 1 -> "%bb.2" "%bb.2" -> 1 "%bb.2" -> "%bb.3" [ color=lightgray ] "%bb.3" [ shape=box ] 1 -> "%bb.3" "%bb.3" -> 2 "%bb.3" -> "%bb.4" [ color=lightgray ] "%bb.4" [ shape=box ] 2 -> "%bb.4" "%bb.4" -> 2 "%bb.4" -> "%bb.4" [ color=lightgray ] "%bb.4" -> "%bb.5" [ color=lightgray ] "%bb.5" [ shape=box ] 2 -> "%bb.5" "%bb.5" -> 1 "%bb.5" -> "%bb.6" [ color=lightgray ] "%bb.5" -> "%bb.3" [ color=lightgray ] "%bb.6" [ shape=box ] 1 -> "%bb.6" "%bb.6" -> 3 } ``` However, the graph output by graphviz is ![t](https://github.com/user-attachments/assets/24056c0a-3ba9-49c3-a5da-269f3140e619) The node name corresponding to the MBB is incorrect. After the change, the node name is consistent with MBB's name. ![s](https://github.com/user-attachments/assets/38c649d1-7222-4de1-971c-56f7721ab64c)
2021-04-07[docs] Fix doxygen comments wrongly attached to the llvm namespaceNicolás Alvarez
Looking at the Doxygen-generated documentation for the llvm namespace currently shows all sorts of random comments from different parts of the codebase. These are mostly caused by: - File doc comments that aren't marked with \file, so they're attached to the next declaration, which is usually "namespace llvm {". - Class doc comments placed before the namespace rather than before the class. - Code comments before the namespace that (in my opinion) shouldn't be extracted by doxygen at all. This commit fixes these comments. The generated doxygen documentation now has proper docs for several classes and files, and the docs for the llvm and llvm::detail namespaces are now empty. Reviewed By: thakis, mizvekov Differential Revision: https://reviews.llvm.org/D96736
2021-02-12[CodeGen] Use range-based for loops (NFC)Kazu Hirata
2020-04-11CodeGen/EdgeBundles - move Twine.h include down into EdgeBundles.cpp. NFC.Simon Pilgrim
EdgeBundles.h has no use for it.
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-07-16Fix parameter name comments using clang-tidy. NFC.Rui Ueyama
This patch applies clang-tidy's bugprone-argument-comment tool to LLVM, clang and lld source trees. Here is how I created this patch: $ git clone https://github.com/llvm/llvm-project.git $ cd llvm-project $ mkdir build $ cd build $ cmake -GNinja -DCMAKE_BUILD_TYPE=Debug \ -DLLVM_ENABLE_PROJECTS='clang;lld;clang-tools-extra' \ -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DLLVM_ENABLE_LLD=On \ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ../llvm $ ninja $ parallel clang-tidy -checks='-*,bugprone-argument-comment' \ -config='{CheckOptions: [{key: StrictMode, value: 1}]}' -fix \ ::: ../llvm/lib/**/*.{cpp,h} ../clang/lib/**/*.{cpp,h} ../lld/**/*.{cpp,h} llvm-svn: 366177
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth
to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
2017-12-04[CodeGen] Unify MBB reference format in both MIR and debug outputFrancis Visoiu Mistrih
As part of the unification of the debug format and the MIR format, print MBB references as '%bb.5'. The MIR printer prints the IR name of a MBB only for block definitions. * find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#" << ([a-zA-Z0-9_]+)->getNumber\(\)/" << printMBBReference(*\1)/g' * find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#" << ([a-zA-Z0-9_]+)\.getNumber\(\)/" << printMBBReference(\1)/g' * find . \( -name "*.txt" -o -name "*.s" -o -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#([0-9]+)/%bb.\1/g' * grep -nr 'BB#' and fix Differential Revision: https://reviews.llvm.org/D40422 llvm-svn: 319665
2016-08-25Fix some Clang-tidy modernize-use-using and Include What You Use warnings; ↵Eugene Zelenko
other minor fixes. Differential revision: https://reviews.llvm.org/D23861 llvm-svn: 279695
2015-06-23Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)Alexander Kornienko
Apparently, the style needs to be agreed upon first. llvm-svn: 240390
2015-06-19Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko
The patch is generated using this command: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ llvm/lib/ Thanks to Eugene Kosov for the original patch! llvm-svn: 240137
2014-04-30Convert several loops over MachineFunction basic blocks to range-based loopsAlexey Samsonov
llvm-svn: 207683
2014-04-24Remove C++11ism (specializing a template in a surrounding namespace) to ↵Richard Smith
appease the buildbots. llvm-svn: 207136
2014-04-24[modules] "Specialize" a function by actually specializing a function templateRichard Smith
rather than by adding an overload and hoping that it's declared before the code that calls it. (In a modules build, it isn't.) llvm-svn: 207133
2011-11-15Twinify GraphWriter a little bit.Benjamin Kramer
llvm-svn: 144647
2011-06-16Function::getNumBlockIDs() should be used instead of Function::size() to set ↵Anna Zaks
the upper limit on the block IDs since basic blocks might get removed (simplified away) after being initially numbered. Plus the test case, in which SelectionDAGBuilder::visitBr() calls llvm::MachineFunction::removeFromMBBNumbering(), which introduces the hole in numbering leading to an assert in llc (prior to the fix). llvm-svn: 133113
2011-04-09Build the Hopfield network incrementally when splitting global live ranges.Jakob Stoklund Olesen
It is common for large live ranges to have few basic blocks with register uses and many live-through blocks without any uses. This approach grows the Hopfield network incrementally around the use blocks, completely avoiding checking interference for some through blocks. llvm-svn: 129188
2011-01-05Add a hidden command line option to display edge bundle graphs as they areJakob Stoklund Olesen
calculated. llvm-svn: 122912
2011-01-04Turn the EdgeBundles class into a stand-alone machine CFG analysis pass.Jakob Stoklund Olesen
The analysis will be needed by both the greedy register allocator and the X86FloatingPoint pass. It only needs to be computed once when the CFG doesn't change. This pass is very fast, usually showing up as 0.0% wall time. llvm-svn: 122832