oota-llvm.git
9 years agoSilence -Wreturn-type warning
Alp Toker [Mon, 2 Jun 2014 04:34:10 +0000 (04:34 +0000)]
Silence -Wreturn-type warning

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

9 years agoGraphWriter: tweak the program fallback order
Alp Toker [Mon, 2 Jun 2014 04:14:23 +0000 (04:14 +0000)]
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

9 years agoGraphWriter: detect graph viewer programs at runtime
Alp Toker [Mon, 2 Jun 2014 01:40:04 +0000 (01:40 +0000)]
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

9 years agoInstruction::isIdenticalToWhenDefined(): Check getNumOperands() in advance of std...
NAKAMURA Takumi [Mon, 2 Jun 2014 01:35:34 +0000 (01:35 +0000)]
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

9 years agoSupport: add 6-parameter format
Saleem Abdulrasool [Mon, 2 Jun 2014 01:17:54 +0000 (01:17 +0000)]
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

9 years agoSupport: add Windows ARM EH data structures
Saleem Abdulrasool [Mon, 2 Jun 2014 01:17:49 +0000 (01:17 +0000)]
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

9 years agoARMEB: Fix function return type f64
Christian Pirker [Sun, 1 Jun 2014 09:30:52 +0000 (09:30 +0000)]
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

9 years agoUpdates in IntelJITEventListener.cpp - by Arch Robison.
Elena Demikhovsky [Sun, 1 Jun 2014 08:45:11 +0000 (08:45 +0000)]
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

9 years agoR600: Set all float vector expands in the same place
Matt Arsenault [Sun, 1 Jun 2014 07:38:21 +0000 (07:38 +0000)]
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

9 years agoDebugInfo: Assert that DbgVariables have associated DIEs
David Blaikie [Sun, 1 Jun 2014 03:38:13 +0000 (03:38 +0000)]
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

9 years agoFix typos
Alp Toker [Sat, 31 May 2014 21:26:28 +0000 (21:26 +0000)]
Fix typos

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

9 years agoExecutionEngine: avoid NDEBUG in headers
Alp Toker [Sat, 31 May 2014 21:26:17 +0000 (21:26 +0000)]
ExecutionEngine: avoid NDEBUG in headers

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

9 years agoUpdate a couple of header inclusion guards
Alp Toker [Sat, 31 May 2014 21:26:09 +0000 (21:26 +0000)]
Update a couple of header inclusion guards

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

9 years agoR600/SI: Remove redundant patterns
Matt Arsenault [Sat, 31 May 2014 19:25:17 +0000 (19:25 +0000)]
R600/SI: Remove redundant patterns

These patterns are already handled in the instruction definition.

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

9 years ago[SelectionDAG] Force cycle detection in AssignTopologicalOrder before aborting
Adam Nemet [Sat, 31 May 2014 16:23:20 +0000 (16:23 +0000)]
[SelectionDAG] Force cycle detection in AssignTopologicalOrder before aborting

DAG cycle detection is only enabled with ENABLE_EXPENSIVE_CHECKS.  However we
can run it just before we would crash in order to provide more informative
diagnostics.

Now in addition to the "Overran sorted position" message we also get the Node
printed if a cycle was detected.

Tested by building several configs: Debug+Assert, Debug+Assert+Check (this is
ENABLE_EXPENSIVE_CHECKS), Release+Assert and Release.  Also tried that the
AssignTopologicalOrder assert produces the expected results.

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

9 years ago[SelectionDAG] Pass DAG to checkForCycles
Adam Nemet [Sat, 31 May 2014 16:23:17 +0000 (16:23 +0000)]
[SelectionDAG] Pass DAG to checkForCycles

Pass the DAG down to checkForCycles from all callers where we have it.  This
allows target-specific nodes to be printed properly.

Also print some missing newlines.

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

9 years ago[SelectionDAG] Remove duplicate declaration
Adam Nemet [Sat, 31 May 2014 16:23:13 +0000 (16:23 +0000)]
[SelectionDAG] Remove duplicate declaration

Prefer the decl in SelectionDAGNodes.h because it's used there and
SelectionDAG.h includes SelectionDAGNodes.h.

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

9 years ago[Reassociate] Similar to "X + -X" -> "0", added code to handle "X + ~X" -> "-1".
Benjamin Kramer [Sat, 31 May 2014 15:01:54 +0000 (15:01 +0000)]
[Reassociate] Similar to "X + -X" -> "0", added code to handle "X + ~X" -> "-1".

