LLVM 22.0.0git
SeparateConstOffsetFromGEP.cpp File Reference

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 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.

Variables

static cl::opt< boolDisableSeparateConstOffsetFromGEP ("disable-separate-const-offset-from-gep", cl::init(false), cl::desc("Do not separate the constant offset from a GEP instruction"), cl::Hidden)
static cl::opt< boolVerifyNoDeadCode ("reassociate-geps-verify-no-dead-code", cl::init(false), cl::desc("Verify this pass produces no dead code"), cl::Hidden)
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

Function Documentation

◆ allowsPreservingNUW()

bool allowsPreservingNUW ( const User * U)
static

A helper function to check if reassociating through an entry in the user chain would invalidate the GEP's nuw flag.

Definition at line 833 of file SeparateConstOffsetFromGEP.cpp.

References assert(), llvm::cast(), llvm::dyn_cast(), llvm::BinaryOperator::getOpcode(), llvm::Instruction::hasNoUnsignedWrap(), and llvm::isa().

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( SeparateConstOffsetFromGEPLegacyPass ,
"separate-const-offset-from-gep" ,
"Split GEPs to a variadic base and a constant offset for better CSE" ,
false ,
false  )

Variable Documentation

◆ CSE

◆ DisableSeparateConstOffsetFromGEP

cl::opt< bool > DisableSeparateConstOffsetFromGEP("disable-separate-const-offset-from-gep", cl::init(false), cl::desc("Do not separate the constant offset from a GEP instruction"), cl::Hidden) ( "disable-separate-const-offset-from-gep" ,
cl::init(false) ,
cl::desc("Do not separate the constant offset from a GEP instruction") ,
cl::Hidden  )
static

◆ false

separate const offset from Split GEPs to a variadic base and a constant offset for better false

Definition at line 474 of file SeparateConstOffsetFromGEP.cpp.

◆ gep

separate const offset from gep

Definition at line 473 of file SeparateConstOffsetFromGEP.cpp.

◆ VerifyNoDeadCode

cl::opt< bool > VerifyNoDeadCode("reassociate-geps-verify-no-dead-code", cl::init(false), cl::desc("Verify this pass produces no dead code"), cl::Hidden) ( "reassociate-geps-verify-no-dead-code" ,
cl::init(false) ,
cl::desc("Verify this pass produces no dead code") ,
cl::Hidden  )
static