Fix typos

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209982 91177308-0d34-0410-b5e6-96231b3b80d8
DebugInfo: Assert that DbgVariables have associated DIEs

This was previously committed in r209680 and reverted in r209683 after
it caused sanitizer builds to crash.

The issue seems to be that the DebugLoc associated with dbg.value IR
intrinsics isn't necessarily accurate. Instead, we duplicate the
DIVariables and add an InlinedAt field to them to record their
location.

We were using this InlinedAt field to compute the LexicalScope for the
variable, but not using it in the abstract DbgVariable construction and
mapping. This resulted in a formal parameter to the current concrete
function, correctly having no InlinedAt information, but incorrectly
having a DebugLoc that described an inlined location within the
function... thus an abstract DbgVariable was created for the variable,
but its DIE was never constructed (since the LexicalScope had no such
variable). This DbgVariable was silently ignored (by testing for a
non-null DIE on the abstract DbgVariable).

So, fix this by using the right scoping information when constructing
abstract DbgVariables.

In the long run, I suspect we want to undo the work that added this
second kind of location tracking and fix the places where the DebugLoc
propagation on the dbg.value intrinsic fails. This will shrink debug
info (by not duplicating DIVariables), make it more efficient (by not
having to construct new DIVariable metadata nodes to try to map back to
a single variable), and benefit all instructions.

But perhaps there are insurmountable issues with DebugLoc quality that
I'm unaware of... I just don't know how we can't /just keep the DebugLoc
from the dbg.declare to the dbg.values and never get this wrong/.

Some history context:

http://llvm.org/viewvc/llvm-project?view=revision&revision=135629
http://llvm.org/viewvc/llvm-project?view=revision&revision=137253

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209984 91177308-0d34-0410-b5e6-96231b3b80d8
R600: Set all float vector expands in the same place

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209988 91177308-0d34-0410-b5e6-96231b3b80d8
Updates in IntelJITEventListener.cpp - by Arch Robison.

This patch updates IntelJITEventListener.cpp to account for revision 206654, which removed some methods from DILineInfo.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209989 91177308-0d34-0410-b5e6-96231b3b80d8
ARMEB: Fix function return type f64

Reviewed at http://reviews.llvm.org/D3968



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209990 91177308-0d34-0410-b5e6-96231b3b80d8
Support: add Windows ARM EH data structures

Introduce the support structures necessary to deal with the Windows ARM EH data.
These definitions are extremely aggressive about assertions to aid future use
for generation of the entries and subsequent decoding.

The names for the various fields are meant to reflect the names used by the
Visual Studio toolchain to aid communication.

Due to the complexity in reading a few of the values, there are a couple of
additional utility functions to decode the information.

In general, there are two ways to encode the unwinding information:
- packed, which places the data inline into the
  _IMAGE_ARM_RUNTIME_FUNCTION_ENTRY structure.
- unpacked, which places the data into auxiliary structures placed into the
  .xdata section.

The set of structures allow reading of data in either encoding, with the minor
caveat that epilogue scopes need to be decoded manually by constructing the
structure from the data returned by the RuntimeFunction structure.

These definitions are meant for read-only access at the current point as the
first use of them will be to decode the exception information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209998 91177308-0d34-0410-b5e6-96231b3b80d8
Support: add 6-parameter format

Since we cannot yet use variadic templates, add a specialisation for
6-parameters to format.  This is motivated by a need for the additional
parameter for formatting information for an unwind decoder for Windows on ARM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209999 91177308-0d34-0410-b5e6-96231b3b80d8
Instruction::isIdenticalToWhenDefined(): Check getNumOperands() in advance of std::equal(op) to appease MSVC Debug build.

MSVC Debug build is confused with (possibly invalid) op_begin(), if op_begin() == op_end().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210000 91177308-0d34-0410-b5e6-96231b3b80d8
GraphWriter: detect graph viewer programs at runtime

Replace the crufty build-time configure checks for program paths with
equivalent runtime logic.

This lets users install graphing tools as needed without having to reconfigure
and rebuild LLVM, while eliminating a long chain of inappropriate compile
dependencies that included GUI programs and the windowing system.

Additional features:

 * Support the OS X 'open' command to view graphs generated by any of the
   Graphviz utilities. This is an alternative to the Graphviz OS X UI which is
   no longer available on Mountain Lion.

 * Produce informative log output upon failure to indicate which programs can
   be installed to view graphs.

Ping me if this doesn't work for your particular environment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210001 91177308-0d34-0410-b5e6-96231b3b80d8
GraphWriter: tweak the program fallback order

Amend r210001 to use the classic fallback order behaviour if the requested
graphing program isn't found.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210003 91177308-0d34-0410-b5e6-96231b3b80d8
Silence -Wreturn-type warning

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210005 91177308-0d34-0410-b5e6-96231b3b80d8
Added inst combine transforms for single bit tests from Chris's note

if ((x & C) == 0) x |= C becomes x |= C
if ((x & C) != 0) x ^= C becomes x &= ~C
if ((x & C) == 0) x ^= C becomes x |= C
if ((x & C) != 0) x &= ~C becomes x &= ~C
if ((x & C) == 0) x &= ~C becomes nothing

Differential Revision: http://reviews.llvm.org/D3777



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210006 91177308-0d34-0410-b5e6-96231b3b80d8
Added inst combine tarnsform for (1 << X) & C pattrens where C is (some PowerOf2 - 1)

This patch can handles following cases from http://nondot.org/sabre/LLVMNotes/InstCombine.txt
  "((1 << X) & 7) == 0" ==> "X > 2"
  "((1 << X) & 7) != 0" ==> "X < 3".

Differential Revision: http://reviews.llvm.org/D3678



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210007 91177308-0d34-0410-b5e6-96231b3b80d8
[AArch64] Add some more regression tests for load pre-index update folding in the load/store optimizer.

Add tests for the following transform:

 add x8, x8, #16
  ...
 ldr X, [x8]
  ->
 ldr X, [x8, #16]!

with X being either w0, x0, s0, d0 or q0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210018 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Handle x86 vector pack intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210020 91177308-0d34-0410-b5e6-96231b3b80d8
[AArch64] Add some more regression tests for store pre-index update folding in the load/store optimizer.

Add tests for the following transform:

 add x8, x8, #16
  ...
 str X, [x8]
  ->
 str X, [x8, #16]!

with X being either w0, x0, s0, d0 or q0.

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

Looks like it was only used by dejagnu and is now dead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210022 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Remove an out-of-date comment.

MSan is no longer an "early prototype".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210023 91177308-0d34-0410-b5e6-96231b3b80d8
Add the nsw flag when we detect that an add will not signed overflow.

We already had a function for checking this, we were just using it only in
specialized cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210029 91177308-0d34-0410-b5e6-96231b3b80d8
[X86] Fix checked arithmetic for i8 on X86.

When lowering a ISD::BRCOND into a test+branch, make sure that we
always use the correct condition code to emit the test operation.

This fixes PR19858: "i8 checked mul is wrong on x86".

Patch by Keno Fisher!



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