Handle "X + ~X" -> "-1" in the function Value *Reassociate::OptimizeAdd(Instruction *I, SmallVectorImpl<ValueEntry> &Ops);
This patch implements:
TODO: We could handle "X + ~X" -> "-1" if we wanted, since "-X = ~X+1".

Patch by Rahul Jain!

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

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

9 years agoR600/SI: Fix [s|u]int_to_fp for i1
Matt Arsenault [Sat, 31 May 2014 06:47:42 +0000 (06:47 +0000)]
R600/SI: Fix [s|u]int_to_fp for i1

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

9 years agoFix typos in tablegen error messages
Matt Arsenault [Sat, 31 May 2014 05:18:52 +0000 (05:18 +0000)]
Fix typos in tablegen error messages

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

9 years ago[yaml2obj] Add new command line option `-docnum`.
Simon Atanasyan [Sat, 31 May 2014 04:51:07 +0000 (04:51 +0000)]
[yaml2obj] Add new command line option `-docnum`.

Input YAML file might contain multiple object file definitions.
New option `-docnum` allows to specify an ordinal number (starting from 1)
of definition used for an object file generation.

Patch reviewed by Sean Silva.

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

9 years agoreally fix the windows build.
Rafael Espindola [Sat, 31 May 2014 03:40:00 +0000 (03:40 +0000)]
really fix the windows build.

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

9 years agoFix windows build.
Rafael Espindola [Sat, 31 May 2014 03:26:57 +0000 (03:26 +0000)]
Fix windows build.

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

9 years agoThere is no std::errc::success, remove the llvm one.
Rafael Espindola [Sat, 31 May 2014 03:21:04 +0000 (03:21 +0000)]
There is no std::errc::success, remove the llvm one.

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

9 years agoTurn errc and windows_error into enum classes.
Rafael Espindola [Sat, 31 May 2014 02:29:28 +0000 (02:29 +0000)]
Turn errc and windows_error into enum classes.

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

9 years agoUse error_code() instead of error_code::succes()
Rafael Espindola [Sat, 31 May 2014 01:37:45 +0000 (01:37 +0000)]
Use error_code() instead of error_code::succes()

There is no std::error_code::success, so this removes much of the noise
in transitioning to std::error_code.

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

9 years agoFix the behavior of ExecuteAndWait with a non-zero timeout.
Peter Collingbourne [Sat, 31 May 2014 01:36:02 +0000 (01:36 +0000)]
Fix the behavior of ExecuteAndWait with a non-zero timeout.

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

9 years agoMake blend tests more specific
Filipe Cabecinhas [Sat, 31 May 2014 00:52:23 +0000 (00:52 +0000)]
Make blend tests more specific

Following the lead set by r209324, I'm making these tests match the whole
instruction, so we can be sure we're lowering them correctly.

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

9 years ago[ASan] Behave the same for functions w/o sanitize_address attribute and blacklisted...
Alexey Samsonov [Sat, 31 May 2014 00:33:05 +0000 (00:33 +0000)]
[ASan] Behave the same for functions w/o sanitize_address attribute and blacklisted functions

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

9 years ago[TSan] Fixup a test case after r209939
Alexey Samsonov [Sat, 31 May 2014 00:26:03 +0000 (00:26 +0000)]
[TSan] Fixup a test case after r209939

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

9 years ago[TSan] Behave the same for functions w/o sanitize_thread attribute and blacklisted...
Alexey Samsonov [Sat, 31 May 2014 00:11:37 +0000 (00:11 +0000)]
[TSan] Behave the same for functions w/o sanitize_thread attribute and blacklisted functions

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

9 years agodelete dead code.
Rafael Espindola [Sat, 31 May 2014 00:10:47 +0000 (00:10 +0000)]
delete dead code.

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

9 years agoHave the TLOF creation take a Triple rather than needing a subtarget.
Eric Christopher [Sat, 31 May 2014 00:07:32 +0000 (00:07 +0000)]
Have the TLOF creation take a Triple rather than needing a subtarget.

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

