mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-06 04:31:08 +00:00
Teach ScalarEvolution about GlobalAliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80014 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
de05902114
commit
26812320b7
@ -63,6 +63,7 @@
|
||||
#include "llvm/Constants.h"
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "llvm/GlobalVariable.h"
|
||||
#include "llvm/GlobalAlias.h"
|
||||
#include "llvm/Instructions.h"
|
||||
#include "llvm/LLVMContext.h"
|
||||
#include "llvm/Operator.h"
|
||||
@ -2906,6 +2907,8 @@ const SCEV *ScalarEvolution::createSCEV(Value *V) {
|
||||
return getIntegerSCEV(0, V->getType());
|
||||
else if (isa<UndefValue>(V))
|
||||
return getIntegerSCEV(0, V->getType());
|
||||
else if (GlobalAlias *GA = dyn_cast<GlobalAlias>(V))
|
||||
return GA->mayBeOverridden() ? getUnknown(V) : getSCEV(GA->getAliasee());
|
||||
else
|
||||
return getUnknown(V);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user