[llvm] 3541139 - [CodeGen](NFC) Add `AliasAnalysis.h` to the CodeGen PCH (#227683)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 06:06:08 PDT 2026


Author: Nathan Corbyn
Date: 2026-09-30T13:05:55Z
New Revision: 3541139d540e09b7c3af734b14543238b0ffaad9

URL: https://github.com/llvm/llvm-project/commit/3541139d540e09b7c3af734b14543238b0ffaad9
DIFF: https://github.com/llvm/llvm-project/commit/3541139d540e09b7c3af734b14543238b0ffaad9.diff

LOG: [CodeGen](NFC) Add `AliasAnalysis.h` to the CodeGen PCH (#227683)

After #226533, `MachineScheduler.h` no longer transitively includes
`AliasAnalysis.h` meaning its contents was dropped from the CodeGen PCH.
As such, a number of CPP files end up pulling 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.

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/pch.h

Removed: 
    


################################################################################
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