LLVM
3.7.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
work
release_test
rc4
llvm.src
include
llvm
Transforms
Utils
BypassSlowDivision.h
Go to the documentation of this file.
1
//===- llvm/Transforms/Utils/BypassSlowDivision.h --------------*- 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 contains an optimization for div and rem on architectures that
11
// execute short instructions significantly faster than longer instructions.
12
// For example, on Intel Atom 32-bit divides are slow enough that during
13
// runtime it is profitable to check the value of the operands, and if they are
14
// positive and less than 256 use an unsigned 8-bit divide.
15
//
16
//===----------------------------------------------------------------------===//
17
18
#ifndef LLVM_TRANSFORMS_UTILS_BYPASSSLOWDIVISION_H
19
#define LLVM_TRANSFORMS_UTILS_BYPASSSLOWDIVISION_H
20
21
#include "
llvm/ADT/DenseMap.h
"
22
#include "
llvm/IR/Function.h
"
23
24
namespace
llvm {
25
26
/// This optimization identifies DIV instructions that can be
27
/// profitably bypassed and carried out with a shorter, faster divide.
28
bool
bypassSlowDivision
(Function &
F
,
29
Function::iterator
&
I
,
30
const
DenseMap<unsigned int, unsigned int> &BypassWidth);
31
32
}
// End llvm namespace
33
34
#endif
F
F(f)
llvm::Function::iterator
BasicBlockListType::iterator iterator
Definition:
Function.h:59
DenseMap.h
Function.h
I
#define I(x, y, z)
Definition:
MD5.cpp:54
llvm::bypassSlowDivision
bool bypassSlowDivision(Function &F, Function::iterator &I, const DenseMap< unsigned int, unsigned int > &BypassWidth)
This optimization identifies DIV instructions that can be profitably bypassed and carried out with a ...
Definition:
BypassSlowDivision.cpp:223
Generated on Mon Aug 31 2015 10:59:33 for LLVM by
1.8.6