search for: isprofitabletoconv3addr

Displaying 6 results from an estimated 6 matches for "isprofitabletoconv3addr".

2015 Sep 29
4
TwoAddressInstructionPass::isProfitableToConv3Addr()
Hi, I have cases of instruction pairs, where one is cheaper 2-address, and the other 3-address. I would like to select the 2-addr instruction during isel, but use the 3-addr instruction to avoid a copy if possible. I find that TwoAddressInstructionPass::isProfitableToConv3Addr() is only checking for the case of a physreg copy, and so leaves the majority of cases as they are (2-address). I would like to say "If 3-addr version would avoid a copy, use it!". Does anyone else have a similar situation? To do this, one would need to check the kill-flag on the tie...
2013 Sep 17
2
[LLVMdev] Codegen performance issue: LEA vs. INC.
...s in code gen that replaces index increment with lea. Here is the snippet from llvm/lib/CodeGen/TwoAddressInstructionPass.cpp if (MI.isConvertibleTo3Addr()) { // This instruction is potentially convertible to a true // three-address instruction. Check if it is profitable. if (!regBKilled || isProfitableToConv3Addr(regA, regB)) { // Try to convert it. if (convertInstTo3Addr(mi, nmi, regA, regB, Dist)) { ++NumConvertedTo3Addr; return true; // Done with this instruction. } } } regBKilled is false for my test case and isProfitableToConv3Addr is not even called. I've made an experim...
2015 Sep 29
2
TwoAddressInstructionPass::isProfitableToConv3Addr()
...wrote: >> >> Hi, >> >> I have cases of instruction pairs, where one is cheaper 2-address, and the other 3-address. I would like to select the 2-addr instruction during isel, but use the 3-addr instruction to avoid a copy if possible. I find that TwoAddressInstructionPass::isProfitableToConv3Addr() is only checking >> for the case of a physreg copy, and so leaves the majority of cases as they are (2-address). >> >> I would like to say "If 3-addr version would avoid a copy, use it!". Does anyone else have a similar situation? > > I think this is what it is...
2013 Oct 02
0
[LLVMdev] Codegen performance issue: LEA vs. INC.
...> Here is the snippet from llvm/lib/CodeGen/TwoAddressInstructionPass.cpp > > > > if (MI.isConvertibleTo3Addr()) { > > // This instruction is potentially convertible to a true > > // three-address instruction. Check if it is profitable. > > if (!regBKilled || isProfitableToConv3Addr(regA, regB)) { > > // Try to convert it. > > if (convertInstTo3Addr(mi, nmi, regA, regB, Dist)) { > > ++NumConvertedTo3Addr; > > return true; // Done with this instruction. > > } > > } > > } > > > > regBKilled is false...
2013 Oct 03
2
[LLVMdev] Codegen performance issue: LEA vs. INC.
...Gen/TwoAddressInstructionPass.cpp >> >> >> >> if (MI.isConvertibleTo3Addr()) { >> >> // This instruction is potentially convertible to a true >> >> // three-address instruction. Check if it is profitable. >> >> if (!regBKilled || isProfitableToConv3Addr(regA, regB)) { >> >> // Try to convert it. >> >> if (convertInstTo3Addr(mi, nmi, regA, regB, Dist)) { >> >> ++NumConvertedTo3Addr; >> >> return true; // Done with this instruction. >> >> } >> >> } >...
2013 Oct 05
0
[LLVMdev] Codegen performance issue: LEA vs. INC.
...;>> >>> >>> >>> if (MI.isConvertibleTo3Addr()) { >>> >>> // This instruction is potentially convertible to a true >>> >>> // three-address instruction. Check if it is profitable. >>> >>> if (!regBKilled || isProfitableToConv3Addr(regA, regB)) { >>> >>> // Try to convert it. >>> >>> if (convertInstTo3Addr(mi, nmi, regA, regB, Dist)) { >>> >>> ++NumConvertedTo3Addr; >>> >>> return true; // Done with this instruction. >>> >>...