~ubuntu-branches/ubuntu/wily/clamav/wily-proposed

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/include/llvm/CodeGen/MachineSSAUpdater.h

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman, Sebastian Andrzej Siewior, Andreas Cadhalpun, Scott Kitterman, Javier Fernández-Sanguino
  • Date: 2015-01-28 00:25:13 UTC
  • mfrom: (0.48.14 sid)
  • Revision ID: package-import@ubuntu.com-20150128002513-lil2oi74cooy4lzr
Tags: 0.98.6+dfsg-1
[ Sebastian Andrzej Siewior ]
* update "fix-ssize_t-size_t-off_t-printf-modifier", include of misc.h was
  missing but was pulled in via the systemd patch.
* Don't leak return codes from libmspack to clamav API. (Closes: #774686).

[ Andreas Cadhalpun ]
* Add patch to avoid emitting incremental progress messages when not
  outputting to a terminal. (Closes: #767350)
* Update lintian-overrides for unused-file-paragraph-in-dep5-copyright.
* clamav-base.postinst: always chown /var/log/clamav and /var/lib/clamav
  to clamav:clamav, not only on fresh installations. (Closes: #775400)
* Adapt the clamav-daemon and clamav-freshclam logrotate scripts,
  so that they correctly work under systemd.
* Move the PidFile variable from the clamd/freshclam configuration files
  to the init scripts. This makes the init scripts more robust against
  misconfiguration and avoids error messages with systemd. (Closes: #767353)
* debian/copyright: drop files from Files-Excluded only present in github
  tarballs
* Drop Workaround-a-bug-in-libc-on-Hurd.patch, because hurd got fixed.
  (see #752237)
* debian/rules: Remove useless --with-system-tommath --without-included-ltdl
  configure options.

[ Scott Kitterman ]
* Stop stripping llvm when repacking the tarball as the system llvm on some
  releases is too old to use
* New upstream bugfix release
  - Library shared object revisions.
  - Includes a patch from Sebastian Andrzej Siewior making ClamAV pid files
    compatible with systemd.
  - Fix a heap out of bounds condition with crafted Yoda's crypter files.
    This issue was discovered by Felix Groebert of the Google Security Team.
  - Fix a heap out of bounds condition with crafted mew packer files. This
    issue was discovered by Felix Groebert of the Google Security Team.
  - Fix a heap out of bounds condition with crafted upx packer files. This
    issue was discovered by Kevin Szkudlapski of Quarkslab.
  - Fix a heap out of bounds condition with crafted upack packer files. This
    issue was discovered by Sebastian Andrzej Siewior. CVE-2014-9328.
  - Compensate a crash due to incorrect compiler optimization when handling
    crafted petite packer files. This issue was discovered by Sebastian
    Andrzej Siewior.
* Update lintian override for embedded zlib to match new so version

[ Javier Fernández-Sanguino ]
* Updated Spanish Debconf template translation (Closes: #773563)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//===-- MachineSSAUpdater.h - Unstructured SSA Update Tool ------*- C++ -*-===//
 
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 the MachineSSAUpdater class.
 
11
//
 
12
//===----------------------------------------------------------------------===//
 
13
 
 
14
#ifndef LLVM_CODEGEN_MACHINESSAUPDATER_H
 
15
#define LLVM_CODEGEN_MACHINESSAUPDATER_H
 
16
 
 
17
namespace llvm {
 
18
  class MachineBasicBlock;
 
19
  class MachineFunction;
 
20
  class MachineInstr;
 
21
  class MachineOperand;
 
22
  class MachineRegisterInfo;
 
23
  class TargetInstrInfo;
 
24
  class TargetRegisterClass;
 
25
  template<typename T> class SmallVectorImpl;
 
26
  template<typename T> class SSAUpdaterTraits;
 
27
  class BumpPtrAllocator;
 
28
 
 
29
/// MachineSSAUpdater - This class updates SSA form for a set of virtual
 
30
/// registers defined in multiple blocks.  This is used when code duplication
 
31
/// or another unstructured transformation wants to rewrite a set of uses of one
 
32
/// vreg with uses of a set of vregs.
 
33
class MachineSSAUpdater {
 
34
  friend class SSAUpdaterTraits<MachineSSAUpdater>;
 
35
 
 
36
private:
 
37
  /// AvailableVals - This keeps track of which value to use on a per-block
 
38
  /// basis.  When we insert PHI nodes, we keep track of them here.
 
39
  //typedef DenseMap<MachineBasicBlock*, unsigned > AvailableValsTy;
 
40
  void *AV;
 
41
 
 
42
  /// VR - Current virtual register whose uses are being updated.
 
43
  unsigned VR;
 
44
 
 
45
  /// VRC - Register class of the current virtual register.
 
46
  const TargetRegisterClass *VRC;
 
47
 
 
48
  /// InsertedPHIs - If this is non-null, the MachineSSAUpdater adds all PHI
 
49
  /// nodes that it creates to the vector.
 
50
  SmallVectorImpl<MachineInstr*> *InsertedPHIs;
 
51
 
 
52
  const TargetInstrInfo *TII;
 
53
  MachineRegisterInfo *MRI;
 
54
public:
 
55
  /// MachineSSAUpdater constructor.  If InsertedPHIs is specified, it will be
 
56
  /// filled in with all PHI Nodes created by rewriting.
 
57
  explicit MachineSSAUpdater(MachineFunction &MF,
 
58
                             SmallVectorImpl<MachineInstr*> *InsertedPHIs = 0);
 
59
  ~MachineSSAUpdater();
 
60
 
 
61
  /// Initialize - Reset this object to get ready for a new set of SSA
 
62
  /// updates.
 
63
  void Initialize(unsigned V);
 
64
 
 
65
  /// AddAvailableValue - Indicate that a rewritten value is available at the
 
66
  /// end of the specified block with the specified value.
 
67
  void AddAvailableValue(MachineBasicBlock *BB, unsigned V);
 
68
 
 
69
  /// HasValueForBlock - Return true if the MachineSSAUpdater already has a
 
70
  /// value for the specified block.
 
71
  bool HasValueForBlock(MachineBasicBlock *BB) const;
 
72
 
 
73
  /// GetValueAtEndOfBlock - Construct SSA form, materializing a value that is
 
74
  /// live at the end of the specified block.
 
75
  unsigned GetValueAtEndOfBlock(MachineBasicBlock *BB);
 
76
 
 
77
  /// GetValueInMiddleOfBlock - Construct SSA form, materializing a value that
 
78
  /// is live in the middle of the specified block.
 
79
  ///
 
80
  /// GetValueInMiddleOfBlock is the same as GetValueAtEndOfBlock except in one
 
81
  /// important case: if there is a definition of the rewritten value after the
 
82
  /// 'use' in BB.  Consider code like this:
 
83
  ///
 
84
  ///      X1 = ...
 
85
  ///   SomeBB:
 
86
  ///      use(X)
 
87
  ///      X2 = ...
 
88
  ///      br Cond, SomeBB, OutBB
 
89
  ///
 
90
  /// In this case, there are two values (X1 and X2) added to the AvailableVals
 
91
  /// set by the client of the rewriter, and those values are both live out of
 
92
  /// their respective blocks.  However, the use of X happens in the *middle* of
 
93
  /// a block.  Because of this, we need to insert a new PHI node in SomeBB to
 
94
  /// merge the appropriate values, and this value isn't live out of the block.
 
95
  ///
 
96
  unsigned GetValueInMiddleOfBlock(MachineBasicBlock *BB);
 
97
 
 
98
  /// RewriteUse - Rewrite a use of the symbolic value.  This handles PHI nodes,
 
99
  /// which use their value in the corresponding predecessor.  Note that this
 
100
  /// will not work if the use is supposed to be rewritten to a value defined in
 
101
  /// the same block as the use, but above it.  Any 'AddAvailableValue's added
 
102
  /// for the use's block will be considered to be below it.
 
103
  void RewriteUse(MachineOperand &U);
 
104
 
 
105
private:
 
106
  void ReplaceRegWith(unsigned OldReg, unsigned NewReg);
 
107
  unsigned GetValueAtEndOfBlockInternal(MachineBasicBlock *BB);
 
108
 
 
109
  void operator=(const MachineSSAUpdater&); // DO NOT IMPLEMENT
 
110
  MachineSSAUpdater(const MachineSSAUpdater&);     // DO NOT IMPLEMENT
 
111
};
 
112
 
 
113
} // End llvm namespace
 
114
 
 
115
#endif