LLVM 20.0.0git
Local.h
Go to the documentation of this file.
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
17namespace llvm {
18
19class DataLayout;
20class IRBuilderBase;
21class User;
22class 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.
29Value *emitGEPOffset(IRBuilderBase *Builder, const DataLayout &DL, User *GEP,
30 bool NoAssumptions = false);
31
32} // namespace llvm
33
34#endif // LLVM_ANALYSIS_UTILS_LOCAL_H
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Hexagon Common GEP
@ User
could "use" a pointer
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
Value * emitGEPOffset(IRBuilderBase *Builder, const DataLayout &DL, User *GEP, bool NoAssumptions=false)
Given a getelementptr instruction/constantexpr, emit the code necessary to compute the offset from th...
Definition: Local.cpp:22