comparison include/llvm/Transforms/Scalar/GVNExpression.h @ 148:63bd29f05246

merged
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 14 Aug 2019 19:46:37 +0900
parents c2174574ed3a
children
comparison
equal deleted inserted replaced
146:3fc4d5c3e21e 148:63bd29f05246
1 //===- GVNExpression.h - GVN Expression classes -----------------*- C++ -*-===// 1 //===- GVNExpression.h - GVN Expression classes -----------------*- C++ -*-===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // 4 // See https://llvm.org/LICENSE.txt for license information.
5 // This file is distributed under the University of Illinois Open Source 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 // License. See LICENSE.TXT for details.
7 // 6 //
8 //===----------------------------------------------------------------------===// 7 //===----------------------------------------------------------------------===//
9 // 8 //
10 /// \file 9 /// \file
11 /// 10 ///
157 static bool classof(const Expression *EB) { 156 static bool classof(const Expression *EB) {
158 ExpressionType ET = EB->getExpressionType(); 157 ExpressionType ET = EB->getExpressionType();
159 return ET > ET_BasicStart && ET < ET_BasicEnd; 158 return ET > ET_BasicStart && ET < ET_BasicEnd;
160 } 159 }
161 160
162 /// \brief Swap two operands. Used during GVN to put commutative operands in 161 /// Swap two operands. Used during GVN to put commutative operands in
163 /// order. 162 /// order.
164 void swapOperands(unsigned First, unsigned Second) { 163 void swapOperands(unsigned First, unsigned Second) {
165 std::swap(Operands[First], Operands[Second]); 164 std::swap(Operands[First], Operands[Second]);
166 } 165 }
167 166