[llvm] [PowerPC] Alignment of toc-data symbol should not be increased during optimizations (PR #94593)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 7 17:30:56 PDT 2024
================
@@ -335,6 +335,14 @@ bool GlobalObject::canIncreaseAlignment() const {
if (isELF && !isDSOLocal())
return false;
+ bool isXCOFF =
+ (!Parent || Triple(Parent->getTargetTriple()).isOSBinFormatXCOFF());
+ if (isXCOFF)
+ if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(this))
+ // GV with toc-data attribute is defined in a TOC entry which has a fixed
----------------
MaskRay wrote:
This comment can be lifted before `isXCOFF`. It seems not correct.
The alignment is not increased to mitigate TOC size overflow.
https://github.com/llvm/llvm-project/pull/94593
More information about the llvm-commits
mailing list