AMDGPU/SI: Initialize InstrInfo before TargetLoweringInfo in GCNSubtarget

SITargetLowering queries SIInstrInfo in its constructor, so SIInstrInfo
must be initialized first.  This fixes msan buildbot failures and was
introduced by r336851.

llvm-svn: 336861
This commit is contained in:
Tom Stellard 2018-07-11 22:15:15 +00:00
parent 0f53355e83
commit 752ddbd068
2 changed files with 3 additions and 3 deletions

View File

@ -208,8 +208,8 @@ GCNSubtarget::GCNSubtarget(const Triple &TT, StringRef GPU, StringRef FS,
ScalarizeGlobal(false),
FeatureDisable(false),
TLInfo(TM, initializeSubtargetDependencies(TT, GPU, FS)),
InstrInfo(*this),
InstrInfo(initializeSubtargetDependencies(TT, GPU, FS)),
TLInfo(TM, *this),
FrameLowering(TargetFrameLowering::StackGrowsUp, getStackAlignment(), 0) {
AS = AMDGPU::getAMDGPUAS(TT);
CallLoweringInfo.reset(new AMDGPUCallLowering(*getTargetLowering()));

View File

@ -362,8 +362,8 @@ protected:
SelectionDAGTargetInfo TSInfo;
AMDGPUAS AS;
private:
SITargetLowering TLInfo;
SIInstrInfo InstrInfo;
SITargetLowering TLInfo;
SIFrameLowering FrameLowering;
public: