[all-commits] [llvm/llvm-project] 245e25: AMDGPU: Implement isAsmClobberable
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Wed Feb 2 11:20:24 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 245e25f9c3b4273ee77f5d066ef8b8526f881b69
https://github.com/llvm/llvm-project/commit/245e25f9c3b4273ee77f5d066ef8b8526f881b69
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2022-02-02 (Wed, 02 Feb 2022)
Changed paths:
M llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
M llvm/lib/Target/AMDGPU/SIRegisterInfo.h
A llvm/test/CodeGen/AMDGPU/inline-asm-reserved-regs.ll
Log Message:
-----------
AMDGPU: Implement isAsmClobberable
Warn on inline assembly clobbering reserved registers. It should also
warn on at least some reserved register defs, but that isn't happening
right now. If you have a def and re-use of a register we reserve, the
register coalescer will eliminate the intermediate virtual
register. When the reserved reg def is introduced later by the
backend, it will end up clobbering the value the register coalescer
assumed was live through the range.
There is also isInlineAsmReadOnlyReg, although I don't understand what
the distinction really is. It's called in SelectionDAGBuilder, long
before the set of reserved registers is frozen so I'm not sure how
that can possibly work reliably.
Unfortunately this is also using the ugly tablegenerated names for the
registers.
Commit: a96dbb9035ea91adf369fcafffe49371806e971e
https://github.com/llvm/llvm-project/commit/a96dbb9035ea91adf369fcafffe49371806e971e
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2022-02-02 (Wed, 02 Feb 2022)
Changed paths:
M llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
M llvm/test/CodeGen/AMDGPU/inline-asm-reserved-regs.ll
Log Message:
-----------
CodeGen: Use asm register names in warning message
This was using the ugly tablegenerated register enum names, which are
really hideous for register tuples on AMDGPU. Use the prettier names
which are recognized by the asm parser.
Compare: https://github.com/llvm/llvm-project/compare/979d0ee8ab30...a96dbb9035ea
More information about the All-commits
mailing list