projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove unused but set variable flagged by GCC.
[oota-llvm.git]
/
lib
/
CodeGen
/
LocalStackSlotAllocation.cpp
diff --git
a/lib/CodeGen/LocalStackSlotAllocation.cpp
b/lib/CodeGen/LocalStackSlotAllocation.cpp
index 38a69825534eb8ca7f8d01527c67a2ba02f6d68b..fbc9e20517c2c4c90d7b6382bec24792ae1804d4 100644
(file)
--- a/
lib/CodeGen/LocalStackSlotAllocation.cpp
+++ b/
lib/CodeGen/LocalStackSlotAllocation.cpp
@@
-9,7
+9,7
@@
//
// This pass assigns local frame indices to stack slots relative to one another
// and allocates additional base registers to access them when the target
//
// This pass assigns local frame indices to stack slots relative to one another
// and allocates additional base registers to access them when the target
-// estimates the are likely to be out of range of stack pointer and frame
+// estimates the
y
are likely to be out of range of stack pointer and frame
// pointer relative addressing.
//
//===----------------------------------------------------------------------===//
// pointer relative addressing.
//
//===----------------------------------------------------------------------===//
@@
-34,7
+34,7
@@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetRegisterInfo.h"
-#include "llvm/Target/TargetFrame
Info
.h"
+#include "llvm/Target/TargetFrame
Lowering
.h"
using namespace llvm;
using namespace llvm;
@@
-71,19
+71,15
@@
namespace {
AU.setPreservesCFG();
MachineFunctionPass::getAnalysisUsage(AU);
}
AU.setPreservesCFG();
MachineFunctionPass::getAnalysisUsage(AU);
}
- const char *getPassName() const {
- return "Local Stack Slot Allocation";
- }
private:
};
} // end anonymous namespace
char LocalStackSlotPass::ID = 0;
private:
};
} // end anonymous namespace
char LocalStackSlotPass::ID = 0;
-
-FunctionPass *llvm::createLocalStackSlotAllocationPass() {
- return new LocalStackSlotPass();
-}
+char &llvm::LocalStackSlotAllocationID = LocalStackSlotPass::ID;
+INITIALIZE_PASS(LocalStackSlotPass, "localstackalloc",
+ "Local Stack Slot Allocation", false, false)
bool LocalStackSlotPass::runOnMachineFunction(MachineFunction &MF) {
MachineFrameInfo *MFI = MF.getFrameInfo();
bool LocalStackSlotPass::runOnMachineFunction(MachineFunction &MF) {
MachineFrameInfo *MFI = MF.getFrameInfo();
@@
-152,9
+148,9
@@
void LocalStackSlotPass::AdjustStackOffset(MachineFrameInfo *MFI,
void LocalStackSlotPass::calculateFrameObjectOffsets(MachineFunction &Fn) {
// Loop over all of the stack objects, assigning sequential addresses...
MachineFrameInfo *MFI = Fn.getFrameInfo();
void LocalStackSlotPass::calculateFrameObjectOffsets(MachineFunction &Fn) {
// Loop over all of the stack objects, assigning sequential addresses...
MachineFrameInfo *MFI = Fn.getFrameInfo();
- const TargetFrame
Info &TFI = *Fn.getTarget().getFrameInfo
();
+ const TargetFrame
Lowering &TFI = *Fn.getTarget().getFrameLowering
();
bool StackGrowsDown =
bool StackGrowsDown =
- TFI.getStackGrowthDirection() == TargetFrame
Info
::StackGrowsDown;
+ TFI.getStackGrowthDirection() == TargetFrame
Lowering
::StackGrowsDown;
int64_t Offset = 0;
unsigned MaxAlign = 0;
int64_t Offset = 0;
unsigned MaxAlign = 0;
@@
-227,9
+223,9
@@
bool LocalStackSlotPass::insertFrameReferenceRegisters(MachineFunction &Fn) {
MachineFrameInfo *MFI = Fn.getFrameInfo();
const TargetRegisterInfo *TRI = Fn.getTarget().getRegisterInfo();
MachineFrameInfo *MFI = Fn.getFrameInfo();
const TargetRegisterInfo *TRI = Fn.getTarget().getRegisterInfo();
- const TargetFrame
Info &TFI = *Fn.getTarget().getFrameInfo
();
+ const TargetFrame
Lowering &TFI = *Fn.getTarget().getFrameLowering
();
bool StackGrowsDown =
bool StackGrowsDown =
- TFI.getStackGrowthDirection() == TargetFrame
Info
::StackGrowsDown;
+ TFI.getStackGrowthDirection() == TargetFrame
Lowering
::StackGrowsDown;
// Collect all of the instructions in the block that reference
// a frame index. Also store the frame index referenced to ease later
// Collect all of the instructions in the block that reference
// a frame index. Also store the frame index referenced to ease later
@@
-318,7
+314,8
@@
bool LocalStackSlotPass::insertFrameReferenceRegisters(MachineFunction &Fn) {
// No previously defined register was in range, so create a
// new one.
int64_t InstrOffset = TRI->getFrameIndexInstrOffset(MI, idx);
// No previously defined register was in range, so create a
// new one.
int64_t InstrOffset = TRI->getFrameIndexInstrOffset(MI, idx);
- const TargetRegisterClass *RC = TRI->getPointerRegClass();
+ const MachineFunction *MF = MI->getParent()->getParent();
+ const TargetRegisterClass *RC = TRI->getPointerRegClass(*MF);
BaseReg = Fn.getRegInfo().createVirtualRegister(RC);
DEBUG(dbgs() << " Materializing base register " << BaseReg <<
BaseReg = Fn.getRegInfo().createVirtualRegister(RC);
DEBUG(dbgs() << " Materializing base register " << BaseReg <<