spatel added a comment. I haven't looked closely at the series of transforms that gets us here, so let me ask: would it be more efficient to produce the add/inc/dec machine instructions directly rather than LEA? Or do we do this because the 3-address opportunity helps register allocation, so this late reversal is a special-case of the more generally useful transforms that produce LEA in the 1st place?
================ Comment at: llvm/lib/Target/X86/X86FixupLEAs.cpp:11 // re-written as LEA instructions in order to reduce pipeline delays. // When optimizing for size it replaces suitable LEAs with INC or DEC. // ---------------- Should update this comment to better match the logic: "It replaces LEAs with ADD/INC/DEC when that is better for size/speed." ? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61472/new/ https://reviews.llvm.org/D61472 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits