mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-24 13:18:17 +00:00
Move TargetData to DataLayout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165402 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
#include "llvm/Support/ValueHandle.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/DataLayout.h"
|
||||
using namespace llvm;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
@@ -397,7 +397,7 @@ bool llvm::RecursivelyDeleteDeadPHINode(PHINode *PN,
|
||||
///
|
||||
/// This returns true if it changed the code, note that it can delete
|
||||
/// instructions in other blocks as well in this block.
|
||||
bool llvm::SimplifyInstructionsInBlock(BasicBlock *BB, const TargetData *TD,
|
||||
bool llvm::SimplifyInstructionsInBlock(BasicBlock *BB, const DataLayout *TD,
|
||||
const TargetLibraryInfo *TLI) {
|
||||
bool MadeChange = false;
|
||||
|
||||
@@ -445,7 +445,7 @@ bool llvm::SimplifyInstructionsInBlock(BasicBlock *BB, const TargetData *TD,
|
||||
/// .. and delete the predecessor corresponding to the '1', this will attempt to
|
||||
/// recursively fold the and to 0.
|
||||
void llvm::RemovePredecessorAndSimplify(BasicBlock *BB, BasicBlock *Pred,
|
||||
TargetData *TD) {
|
||||
DataLayout *TD) {
|
||||
// This only adjusts blocks with PHI nodes.
|
||||
if (!isa<PHINode>(BB->begin()))
|
||||
return;
|
||||
@@ -760,7 +760,7 @@ bool llvm::EliminateDuplicatePHINodes(BasicBlock *BB) {
|
||||
/// their preferred alignment from the beginning.
|
||||
///
|
||||
static unsigned enforceKnownAlignment(Value *V, unsigned Align,
|
||||
unsigned PrefAlign, const TargetData *TD) {
|
||||
unsigned PrefAlign, const DataLayout *TD) {
|
||||
V = V->stripPointerCasts();
|
||||
|
||||
if (AllocaInst *AI = dyn_cast<AllocaInst>(V)) {
|
||||
@@ -803,7 +803,7 @@ static unsigned enforceKnownAlignment(Value *V, unsigned Align,
|
||||
/// and it is more than the alignment of the ultimate object, see if we can
|
||||
/// increase the alignment of the ultimate object, making this check succeed.
|
||||
unsigned llvm::getOrEnforceKnownAlignment(Value *V, unsigned PrefAlign,
|
||||
const TargetData *TD) {
|
||||
const DataLayout *TD) {
|
||||
assert(V->getType()->isPointerTy() &&
|
||||
"getOrEnforceKnownAlignment expects a pointer!");
|
||||
unsigned BitWidth = TD ? TD->getPointerSizeInBits() : 64;
|
||||
|
||||
Reference in New Issue
Block a user