mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Fix const merging when an alias of a const is llvm.used.
We used to disable constant merging not only if a constant is llvm.used, but also if an alias of a constant is llvm.used. This change fixes that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181175 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -260,14 +260,24 @@ public:
|
||||
/// this value.
|
||||
bool hasValueHandle() const { return HasValueHandle; }
|
||||
|
||||
/// stripPointerCasts - This method strips off any unneeded pointer casts and
|
||||
/// all-zero GEPs from the specified value, returning the original uncasted
|
||||
/// value. If this is called on a non-pointer value, it returns 'this'.
|
||||
/// \brief This method strips off any unneeded pointer casts,
|
||||
/// all-zero GEPs and aliases from the specified value, returning the original
|
||||
/// uncasted value. If this is called on a non-pointer value, it returns
|
||||
/// 'this'.
|
||||
Value *stripPointerCasts();
|
||||
const Value *stripPointerCasts() const {
|
||||
return const_cast<Value*>(this)->stripPointerCasts();
|
||||
}
|
||||
|
||||
/// \brief This method strips off any unneeded pointer casts and
|
||||
/// all-zero GEPs from the specified value, returning the original
|
||||
/// uncasted value. If this is called on a non-pointer value, it returns
|
||||
/// 'this'.
|
||||
Value *stripPointerCastsNoFollowAliases();
|
||||
const Value *stripPointerCastsNoFollowAliases() const {
|
||||
return const_cast<Value*>(this)->stripPointerCastsNoFollowAliases();
|
||||
}
|
||||
|
||||
/// stripInBoundsConstantOffsets - This method strips off unneeded pointer casts and
|
||||
/// all-constant GEPs from the specified value, returning the original
|
||||
/// pointer value. If this is called on a non-pointer value, it returns
|
||||
|
Reference in New Issue
Block a user