mirror of
				https://github.com/intel/intel-graphics-compiler.git
				synced 2025-11-04 08:21:06 +08:00 
			
		
		
		
	Recognise all vector aliases within same BB without
threshold Add vector aliases as long as all the IE instructions are in the same BB, regardless of VectorAliasBBThreshold.
This commit is contained in:
		
				
					committed by
					
						
						igcbot
					
				
			
			
				
	
			
			
			
						parent
						
							bd2945b40f
						
					
				
				
					commit
					35d6a22cbf
				
			@ -958,7 +958,7 @@ bool VariableReuseAnalysis::hasAnotherDCCAsAliasee(Value* V) const
 | 
			
		||||
//   true :  if all elements are inserted with IEI of constant index
 | 
			
		||||
//   false:  otherwise.
 | 
			
		||||
bool VariableReuseAnalysis::getAllInsEltsIfAvailable(
 | 
			
		||||
    InsertElementInst* FirstIEI, VecInsEltInfoTy& AllIEIs)
 | 
			
		||||
    InsertElementInst* FirstIEI, VecInsEltInfoTy& AllIEIs, bool OnlySameBB)
 | 
			
		||||
{
 | 
			
		||||
    int nelts = getNumElts(FirstIEI);
 | 
			
		||||
 | 
			
		||||
@ -975,6 +975,9 @@ bool VariableReuseAnalysis::getAllInsEltsIfAvailable(
 | 
			
		||||
    {
 | 
			
		||||
        LastIEI = I;
 | 
			
		||||
 | 
			
		||||
        if (OnlySameBB && LastIEI->getParent() != FirstIEI->getParent())
 | 
			
		||||
            return false;
 | 
			
		||||
 | 
			
		||||
        // For insertElement, it should be in the same dessa CC
 | 
			
		||||
        // already, as dessa special-handles it. Make sure they
 | 
			
		||||
        // are indeed in the same CC, otherwise, skip.
 | 
			
		||||
@ -1169,8 +1172,9 @@ void VariableReuseAnalysis::InsertElementAliasing(Function* F)
 | 
			
		||||
    const auto control = (m_pCtx->getVectorCoalescingControl() & 0x3);
 | 
			
		||||
    // To avoid increasing GRF pressure, skip if F is too large or not an entry
 | 
			
		||||
    const int32_t NumBBThreshold = IGC_GET_FLAG_VALUE(VectorAliasBBThreshold);
 | 
			
		||||
    bool OnlySameBB = getNumBBs(F) > NumBBThreshold;
 | 
			
		||||
    MetaDataUtils* pMdUtils = getAnalysis<MetaDataUtilsWrapper>().getMetaDataUtils();
 | 
			
		||||
    if (control == 0 || !isEntryFunc(pMdUtils, F) || getNumBBs(F) > NumBBThreshold) {
 | 
			
		||||
    if (control == 0 || !isEntryFunc(pMdUtils, F)) {
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
    for (auto BI = F->begin(), BE = F->end(); BI != BE; ++BI)
 | 
			
		||||
@ -1207,7 +1211,7 @@ void VariableReuseAnalysis::InsertElementAliasing(Function* F)
 | 
			
		||||
 | 
			
		||||
            // First, collect all insertElementInst and extractElementInst.
 | 
			
		||||
            VecInsEltInfoTy AllIEIs;
 | 
			
		||||
            if (!getAllInsEltsIfAvailable(IEI, AllIEIs)) {
 | 
			
		||||
            if (!getAllInsEltsIfAvailable(IEI, AllIEIs, OnlySameBB)) {
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user