mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Move Value::getUnderlyingObject to be a standalone
function so that it can live in Analysis instead of VMCore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121885 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "ScheduleDAGInstrs.h"
|
||||
#include "llvm/Operator.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/ValueTracking.h"
|
||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||
#include "llvm/CodeGen/MachineMemOperand.h"
|
||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||
@@ -78,12 +79,12 @@ static const Value *getUnderlyingObjectFromInt(const Value *V) {
|
||||
} while (1);
|
||||
}
|
||||
|
||||
/// getUnderlyingObject - This is a wrapper around Value::getUnderlyingObject
|
||||
/// getUnderlyingObject - This is a wrapper around GetUnderlyingObject
|
||||
/// and adds support for basic ptrtoint+arithmetic+inttoptr sequences.
|
||||
static const Value *getUnderlyingObject(const Value *V) {
|
||||
// First just call Value::getUnderlyingObject to let it do what it does.
|
||||
do {
|
||||
V = V->getUnderlyingObject();
|
||||
V = GetUnderlyingObject(V);
|
||||
// If it found an inttoptr, use special code to continue climing.
|
||||
if (Operator::getOpcode(V) != Instruction::IntToPtr)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user