Lines Matching +full:fixed +full:- +full:layout

1 //===-- StackFrameLayoutAnalysisPass.cpp
2 //------------------------------------===//
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 //===----------------------------------------------------------------------===//
11 // layout of the stack frame, using the remarks interface. On the CLI it prints
17 //===----------------------------------------------------------------------===//
41 #define DEBUG_TYPE "stack-frame-layout"
45 /// StackFrameLayoutAnalysisPass - This is a pass to dump the stack frame of a
54 Fixed, // a Fixed slot (e.g. arguments passed on the stack) enumerator
78 SlotTy = SlotType::Fixed; in SlotData()
90 // We use this to sort in reverse order, so that the layout is displayed
107 return "Stack Frame Layout Analysis"; in getPassName()
118 // -Rpass-func-filter=<regex> in runOnMachineFunction()
123 if (!Ctx.getDiagHandlerPtr()->isAnalysisRemarkEnabled(DEBUG_TYPE)) in runOnMachineFunction()
139 case SlotType::Fixed: in getTypeString()
140 return "Fixed"; in getTypeString()
148 llvm_unreachable("bad slot type for stack layout"); in getTypeString()
154 // To make it easy to understand the stack layout from the CLI, we want to in emitStackSlotRemark()
170 // - Offset: -8 in emitStackSlotRemark()
171 // - ScalableOffset: -16 in emitStackSlotRemark()
172 // Note: the ScalableOffset entries are added only for slots with non-zero in emitStackSlotRemark()
176 // Offset: [SP-8] in emitStackSlotRemark()
178 // Or with non-zero scalable offset: in emitStackSlotRemark()
179 // Offset: [SP-8-16 x vscale] in emitStackSlotRemark()
181 // Negative offsets will print a leading `-`, so only add `+` in emitStackSlotRemark()
199 formatv("{0} @ {1}:{2}", N->getName(), N->getFilename(), N->getLine()) in emitSourceLocRemark()
210 return FI->getFrameIndexReferenceFromSP(MF, FrameIdx); in getStackOffset()
236 // sort the ordering, to match the actual layout in memory in emitStackFrameLayoutRemarks()
263 if (!MO->isStore()) in genSlotDbgMapping()
266 MO->getPseudoValue()); in genSlotDbgMapping()
269 int FrameIdx = FI->getFrameIndex(); in genSlotDbgMapping()
274 SlotDebugMap[FrameIdx].insert(MI->getDebugVariable()); in genSlotDbgMapping()
287 INITIALIZE_PASS(StackFrameLayoutAnalysisPass, "stack-frame-layout",
288 "Stack Frame Layout", false, false)
291 /// Returns a newly-created StackFrameLayout pass.