LLVM API Documentation

AutoUpgrade.h

Go to the documentation of this file.
00001 //===-- llvm/AutoUpgrade.h - AutoUpgrade Helpers ----------------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 //  These functions are implemented by lib/VMCore/AutoUpgrade.cpp.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef LLVM_AUTOUPGRADE_H
00015 #define LLVM_AUTOUPGRADE_H
00016 
00017 namespace llvm {
00018   class Function;
00019   class CallInst;
00020 
00021   /// This is a more granular function that simply checks an intrinsic function 
00022   /// for upgrading, and returns true if it requires upgrading. It may return
00023   /// null in NewFn if the all calls to the original intrinsic function
00024   /// should be transformed to non-function-call instructions.
00025   bool UpgradeIntrinsicFunction(Function *F, Function *&NewFn);
00026 
00027   /// This is the complement to the above, replacing a specific call to an 
00028   /// intrinsic function with a call to the specified new function.
00029   void UpgradeIntrinsicCall(CallInst *CI, Function *NewFn);
00030   
00031   /// This is an auto-upgrade hook for any old intrinsic function syntaxes 
00032   /// which need to have both the function updated as well as all calls updated 
00033   /// to the new function. This should only be run in a post-processing fashion 
00034   /// so that it can update all calls to the old function.
00035   void UpgradeCallsToIntrinsic(Function* F);
00036 
00037 } // End llvm namespace
00038 
00039 #endif



This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.