aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCSchedule.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-07-10 22:13:43 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-07-10 22:13:43 +0000
commitf862f87ff219206e03d56512b788bc5f61c78541 (patch)
tree5edc9caa39afcfe95bacae47002c0d34719d8f43 /llvm/lib/MC/MCSchedule.cpp
parent8b984d19f2c8b22e26a7b8f8beca6dfde2873a7e (diff)
downloadllvm-f862f87ff219206e03d56512b788bc5f61c78541.zip
llvm-f862f87ff219206e03d56512b788bc5f61c78541.tar.gz
llvm-f862f87ff219206e03d56512b788bc5f61c78541.tar.bz2
MC: Remove the copy of MCSchedModel in MCSubtargetInfo
`MCSchedModel` is large. Make `MCSchedModel::GetDefaultSchedModel()` return by-reference instead of by-value, so we can store a pointer in `MCSubtargetInfo::CPUSchedModel` instead of a copy. Note: since `MCSchedModel` is POD, this doesn't create a static constructor. llvm-svn: 241947
Diffstat (limited to 'llvm/lib/MC/MCSchedule.cpp')
-rw-r--r--llvm/lib/MC/MCSchedule.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCSchedule.cpp b/llvm/lib/MC/MCSchedule.cpp
new file mode 100644
index 0000000..0aa20f9
--- /dev/null
+++ b/llvm/lib/MC/MCSchedule.cpp
@@ -0,0 +1,33 @@
+//===- MCSchedule.cpp - Scheduling ------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the default scheduling model.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/MC/MCSchedule.h"
+
+using namespace llvm;
+
+static_assert(std::is_pod<MCSchedModel>::value,
+ "We shouldn't have a static constructor here");
+const MCSchedModel MCSchedModel::Default = {DefaultIssueWidth,
+ DefaultMicroOpBufferSize,
+ DefaultLoopMicroOpBufferSize,
+ DefaultLoadLatency,
+ DefaultHighLatency,
+ DefaultMispredictPenalty,
+ false,
+ true,
+ 0,
+ nullptr,
+ nullptr,
+ 0,
+ 0,
+ nullptr};