1
- // ===- InstructionMaps .h ----------------------------------------*- C++ -*-===//
1
+ // ===- InstrMaps .h ------ ----------------------------------------*- C++ -*-===//
2
2
//
3
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
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
6
//
7
7
// ===----------------------------------------------------------------------===//
8
8
9
- #ifndef LLVM_TRANSFORMS_VECTORIZE_SANDBOXVEC_PASSES_INSTRUCTIONMAPS_H
10
- #define LLVM_TRANSFORMS_VECTORIZE_SANDBOXVEC_PASSES_INSTRUCTIONMAPS_H
9
+ #ifndef LLVM_TRANSFORMS_VECTORIZE_SANDBOXVEC_PASSES_INSTRMAPS_H
10
+ #define LLVM_TRANSFORMS_VECTORIZE_SANDBOXVEC_PASSES_INSTRMAPS_H
11
11
12
12
#include " llvm/ADT/ArrayRef.h"
13
13
#include " llvm/ADT/DenseMap.h"
@@ -32,15 +32,15 @@ class InstrMaps {
32
32
DenseMap<Value *, DenseMap<Value *, unsigned >> VectorToOrigLaneMap;
33
33
34
34
public:
35
- // / \Returns all the vector value that we got from vectorizing \p Orig, or
35
+ // / \Returns the vector value that we got from vectorizing \p Orig, or
36
36
// / nullptr if not found.
37
37
Value *getVectorForOrig (Value *Orig) const {
38
38
auto It = OrigToVectorMap.find (Orig);
39
39
return It != OrigToVectorMap.end () ? It->second : nullptr ;
40
40
}
41
41
// / \Returns the lane of \p Orig before it got vectorized into \p Vec, or
42
42
// / nullopt if not found.
43
- std::optional<int > getOrigLane (Value *Vec, Value *Orig) const {
43
+ std::optional<unsigned > getOrigLane (Value *Vec, Value *Orig) const {
44
44
auto It1 = VectorToOrigLaneMap.find (Vec);
45
45
if (It1 == VectorToOrigLaneMap.end ())
46
46
return std::nullopt;
@@ -74,4 +74,4 @@ class InstrMaps {
74
74
};
75
75
} // namespace llvm::sandboxir
76
76
77
- #endif // LLVM_TRANSFORMS_VECTORIZE_SANDBOXVEC_PASSES_INSTRUCTIONMAPS_H
77
+ #endif // LLVM_TRANSFORMS_VECTORIZE_SANDBOXVEC_PASSES_INSTRMAPS_H
0 commit comments