@@ -154,17 +154,17 @@ void ilist_alloc_traits<MachineBasicBlock>::deleteNode(MachineBasicBlock *MBB) {
154
154
MBB->getParent ()->deleteMachineBasicBlock (MBB);
155
155
}
156
156
157
- static inline Align getFnStackAlignment (const TargetSubtargetInfo * STI,
158
- const Function &F) {
157
+ static inline Align getFnStackAlignment (const TargetSubtargetInfo & STI,
158
+ const Function &F) {
159
159
if (auto MA = F.getFnStackAlign ())
160
160
return *MA;
161
- return STI-> getFrameLowering ()->getStackAlign ();
161
+ return STI. getFrameLowering ()->getStackAlign ();
162
162
}
163
163
164
164
MachineFunction::MachineFunction (Function &F, const TargetMachine &Target,
165
165
const TargetSubtargetInfo &STI, MCContext &Ctx,
166
166
unsigned FunctionNum)
167
- : F(F), Target(Target), STI(& STI), Ctx(Ctx) {
167
+ : F(F), Target(Target), STI(STI), Ctx(Ctx) {
168
168
FunctionNumber = FunctionNum;
169
169
init ();
170
170
}
@@ -195,7 +195,7 @@ void MachineFunction::init() {
195
195
196
196
// We can realign the stack if the target supports it and the user hasn't
197
197
// explicitly asked us not to.
198
- bool CanRealignSP = STI-> getFrameLowering ()->isStackRealignable () &&
198
+ bool CanRealignSP = STI. getFrameLowering ()->isStackRealignable () &&
199
199
!F.hasFnAttribute (" no-realign-stack" );
200
200
bool ForceRealignSP = F.hasFnAttribute (Attribute::StackAlignment) ||
201
201
F.hasFnAttribute (" stackrealign" );
@@ -209,11 +209,11 @@ void MachineFunction::init() {
209
209
FrameInfo->ensureMaxAlignment (*F.getFnStackAlign ());
210
210
211
211
ConstantPool = new (Allocator) MachineConstantPool (getDataLayout ());
212
- Alignment = STI-> getTargetLowering ()->getMinFunctionAlignment ();
212
+ Alignment = STI. getTargetLowering ()->getMinFunctionAlignment ();
213
213
214
214
if (!F.getAlign () && !F.hasOptSize ())
215
215
Alignment = std::max (Alignment,
216
- STI-> getTargetLowering ()->getPrefFunctionAlignment ());
216
+ STI. getTargetLowering ()->getPrefFunctionAlignment ());
217
217
218
218
// -fsanitize=function and -fsanitize=kcfi instrument indirect function calls
219
219
// to load a type hash before the function label. Ensure functions are aligned
0 commit comments