diff options
author | Harrison Hao <57025411+harrisonGPU@users.noreply.github.com> | 2025-07-22 15:55:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-22 15:55:12 +0800 |
commit | 8c14d3f44f51be053e91612f4ad2d77bf04b6b3a (patch) | |
tree | d03fb6b7abc497cd07eebe557d2666627318e125 /clang/lib/AST/ByteCode/Program.cpp | |
parent | 34f59d79209268eca9c63ccc7646128f2dc52fe3 (diff) | |
download | llvm-8c14d3f44f51be053e91612f4ad2d77bf04b6b3a.zip llvm-8c14d3f44f51be053e91612f4ad2d77bf04b6b3a.tar.gz llvm-8c14d3f44f51be053e91612f4ad2d77bf04b6b3a.tar.bz2 |
[MISched] Use SchedRegion in overrideSchedPolicy and overridePostRASchedPolicy (#149297)
This patch updates `overrideSchedPolicy` and `overridePostRASchedPolicy`
to take a
`SchedRegion` parameter instead of just `NumRegionInstrs`. This provides
access to both the
instruction range and the parent `MachineBasicBlock`, which enables
looking up function-level
attributes.
With this change, targets can select post-RA scheduling direction per
function using a function
attribute. For example:
```cpp
void overridePostRASchedPolicy(MachineSchedPolicy &Policy,
const SchedRegion &Region) const {
const Function &F = Region.RegionBegin->getMF()->getFunction();
Attribute Attr = F.getFnAttribute("amdgpu-post-ra-direction");
...
}
Diffstat (limited to 'clang/lib/AST/ByteCode/Program.cpp')
0 files changed, 0 insertions, 0 deletions