[llvm] r225752 - Rename llvm.recoverframeallocation to llvm.framerecover

Reid Kleckner reid at kleckner.net
Mon Jan 12 17:51:34 PST 2015


Author: rnk
Date: Mon Jan 12 19:51:34 2015
New Revision: 225752

URL: http://llvm.org/viewvc/llvm-project?rev=225752&view=rev
Log:
Rename llvm.recoverframeallocation to llvm.framerecover

This name is less descriptive, but it sort of puts things in the
'llvm.frame...' namespace, relating it to frameallocate and
frameaddress. It also avoids using "allocate" and "allocation" together.

Modified:
    llvm/trunk/docs/LangRef.rst
    llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h
    llvm/trunk/include/llvm/IR/Intrinsics.td
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    llvm/trunk/lib/IR/Verifier.cpp
    llvm/trunk/lib/Target/X86/X86InstrInfo.td
    llvm/trunk/test/CodeGen/X86/frameallocate.ll
    llvm/trunk/test/Verifier/frameallocate.ll

Modified: llvm/trunk/docs/LangRef.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.rst?rev=225752&r1=225751&r2=225752&view=diff
==============================================================================
--- llvm/trunk/docs/LangRef.rst (original)
+++ llvm/trunk/docs/LangRef.rst Mon Jan 12 19:51:34 2015
@@ -7281,7 +7281,7 @@ Note that calling this intrinsic does no
 other aggressive transformations, so the value returned may not be that
 of the obvious source-language caller.
 
-'``llvm.frameallocate``' and '``llvm.recoverframeallocation``' Intrinsics
+'``llvm.frameallocate``' and '``llvm.framerecover``' Intrinsics
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Syntax:
@@ -7290,13 +7290,13 @@ Syntax:
 ::
 
       declare i8* @llvm.frameallocate(i32 %size)
