summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDean Michael Berris <dberris@google.com>2018-07-26 00:02:54 +0000
committerDean Michael Berris <dberris@google.com>2018-07-26 00:02:54 +0000
commit12c27f5b5398e4f7aca5bf1cea997365a2ab58d8 (patch)
tree27a504396bad7d2ed2e4c76adaaf1b27c70e1e3c /tools
parent327eaad5f0c74a1edc87eddc895ae20e05e9ccec (diff)
[MCA] Avoid an InstrDesc copy in mca::LSUnit::reserve.
Summary: InstrDesc contains 4 vectors (as well as some other data), so it's expensive to copy. Authored By: orodley Reviewers: andreadb, mattd, dberris Reviewed By: mattd, dberris Subscribers: dberris, gbedwell, llvm-commits Differential Revision: https://reviews.llvm.org/D49775 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337985 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-mca/LSUnit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/llvm-mca/LSUnit.cpp b/tools/llvm-mca/LSUnit.cpp
index 4406e30a593..9ee3b617189 100644
--- a/tools/llvm-mca/LSUnit.cpp
+++ b/tools/llvm-mca/LSUnit.cpp
@@ -52,7 +52,7 @@ void LSUnit::assignSQSlot(unsigned Index) {
}
bool LSUnit::reserve(const InstRef &IR) {
- const InstrDesc Desc = IR.getInstruction()->getDesc();
+ const InstrDesc &Desc = IR.getInstruction()->getDesc();
unsigned MayLoad = Desc.MayLoad;
unsigned MayStore = Desc.MayStore;
unsigned IsMemBarrier = Desc.HasSideEffects;