[PATCH] D27193: MachineLoopInfo: add function findInductionRegister.
Quentin Colombet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 30 13:41:37 PST 2016
qcolombet added inline comments.
================
Comment at: include/llvm/CodeGen/MachineLoopInfo.h:174
+ /// R = R + #bump
+ /// if (R < #N) goto loop
+ /// IVBump is the immediate value added to R, and IVOp is the instruction
----------------
Which register would you return in such case:
/// R0 = phi ..., [ R1, LatchBlock ]
/// R1 = R0 + #bump
/// if (R1 < #N) goto loop
Is this supposed to work only on non-SSA code?
================
Comment at: include/llvm/CodeGen/MachineLoopInfo.h:176
+ /// IVBump is the immediate value added to R, and IVOp is the instruction
+ /// "R = R + #bump".
+ bool findInductionRegister(MachineLoop *L, unsigned &Reg, int64_t &IVBump,
----------------
What do we do we more general representation?
E.g., R = R * 2
Or with R = R + RuntimeConstant?
Basically where I am going is shouldn't we have a representation a la SCEV?
https://reviews.llvm.org/D27193
More information about the llvm-commits
mailing list