summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/tools/llvm-exegesis/OperandGraphTest.cpp
diff options
context:
space:
mode:
authorClement Courbet <courbet@google.com>2018-05-17 07:38:21 +0000
committerClement Courbet <courbet@google.com>2018-05-17 07:38:21 +0000
commitee110fb735651d63252f70104d39c5a0376ee20d (patch)
tree56191aacb80508141d669128159f56b5afef5879 /llvm/unittests/tools/llvm-exegesis/OperandGraphTest.cpp
parentf4b09a3a30875842ea4f8e8fce22936a2a29164e (diff)
downloadbcm5719-llvm-ee110fb735651d63252f70104d39c5a0376ee20d.tar.gz
bcm5719-llvm-ee110fb735651d63252f70104d39c5a0376ee20d.zip
[llvm-exegesis] Update to cover latency through another opcode.
Restructuring the code to measure latency and uops. The end goal is to have this program spawn another process to deal with SIGILL and other malformed programs. It is not yet the case in this redesign, it is still the main program that runs the code (and may crash). It now uses BitVector instead of Graph for performance reasons. https://reviews.llvm.org/D46821 Authored by Guillaume Chatelet llvm-svn: 332579
Diffstat (limited to 'llvm/unittests/tools/llvm-exegesis/OperandGraphTest.cpp')
-rw-r--r--llvm/unittests/tools/llvm-exegesis/OperandGraphTest.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/llvm/unittests/tools/llvm-exegesis/OperandGraphTest.cpp b/llvm/unittests/tools/llvm-exegesis/OperandGraphTest.cpp
deleted file mode 100644
index a29813b03ef..00000000000
--- a/llvm/unittests/tools/llvm-exegesis/OperandGraphTest.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-//===-- OperandGraphTest.cpp ------------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "OperandGraph.h"
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-
-using testing::ElementsAre;
-using testing::IsEmpty;
-using testing::Not;
-
-namespace exegesis {
-namespace graph {
-namespace {
-
-static const auto In = Node::In();
-static const auto Out = Node::Out();
-
-TEST(OperandGraphTest, NoPath) {
- Graph TheGraph;
- EXPECT_THAT(TheGraph.getPathFrom(In, Out), IsEmpty());
-}
-
-TEST(OperandGraphTest, Connecting) {
- Graph TheGraph;
- TheGraph.connect(In, Out);
- EXPECT_THAT(TheGraph.getPathFrom(In, Out), Not(IsEmpty()));
- EXPECT_THAT(TheGraph.getPathFrom(In, Out), ElementsAre(In, Out));
-}
-
-TEST(OperandGraphTest, ConnectingThroughVariable) {
- const Node Var = Node::Var(1);
- Graph TheGraph;
- TheGraph.connect(In, Var);
- TheGraph.connect(Var, Out);
- EXPECT_THAT(TheGraph.getPathFrom(In, Out), Not(IsEmpty()));
- EXPECT_THAT(TheGraph.getPathFrom(In, Out), ElementsAre(In, Var, Out));
-}
-
-} // namespace
-} // namespace graph
-} // namespace exegesis
OpenPOWER on IntegriCloud