9 years ago[X86] Add two combine rules to simplify dag nodes introduced during type legalization...
Andrea Di Biagio [Fri, 30 May 2014 23:17:53 +0000 (23:17 +0000)]
[X86] Add two combine rules to simplify dag nodes introduced during type legalization when promoting nodes with illegal vector type.

This patch teaches the backend how to simplify/canonicalize dag node
sequences normally introduced by the backend when promoting certain dag nodes
with illegal vector type.

This patch adds two new combine rules:
1) fold (shuffle (bitcast (BINOP A, B)), Undef, <Mask>) ->
        (shuffle (BINOP (bitcast A), (bitcast B)), Undef, <Mask>)

2) fold (BINOP (shuffle (A, Undef, <Mask>)), (shuffle (B, Undef, <Mask>))) ->
        (shuffle (BINOP A, B), Undef, <Mask>).

Both rules are only triggered on the type-legalized DAG.
In particular, rule 1. is a target specific combine rule that attempts
to sink a bitconvert into the operands of a binary operation.
Rule 2. is a target independet rule that attempts to move a shuffle
immediately after a binary operation.

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

9 years agoConvert a vselect into a concat_vector if possible
Filipe Cabecinhas [Fri, 30 May 2014 23:03:11 +0000 (23:03 +0000)]
Convert a vselect into a concat_vector if possible

Summary:
If both vector args to vselect are concat_vectors and the condition is
constant and picks half a vector from each argument, convert the vselect
into a concat_vectors.

Added a test.

The ConvertSelectToConcatVector is assuming it doesn't get vselects with
arguments of, for example, <undef, undef, true, true>. Those get taken
care of in the checks above its call.

Reviewers: nadav, delena, grosbach, hfinkel

Subscribers: llvm-commits

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

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

9 years agoisSVR4ABI() returned !isDarwin() so just move that to the else
Eric Christopher [Fri, 30 May 2014 22:47:53 +0000 (22:47 +0000)]
isSVR4ABI() returned !isDarwin() so just move that to the else
block and remove the unreachable code.

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

9 years agoRename CreateTLOF->createTLOF to match the rest of the file and the
Eric Christopher [Fri, 30 May 2014 22:47:48 +0000 (22:47 +0000)]
Rename CreateTLOF->createTLOF to match the rest of the file and the
rest of the targets with a similar function name.

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

9 years agoSeparate the check for blend shuffle_vector masks
Filipe Cabecinhas [Fri, 30 May 2014 21:31:21 +0000 (21:31 +0000)]
Separate the check for blend shuffle_vector masks

Summary:
Separate the check for blend shuffle_vector masks into isBlendMask.
This function will also be used to check if a vector shuffle is legal. No
change in functionality was intended, but we ended up improving codegen on
two tests, which were being (more) optimized only if the resulting shuffle
was legal.

Reviewers: nadav, delena, andreadb

Subscribers: llvm-commits

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

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

9 years agofixed more typos
Sanjay Patel [Fri, 30 May 2014 21:18:13 +0000 (21:18 +0000)]
fixed more typos

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

9 years agoRoll DbgVariable::setMInsn into the constructor. No functional changes.
Adrian Prantl [Fri, 30 May 2014 21:10:13 +0000 (21:10 +0000)]
Roll DbgVariable::setMInsn into the constructor. No functional changes.

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

9 years agoadded link to CMake page
Sanjay Patel [Fri, 30 May 2014 21:07:25 +0000 (21:07 +0000)]
added link to CMake page

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

9 years agofixed typo
Sanjay Patel [Fri, 30 May 2014 20:55:55 +0000 (20:55 +0000)]
fixed typo

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

9 years agoMake bitcast, extractelement, and insertelement considered cheap for speculation.
Matt Arsenault [Fri, 30 May 2014 18:34:43 +0000 (18:34 +0000)]
Make bitcast, extractelement, and insertelement considered cheap for speculation.

This helps more branches into selects. On R600,
vectors are cheap and anything that helps
remove branches is very good.

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

9 years agoFix MIPS exception personality encoding.
Logan Chien [Fri, 30 May 2014 16:48:56 +0000 (16:48 +0000)]
Fix MIPS exception personality encoding.

For MIPS, we have to encode the personality routine with
an indirect pointer to absptr; otherwise, some link warning
warning will be raised, and the program might crash in some
early MIPS Android device.

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

9 years agoMachO: move test to ARM directory.
Tim Northover [Fri, 30 May 2014 16:01:29 +0000 (16:01 +0000)]
MachO: move test to ARM directory.

