Tom Stellard
2012-May-25 15:15 UTC
[LLVMdev] MachineOperand TargetFlags being ignored in register coalescing pass
Hi, On AMD GPUs we have source modifiers and output modifiers, which are bits you can set on instructions to perform some simple no cost operations on either the operands or the result of an instruction (floating point values only). The source modifiers are FABS and FNEG and are applied to the operands before an instruction is executed. The output modifiers are CLAMP (clamp result between 0.0f and 1.0f) and OMOD (multiply the result by 0.5f, 2.0f, or 4.0f). These are applied to the result of an instruction after it is executed. For the R600 backend, I'm using the MachineOperand TargetFlags to keep track of the modifiers, but I've noticed when I use them on operands to COPY instructions they are not propagated when registers are coalesced. Is this a bug, or should I not be using TargetFlags for storing this kind of information? -Tom
Jakob Stoklund Olesen
2012-May-25 19:10 UTC
[LLVMdev] MachineOperand TargetFlags being ignored in register coalescing pass
On May 25, 2012, at 8:15 AM, Tom Stellard <thomas.stellard at amd.com> wrote:> For the R600 backend, I'm using the MachineOperand TargetFlags to > keep track of the modifiers, but I've noticed when I use them on > operands to COPY instructions they are not propagated when registers > are coalesced. Is this a bug, or should I not be using TargetFlags for > storing this kind of information?Just use immediate operands. /jakob
Maybe Matching Threads
- [LLVMdev] MachineOperand::TargetFlags question
- [LLVMdev] MachineOperand::TargetFlags question
- [LLVMdev] MachineOperand::TargetFlags question
- [LLVMdev] [llvm-commits] [llvm] r162770 - in /llvm/trunk: include/llvm/CodeGen/MachineOperand.h lib/CodeGen/MachineInstr.cpp
- [LLVMdev] [llvm-commits] [llvm] r162770 - in /llvm/trunk: include/llvm/CodeGen/MachineOperand.h lib/CodeGen/MachineInstr.cpp