This patch reduces compilation time by avoiding redundant analysis while selecting instructions to create an immediate.
If the instruction count required to create the input number without rotate is 2, we do not need further analysis to find a shorter instruction sequence with rotate; rotate + load constant cannot be done by 1 instruction (i.e. getInt64CountDirectnever return 0).
This patch should not change functionality.
Details
Details
Diff Detail
Diff Detail
Event Timeline
llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp | ||
---|---|---|
710 ↗ | (On Diff #105963) | Can uou change this routine name? (and the one below) They're pretty useless when reading to know what they mean. |
Comment Actions
@echristo In addition to getInt64Count, I feel that getInt64 is also somewhat confusing since we have getI64Imm for other purpose.
How about selectI64Imm and selectI64ImmInstrCount instead of getInt64 and getInt64Count?
Alternative names are getInt64MaterializationInstr and getInt64MaterializationInstrCount (suggested by @nemanjai)
Do you have any suggestion?