Instead of skipping past allocas whenever inserting a new insruction,
which ate up a lot of compilation time, they are inserted at the default
insertion point.
The result is that allocas that would have coallesced just after the
global load an input loads are dispersed throughout the commands. So as
part of dxil finalization, the allocas are moved to the beginning of the
entry block of each function. This results in some minor changes to a
couple tests due to the allocas preceding the loads.
Many of these take the form of removing unused member variables and
unused functions. Where they were truly unused, I removed them. Where
they were only used in asserts, I hid them for the release builds. Where
the code in question was original to LLVM, I didn't remove so much as
comment out the offending code. In most cases these changes are
counterparts to already excluded code for HLSL.
A few cases concern indexing or type matches. Where relevant, I lifted
the same solutions in the current source of the llvm project.
I altered the fix made recently to LinkAllPasses.h. Instead of just
disabling the warning, I used the temporary variables that the current
llvm project uses to avoid having to cast null pointers.
Previously, the counter-of-instrumentation-bytes-written for the shader debug pass was at offset zero into the UAV. This presented problems when overflow/wraparound occurred. This change moves the counter up into the unused overflow space in the UAV. The counter for the mesh shader output pass is moved to the same place for simplicity.
PIX bug # 26371771.
This is a pass for PIX that adds instructions to write mesh shader output (vertices and indices) to a UAV for later ingestion by PIX in order to present a view of that output.