1 //===- llvm/CodeGen/GlobalISel/Types.h - Types used by GISel ----*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
10 /// This file describes high level types that are used by several passes or
11 /// APIs involved in the GlobalISel pipeline.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CODEGEN_GLOBALISEL_TYPES_H
15 #define LLVM_CODEGEN_GLOBALISEL_TYPES_H
17 #include "llvm/ADT/DenseMap.h"
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>;
31 } // end namespace llvm
33 #endif // LLVM_CODEGEN_GLOBALISEL_TYPES_H