[PATCH] D124308: [MachineScheduler] exclude INLINEASM from schedule when it would increase register pressure
Quentin Colombet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 2 14:00:16 PDT 2022
qcolombet added a comment.
Hi,
I see what you are trying to solve, but at the same time, in theory any instruction could have this kind of register pressure problems. (Though, we probably don't ever create too many not spillable live-ranges around regular instructions and regular instructions have a reasonable number of operands.)
Ultimately, I feel that telling the users that their inline asm is using too many registers is not necessarily a bad thing.
Making inline asm instructions scheduling boundaries when they use a "lot of registers" is a pretty big hammer. Also technically, inline asm instructions with only a few operands could also become scheduling barrier if the surrounding pressure is already high.
I'm on the fence with that patch. I expect it fixes the cases where we may run out of registers but it also over-constrains the scheduling problem.
I guess this is acceptable because when users use inline asm, they essentially are telling the compiler "I know what I'm doing". Thus, I'm leaning toward "this patch is okay" but I could be convinced otherwise.
What do others think?
Cheers,
-Quentin
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124308/new/
https://reviews.llvm.org/D124308
More information about the llvm-commits
mailing list