~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/include/llvm/Analysis/InstructionSimplify.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-03-12 11:30:04 UTC
  • mfrom: (0.41.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100312113004-b0fop4bkycszdd0z
Tags: 0.96~rc1+dfsg-0ubuntu1
* New upstream RC - FFE (LP: #537636):
  - Add OfficialDatabaseOnly option to clamav-base.postinst.in
  - Add LocalSocketGroup option to clamav-base.postinst.in
  - Add LocalSocketMode option to clamav-base.postinst.in
  - Add CrossFilesystems option to clamav-base.postinst.in
  - Add ClamukoScannerCount option to clamav-base.postinst.in
  - Add BytecodeSecurity opiton to clamav-base.postinst.in
  - Add DetectionStatsHostID option to clamav-freshclam.postinst.in
  - Add Bytecode option to clamav-freshclam.postinst.in
  - Add MilterSocketGroup option to clamav-milter.postinst.in
  - Add MilterSocketMode option to clamav-milter.postinst.in
  - Add ReportHostname option to clamav-milter.postinst.in
  - Bump libclamav SO version to 6.1.0 in libclamav6.install
  - Drop clamdmon from clamav.examples (no longer shipped by upstream)
  - Drop libclamav.a from libclamav-dev.install (not built by upstream)
  - Update SO version for lintian override for libclamav6
  - Add new Bytecode Testing Tool, usr/bin/clambc, to clamav.install
  - Add build-depends on python and python-setuptools for new test suite
  - Update debian/copyright for the embedded copy of llvm (using the system
    llvm is not currently feasible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//===-- InstructionSimplify.h - Fold instructions into simpler forms ------===//
 
2
//
 
3
//                     The LLVM Compiler Infrastructure
 
4
//
 
5
// This file is distributed under the University of Illinois Open Source
 
6
// License. See LICENSE.TXT for details.
 
7
//
 
8
//===----------------------------------------------------------------------===//
 
9
//
 
10
// This file declares routines for folding instructions into simpler forms that
 
11
// do not require creating new instructions.  For example, this does constant
 
12
// folding, and can handle identities like (X&0)->0.
 
13
//
 
14
//===----------------------------------------------------------------------===//
 
15
 
 
16
#ifndef LLVM_ANALYSIS_INSTRUCTIONSIMPLIFY_H
 
17
#define LLVM_ANALYSIS_INSTRUCTIONSIMPLIFY_H
 
18
 
 
19
namespace llvm {
 
20
  class Instruction;
 
21
  class Value;
 
22
  class TargetData;
 
23
 
 
24
  /// SimplifyAddInst - Given operands for an Add, see if we can
 
25
  /// fold the result.  If not, this returns null.
 
26
  Value *SimplifyAddInst(Value *LHS, Value *RHS, bool isNSW, bool isNUW,
 
27
                         const TargetData *TD = 0);
 
28
  
 
29
  /// SimplifyAndInst - Given operands for an And, see if we can
 
30
  /// fold the result.  If not, this returns null.
 
31
  Value *SimplifyAndInst(Value *LHS, Value *RHS,
 
32
                         const TargetData *TD = 0);
 
33
 
 
34
  /// SimplifyOrInst - Given operands for an Or, see if we can
 
35
  /// fold the result.  If not, this returns null.
 
36
  Value *SimplifyOrInst(Value *LHS, Value *RHS,
 
37
                        const TargetData *TD = 0);
 
38
  
 
39
  /// SimplifyICmpInst - Given operands for an ICmpInst, see if we can
 
40
  /// fold the result.  If not, this returns null.
 
41
  Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 
42
                          const TargetData *TD = 0);
 
43
  
 
44
  /// SimplifyFCmpInst - Given operands for an FCmpInst, see if we can
 
45
  /// fold the result.  If not, this returns null.
 
46
  Value *SimplifyFCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 
47
                          const TargetData *TD = 0);
 
48
  
 
49
 
 
50
  /// SimplifyGEPInst - Given operands for an GetElementPtrInst, see if we can
 
51
  /// fold the result.  If not, this returns null.
 
52
  Value *SimplifyGEPInst(Value * const *Ops, unsigned NumOps,
 
53
                         const TargetData *TD = 0);
 
54
  
 
55
  //=== Helper functions for higher up the class hierarchy.
 
56
  
 
57
  
 
58
  /// SimplifyCmpInst - Given operands for a CmpInst, see if we can
 
59
  /// fold the result.  If not, this returns null.
 
60
  Value *SimplifyCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 
61
                         const TargetData *TD = 0);
 
62
  
 
63
  /// SimplifyBinOp - Given operands for a BinaryOperator, see if we can
 
64
  /// fold the result.  If not, this returns null.
 
65
  Value *SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS, 
 
66
                       const TargetData *TD = 0);
 
67
  
 
68
  /// SimplifyInstruction - See if we can compute a simplified version of this
 
69
  /// instruction.  If not, this returns null.
 
70
  Value *SimplifyInstruction(Instruction *I, const TargetData *TD = 0);
 
71
  
 
72
  
 
73
  /// ReplaceAndSimplifyAllUses - Perform From->replaceAllUsesWith(To) and then
 
74
  /// delete the From instruction.  In addition to a basic RAUW, this does a
 
75
  /// recursive simplification of the updated instructions.  This catches
 
76
  /// things where one simplification exposes other opportunities.  This only
 
77
  /// simplifies and deletes scalar operations, it does not change the CFG.
 
78
  ///
 
79
  void ReplaceAndSimplifyAllUses(Instruction *From, Value *To,
 
80
                                 const TargetData *TD = 0);
 
81
} // end namespace llvm
 
82
 
 
83
#endif
 
84