[PATCH] D59787: [ARM] Implement TTI::getMemcpyCost
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 24 14:01:28 PDT 2019
dmgreen added inline comments.
================
Comment at: lib/Target/ARM/ARMTargetTransformInfo.cpp:412
+ // is more expensive than 'TCC_Expensive = 4'.
+ const unsigned LibCallCost = 6;
+
----------------
Can you explain why this is more than 6? I would imagine it would be something like 4; 1 (for the call) + a few for argument setup.
================
Comment at: lib/Target/ARM/ARMTargetTransformInfo.cpp:436
+ MI->getDestAddressSpace(),
+ MI->getSourceAddressSpace(), *F))
+ return MemOps.size() * 2;
----------------
Does this need to be clang-formatted?
================
Comment at: test/Analysis/CostModel/ARM/memcpy.ll:373
+; ldrh r1, [r1]
+; strh r1, [r0]
+;
----------------
Is it worth adding a few strict-align tests too?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59787/new/
https://reviews.llvm.org/D59787
More information about the llvm-commits
mailing list