[llvm] [RISCV] Support postRA vsetvl insertion pass (PR #70549)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 15 12:19:05 PST 2023


topperc wrote:

> At a high level, I see a couple of conceptual problems with this code.
> 
> The updates being applied are often overly course. I don't spot a specific instance of any of them being incorrect, but prior experience says this likely hints at a lack of understanding which risks a potential correctness bug.
> 
> The inconsistent use of getReachingDefMI and getUniqueVRegDef hints at a conceptual gap. I think it is the case that all of our vector typed values should require the LiveIntervals based query mechanisms for precision, and that all of our GPRs (in particular AVLs), should be fine with getUniqueVRegDef (or even getVRegDef) since we _haven't_ been through scalar regalloc here. If this is not true, then the alternate question is why only _some_ sites have been updated to use getReachingDefMI. Either way, there's something off here.

getUniqueVRegDef will definitely fail for any scalar GPRs that came from a phi. Maybe other cases too.

https://github.com/llvm/llvm-project/pull/70549


More information about the llvm-commits mailing list