Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
14 | pmbaty | 1 | //===- Local.h - Functions to perform local transformations -----*- 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 | // This family of functions perform various local transformations to the |
||
10 | // program. |
||
11 | // |
||
12 | //===----------------------------------------------------------------------===// |
||
13 | |||
14 | #ifndef LLVM_ANALYSIS_UTILS_LOCAL_H |
||
15 | #define LLVM_ANALYSIS_UTILS_LOCAL_H |
||
16 | |||
17 | namespace llvm { |
||
18 | |||
19 | class DataLayout; |
||
20 | class IRBuilderBase; |
||
21 | class User; |
||
22 | class Value; |
||
23 | |||
24 | /// Given a getelementptr instruction/constantexpr, emit the code necessary to |
||
25 | /// compute the offset from the base pointer (without adding in the base |
||
26 | /// pointer). Return the result as a signed integer of intptr size. |
||
27 | /// When NoAssumptions is true, no assumptions about index computation not |
||
28 | /// overflowing is made. |
||
29 | Value *emitGEPOffset(IRBuilderBase *Builder, const DataLayout &DL, User *GEP, |
||
30 | bool NoAssumptions = false); |
||
31 | |||
32 | } // namespace llvm |
||
33 | |||
34 | #endif // LLVM_ANALYSIS_UTILS_LOCAL_H |