DebugInfo: Simplify gnu_pubnames index computation.

Names open to bikeshedding. Could switch back to the constants being
unshifted, but this way seems a bit easier to work with.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191025 91177308-0d34-0410-b5e6-96231b3b80d8
Remove extraneous space, the asm printing infrastructure adds a space
in normally.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191026 91177308-0d34-0410-b5e6-96231b3b80d8
llvm-c: Make LLVMGetFirstTarget a proper prototype

This avoids warnings when included in a application that
uses -Wstrict-prototypes.

Differential Revision: http://llvm-reviews.chandlerc.com/D1713



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

Differential Revision: http://llvm-reviews.chandlerc.com/D1715



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191030 91177308-0d34-0410-b5e6-96231b3b80d8
Unshift the GDB index/GNU pubnames constants modified in r191025

Based on code review feedback from Eric Christopher, unshifting these
constants as they can appear in the gdb_index itself, shifted a further
24 bits. This means that keeping them preshifted is a bit inflexible, so
let's not do that.

Given the motivation, wrap up some nicer enums, more type safety, and
some utility functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191035 91177308-0d34-0410-b5e6-96231b3b80d8
InstCombine: Don't allow turning vector-of-pointer loads into vector-of-integer.

The code below can't handle any pointers. PR17293.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191036 91177308-0d34-0410-b5e6-96231b3b80d8
[Fast-math] Disable "(C1/X)*C2 => (C1*C2)/X" if C1/X has multiple uses.

  If "C1/X" were having multiple uses, the only benefit of this
transformation is to potentially shorten critical path. But it is at the
cost of instroducing additional div.

  The additional div may or may not incur cost depending on how div is
implemented. If it is implemented using Newton–Raphson iteration, it dosen't
seem to incur any cost (FIXME). However, if the div blocks the entire
pipeline, that sounds to be pretty expensive. Let CodeGen to take care 
this transformation.

  This patch sees 6% on a benchmark.

rdar://15032743


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191037 91177308-0d34-0410-b5e6-96231b3b80d8
Unbreak C++03 build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191039 91177308-0d34-0410-b5e6-96231b3b80d8
Add testcase to make sure we don't generate too many jumps for a une compare.
<rdar://problem/7859988>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191040 91177308-0d34-0410-b5e6-96231b3b80d8
Fix LTO handling of module-level assembly (PR14152).

Patch by Tom Roeder!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191042 91177308-0d34-0410-b5e6-96231b3b80d8
DebugInfo: Improve IR annotation comments for GNU pubthings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191043 91177308-0d34-0410-b5e6-96231b3b80d8
PR16726: extend rol/ror matching

C-like languages promote types like unsigned short to unsigned int before
performing an arithmetic operation. Currently the rotate matcher in the
DAGCombiner does not consider this situation.

This commit extends the DAGCombiner in the way that the pattern

(or (shl ([az]ext x), (*ext y)), (srl ([az]ext x), (*ext (sub 32, y))))

is folded into

([az]ext (rotl x, y))

The matching is restricted to aext and zext because in this cases the upper
bits are either undefined or known. Test case is included.

This fixes PR16726.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191045 91177308-0d34-0410-b5e6-96231b3b80d8
Revert PR16726: extend rol/ror matching

There is a buildbot failure. Need to investigate this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191048 91177308-0d34-0410-b5e6-96231b3b80d8
PR16726: extend rol/ror matching

C-like languages promote types like unsigned short to unsigned int before
performing an arithmetic operation. Currently the rotate matcher in the
DAGCombiner does not consider this situation.

This commit extends the DAGCombiner in the way that the pattern

(or (shl ([az]ext x), (*ext y)), (srl ([az]ext x), (*ext (sub 32, y))))

is folded into

([az]ext (rotl x, y))

The matching is restricted to aext and zext because in this cases the upper
bits are either undefined or known. Test case is included.

This fixes PR16726.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191049 91177308-0d34-0410-b5e6-96231b3b80d8
DebugInfo: llvm-dwarfdump support for gnu_pubnames section

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191050 91177308-0d34-0410-b5e6-96231b3b80d8
Rename ConvergingScheduler to GenericScheduler.

This was an experimental scheduler a year ago. It's now used by
several subtargets, both in-order and out-of-order, and it
is about to be enabled by default for x86 and armv7. It will be the
new GenericScheduler for subtargets that don't provide their own
SchedulingStrategy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191051 91177308-0d34-0410-b5e6-96231b3b80d8
Added support for generate DWARF .debug_aranges sections automatically.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191053 91177308-0d34-0410-b5e6-96231b3b80d8
DebugInfo: constrain gnu pubnames test further

Ensures that the pubnames entries actually refer to the intended
entities. This test could be more flexible if there was a way to do
multiline FileCheck matches with captures (in that way the test wouldn't
need to have hardcoded offset values and would thus be resilient to
changes in the layout of the DIEs in this CU).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191055 91177308-0d34-0410-b5e6-96231b3b80d8
Add braces to suppress Clang's dangling-else warning.

These violations were introduced in r191049

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