This test specifies an ARM triple, so it needs ARM as a registered
target.

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

9 years agoPR19753: Optimize comparisons with "ashr exact" of a constanst.
Rafael Espindola [Fri, 30 May 2014 15:54:32 +0000 (15:54 +0000)]
PR19753: Optimize comparisons with "ashr exact" of a constanst.

Patch by suyog sarda.

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

9 years ago[pr19636] Fix known bit computation in urem instruction with power of two.
Rafael Espindola [Fri, 30 May 2014 15:00:45 +0000 (15:00 +0000)]
[pr19636]  Fix known bit computation in urem instruction with power of two.
Patch by Andrey Kuharev.

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

9 years agoSelectionDAG: skip barriers for unordered atomic operations
Tim Northover [Fri, 30 May 2014 14:41:51 +0000 (14:41 +0000)]
SelectionDAG: skip barriers for unordered atomic operations

Unordered is strictly weaker than monotonic, so if the latter doesn't have any
barriers then the former certainly shouldn't.

rdar://problem/16548260

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

9 years agoARM: use AAPCS-style prologues for embedded MachO.
Tim Northover [Fri, 30 May 2014 13:23:06 +0000 (13:23 +0000)]
ARM: use AAPCS-style prologues for embedded MachO.

Darwin prologues save their GPRs in two stages: a narrow push of r0-r7 & lr,
followed by a wide push of the remaining registers if there are any. AAPCS uses
a single push.w instruction.

It turns out that, on average, enough registers get pushed that code is smaller
in the AAPCS prologue, which is a nice property for M-class programmers. They
also have other options available for back-traces, so can hopefully deal with
the fact that FP & LR aren't adjacent in memory.

rdar://problem/15909583

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

9 years agoMachO: support N_INDR aliases in assembly files.
Tim Northover [Fri, 30 May 2014 13:22:59 +0000 (13:22 +0000)]
MachO: support N_INDR aliases in assembly files.

This makes LLVM create N_INDR aliases (to be resolved by the linker) when
appropriate.

rdar://problem/15125513

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

9 years agoAArch64 & ARM: disable generic test that relies on no CFG changes.
Tim Northover [Fri, 30 May 2014 10:56:12 +0000 (10:56 +0000)]
AArch64 & ARM: disable generic test that relies on no CFG changes.

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

9 years agoARM & AArch64: make use of common cmpxchg idioms after expansion
Tim Northover [Fri, 30 May 2014 10:09:59 +0000 (10:09 +0000)]
ARM & AArch64: make use of common cmpxchg idioms after expansion

The C and C++ semantics for compare_exchange require it to return a bool
indicating success. This gets mapped to LLVM IR which follows each cmpxchg with
an icmp of the value loaded against the desired value.

When lowered to ldxr/stxr loops, this extra comparison is redundant: its
results are implicit in the control-flow of the function.

This commit makes two changes: it replaces that icmp with appropriate PHI
nodes, and then makes sure earlyCSE is called after expansion to actually make
use of the opportunities revealed.

I've also added -{arm,aarch64}-enable-atomic-tidy options, so that
existing fragile tests aren't perturbed too much by the change. Many
of them either rely on undef/unreachable too pervasively to be
restored to something well-defined (particularly while making sure
they test the same obscure assert from many years ago), or depend on a
particular CFG shape, which is disrupted by SimplifyCFG.

rdar://problem/16227836

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

9 years agoAArch64 & ARM: remove undefined behaviour from some tests.
Tim Northover [Fri, 30 May 2014 08:59:55 +0000 (08:59 +0000)]
AArch64 & ARM: remove undefined behaviour from some tests.

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

9 years agoTest cases named with dates is a legacy rule not used now. Rename several test cases.
Hao Liu [Fri, 30 May 2014 05:58:19 +0000 (05:58 +0000)]
Test cases named with dates is a legacy rule not used now. Rename several test cases.

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

9 years agoAllow vectorization of intrinsics such as powi,cttz and ctlz in Loop and SLP Vectorizer.
Karthik Bhat [Fri, 30 May 2014 04:31:24 +0000 (04:31 +0000)]
Allow vectorization of intrinsics such as powi,cttz and ctlz in Loop and SLP Vectorizer.

