[PATCH] D46272: AMDGPU: Remove #include "MCTargetDesc/AMDGPUMCTargetDesc.h" from common headers
Tom Stellard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 3 08:32:55 PDT 2018
tstellar added inline comments.
================
Comment at: lib/Target/AMDGPU/AMDGPUSubtarget.h:26
#include "SIInstrInfo.h"
-#include "SIMachineFunctionInfo.h"
#include "Utils/AMDGPUBaseInfo.h"
----------------
nhaehnle wrote:
> Ah I see. This seems like a separate change, although I wouldn't mind committing them together as long as the description is updated to reflect this.
These are both related changes. I was unable to remove AMDGPUMCTargetDesc.h from SIMachineFunctionInfo.h because it uses some enums from the header to initialize default values for the SIMachineFunction class. Having AMDGPUSubtarget.h include SIMachineFunctionInfo.h would then pull in AMDGPUMCTargetDesc.h which would defeat the purpose of the patch since AMDGPUSubtarget.h is included everywhere.
This was a compromise to keep the patch simple and avoid rewriting the SIMachineFunctionInfo class.
Repository:
rL LLVM
https://reviews.llvm.org/D46272
More information about the llvm-commits
mailing list