[PATCH] D139415: [RFC][WebAssembly] Optimize GEPs
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 12 03:33:52 PST 2022
samparker added inline comments.
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyOptimizeGEPs.cpp:18
+/// between IR -> SCEV -> IR during LSR. This pass finds inbounds GEPs, with the
+/// form: (getelementptr %base, (or %reg_offset, %constant)) which is what is
+/// generated after loop unrolling + instcombine. The GEPs are then converted
----------------
lebedev.ri wrote:
> How is this different from `SeparateConstOffsetFromGEP` pass?
I started by trying to use it and it didn't do anything. But, looking again, that appears to be a TTI issue. It still produces IR that we don't want, as the base address is generated by a GEP and not pointer arithmetic. I should be able to remedy this through another TTI hook though. I'll experiment.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139415/new/
https://reviews.llvm.org/D139415
More information about the llvm-commits
mailing list