aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorElliot Goodrich <elliotgoodrich@gmail.com>2023-06-25 18:04:47 +0100
committerElliot Goodrich <elliotgoodrich@gmail.com>2023-06-27 15:26:17 +0100
commitf0fa2d7c292853b79b5bcd16be97940859a800ec (patch)
tree273ed001ddfcdabd784762f5930c719018fabc97 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent1d699bf2664d2a9e64024fd9eb87451d6360ea8c (diff)
downloadllvm-f0fa2d7c292853b79b5bcd16be97940859a800ec.zip
llvm-f0fa2d7c292853b79b5bcd16be97940859a800ec.tar.gz
llvm-f0fa2d7c292853b79b5bcd16be97940859a800ec.tar.bz2
[llvm] Move AttributeMask to a separate header
Move `AttributeMask` out of `llvm/IR/Attributes.h` to a new file `llvm/IR/AttributeMask.h`. After doing this we can remove the `#include <bitset>` and `#include <set>` directives from `Attributes.h`. Since there are many headers including `Attributes.h`, but not needing the definition of `AttributeMask`, this causes unnecessary bloating of the translation units and slows down compilation. This commit adds in the include directive for `llvm/IR/AttributeMask.h` to the handful of source files that need to see the definition. This reduces the total number of preprocessing tokens across the LLVM source files in lib from (roughly) 1,917,509,187 to 1,902,982,273 - a reduction of ~0.76%. This should result in a small improvement in compilation time. Differential Revision: https://reviews.llvm.org/D153728
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index a1d7044..ebc88c8 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -23,6 +23,7 @@
#include "llvm/Bitstream/BitstreamReader.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/Argument.h"
+#include "llvm/IR/AttributeMask.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/AutoUpgrade.h"
#include "llvm/IR/BasicBlock.h"