This patch adds support to vectorize intrinsics such as powi, cttz and ctlz in Vectorizer. These intrinsics are different from other
intrinsics as second argument to these function must be same in order to vectorize them and it should be represented as a scalar.
Review: http://reviews.llvm.org/D3851#inline-32769 and http://reviews.llvm.org/D3937#inline-32857

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

9 years agoAdd a trivial ArrayRef helper overload to the SelectionDAG interface.
Chandler Carruth [Fri, 30 May 2014 03:50:06 +0000 (03:50 +0000)]
Add a trivial ArrayRef helper overload to the SelectionDAG interface.
I'm using this pretty frequently in a patch I'm working on and it seems
generally useful.

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

9 years agoRemove use of comma operator.
Richard Trieu [Fri, 30 May 2014 03:15:17 +0000 (03:15 +0000)]
Remove use of comma operator.

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

9 years agoWhen analyzing params/args for readnone/readonly, don't forget to consider that a...
Nick Lewycky [Fri, 30 May 2014 02:31:27 +0000 (02:31 +0000)]
When analyzing params/args for readnone/readonly, don't forget to consider that a pointer argument may be passed through a callsite to the return, and that we may need to analyze it. Fixes a bug reported on llvm-dev: lists.cs.uiuc.edu/pipermail/llvmdev/2014-May/073098.html

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

9 years ago[X86] Move test from r209863 to CodeGen/X86
Adam Nemet [Thu, 29 May 2014 23:52:53 +0000 (23:52 +0000)]
[X86] Move test from r209863 to CodeGen/X86

We should only run this if X86 is in the targets.

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

9 years ago[X86] Remove AVX1 vbroadcast intrinsics
Adam Nemet [Thu, 29 May 2014 23:35:36 +0000 (23:35 +0000)]
[X86] Remove AVX1 vbroadcast intrinsics

The corresponding CFE patch replaces these intrinsics with vector initializers
in avxintrin.h.  This patch removes the LLVM intrinsics from the backend.

We now stop lowering at X86ISD::VBROADCAST custom node rather than lowering
that further to the intrinsics.

The patch only changes VBROADCASTS* and leaves VBROADCAST[FI]128 to continue
to use intrinsics.  As explained in the CFE patch, the reason is that we
currently don't generate as good code for them without the intrinsics.

CodeGen/X86/avx-vbroadcast.ll already provides coverage for this change.  It
checks that for a series of insertelements we generate the appropriate
vbroadcast instruction.

Also verified that there was no assembly change in the test-suite before and
after this patch.

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

9 years ago[X86] Auto-upgrade AVX1 vbroadcast intrinsics
Adam Nemet [Thu, 29 May 2014 23:35:33 +0000 (23:35 +0000)]
[X86] Auto-upgrade AVX1 vbroadcast intrinsics

They are replaced with the same IR that is generated for the
vector-initializers in avxintrin.h.

The test verifies that we get back the original instruction.  I haven't seen
this approach to be used in other auto-upgrade tests (i.e. llc + FileCheck)
but I think it's the most direct way to test this case.  I believe this should
work because llc upgrades calls during parsing.  (Other tests mostly check
that assembling and disassembling yields the upgraded IR.)

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

9 years agoAnd fix my fix to sink down through the type at the right time. My
Chandler Carruth [Thu, 29 May 2014 23:21:12 +0000 (23:21 +0000)]
And fix my fix to sink down through the type at the right time. My
original fix would actually trigger the *exact* same crasher as the
original bug for a different reason. Awesomesauce.

Working on test cases now, but wanted to get bots healthier.

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

9 years agoFix one bug in the latest incarnation of r209843 -- combining GEPs
Chandler Carruth [Thu, 29 May 2014 23:05:52 +0000 (23:05 +0000)]
Fix one bug in the latest incarnation of r209843 -- combining GEPs
across PHI nodes. The code was computing the Idxs from the 'GEP'
variable's indices when what it wanted was Op1's indices. This caused an
ASan heap-overflow for me that pin pointed the issue when Op1 had more
indices than GEP did. =] I'll let Louis add a specific test case for
this if he wants.

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

9 years agoSync list of targets with configure's reality
Jeroen Ketema [Thu, 29 May 2014 22:23:22 +0000 (22:23 +0000)]
Sync list of targets with configure's reality

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

