mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Model inline asm constraint which ties an input to an output register as machine operand TIED_TO constraint. This eliminated the need to pre-allocate registers for these. This also allows register allocator can eliminate the unneeded copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67512 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -135,14 +135,13 @@ public:
|
||||
return (Flag & 0xffff) >> 3;
|
||||
}
|
||||
|
||||
/// isOutputOperandTiedToUse - Return true if the flag of the inline asm
|
||||
/// operand indicates it is an output that's matched to an input operand.
|
||||
static bool isOutputOperandTiedToUse(unsigned Flag, unsigned &UseIdx) {
|
||||
if (Flag & 0x80000000) {
|
||||
UseIdx = Flag >> 16;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
/// isUseOperandTiedToDef - Return true if the flag of the inline asm
|
||||
/// operand indicates it is an use operand that's matched to a def operand.
|
||||
static bool isUseOperandTiedToDef(unsigned Flag, unsigned &Idx) {
|
||||
if ((Flag & 0x80000000) == 0)
|
||||
return false;
|
||||
Idx = (Flag & ~0x80000000) >> 16;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user