Lines Matching refs:CFStack
33 struct CFStack { struct
49 CFStack(const AMDGPUSubtarget *st, unsigned ShaderType) : ST(st), in CFStack() argument
55 bool branchStackContains(CFStack::StackItem);
57 unsigned getSubEntrySize(CFStack::StackItem Item);
65 unsigned CFStack::getLoopDepth() { in getLoopDepth()
69 bool CFStack::branchStackContains(CFStack::StackItem Item) { in branchStackContains()
70 for (std::vector<CFStack::StackItem>::const_iterator I = BranchStack.begin(), in branchStackContains()
78 bool CFStack::requiresWorkAroundForInst(unsigned Opcode) { in requiresWorkAroundForInst()
116 unsigned CFStack::getSubEntrySize(CFStack::StackItem Item) { in getSubEntrySize()
120 case CFStack::FIRST_NON_WQM_PUSH: in getSubEntrySize()
134 case CFStack::FIRST_NON_WQM_PUSH_W_FULL_ENTRY: in getSubEntrySize()
139 case CFStack::SUB_ENTRY: in getSubEntrySize()
144 void CFStack::updateMaxStackSize() { in updateMaxStackSize()
150 void CFStack::pushBranch(unsigned Opcode, bool isWQM) { in pushBranch()
151 CFStack::StackItem Item = CFStack::ENTRY; in pushBranch()
157 !branchStackContains(CFStack::FIRST_NON_WQM_PUSH)) in pushBranch()
158 Item = CFStack::FIRST_NON_WQM_PUSH; // May not be required on Evergreen/NI in pushBranch()
164 !branchStackContains(CFStack::FIRST_NON_WQM_PUSH_W_FULL_ENTRY)) in pushBranch()
165 Item = CFStack::FIRST_NON_WQM_PUSH_W_FULL_ENTRY; in pushBranch()
167 Item = CFStack::SUB_ENTRY; in pushBranch()
169 Item = CFStack::ENTRY; in pushBranch()
173 if (Item == CFStack::ENTRY) in pushBranch()
180 void CFStack::pushLoop() { in pushLoop()
181 LoopStack.push_back(CFStack::ENTRY); in pushLoop()
186 void CFStack::popBranch() { in popBranch()
187 CFStack::StackItem Top = BranchStack.back(); in popBranch()
188 if (Top == CFStack::ENTRY) in popBranch()
195 void CFStack::popLoop() { in popLoop()
481 CFStack CFStack(ST, MFI->getShaderType()); in runOnMachineFunction() local
514 CFStack.requiresWorkAroundForInst(MI->getOpcode()); in runOnMachineFunction()
524 CFStack.pushBranch(AMDGPU::CF_PUSH_EG); in runOnMachineFunction()
526 CFStack.pushBranch(AMDGPU::CF_ALU_PUSH_BEFORE); in runOnMachineFunction()
535 CFStack.pushLoop(); in runOnMachineFunction()
548 CFStack.popLoop(); in runOnMachineFunction()
586 CFStack.popBranch(); in runOnMachineFunction()
661 MFI->StackSize = CFStack.MaxStackSize; in runOnMachineFunction()