Replace llvm.frameallocate with llvm.frameescape

Turns out it's pretty straightforward and simplifies the implementation.

Reviewers: andrew.w.kaylor

Differential Revision: http://reviews.llvm.org/D8051

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231386 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Kleckner
2015-03-05 18:26:34 +00:00
parent 8b4cc5e616
commit 9f7c861416
20 changed files with 376 additions and 399 deletions

View File

@@ -151,7 +151,12 @@ public:
IterTy arg_end() const { return (*this)->op_end() - getArgumentEndOffset(); }
bool arg_empty() const { return arg_end() == arg_begin(); }
unsigned arg_size() const { return unsigned(arg_end() - arg_begin()); }
/// arg_operands - iteration adapter for range-for loops.
iterator_range<IterTy> arg_operands() const {
return iterator_range<User::const_op_iterator>(arg_begin(), arg_eng());
}
/// getType - Return the type of the instruction that generated this call site
///
Type *getType() const { return (*this)->getType(); }

View File

@@ -261,10 +261,10 @@ def int_gcwrite : Intrinsic<[],
//
def int_returnaddress : Intrinsic<[llvm_ptr_ty], [llvm_i32_ty], [IntrNoMem]>;
def int_frameaddress : Intrinsic<[llvm_ptr_ty], [llvm_i32_ty], [IntrNoMem]>;
def int_frameallocate : Intrinsic<[llvm_ptr_ty], [llvm_i32_ty]>;
def int_frameescape : Intrinsic<[], [llvm_vararg_ty]>;
def int_framerecover : Intrinsic<[llvm_ptr_ty],
[llvm_ptr_ty, llvm_ptr_ty],
[IntrNoMem]>;
[llvm_ptr_ty, llvm_ptr_ty, llvm_i32_ty],
[IntrNoMem]>;
def int_read_register : Intrinsic<[llvm_anyint_ty], [llvm_metadata_ty],
[IntrNoMem], "llvm.read_register">;
def int_write_register : Intrinsic<[], [llvm_metadata_ty, llvm_anyint_ty],

View File

@@ -238,7 +238,7 @@ namespace llvm {
MCSymbol *getOrCreateSectionSymbol(const MCSectionELF &Section);
MCSymbol *getOrCreateFrameAllocSymbol(StringRef FuncName);
MCSymbol *getOrCreateFrameAllocSymbol(StringRef FuncName, unsigned Idx);
/// LookupSymbol - Get the symbol for \p Name, or null.
MCSymbol *LookupSymbol(StringRef Name) const;