-      declare i8* @llvm.recoverframeallocation(i8* %func, i8* %fp)
+      declare i8* @llvm.framerecover(i8* %func, i8* %fp)
 
 Overview:
 """""""""
 
 The '``llvm.frameallocate``' intrinsic allocates stack memory at some fixed
-offset from the frame pointer, and the '``llvm.recoverframeallocation``'
+offset from the frame pointer, and the '``llvm.framerecover``'
 intrinsic applies that offset to a live frame pointer to recover the address of
 the allocation. The offset is computed during frame layout of the caller of
 ``llvm.frameallocate``.
@@ -7308,12 +7308,12 @@ The ``size`` argument to '``llvm.frameal
 indicating the amount of stack memory to allocate. As with allocas, allocating
 zero bytes is legal, but the result is undefined.
 
-The ``func`` argument to '``llvm.recoverframeallocation``' must be a constant
+The ``func`` argument to '``llvm.framerecover``' must be a constant
 bitcasted pointer to a function defined in the current module. The code
 generator cannot determine the frame allocation offset of functions defined in
 other modules.
 
-The ``fp`` argument to '``llvm.recoverframeallocation``' must be a frame
+The ``fp`` argument to '``llvm.framerecover``' must be a frame
 pointer of a call frame that is currently live. The return value of
 '``llvm.frameaddress``' is one way to produce such a value, but most platforms
 also expose the frame pointer through stack unwinding mechanisms.
@@ -7328,7 +7328,7 @@ memory is only aligned to the ABI-requir
 only call '``llvm.frameallocate``' one or zero times from the function entry
 block.  The frame allocation intrinsic inhibits inlining, as any frame
 allocations in the inlined function frame are likely to be at a different
-offset from the one used by '``llvm.recoverframeallocation``' called with the
+offset from the one used by '``llvm.framerecover``' called with the
 uninlined function.
 
 .. _int_read_register:

Modified: llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h?rev=225752&r1=225751&r2=225752&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h Mon Jan 12 19:51:34 2015
@@ -72,10 +72,10 @@ namespace ISD {
     /// the parent's frame or return address, and so on.
     FRAMEADDR, RETURNADDR,
 
-    /// RECOVER_FRAME_ALLOC - Represents the llvm.recoverframeallocation
+    /// FRAME_ALLOC_RECOVER - Represents the llvm.framerecover
     /// intrinsic. Materializes the offset from the frame pointer of another
     /// function to the result of llvm.frameallocate.
-    RECOVER_FRAME_ALLOC,
+    FRAME_ALLOC_RECOVER,
 
     /// READ_REGISTER, WRITE_REGISTER - This node represents llvm.register on
     /// the DAG, which implements the named register global variables extension.

Modified: llvm/trunk/include/llvm/IR/Intrinsics.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Intrinsics.td?rev=225752&r1=225751&r2=225752&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Intrinsics.td (original)
+++ llvm/trunk/include/llvm/IR/Intrinsics.td Mon Jan 12 19:51:34 2015
@@ -260,7 +260,7 @@ 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_recoverframeallocation : Intrinsic<[llvm_ptr_ty],
+def int_framerecover : Intrinsic<[llvm_ptr_ty],
                                              [llvm_ptr_ty, llvm_ptr_ty],
                                              [IntrNoMem]>;
 def int_read_register  : Intrinsic<[llvm_anyint_ty], [llvm_metadata_ty],

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=225752&r1=225751&r2=225752&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Mon Jan 12 19:51:34 2015
@@ -5608,8 +5608,8 @@ SelectionDAGBuilder::visitIntrinsicCall(
     return nullptr;
   }
 
-  case Intrinsic::recoverframeallocation: {
-    // i8* @llvm.recoverframeallocation(i8* %fn, i8* %fp)
+  case Intrinsic::framerecover: {
+    // i8* @llvm.framerecover(i8* %fn, i8* %fp)
     MachineFunction &MF = DAG.getMachineFunction();
     MVT PtrVT = TLI.getPointerTy(0);
 
@@ -5624,7 +5624,7 @@ SelectionDAGBuilder::visitIntrinsicCall(
     assert(Name.size() == strlen(Name.data()) && "not null terminated");
     SDValue OffsetSym = DAG.getTargetExternalSymbol(Name.data(), PtrVT);
     SDValue OffsetVal =
-        DAG.getNode(ISD::RECOVER_FRAME_ALLOC, sdl, PtrVT, OffsetSym);
+        DAG.getNode(ISD::FRAME_ALLOC_RECOVER, sdl, PtrVT, OffsetSym);
 
     // Add the offset to the FP.
     Value *FP = I.getArgOperand(1);

Modified: llvm/trunk/lib/IR/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=225752&r1=225751&r2=225752&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Verifier.cpp (original)
+++ llvm/trunk/lib/IR/Verifier.cpp Mon Jan 12 19:51:34 2015
@@ -2617,10 +2617,10 @@ void Verifier::visitIntrinsicFunctionCal
             "llvm.frameallocate argument must be constant integer size", &CI);
     break;
   }
-  case Intrinsic::recoverframeallocation: {
+  case Intrinsic::framerecover: {
     Value *FnArg = CI.getArgOperand(0)->stripPointerCasts();
     Function *Fn = dyn_cast<Function>(FnArg);
-    Assert1(Fn && !Fn->isDeclaration(), "llvm.recoverframeallocation first "
+    Assert1(Fn && !Fn->isDeclaration(), "llvm.framerecover first "
             "argument must be function defined in this module", &CI);
     break;
   }

Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=225752&r1=225751&r2=225752&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Mon Jan 12 19:51:34 2015
@@ -194,7 +194,7 @@ def X86rdpmc   : SDNode<"X86ISD::RDPMC_D
 def X86Wrapper    : SDNode<"X86ISD::Wrapper",     SDTX86Wrapper>;
 def X86WrapperRIP : SDNode<"X86ISD::WrapperRIP",  SDTX86Wrapper>;
 
-def X86RecoverFrameAlloc : SDNode<"ISD::RECOVER_FRAME_ALLOC",
+def X86RecoverFrameAlloc : SDNode<"ISD::FRAME_ALLOC_RECOVER",
                                   SDTypeProfile<1, 1, [SDTCisSameAs<0, 1>,
                                                        SDTCisInt<1>]>>;
 

Modified: llvm/trunk/test/CodeGen/X86/frameallocate.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/frameallocate.ll?rev=225752&r1=225751&r2=225752&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/frameallocate.ll (original)
+++ llvm/trunk/test/CodeGen/X86/frameallocate.ll Mon Jan 12 19:51:34 2015
@@ -2,13 +2,13 @@
 
 declare i8* @llvm.frameallocate(i32)
 declare i8* @llvm.frameaddress(i32)
-declare i8* @llvm.recoverframeallocation(i8*, i8*)
+declare i8* @llvm.framerecover(i8*, i8*)
 declare i32 @printf(i8*, ...)
 
 @str = internal constant [10 x i8] c"asdf: %d\0A\00"
 
 define void @print_framealloc_from_fp(i8* %fp) {
-  %alloc = call i8* @llvm.recoverframeallocation(i8* bitcast (void(i32*, i32*)* @alloc_func to i8*), i8* %fp)
+  %alloc = call i8* @llvm.framerecover(i8* bitcast (void(i32*, i32*)* @alloc_func to i8*), i8* %fp)
   %alloc_i32 = bitcast i8* %alloc to i32*
   %r = load i32* %alloc_i32
   call i32 (i8*, ...)* @printf(i8* getelementptr ([10 x i8]* @str, i32 0, i32 0), i32 %r)

Modified: llvm/trunk/test/Verifier/frameallocate.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/frameallocate.ll?rev=225752&r1=225751&r2=225752&view=diff
==============================================================================
--- llvm/trunk/test/Verifier/frameallocate.ll (original)
+++ llvm/trunk/test/Verifier/frameallocate.ll Mon Jan 12 19:51:34 2015
@@ -1,7 +1,7 @@
 ; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
 
 declare i8* @llvm.frameallocate(i32)
-declare i8* @llvm.recoverframeallocation(i8*, i8*)
+declare i8* @llvm.framerecover(i8*, i8*)
 
 define internal void @f() {
   call i8* @llvm.frameallocate(i32 4)
@@ -26,23 +26,23 @@ not_entry:
 ; CHECK: llvm.frameallocate used outside of entry block
 
 define internal void @h() {
-  call i8* @llvm.recoverframeallocation(i8* null, i8* null)
+  call i8* @llvm.framerecover(i8* null, i8* null)
   ret void
 }
-; CHECK: llvm.recoverframeallocation first argument must be function defined in this module
+; CHECK: llvm.framerecover first argument must be function defined in this module
 
 @global = constant i8 0
 
 declare void @declaration()
 
 define internal void @i() {
-  call i8* @llvm.recoverframeallocation(i8* @global, i8* null)
+  call i8* @llvm.framerecover(i8* @global, i8* null)
   ret void
 }
-; CHECK: llvm.recoverframeallocation first argument must be function defined in this module
+; CHECK: llvm.framerecover first argument must be function defined in this module
 
 define internal void @j() {
-  call i8* @llvm.recoverframeallocation(i8* bitcast(void()* @declaration to i8*), i8* null)
+  call i8* @llvm.framerecover(i8* bitcast(void()* @declaration to i8*), i8* null)
   ret void
 }
-; CHECK: llvm.recoverframeallocation first argument must be function defined in this module
+; CHECK: llvm.framerecover first argument must be function defined in this module





More information about the llvm-commits mailing list