@@ -25,16 +25,17 @@ using namespace llvm;
25
25
26
26
void BPFSubtarget::anchor () {}
27
27
28
- BPFSubtarget &BPFSubtarget::initializeSubtargetDependencies (StringRef CPU,
28
+ BPFSubtarget &BPFSubtarget::initializeSubtargetDependencies (const Triple &TT,
29
+ StringRef CPU,
29
30
StringRef FS) {
30
- initializeEnvironment ();
31
+ initializeEnvironment (TT );
31
32
initSubtargetFeatures (CPU, FS);
32
33
ParseSubtargetFeatures (CPU, /* TuneCPU*/ CPU, FS);
33
34
return *this ;
34
35
}
35
36
36
- void BPFSubtarget::initializeEnvironment () {
37
- IsSolana = false ;
37
+ void BPFSubtarget::initializeEnvironment (const Triple &TT ) {
38
+ IsSolana = TT. getArch () == Triple::sbf ;
38
39
HasJmpExt = false ;
39
40
HasJmp32 = false ;
40
41
HasAlu32 = false ;
@@ -61,7 +62,7 @@ void BPFSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
61
62
BPFSubtarget::BPFSubtarget (const Triple &TT, const std::string &CPU,
62
63
const std::string &FS, const TargetMachine &TM)
63
64
: BPFGenSubtargetInfo(TT, CPU, /* TuneCPU*/ CPU, FS), InstrInfo(),
64
- FrameLowering(initializeSubtargetDependencies(CPU, FS)),
65
+ FrameLowering(initializeSubtargetDependencies(TT, CPU, FS)),
65
66
TLInfo(TM, *this ) {
66
67
if (TT.getArch () == Triple::sbf) {
67
68
IsSolana = true ;
0 commit comments