9 years agoLoopVectorizer: Add a check that the backedge taken count + 1 does not overflow
Arnold Schwaighofer [Thu, 29 May 2014 22:10:01 +0000 (22:10 +0000)]
LoopVectorizer: Add a check that the backedge taken count + 1 does not overflow

The loop vectorizer instantiates be-taken-count + 1 as the loop iteration count.
If this expression overflows the generated code was invalid.

In case of overflow the code now jumps to the scalar loop.

Fixes PR17288.

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

9 years agoAdded tests for shufflevector lowering to blend instrs.
Filipe Cabecinhas [Thu, 29 May 2014 22:04:42 +0000 (22:04 +0000)]
Added tests for shufflevector lowering to blend instrs.

These tests ensure that a change I will propose in clang works as
expected.

Summary:
Added tests for the generation of blend+immediate instructions from a
shufflevector.
These tests were proposed along with a patch that was dropped. I'm
committing the tests anyway to protect against possible regressions in
codegen.

Reviewers: nadav, bkramer

Subscribers: llvm-commits

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

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

9 years agoAdd support for combining GEPs across PHI nodes
Louis Gerbarg [Thu, 29 May 2014 20:29:47 +0000 (20:29 +0000)]
Add support for combining GEPs across PHI nodes

Currently LLVM will generally merge GEPs. This allows backends to use more
complex addressing modes. In some cases this is not happening because there
is PHI inbetween the two GEPs:

  GEP1--\
        |-->PHI1-->GEP3
  GEP2--/

This patch checks to see if GEP1 and GEP2 are similiar enough that they can be
cloned (GEP12) in GEP3's BB, allowing GEP->GEP merging (GEP123):

  GEP1--\                     --\                           --\
        |-->PHI1-->GEP3  ==>    |-->PHI2->GEP12->GEP3 == >    |-->PHI2->GEP123
  GEP2--/                     --/                           --/

This also breaks certain use chains that are preventing GEP->GEP merges that the
the existing instcombine would merge otherwise.

Tests included.

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

9 years agoUpdate Credits.
Chad Rosier [Thu, 29 May 2014 19:59:58 +0000 (19:59 +0000)]
Update Credits.

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

9 years agoimplement missing SCEVDivision case
Sebastian Pop [Thu, 29 May 2014 19:44:09 +0000 (19:44 +0000)]
implement missing SCEVDivision case

without this case we would end on an infinite recursion: the remainder is zero,
so Numerator - Remainder is equal to Numerator and so we would recursively ask
for the division of Numerator by Denominator.

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

9 years agofail to find dimensions when ElementSize is nullptr
Sebastian Pop [Thu, 29 May 2014 19:44:05 +0000 (19:44 +0000)]
fail to find dimensions when ElementSize is nullptr

when ScalarEvolution::getElementSize returns nullptr it is safe to early return
in ScalarEvolution::findArrayDimensions such that we avoid later problems when
we try to divide the terms by ElementSize.

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

9 years agoUse range-based for loops in ASan, TSan and MSan
Alexey Samsonov [Thu, 29 May 2014 18:40:48 +0000 (18:40 +0000)]
Use range-based for loops in ASan, TSan and MSan

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

9 years ago[ADT] Delete the Twine assignment operator
Reid Kleckner [Thu, 29 May 2014 17:12:05 +0000 (17:12 +0000)]
[ADT] Delete the Twine assignment operator

This makes it slightly harder to misuse Twines.  It is still possible to
refer to destroyed temporaries with the regular constructors, though.

Patch by Marco Alesiani!

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

9 years agoDebug Info: Remove unused code. The MInsn of an _abstract_ variable is
Adrian Prantl [Thu, 29 May 2014 16:56:48 +0000 (16:56 +0000)]
Debug Info: Remove unused code. The MInsn of an _abstract_ variable is
never used again and updating the abstract variable for each inlined
instance of it was questionable in the first place.

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

9 years agoRename alias variables to make it easier to add new tests to the file.
Rafael Espindola [Thu, 29 May 2014 16:16:12 +0000 (16:16 +0000)]
Rename alias variables to make it easier to add new tests to the file.

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

9 years ago[PPC] Use alias symbols in address computation.
Rafael Espindola [Thu, 29 May 2014 15:41:38 +0000 (15:41 +0000)]
[PPC] Use alias symbols in address computation.

