[llvm] [CodeGen](NFC) Add `AliasAnalysis.h` to the CodeGen PCH (PR #227683)
Nathan Corbyn via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 30 05:20:01 PDT 2026
https://github.com/cofibrant created https://github.com/llvm/llvm-project/pull/227683
After #226533, `MachineScheduler.h` no longer transitively includes `AliasAnalysis.h` meaning that a number of CPP files end up pull it in manually and regressing the size of TUs size significantly (see [this comparison](https://llvm-compile-time-tracker.com/compare_clang.php?from=05a75e831476a8446d9319f56ce46851da86fb68&to=91b08a503f4f712ea8ce83dc3887f8be7738e95a&stat=instructions%3Au&sortBy=absolute-difference)). Add `AliasAnalysis.h` to the CodeGen PCH to avoid this issue.
Thanks to @aengelke for pointing this out.
>From 5d65d785c571d4ea3e4242da8289237d01171962 Mon Sep 17 00:00:00 2001
From: Nathan Corbyn <n_corbyn at apple.com>
Date: Wed, 30 Sep 2026 13:17:00 +0100
Subject: [PATCH] [CodeGen](NFC) Add AliasAnalysis.h to the CodeGen PCH
---
llvm/include/llvm/CodeGen/pch.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/llvm/include/llvm/CodeGen/pch.h b/llvm/include/llvm/CodeGen/pch.h
index 36eb560b3c003..d3660dffbe38b 100644
--- a/llvm/include/llvm/CodeGen/pch.h
+++ b/llvm/include/llvm/CodeGen/pch.h
@@ -10,6 +10,7 @@
///
//===----------------------------------------------------------------------===//
+#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h"
More information about the llvm-commits
mailing list