libLTO: Add a utility method to initialize the disassemblers.

Necessary to give disassembler users (like darwin's otool) a possibility to
dlopen libLTO and still initialize the required LLVM bits. This used to go
through libMCDisassembler but that's a gross layering violation, the MC layer
can't pull in functions from the targets. Adding a function to libLTO is a bit
of a hack but not worse than exposing other disassembler bits from libLTO.

Fixes PR14362.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168545 91177308-0d34-0410-b5e6-96231b3b80d8
Refactor a bit to make some helper methods static.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168546 91177308-0d34-0410-b5e6-96231b3b80d8
Remove redundant calls to getCurDebugLoc in visitIntrinsicCall. It's already called at the start of the function and captured in a local variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168548 91177308-0d34-0410-b5e6-96231b3b80d8
Factor common code out of individual if blocks into common tail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168551 91177308-0d34-0410-b5e6-96231b3b80d8
Remove duplicate check of LimitFloatPrecision. It was already checked earlier before IsExp10 could be set to true.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168553 91177308-0d34-0410-b5e6-96231b3b80d8
Add an extra slash so doxygen comments will be properly recognized.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168554 91177308-0d34-0410-b5e6-96231b3b80d8
Further cleanups. Thanks for Sean Silva for noticing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168556 91177308-0d34-0410-b5e6-96231b3b80d8
Refactor to make helper method static.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168557 91177308-0d34-0410-b5e6-96231b3b80d8
Add support for pointer induction variables even when there is no integer induction variable.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168558 91177308-0d34-0410-b5e6-96231b3b80d8
The induction-pointer work is inspired by a research paper. This commit adds a reference.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168559 91177308-0d34-0410-b5e6-96231b3b80d8
Rename method. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168560 91177308-0d34-0410-b5e6-96231b3b80d8
Move semantics are great, don't destroy the optimization opportunity with trivial copy ctors.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168561 91177308-0d34-0410-b5e6-96231b3b80d8
Add support for .cfi_register now that it is easy to extent the representation
to support it. Original patch with the parsing and plumbing by the PaX team and
Roman Divacky. I added the bits in MCDwarf.cpp and the test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168565 91177308-0d34-0410-b5e6-96231b3b80d8
Code Custodian:
  - Widespread trailing space removal
  - A dash of OCD spacing to block align enums
  - joined a line that probably needed 80 cols a while back



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168566 91177308-0d34-0410-b5e6-96231b3b80d8
Refactor the ptr runtime check generation code. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168568 91177308-0d34-0410-b5e6-96231b3b80d8
Fix the document style.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168569 91177308-0d34-0410-b5e6-96231b3b80d8
Move the max vector width to a constant parameter. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168570 91177308-0d34-0410-b5e6-96231b3b80d8
instcombine: Migrate ffs* optimizations

This patch migrates the ffs* optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168571 91177308-0d34-0410-b5e6-96231b3b80d8
instcombine: Migrate *abs optimizations

This patch migrates the *abs optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168574 91177308-0d34-0410-b5e6-96231b3b80d8
Fix bogus comment;  no functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168575 91177308-0d34-0410-b5e6-96231b3b80d8