• Lei Wang's avatar
    [Refactor] Enhance MergeSharedMemoryAllocations Pass for Improved Liveness... · 0fdefe2b
    Lei Wang authored
    [Refactor] Enhance MergeSharedMemoryAllocations Pass for Improved Liveness Analysis and Scope Management (#508)
    
    * Introduced a new StmtAttr structure to track the scope level of statements, enhancing the liveness analysis process.
    * Updated the UpdateStmtAttr function to manage statement attributes effectively during memory allocation visits.
    * Modified the VisitStmt_ methods to utilize the new scope level tracking, ensuring accurate memory access patterns.
    * Refactored the LivenessAnalysis and PlanMemory functions to incorporate statement attributes, improving the handling of gen and kill points in memory management.
    * Added a new helper function allow_warp_specialized in phase.py to conditionally enable warp specialization based on pass context and target, addressing potential bugs in the MergeSharedMemoryAllocations pass.
    * Enhanced the OptimizeForTarget function to conditionally apply the MergeSharedMemoryAllocations pass based on warp specialization settings, improving robustness in memory allocation strategies.
    0fdefe2b
merge_shared_memory_allocations.cc 36 KB