LLVM 22.0.0git
|
#include "llvm/Transforms/Scalar/InferAlignment.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/Support/KnownBits.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils/Local.h"
Go to the source code of this file.
Functions | |
static bool | tryToImproveAlign (const DataLayout &DL, Instruction *I, function_ref< Align(Value *PtrOp, Align OldAlign, Align PrefAlign)> Fn) |
bool | inferAlignment (Function &F, AssumptionCache &AC, DominatorTree &DT) |
bool inferAlignment | ( | Function & | F, |
AssumptionCache & | AC, | ||
DominatorTree & | DT ) |
Definition at line 74 of file InferAlignment.cpp.
References Changed, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::clear(), llvm::commonAlignment(), llvm::computeKnownBits(), llvm::KnownBits::countMinTrailingZeros(), DL, F, llvm::KnownBits::getBitWidth(), llvm::APInt::getLimitedValue(), llvm::Value::getType(), I, llvm::Value::MaxAlignmentExponent, llvm::Value::stripAndAccumulateConstantOffsets(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::try_emplace(), llvm::tryEnforceAlignment(), and tryToImproveAlign().
Referenced by llvm::InferAlignmentPass::run().
|
static |
Definition at line 25 of file InferAlignment.cpp.
References llvm::cast(), DL, llvm::dyn_cast(), llvm::Type::getInt32Ty(), llvm::getLoadStoreAlignment(), llvm::getLoadStorePointerOperand(), llvm::getLoadStoreType(), I, II, llvm::setLoadStoreAlignment(), and llvm::Align::value().
Referenced by inferAlignment().