This seems to match what gcc does for ppc and what every other llvm
backend does.

This is a fixed version of r209638. The difference is to avoid any change
in behavior for functions. The logic for using constant pools for function
addresseses is spread over a few places and we have to keep them in sync.

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

9 years agoAdd a test showing the ppc code sequence for getting a function pointer.
Rafael Espindola [Thu, 29 May 2014 15:13:23 +0000 (15:13 +0000)]
Add a test showing the ppc code sequence for getting a function pointer.

This would have found the miscompile in r209638.

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

9 years agoRevert "Revert "Revert "InstCombine: Improvement to check if signed addition overflow...
Rafael Espindola [Thu, 29 May 2014 14:39:16 +0000 (14:39 +0000)]
Revert "Revert "Revert "InstCombine: Improvement to check if signed addition overflows."""

This reverts commit r209776.

It was miscompiling llvm::SelectionDAGISel::MorphNode.

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

9 years agoRestore getInvertedCondCode() from the phased-out backend, fixing disassembly for NV
Artyom Skrobov [Thu, 29 May 2014 11:34:50 +0000 (11:34 +0000)]
Restore getInvertedCondCode() from the phased-out backend, fixing disassembly for NV

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

9 years agoAdd missing check when MatchInstructionImpl() reports failure
Artyom Skrobov [Thu, 29 May 2014 11:26:15 +0000 (11:26 +0000)]
Add missing check when MatchInstructionImpl() reports failure

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

9 years ago[elf2yaml][ELF] Move Info field to the RelocationSection structure. This
Simon Atanasyan [Thu, 29 May 2014 11:05:31 +0000 (11:05 +0000)]
[elf2yaml][ELF] Move Info field to the RelocationSection structure. This
field represents ELF section header sh_info field and does not have any
sense for regular sections. Its interpretation depends on section type.

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

9 years agoRename a test case to contain correct date info.
Hao Liu [Thu, 29 May 2014 09:21:23 +0000 (09:21 +0000)]
Rename a test case to contain correct date info.

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

9 years agoFix an assertion failure caused by v1i64 in DAGCombiner Shrink.
Hao Liu [Thu, 29 May 2014 09:19:07 +0000 (09:19 +0000)]
Fix an assertion failure caused by v1i64 in DAGCombiner Shrink.

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

9 years agoLCSSA should be performed on the outermost affected loop while unrolling loop.
Dinesh Dwivedi [Thu, 29 May 2014 06:47:23 +0000 (06:47 +0000)]
LCSSA should be performed on the outermost affected loop while unrolling loop.

During loop-unroll, loop exits from the current loop may end up in in different
outer loop. This requires to re-form LCSSA recursively for one level down from
the outer most loop where loop exits are landed during unroll. This fixes PR18861.

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

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

9 years ago[LoadCombine] Missed a file.
Michael J. Spencer [Thu, 29 May 2014 02:05:37 +0000 (02:05 +0000)]
[LoadCombine] Missed a file.

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

9 years agoAdd LoadCombine pass.
Michael J. Spencer [Thu, 29 May 2014 01:55:07 +0000 (01:55 +0000)]
Add LoadCombine pass.

This pass is disabled by default. Use -combine-loads to enable in -O[1-3]

Differential revision: http://reviews.llvm.org/D3580

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

9 years ago[ASan] Hoist blacklisting globals from init-order checking to Clang.
Alexey Samsonov [Thu, 29 May 2014 01:44:13 +0000 (01:44 +0000)]
[ASan] Hoist blacklisting globals from init-order checking to Clang.

Clang knows about the sanitizer blacklist and it makes no sense to
add global to the list of llvm.asan.dynamically_initialized_globals if it
will be blacklisted in the instrumentation pass anyway. Instead, we should
do as much blacklisting as possible (if not all) in the frontend.

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

9 years ago[x86] Fold extract_vector_elt of a load into the Load's address computation.
Michael J. Spencer [Thu, 29 May 2014 01:42:45 +0000 (01:42 +0000)]
[x86] Fold extract_vector_elt of a load into the Load's address computation.

An address only use of an extract element of a load can be simplified to a
load. Without this the result of the extract element is spilled to the
stack so that an address is available.

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

9 years agoR600/SI: Fix pattern variable names.
Matt Arsenault [Thu, 29 May 2014 01:18:01 +0000 (01:18 +0000)]
R600/SI: Fix pattern variable names.

