IntegerDivision.h revision d2014649e0fc3c630c7530f6da060618c789d78d
1d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman//===- llvm/Transforms/Utils/IntegerDivision.h ------------------*- C++ -*-===//
2d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman//
3d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman//                     The LLVM Compiler Infrastructure
4d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman//
5d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman// This file is distributed under the University of Illinois Open Source
6d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman// License. See LICENSE.TXT for details.
7d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman//
8d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman//===----------------------------------------------------------------------===//
9d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman//
10d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman// This file contains an implementation of 32bit integer division for targets
11d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman// that don't have native support. It's largely derived from compiler-rt's
12d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman// implementation of __udivsi3, but hand-tuned for targets that prefer less
13d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman// control flow.
14d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman//
15d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman//===----------------------------------------------------------------------===//
16d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman
17d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman#ifndef TRANSFORMS_UTILS_INTEGERDIVISION_H
18d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman#define TRANSFORMS_UTILS_INTEGERDIVISION_H
19d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman
20d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilsemannamespace llvm {
21d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman
22d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman  bool expandDivision(BinaryOperator* Div);
23d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman
24d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman} // End llvm namespace
25d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman
26d2014649e0fc3c630c7530f6da060618c789d78dMichael Ilseman#endif
27