HomePhabricator

[AMDGPU] SIFoldOperands: clean up tryConstantFoldOp

Authored by foad on Apr 7 2021, 5:49 AM.

Description

[AMDGPU] SIFoldOperands: clean up tryConstantFoldOp

First clean up the strange API of tryConstantFoldOp where it took an
immediate operand value, but no indication of which operand it was the
value for.

Second clean up the loop that calls tryConstantFoldOp so that it does
not have to restart from the beginning every time it folds an
instruction.

This is NFCI but there are some minor changes caused by the order in
which things are folded.

Differential Revision: https://reviews.llvm.org/D100031

Details

Committed
foadMay 6 2021, 1:55 AM
Differential Revision
D100031: [AMDGPU] SIFoldOperands: clean up tryConstantFoldOp
Parents
rG65cd0d6be477: [flang] Remove `%f18` from LIT configuration files
Branches
Unknown
Tags
Unknown