[PATCH] D61472: [X86FixupLEAs] Turn optIncDec into a generic two address LEA optimizer. Support LEA64_32r properly.
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 24 07:41:58 PDT 2019
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
More information about the llvm-commits
mailing list