Skip to content

Commit 27d8d6c

Browse files
admitricigcbot
authored andcommitted
Create CodeScheduling pass
Introduce the CodeScheduling LLVM function pass for local scheduling of the instructions within a basic block. The goal is to schedule for maximal latency hiding without increasing the register pressure so much that the spills are introduced. There is also an option to force scheduling for the minimum possible register pressure. Added the RegisterPressureTracker helper class to track real register pressure within a basic block, including proper tracking of "hanging" values, which live intervals are prolonged because of the regalloc restrictions. Added the VectorShuffleAnalysis pass to recognize vector shuffle and vector creation patterns to handle them properly for scheduling purposes.
1 parent 392d9d7 commit 27d8d6c

File tree

18 files changed

+3393
-4
lines changed

18 files changed

+3393
-4
lines changed

IGC/Compiler/CISACodeGen/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ set(IGC_BUILD__SRC__CISACodeGen_Common
2727
"${CMAKE_CURRENT_SOURCE_DIR}/CVariable.cpp"
2828
"${CMAKE_CURRENT_SOURCE_DIR}/CheckInstrTypes.cpp"
2929
"${CMAKE_CURRENT_SOURCE_DIR}/CoalescingEngine.cpp"
30+
"${CMAKE_CURRENT_SOURCE_DIR}/CodeScheduling.cpp"
3031
"${CMAKE_CURRENT_SOURCE_DIR}/CodeSinking.cpp"
3132
"${CMAKE_CURRENT_SOURCE_DIR}/ComputeShaderBase.cpp"
3233
"${CMAKE_CURRENT_SOURCE_DIR}/ConstantCoalescing.cpp"
@@ -100,6 +101,7 @@ set(IGC_BUILD__SRC__CISACodeGen_Common
100101
"${CMAKE_CURRENT_SOURCE_DIR}/VariableReuseAnalysis.cpp"
101102
"${CMAKE_CURRENT_SOURCE_DIR}/VectorPreProcess.cpp"
102103
"${CMAKE_CURRENT_SOURCE_DIR}/VectorProcess.cpp"
104+
"${CMAKE_CURRENT_SOURCE_DIR}/VectorShuffleAnalysis.cpp"
103105
"${CMAKE_CURRENT_SOURCE_DIR}/WIAnalysis.cpp"
104106
"${CMAKE_CURRENT_SOURCE_DIR}/helper.cpp"
105107
"${CMAKE_CURRENT_SOURCE_DIR}/layout.cpp"
@@ -136,6 +138,7 @@ set(IGC_BUILD__HDR__CISACodeGen_Common
136138
"${CMAKE_CURRENT_SOURCE_DIR}/CShaderProgram.hpp"
137139
"${CMAKE_CURRENT_SOURCE_DIR}/CheckInstrTypes.hpp"
138140
"${CMAKE_CURRENT_SOURCE_DIR}/CoalescingEngine.hpp"
141+
"${CMAKE_CURRENT_SOURCE_DIR}/CodeScheduling.hpp"
139142
"${CMAKE_CURRENT_SOURCE_DIR}/CodeSinking.hpp"
140143
"${CMAKE_CURRENT_SOURCE_DIR}/ComputeShaderBase.hpp"
141144
"${CMAKE_CURRENT_SOURCE_DIR}/ConstantCoalescing.hpp"
@@ -209,6 +212,7 @@ set(IGC_BUILD__HDR__CISACodeGen_Common
209212
"${CMAKE_CURRENT_SOURCE_DIR}/UniformAssumptions.hpp"
210213
"${CMAKE_CURRENT_SOURCE_DIR}/VariableReuseAnalysis.hpp"
211214
"${CMAKE_CURRENT_SOURCE_DIR}/VectorProcess.hpp"
215+
"${CMAKE_CURRENT_SOURCE_DIR}/VectorShuffleAnalysis.hpp"
212216
"${CMAKE_CURRENT_SOURCE_DIR}/WIAnalysis.hpp"
213217
"${CMAKE_CURRENT_SOURCE_DIR}/helper.h"
214218
"${CMAKE_CURRENT_SOURCE_DIR}/layout.hpp"

0 commit comments

Comments
 (0)