ConstantFolding.h revision 73259caa44b03206d1e39e77a7aa375250b1a193
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"
17using namespace llvm;
18
19namespace llvm {
20
21/// canConstantFoldCallTo - Return true if its even possible to fold a call to
22/// the specified function.
23bool 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.
27Constant *
28ConstantFoldCall(Function *F, Constant** Operands, unsigned NumOperands);
29}
30
31