diff options
author | Alex Bradbury <asb@lowrisc.org> | 2018-05-17 15:51:37 +0000 |
---|---|---|
committer | Alex Bradbury <asb@lowrisc.org> | 2018-05-17 15:51:37 +0000 |
commit | 6a53023b4e1230609691377c33263de6667522c8 (patch) | |
tree | ef5ede9671584e75d34401e5dcacd224c990575c /lldb/packages/Python/lldbsuite/test/expression_command/timeout/wait-a-while.cpp | |
parent | b5741f5c3db0e18a70564e326f75f5087a36cd12 (diff) | |
download | bcm5719-llvm-6a53023b4e1230609691377c33263de6667522c8.tar.gz bcm5719-llvm-6a53023b4e1230609691377c33263de6667522c8.zip |
[RISCV] Set isReMaterializable on ADDI and LUI instructions
The isReMaterlizable flag is somewhat confusing, unlike most other instruction
flags it is currently interpreted as a hint (mightBeRematerializable would be
a better name). While LUI is always rematerialisable, for an instruction like
ADDI it depends on its operands. TargetInstrInfo::isTriviallyReMaterializable
will call TargetInstrInfo::isReallyTriviallyReMaterializable, which in turn
calls TargetInstrInfo::isReallyTriviallyReMaterializableGeneric. We rely on
the logic in the latter to pick out instances of ADDI that really are
rematerializable.
The isReMaterializable flag does make a difference on a variety of test
programs. The recently committed remat.ll test case demonstrates how stack
usage is reduce and a unnecessary lw/sw can be removed. Stack usage in the
Proc0 function in dhrystone reduces from 192 bytes to 112 bytes.
For the sake of completeness, this patch also implements
RISCVRegisterInfo::isConstantPhysReg. Although this is called from a number of
places, it doesn't seem to result in different codegen for any programs I've
thrown at it. However, it is called in the rematerialisation codepath and it
seems sensible to implement something correct here.
Differential Revision: https://reviews.llvm.org/D46182
llvm-svn: 332617
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/timeout/wait-a-while.cpp')
0 files changed, 0 insertions, 0 deletions