[clang] [RFC][Clang][AMDGPU] Emit only delta target-features to reduce IR bloat (PR #176533)
Shilei Tian via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 20 06:59:59 PST 2026
================
@@ -2980,10 +2988,34 @@ bool CodeGenModule::GetCPUAndFeaturesAttributes(GlobalDecl GD,
// favor this processor.
TuneCPU = SD->getCPUName(GD.getMultiVersionIndex())->getName();
}
+
+ // For AMDGPU, only emit delta features (features that differ from the
+ // target CPU's defaults). Other targets might want to follow a similar
+ // pattern.
+ if (getTarget().getTriple().isAMDGPU()) {
----------------
shiltian wrote:
Sure, this should do one target at a time to minimize the possibilities of big break.
https://github.com/llvm/llvm-project/pull/176533
More information about the cfe-commits
mailing list