These are confusing enough since the order swaps,
so give them more useful names.

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

9 years agoFix typo in variable name
Alexey Samsonov [Thu, 29 May 2014 01:10:14 +0000 (01:10 +0000)]
Fix typo in variable name

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

9 years ago[ASan] Use llvm.global_ctors to insert init-order checking calls into ASan runtime.
Alexey Samsonov [Thu, 29 May 2014 00:51:15 +0000 (00:51 +0000)]
[ASan] Use llvm.global_ctors to insert init-order checking calls into ASan runtime.

Don't assume that dynamically initialized globals are all initialized from
_GLOBAL__<module_name>I_ function. Instead, scan the llvm.global_ctors and
insert poison/unpoison calls to each function there.

Patch by Nico Weber!

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

9 years agoAdd a simple helper function to create a 64-bit integer.
Reid Kleckner [Wed, 28 May 2014 22:49:12 +0000 (22:49 +0000)]
Add a simple helper function to create a 64-bit integer.

Add a function to combine two 32-bit integers into a 64-bit integer.
There are no calls to this function yet, although a subsequent change
will add some in LLDB.

Reviewers: rnk

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

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

9 years agoRevert "Revert "InstCombine: Improvement to check if signed addition overflows.""
Rafael Espindola [Wed, 28 May 2014 21:43:52 +0000 (21:43 +0000)]
Revert "Revert "InstCombine: Improvement to check if signed addition overflows.""

This reverts commit r209762, bringing back r209746. It was not responsible for the libc++ build failure

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

9 years agoRevert "Add support for combining GEPs across PHI nodes"
Rafael Espindola [Wed, 28 May 2014 21:41:21 +0000 (21:41 +0000)]
Revert "Add support for combining GEPs across PHI nodes"

This reverts commit r209755.

it was the real cause of the libc++ build failure.

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

9 years agoFix wrong setcc result type when legalizing uaddo/usubo
Matt Arsenault [Wed, 28 May 2014 20:51:42 +0000 (20:51 +0000)]
Fix wrong setcc result type when legalizing uaddo/usubo

No test because no in-tree targets change the bitwidth of the
setcc type depending on the bitwidth of the compared type.

Patch by Ke Bai

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

9 years agoUpdate CREDITS to be at least moderately more current.
Jim Grosbach [Wed, 28 May 2014 20:31:52 +0000 (20:31 +0000)]
Update CREDITS to be at least moderately more current.

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

9 years agofixed a few typos
Sanjay Patel [Wed, 28 May 2014 20:07:37 +0000 (20:07 +0000)]
fixed a few typos

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

9 years agotest check-in: added missing parenthesis in comment
Sanjay Patel [Wed, 28 May 2014 19:03:33 +0000 (19:03 +0000)]
test check-in: added missing parenthesis in comment

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

9 years agoRevert "InstCombine: Improvement to check if signed addition overflows."
Rafael Espindola [Wed, 28 May 2014 18:48:10 +0000 (18:48 +0000)]
Revert "InstCombine: Improvement to check if signed addition overflows."

This reverts commit r209746.

It looks it is causing a crash while building libcxx. I am trying to get a
reduced testcase.

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

9 years agoFix standard integer definitions for MSVC in DataTypes.h
Reid Kleckner [Wed, 28 May 2014 18:19:55 +0000 (18:19 +0000)]
Fix standard integer definitions for MSVC in DataTypes.h

Previously, DataTypes.h would #define a variety of symbols any time
they weren't already defined.  However, some versions of Visual
Studio do provide the appropriate headers, so if those headers are
included after DataTypes.h, it can lead to macro redefinition
warnings.

The fix is to include the appropriate headers if they exist, and
only #define the symbols if the required header does not exist.

Patch by Zachary Turner!

---

The big change here is that we no longer have our own stdint.h
typedefs because now all supported toolchains have stdint.h.
Hooray!

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

9 years ago[pr19844] Add thread local mode to aliases.
Rafael Espindola [Wed, 28 May 2014 18:15:43 +0000 (18:15 +0000)]
[pr19844] Add thread local mode to aliases.

This matches gcc's behavior. It also seems natural given that aliases
contain other properties that govern how it is accessed (linkage,
visibility, dll storage).

Clang still has to be updated to expose this feature to C.

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