1 //===- llvm/CodeGen/GlobalISel/Types.h - Types used by GISel ----*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 /// 9 /// \file 10 /// This file describes high level types that are used by several passes or 11 /// APIs involved in the GlobalISel pipeline. 12 //===----------------------------------------------------------------------===// 13 14 #ifndef LLVM_CODEGEN_GLOBALISEL_TYPES_H 15 #define LLVM_CODEGEN_GLOBALISEL_TYPES_H 16 17 #include "llvm/ADT/DenseMap.h" 18 19 namespace llvm { 20 21 class Value; 22 23 /// Map a value to a virtual register. 24 /// For now, we chose to map aggregate types to on single virtual 25 /// register. This might be revisited if it turns out to be inefficient. 26 /// PR26161 tracks that. 27 /// Note: We need to expose this type to the target hooks for thing like 28 /// ABI lowering that would be used during IRTranslation. 29 using ValueToVReg = DenseMap<const Value *, unsigned>; 30 31 } // end namespace llvm 32 33 #endif // LLVM_CODEGEN_GLOBALISEL_TYPES_H 34