Static LDS size is saved in MachineFunctionInfo::LDSSize,
We define a pseudo instruction with usesCustomInserter bit set. Then, in EmitInstrWithCustomInserter,
we replace this pseudo instruction with a mov of MachineFunctionInfo::LDSSize.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/AMDGPU/SIISelLowering.cpp | ||
---|---|---|
1064 ↗ | (On Diff #50355) | I don't think this will work if we call this intrinsic in the entry block and then the LDS variables are used in different blocks. Can you add a test case for this and then fix it if it doesn't work. |
include/llvm/IR/IntrinsicsAMDGPU.td | ||
---|---|---|
219–220 ↗ | (On Diff #50355) | I think the get should be dropped from the name |
lib/Target/AMDGPU/SIISelLowering.cpp | ||
---|---|---|
1064 ↗ | (On Diff #50355) | This is ok because this is called by the ExpandISelPseudos pass which runs on the completed MachineFunction |
Comment Actions
updated based on Tom and Matt's comments:
- drop "get_" in the intrinsic name;
- add new test to test multiple block case.