mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 17:25:21 +00:00
Move some constant folding functions into LLVMAnalysis since they are used
by Analysis and Transformation passes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24038 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
36
include/llvm/Analysis/ConstantFolding.h
Normal file
36
include/llvm/Analysis/ConstantFolding.h
Normal file
@@ -0,0 +1,36 @@
|
||||
//===-- ConstantFolding.h - Analyze constant folding possibilities --------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file was developed by the LLVM research group and is distributed under
|
||||
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This family of functions determines the possibility of performing constant
|
||||
// folding.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Constants.h"
|
||||
#include "llvm/Function.h"
|
||||
using namespace llvm;
|
||||
|
||||
namespace llvm {
|
||||
|
||||
/// canConstantFoldCallTo - Return true if its even possible to fold a call to
|
||||
/// the specified function.
|
||||
extern
|
||||
bool canConstantFoldCallTo(Function *F);
|
||||
|
||||
/// ConstantFoldFP - Given a function that evaluates the constant, return an
|
||||
/// LLVM Constant that represents the evaluated constant
|
||||
extern Constant *
|
||||
ConstantFoldFP(double (*NativeFP)(double), double V, const Type *Ty);
|
||||
|
||||
/// ConstantFoldCall - Attempt to constant fold a call to the specified function
|
||||
/// with the specified arguments, returning null if unsuccessful.
|
||||
extern Constant *
|
||||
ConstantFoldCall(Function *F, const std::vector<Constant*> &Operands);
|
||||
}
|
||||
|
Reference in New Issue
Block a user