summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mca/llvm-mca.cpp
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2018-03-23 11:50:43 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2018-03-23 11:50:43 +0000
commitb5088da452d82a11e9f0f518df100e440d7266d6 (patch)
treeea5d784471b5fc11a841a9fada01880cc2f3130d /llvm/tools/llvm-mca/llvm-mca.cpp
parent29538c6ddbdc74889d2f76bb4f710782e39989b3 (diff)
downloadbcm5719-llvm-b5088da452d82a11e9f0f518df100e440d7266d6.tar.gz
bcm5719-llvm-b5088da452d82a11e9f0f518df100e440d7266d6.zip
[llvm-mca] Pass the InstrBuilder to the constructor of Backend.
This is done in preparation for the fix for PR36784. No functional change. llvm-svn: 328306
Diffstat (limited to 'llvm/tools/llvm-mca/llvm-mca.cpp')
-rw-r--r--llvm/tools/llvm-mca/llvm-mca.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/tools/llvm-mca/llvm-mca.cpp b/llvm/tools/llvm-mca/llvm-mca.cpp
index 0ae9c8849bb..5c085af9685 100644
--- a/llvm/tools/llvm-mca/llvm-mca.cpp
+++ b/llvm/tools/llvm-mca/llvm-mca.cpp
@@ -321,8 +321,12 @@ int main(int argc, char **argv) {
if (DispatchWidth)
Width = DispatchWidth;
+ // Create an instruction builder.
+ std::unique_ptr<mca::InstrBuilder> IB =
+ llvm::make_unique<mca::InstrBuilder>(*STI, *MCII);
+
std::unique_ptr<mca::Backend> B = llvm::make_unique<mca::Backend>(
- *STI, *MCII, *MRI, *S, Width, RegisterFileSize, MaxRetirePerCycle,
+ *STI, *MRI, *IB, *S, Width, RegisterFileSize, MaxRetirePerCycle,
LoadQueueSize, StoreQueueSize, AssumeNoAlias);
std::unique_ptr<mca::BackendPrinter> Printer =
OpenPOWER on IntegriCloud