|
LLVM 24.0.0git
|
#include "llvm/Transforms/Scalar/SeparateConstOffsetFromGEP.h"#include "ScalarOptions.h"#include "llvm/ADT/APInt.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/DepthFirstIterator.h"#include "llvm/ADT/SmallVector.h"#include "llvm/Analysis/LoopInfo.h"#include "llvm/Analysis/MemoryBuiltins.h"#include "llvm/Analysis/TargetLibraryInfo.h"#include "llvm/Analysis/TargetTransformInfo.h"#include "llvm/Analysis/ValueTracking.h"#include "llvm/IR/BasicBlock.h"#include "llvm/IR/Constant.h"#include "llvm/IR/Constants.h"#include "llvm/IR/DataLayout.h"#include "llvm/IR/DerivedTypes.h"#include "llvm/IR/Dominators.h"#include "llvm/IR/Function.h"#include "llvm/IR/GetElementPtrTypeIterator.h"#include "llvm/IR/IRBuilder.h"#include "llvm/IR/InstrTypes.h"#include "llvm/IR/Instruction.h"#include "llvm/IR/Instructions.h"#include "llvm/IR/Module.h"#include "llvm/IR/PassManager.h"#include "llvm/IR/PatternMatch.h"#include "llvm/IR/Type.h"#include "llvm/IR/User.h"#include "llvm/IR/Value.h"#include "llvm/InitializePasses.h"#include "llvm/Pass.h"#include "llvm/Support/Casting.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/KnownBits.h"#include "llvm/Support/raw_ostream.h"#include "llvm/Transforms/Scalar.h"#include "llvm/Transforms/Utils/Local.h"#include <cassert>#include <cstdint>#include <iterator>#include <optional>#include <string>Go to the source code of this file.
Functions | |
| INITIALIZE_PASS_BEGIN (SeparateConstOffsetFromGEPLegacyPass, "separate-const-offset-from-gep", "Split GEPs to a variadic base and a constant offset for better CSE", false, false) INITIALIZE_PASS_END(SeparateConstOffsetFromGEPLegacyPass | |
| static bool | canReorderAddSextToGEP (const Use *Idx, const BinaryOperator *Add, const DataLayout &DL) |
| static bool | allowsPreservingNUW (const User *U) |
| A helper function to check if reassociating through an entry in the user chain would invalidate the GEP's nuw flag. | |
| static BasicBlock::iterator | getIndexInsertionPoint (const Use &Idx) |
Variables | |
| separate const offset from | gep |
| separate const offset from Split GEPs to a variadic base and a constant offset for better | CSE |
| separate const offset from Split GEPs to a variadic base and a constant offset for better | false |
A helper function to check if reassociating through an entry in the user chain would invalidate the GEP's nuw flag.
Definition at line 872 of file SeparateConstOffsetFromGEP.cpp.
References assert(), llvm::cast(), llvm::dyn_cast(), llvm::BinaryOperator::getOpcode(), llvm::Instruction::hasNoUnsignedWrap(), and llvm::isa().
|
static |
Definition at line 531 of file SeparateConstOffsetFromGEP.cpp.
References llvm::Add, llvm::sampleprof::Base, llvm::cast(), llvm::computeOverflowForSignedAdd(), DL, llvm::dyn_cast(), GEP, llvm::gep_type_begin(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::getFixedValue(), llvm::GetPointerBaseWithConstantOffset(), llvm::APInt::getSignedMinValue(), llvm::getUnderlyingObject(), llvm::ConstantInt::getValue(), llvm::isa(), llvm::ConstantInt::isNegative(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::isScalable(), N, llvm::NeverOverflows, llvm::Offset, llvm::APInt::sextOrTrunc(), uint64_t, llvm::APInt::zext(), and llvm::APInt::zextOrTrunc().
|
static |
Definition at line 894 of file SeparateConstOffsetFromGEP.cpp.
References llvm::cast(), llvm::dyn_cast(), and I.
| INITIALIZE_PASS_BEGIN | ( | SeparateConstOffsetFromGEPLegacyPass | , |
| "separate-const-offset-from-gep" | , | ||
| "Split GEPs to a variadic base and a constant offset for better CSE" | , | ||
| false | , | ||
| false | ) |
References INITIALIZE_PASS_DEPENDENCY, and INITIALIZE_PASS_END.
Definition at line 494 of file SeparateConstOffsetFromGEP.cpp.
| separate const offset from gep |
Definition at line 493 of file SeparateConstOffsetFromGEP.cpp.