Change constant folding APIs to take an optional TargetData, and change
[oota-llvm.git] / include / llvm / Analysis / ConstantFolding.h
1 //===-- ConstantFolding.h - Analyze constant folding possibilities --------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This family of functions determines the possibility of performing constant
11 // folding.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #include "llvm/Constants.h"
16 #include "llvm/Function.h"
17 using namespace llvm;
18
19 namespace llvm {
20
21 /// canConstantFoldCallTo - Return true if its even possible to fold a call to
22 /// the specified function.
23 bool canConstantFoldCallTo(Function *F);
24
25 /// ConstantFoldCall - Attempt to constant fold a call to the specified function
26 /// with the specified arguments, returning null if unsuccessful.
27 Constant *
28 ConstantFoldCall(Function *F, Constant** Operands, unsigned NumOperands);
29 }
30