llvm.org GIT mirror llvm / bf0683f
Change MachineFrameInfo::StackObject::Alloca from Value* to AllocaInst* This more accurately reflects what is actually being stored in the field. No functionality change intended. Author: Matthew Curtis <mcurtis@codeaurora.org> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166215 91177308-0d34-0410-b5e6-96231b3b80d8 Sebastian Pop 7 years ago
2 changed file(s) with 6 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
2828 class TargetFrameLowering;
2929 class BitVector;
3030 class Value;
31 class AllocaInst;
3132
3233 /// The CalleeSavedInfo class tracks the information need to locate where a
3334 /// callee saved register is in the current frame.
105106
106107 /// Alloca - If this stack object is originated from an Alloca instruction
107108 /// this value saves the original IR allocation. Can be NULL.
108 const Value *Alloca;
109 const AllocaInst *Alloca;
109110
110111 // PreAllocated - If true, the object was mapped into the local frame
111112 // block and doesn't need additional handling for allocation beyond that.
112113 bool PreAllocated;
113114
114115 StackObject(uint64_t Sz, unsigned Al, int64_t SP, bool IM,
115 bool isSS, bool NSP, const Value *Val)
116 bool isSS, bool NSP, const AllocaInst *Val)
116117 : SPOffset(SP), Size(Sz), Alignment(Al), isImmutable(IM),
117118 isSpillSlot(isSS), MayNeedSP(NSP), Alloca(Val), PreAllocated(false) {}
118119 };
368369
369370 /// getObjectAllocation - Return the underlying Alloca of the specified
370371 /// stack object if it exists. Returns 0 if none exists.
371 const Value* getObjectAllocation(int ObjectIdx) const {
372 const AllocaInst* getObjectAllocation(int ObjectIdx) const {
372373 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
373374 "Invalid Object Idx!");
374375 return Objects[ObjectIdx+NumFixedObjects].Alloca;
494495 /// a nonnegative identifier to represent it.
495496 ///
496497 int CreateStackObject(uint64_t Size, unsigned Alignment, bool isSS,
497 bool MayNeedSP = false, const Value *Alloca = 0) {
498 bool MayNeedSP = false, const AllocaInst *Alloca = 0) {
498499 assert(Size != 0 && "Cannot allocate zero size stack objects!");
499500 Objects.push_back(StackObject(Size, Alignment, 0, false, isSS, MayNeedSP,
500501 Alloca));
4747 #include "llvm/CodeGen/Passes.h"
4848 #include "llvm/CodeGen/SlotIndexes.h"
4949 #include "llvm/DebugInfo.h"
50 #include "llvm/Instructions.h"
5051 #include "llvm/MC/MCInstrItineraries.h"
5152 #include "llvm/Target/TargetInstrInfo.h"
5253 #include "llvm/Target/TargetRegisterInfo.h"