oota-llvm.git
11 years ago[autotools->cmake] Enable generation of doxygen documentation via cmake.
Michael Gottesman [Sat, 24 Aug 2013 07:25:21 +0000 (07:25 +0000)]
[autotools->cmake] Enable generation of doxygen documentation via cmake.

I am going to add in a subsequent patch support for generating the llvm
manpage.

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

11 years agoAdded const qualifier to StringRef::edit_distance member function
Dmitri Gribenko [Sat, 24 Aug 2013 01:50:41 +0000 (01:50 +0000)]
Added const qualifier to StringRef::edit_distance member function

Patch by Ismail Pazarbasi.

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

11 years agoStart to add the builtind to the mips16 exclusion lists for fp.
Reed Kotler [Sat, 24 Aug 2013 01:24:44 +0000 (01:24 +0000)]
Start to add the builtind to the mips16 exclusion lists for fp.
I need to add the rest of these to the list or else to delay putting
out the actual stub until later in code generation when I know if
the external function ever got emitted.

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

11 years ago[NVPTX] Re-enable assembly printing support for inline assembly
Justin Holewinski [Sat, 24 Aug 2013 01:17:23 +0000 (01:17 +0000)]
[NVPTX] Re-enable assembly printing support for inline assembly

This support was removed by accident during the MC conversion

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

11 years agoDebugInfoFinder: handle imported entities of a CU.
Manman Ren [Sat, 24 Aug 2013 00:32:12 +0000 (00:32 +0000)]
DebugInfoFinder: handle imported entities of a CU.

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

11 years agoCMake: Add LLVM_INSTALL_TOOLCHAIN_ONLY option.
Hans Wennborg [Sat, 24 Aug 2013 00:20:36 +0000 (00:20 +0000)]
CMake: Add LLVM_INSTALL_TOOLCHAIN_ONLY option.

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

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

11 years agoUpdate test to use rdrnd instead of rdrand.
Rafael Espindola [Fri, 23 Aug 2013 20:49:02 +0000 (20:49 +0000)]
Update test to use rdrnd instead of rdrand.

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

11 years agoUpdate tests to use sse4.2 instead of sse42.
Rafael Espindola [Fri, 23 Aug 2013 20:46:35 +0000 (20:46 +0000)]
Update tests to use sse4.2 instead of sse42.

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

11 years agoReplace more uses of sse41 with sse4.1.
Rafael Espindola [Fri, 23 Aug 2013 20:39:19 +0000 (20:39 +0000)]
Replace more uses of sse41 with sse4.1.

llc using the host cpu features and *waning* on unknown features is probably
not a good thing :-(

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

11 years agoUpdate a test that I missed in the previous commit.
Rafael Espindola [Fri, 23 Aug 2013 20:27:02 +0000 (20:27 +0000)]
Update a test that I missed in the previous commit.

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

11 years agoRename features to match what gcc and clang use.
Rafael Espindola [Fri, 23 Aug 2013 20:21:34 +0000 (20:21 +0000)]
Rename features to match what gcc and clang use.

There is no advantage in being different and using the same names simplifies
clang a bit.

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

11 years agoDataFlowSanitizer: correctly combine labels in the case where they are equal.
Peter Collingbourne [Fri, 23 Aug 2013 18:45:06 +0000 (18:45 +0000)]
DataFlowSanitizer: correctly combine labels in the case where they are equal.

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

11 years agoDebugInfoFinder: handle template params of a DISubprogram.
Manman Ren [Fri, 23 Aug 2013 18:36:18 +0000 (18:36 +0000)]
DebugInfoFinder: handle template params of a DISubprogram.

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

11 years agoCMake: don't install tablegen
Hans Wennborg [Fri, 23 Aug 2013 18:28:10 +0000 (18:28 +0000)]
CMake: don't install tablegen

Since it's an llvm-internal tool, we shouldn't install it.

(This depends on Clang r189127 and lld r189128.)

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

11 years agoCMake: build llvm-config on Windows.
Hans Wennborg [Fri, 23 Aug 2013 17:59:13 +0000 (17:59 +0000)]
CMake: build llvm-config on Windows.

It was previously not being built on Windows because the cmake file relied
on a sed script to generate a .in file that llvm-config needs.

By using cmake's configure_file function, we can get rid off the sed hack,
and also have this work on Windows.

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

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

11 years agoPrintVRegOrUnit
Andrew Trick [Fri, 23 Aug 2013 17:48:53 +0000 (17:48 +0000)]
PrintVRegOrUnit

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

11 years agoRename to RegPressure API parameters RegUnits.
Andrew Trick [Fri, 23 Aug 2013 17:48:51 +0000 (17:48 +0000)]
Rename to RegPressure API parameters RegUnits.

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

11 years agoSimplify RegPressure helpers.
Andrew Trick [Fri, 23 Aug 2013 17:48:48 +0000 (17:48 +0000)]
Simplify RegPressure helpers.

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

11 years agoAdd a convenient PSetIterator for visiting pressure sets affected by a register.
Andrew Trick [Fri, 23 Aug 2013 17:48:46 +0000 (17:48 +0000)]
Add a convenient PSetIterator for visiting pressure sets affected by a register.

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

11 years agoAdds cyclic critical path computation and heuristics, temporarily disabled.
Andrew Trick [Fri, 23 Aug 2013 17:48:43 +0000 (17:48 +0000)]
Adds cyclic critical path computation and heuristics, temporarily disabled.

Estimate the cyclic critical path within a single block loop. If the
acyclic critical path is longer, then the loop will exhaust OOO
resources after some number of iterations. If lag between the acyclic
critical path and cyclic critical path is longer the the time it takes
to issue those loop iterations, then aggressively schedule for
latency.

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

11 years agoMI Sched: record local vreg uses.
Andrew Trick [Fri, 23 Aug 2013 17:48:39 +0000 (17:48 +0000)]
MI Sched: record local vreg uses.

This will be used to compute the cyclic critical path and to
update precomputed per-node pressure differences.
In the longer term, it could also be used to speed up LiveInterval
update by avoiding visiting all global vreg users.

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

11 years agoRemove unused field.
Andrew Trick [Fri, 23 Aug 2013 17:48:36 +0000 (17:48 +0000)]
Remove unused field.

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

11 years agomi-sched: Don't call MBB.size() in initSUnits. The driver already has instr count.
Andrew Trick [Fri, 23 Aug 2013 17:48:33 +0000 (17:48 +0000)]
mi-sched: Don't call MBB.size() in initSUnits. The driver already has instr count.

This fixes a pathological compile time problem with very large blocks
and lots of scheduling boundaries.

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

11 years agoChecking commit access; added one space
Jim Cownie [Fri, 23 Aug 2013 15:51:37 +0000 (15:51 +0000)]
Checking commit access; added one space

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

11 years ago[ARM] Fix another ARM FastISel -verify-machineinstrs issue.
Joey Gouly [Fri, 23 Aug 2013 15:20:56 +0000 (15:20 +0000)]
[ARM] Fix another ARM FastISel -verify-machineinstrs issue.

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

11 years ago[mips][msa] Few MSA Builtins have side-effects. Added IntrNoMem to those that don't.
Daniel Sanders [Fri, 23 Aug 2013 12:21:25 +0000 (12:21 +0000)]
[mips][msa] Few MSA Builtins have side-effects. Added IntrNoMem to those that don't.

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

11 years ago[msan] Fix handling of va_arg overflow area on x86_64.
Evgeniy Stepanov [Fri, 23 Aug 2013 12:11:00 +0000 (12:11 +0000)]
[msan] Fix handling of va_arg overflow area on x86_64.

The code was erroneously reading overflow area shadow from the TLS slot,
bypassing the local copy. Reading shadow directly from TLS is wrong, because
it can be overwritten by a nested vararg call, if that happens before va_start.

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

11 years ago[ARMv8] Add CodeGen for VMAXNM/VMINNM.
Joey Gouly [Fri, 23 Aug 2013 12:01:13 +0000 (12:01 +0000)]
[ARMv8] Add CodeGen for VMAXNM/VMINNM.

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

11 years agoAdd function attribute 'optnone'.
Andrea Di Biagio [Fri, 23 Aug 2013 11:53:55 +0000 (11:53 +0000)]
Add function attribute 'optnone'.

This function attribute indicates that the function is not optimized
by any optimization or code generator passes with the
exception of interprocedural optimization passes.

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

11 years ago[SystemZ] Add basic prefetch support
Richard Sandiford [Fri, 23 Aug 2013 11:36:42 +0000 (11:36 +0000)]
[SystemZ] Add basic prefetch support

Just the instructions and intrinsics for now.

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

11 years ago[SystemZ] Try reversing comparisons whose first operand is in memory
Richard Sandiford [Fri, 23 Aug 2013 11:27:19 +0000 (11:27 +0000)]
[SystemZ] Try reversing comparisons whose first operand is in memory

This allows us to make more use of the many compare reg,mem instructions.

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

11 years ago[SystemZ] Prefer LHI;ST... over LAY;MV...
Richard Sandiford [Fri, 23 Aug 2013 11:18:53 +0000 (11:18 +0000)]
[SystemZ] Prefer LHI;ST... over LAY;MV...

If we had a store of an integer to memory, and the integer and store size
were suitable for a form of MV..., we used MV... no matter what.  We could
then have sequences like:

    lay %r2, 0(%r3,%r4)
    mvi 0(%r2), 4

In these cases it seems better to force the constant into a register
and use a normal store:

    lhi %r2, 4
    stc %r2, 0(%r3, %r4)

since %r2 is more likely to be hoisted and is easier to rematerialize.

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

11 years agoTurn MipsOptimizeMathLibCalls into a target-independent scalar transform
Richard Sandiford [Fri, 23 Aug 2013 10:27:02 +0000 (10:27 +0000)]
Turn MipsOptimizeMathLibCalls into a target-independent scalar transform

...so that it can be used for z too.  Most of the code is the same.
The only real change is to use TargetTransformInfo to test when a sqrt
instruction is available.

The pass is opt-in because at the moment it only handles sqrt.

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

11 years agoARM: make sure ARM-mode pseudo-inst requires IsARM
Tim Northover [Fri, 23 Aug 2013 10:16:39 +0000 (10:16 +0000)]
ARM: make sure ARM-mode pseudo-inst requires IsARM

I'd forgotten that "Requires" blocks override rather than add to the
constraints, so my pseudo-instruction was being selected in Thumb mode leading
to nonsense instructions.

rdar://problem/14817358

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

11 years ago[mips][msa] Split MSA128 regset into size-specific sets containing the same registers.
Daniel Sanders [Fri, 23 Aug 2013 10:10:13 +0000 (10:10 +0000)]
[mips][msa] Split MSA128 regset into size-specific sets containing the same registers.

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

11 years ago80 cols
Alexey Samsonov [Fri, 23 Aug 2013 07:42:51 +0000 (07:42 +0000)]
80 cols

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

11 years agoMake DWARFCompileUnit non-copyable
Alexey Samsonov [Fri, 23 Aug 2013 06:56:01 +0000 (06:56 +0000)]
Make DWARFCompileUnit non-copyable

Summary:
This is a part of D1164. DWARFCompileUnit is not that lightweight
to copy it around, and we want it to own corresponding .dwo compile unit
eventually.

Reviewers: echristo

Reviewed By: echristo

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1298

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

11 years agolto/CMakeLists.txt: Cut the dep to intrinsics_gen. LTO doesn't depend on it and LTO_s...
NAKAMURA Takumi [Fri, 23 Aug 2013 02:51:13 +0000 (02:51 +0000)]
lto/CMakeLists.txt: Cut the dep to intrinsics_gen. LTO doesn't depend on it and LTO_static doesn't depend on anything.

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

11 years agoUse register masks on SPARC call instructions.
Jakob Stoklund Olesen [Fri, 23 Aug 2013 02:33:47 +0000 (02:33 +0000)]
Use register masks on SPARC call instructions.

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

11 years agoAdd an OtherPreserved field to the CalleeSaved TableGen class.
Jakob Stoklund Olesen [Fri, 23 Aug 2013 02:25:47 +0000 (02:25 +0000)]
Add an OtherPreserved field to the CalleeSaved TableGen class.

This field specifies registers that are preserved across function calls,
but that should not be included in the generates SaveList array.

This can be used ot generate regmasks for architectures that save
registers through other means, like SPARC's register windows.

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

11 years ago[PR11606] ocaml bindings tests produce binaries in source dir
Daniel Dunbar [Fri, 23 Aug 2013 00:55:32 +0000 (00:55 +0000)]
[PR11606] ocaml bindings tests produce binaries in source dir

 - Workaround for ocamlopt producing outputs adjacent to its source inputs, by
   having the tests copy the inputs into temporary directories in the output
   paths before building.

 - Patch by edward-san.

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

11 years agoFilecheckize some tests.
Michael Gottesman [Fri, 23 Aug 2013 00:23:28 +0000 (00:23 +0000)]
Filecheckize some tests.

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

11 years agoUpdate StripDeadDebugInfo to use DebugInfoFinder so that it is no longer stale to...
Michael Gottesman [Fri, 23 Aug 2013 00:23:24 +0000 (00:23 +0000)]
Update StripDeadDebugInfo to use DebugInfoFinder so that it is no longer stale to the point of not working and more resilient to debug info changes.

The current version of StripDeadDebugInfo became stale and no longer actually
worked since it was expecting an older version of debug info.

This patch updates it to use DebugInfoFinder and the modern DebugInfo classes as
much as possible to make it more redundent to such changes. Additionally, the
only place where that was avoided (the code where we replace the old sets with
the new), I call verify on the DIContextUnit implying that if the format changes
and my live set changes no longer make sense an assert will be hit. In order to
ensure that that occurs I have included a test case.

The actual stripping of the dead debug info follows the same strategy as was
used before in this class: find the live set and replace the old set in the
given compile unit (which may contain dead global variables/functions) with the
new live one.

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

11 years ago[stack protector] Work around an issue with the BMOVPCB_CALL instruction on ARM by...
Michael Gottesman [Thu, 22 Aug 2013 23:45:24 +0000 (23:45 +0000)]
[stack protector] Work around an issue with the BMOVPCB_CALL instruction on ARM by disabling does not return on __stack_chk_fail.

This is to fix the bots while I look to see if there is something I can do here.

rdar://14811848

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

11 years agoUpdate to remove the no-frame-pointer-elim-non-leaf flag if it was set to 'false'.
Bill Wendling [Thu, 22 Aug 2013 21:28:54 +0000 (21:28 +0000)]
Update to remove the no-frame-pointer-elim-non-leaf flag if it was set to 'false'.

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

11 years agoFix some tests. The 'false' version just omits the attribute altogether.
Bill Wendling [Thu, 22 Aug 2013 21:20:14 +0000 (21:20 +0000)]
Fix some tests. The 'false' version just omits the attribute altogether.

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

11 years agoCheck only if we have this attribute. If it's not an attribute, then it's assumed...
Bill Wendling [Thu, 22 Aug 2013 21:16:14 +0000 (21:16 +0000)]
Check only if we have this attribute. If it's not an attribute, then it's assumed false.

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

11 years agoFileCheckize some tests.
Bill Wendling [Thu, 22 Aug 2013 20:46:05 +0000 (20:46 +0000)]
FileCheckize some tests.

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

11 years agoR600/SI: Fix another case of illegal VGPR to SGPR copy
Tom Stellard [Thu, 22 Aug 2013 20:21:02 +0000 (20:21 +0000)]
R600/SI: Fix another case of illegal VGPR to SGPR copy

This fixes a crash in Unigine Tropics.

https://bugs.freedesktop.org/show_bug.cgi?id=68389

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

11 years agoDataFlowSanitizer: Replace non-instrumented aliases of instrumented functions, and...
Peter Collingbourne [Thu, 22 Aug 2013 20:08:15 +0000 (20:08 +0000)]
DataFlowSanitizer: Replace non-instrumented aliases of instrumented functions, and vice versa, with wrappers.

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

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

11 years agoDataFlowSanitizer: Factor the wrapper builder out to buildWrapperFunction.
Peter Collingbourne [Thu, 22 Aug 2013 20:08:11 +0000 (20:08 +0000)]
DataFlowSanitizer: Factor the wrapper builder out to buildWrapperFunction.

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

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

11 years agoDataFlowSanitizer: Prefix the name of each instrumented function with "dfs$".
Peter Collingbourne [Thu, 22 Aug 2013 20:08:08 +0000 (20:08 +0000)]
DataFlowSanitizer: Prefix the name of each instrumented function with "dfs$".

DFSan changes the ABI of each function in the module.  This makes it possible
for a function with the native ABI to be called with the instrumented ABI,
or vice versa, thus possibly invoking undefined behavior.  A simple way
of statically detecting instances of this problem is to prepend the prefix
"dfs$" to the name of each instrumented-ABI function.

This will not catch every such problem; in particular function pointers passed
across the instrumented-native barrier cannot be used on the other side.
These problems could potentially be caught dynamically.

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

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

11 years ago[Debug Info Tests] Update testing cases.
Manman Ren [Thu, 22 Aug 2013 17:11:18 +0000 (17:11 +0000)]
[Debug Info Tests] Update testing cases.

A single metadata will not span multiple lines. This also helps me with
my script to automatic update the testing cases.
A debug info testing case should have a llvm.dbg.cu.
Do not use hard-coded id for debug nodes.

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

11 years agoconfigure: Regenerate corresponding to r189026.
NAKAMURA Takumi [Thu, 22 Aug 2013 16:31:34 +0000 (16:31 +0000)]
configure: Regenerate corresponding to r189026.

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

11 years agoAutoconf: The Clang ARC migrator now depends on the static analyzer.
Jordan Rose [Thu, 22 Aug 2013 15:49:53 +0000 (15:49 +0000)]
Autoconf: The Clang ARC migrator now depends on the static analyzer.

I don't actually have a version of autoconf so I edited configure directly
as well. It's copy-pasted so I think there was little margin for error.

See also Clang-side dependency graph changes.

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

11 years ago[ARMv8] Add CodeGen support for VSEL.
Joey Gouly [Thu, 22 Aug 2013 15:29:11 +0000 (15:29 +0000)]
[ARMv8] Add CodeGen support for VSEL.

This uses the ARMcmov pattern that Tim cleaned up in r188995.

Thanks to Simon Tatham for his floating point help!

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

11 years ago[Win32] mapped_file_region: Fix a bug in CreateFileMapping() that Size must contain...
NAKAMURA Takumi [Thu, 22 Aug 2013 15:14:53 +0000 (15:14 +0000)]
[Win32] mapped_file_region: Fix a bug in CreateFileMapping() that Size must contain Offset when Offset >= 65536.

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

11 years agoWhitespace.
NAKAMURA Takumi [Thu, 22 Aug 2013 15:14:45 +0000 (15:14 +0000)]
Whitespace.

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

11 years agoFix ARM vcvt encoding when the number of fractional bits is zero.
Mihai Popa [Thu, 22 Aug 2013 13:16:07 +0000 (13:16 +0000)]
Fix ARM vcvt encoding when the number of fractional bits is zero.

The instruction to convert between floating point and fixed point representations
takes an immediate operand for the number of fractional bits of the fixed point
value. ARMARM specifies that when that number of bits is zero, the assembler
should encode floating point/integer conversion instructions.

This patch adds the necessary instruction aliases to achieve this behaviour.

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

11 years agoTeach the SLP vectorizer the correct way to check for consecutive access
Chandler Carruth [Thu, 22 Aug 2013 12:45:17 +0000 (12:45 +0000)]
Teach the SLP vectorizer the correct way to check for consecutive access
using GEPs. Previously, it used a number of different heuristics for
analyzing the GEPs. Several of these were conservatively correct, but
failed to fall back to SCEV even when SCEV might have given a reasonable
answer. One was simply incorrect in how it was formulated.

There was good code already to recursively evaluate the constant offsets
in GEPs, look through pointer casts, etc. I gathered this into a form
code like the SLP code can use in a previous commit, which allows all of
this code to become quite simple.

There is some performance (compile time) concern here at first glance as
we're directly attempting to walk both pointers constant GEP chains.
However, a couple of thoughts:

1) The very common cases where there is a dynamic pointer, and a second
   pointer at a constant offset (usually a stride) from it, this code
   will actually not do any unnecessary work.

2) InstCombine and other passes work very hard to collapse constant
   GEPs, so it will be rare that we iterate here for a long time.

That said, if there remain performance problems here, there are some
obvious things that can improve the situation immensely. Doing
a vectorizer-pass-wide memoizer for each individual layer of pointer
values, their base values, and the constant offset is likely to be able
to completely remove redundant work and strictly limit the scaling of
the work to scrape these GEPs. Since this optimization was not done on
the prior version (which would still benefit from it), I've not done it
here. But if folks have benchmarks that slow down it should be straight
forward for them to add.

I've added a test case, but I'm not really confident of the amount of
testing done for different access patterns, strides, and pointer
manipulation.

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

11 years ago[ARM] Constrain some register classes in EmitAtomicBinary64 so that
Joey Gouly [Thu, 22 Aug 2013 12:19:24 +0000 (12:19 +0000)]
[ARM] Constrain some register classes in EmitAtomicBinary64 so that
we pass these tests with -verify-machineinstrs.

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

11 years agoAVX-512: Added masked SHIFT commands, more encoding tests
Elena Demikhovsky [Thu, 22 Aug 2013 12:18:28 +0000 (12:18 +0000)]
AVX-512: Added masked SHIFT commands, more encoding tests

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

11 years agoFix ARM FastISel PIC function call.
Logan Chien [Thu, 22 Aug 2013 12:08:04 +0000 (12:08 +0000)]
Fix ARM FastISel PIC function call.

The function call to external function should come with PLT relocation
type if the PIC relocation model is used.

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

11 years agoSuppress MemoryBufferTest.cpp on win32 for now. Investigating.
NAKAMURA Takumi [Thu, 22 Aug 2013 12:00:44 +0000 (12:00 +0000)]
Suppress MemoryBufferTest.cpp on win32 for now. Investigating.

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

11 years agoAdd a new helper method to Value to strip in-bounds constant offsets of
Chandler Carruth [Thu, 22 Aug 2013 11:25:11 +0000 (11:25 +0000)]
Add a new helper method to Value to strip in-bounds constant offsets of
pointers, but accumulate the offset into an APInt in the process of
stripping it.

This is a pretty handy thing to have, such as when trying to determine
if two pointers are at some constant relative offset. I'll be committing
a patch shortly to use it for exactly that purpose.

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

11 years agoMemoryBufferTest.cpp: Tweak offset corresponding to the case that PageSize is greater...
NAKAMURA Takumi [Thu, 22 Aug 2013 10:23:58 +0000 (10:23 +0000)]
MemoryBufferTest.cpp: Tweak offset corresponding to the case that PageSize is greater than 8000.

PageSize, aka AllocationGranularity, is 65536 on Win32 (and Cygwin).

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

11 years agoMemoryBuffer.cpp: Consider if PageSize were not 4096 in shouldUseMmap(). Follow-up...
NAKAMURA Takumi [Thu, 22 Aug 2013 10:23:52 +0000 (10:23 +0000)]
MemoryBuffer.cpp: Consider if PageSize were not 4096 in shouldUseMmap(). Follow-up to r188903.

The AllocationGranularity can be 65536 on Win32, even on Cygwin.

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

11 years agoClean up the doxygen formatting of the comments on the strip* methods on
Chandler Carruth [Thu, 22 Aug 2013 10:12:18 +0000 (10:12 +0000)]
Clean up the doxygen formatting of the comments on the strip* methods on
Value. These methods probably don't belong here, and I'm discussing
moving the lot of them to a better home, but for now I'm about to extend
their functionality and wanted to tidy them up first.

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

11 years agoARM: use TableGen patterns to select CMOV operations.
Tim Northover [Thu, 22 Aug 2013 09:57:11 +0000 (09:57 +0000)]
ARM: use TableGen patterns to select CMOV operations.

Back in the mists of time (2008), it seems TableGen couldn't handle the
patterns necessary to match ARM's CMOV node that we convert select operations
to, so we wrote a lot of fairly hairy C++ to do it for us.

TableGen can deal with it now: there were a few minor differences to CodeGen
(see tests), but nothing obviously worse that I could see, so we should
probably address anything that *does* come up in a localised manner.

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

11 years agoARM: respect tied 64-bit inlineasm operands when printing
Tim Northover [Thu, 22 Aug 2013 06:51:04 +0000 (06:51 +0000)]
ARM: respect tied 64-bit inlineasm operands when printing

The code for 'Q' and 'R' operand modifiers needs to look through tied
operands to discover the register class.

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

11 years ago[stackprotector] When finding the split point to splice off the end of a parentmbb...
Michael Gottesman [Thu, 22 Aug 2013 05:40:50 +0000 (05:40 +0000)]
[stackprotector] When finding the split point to splice off the end of a parentmbb into a successmbb, include any DBG_VALUE MI.

Fix for PR16954.

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

11 years agoTeach LoopVectorize about address space sizes
Matt Arsenault [Thu, 22 Aug 2013 02:42:55 +0000 (02:42 +0000)]
Teach LoopVectorize about address space sizes

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

11 years agoRemove llvm-lit from the cmake install target.
Hans Wennborg [Thu, 22 Aug 2013 01:34:09 +0000 (01:34 +0000)]
Remove llvm-lit from the cmake install target.

Since it's an llvm-internal tool, we shouldn't install it.

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

11 years agoFileCheck-ize tests.
Bill Wendling [Thu, 22 Aug 2013 00:51:19 +0000 (00:51 +0000)]
FileCheck-ize tests.

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

11 years agoARM: R9 is not safe to use for tcGPR.
Jim Grosbach [Thu, 22 Aug 2013 00:14:24 +0000 (00:14 +0000)]
ARM: R9 is not safe to use for tcGPR.

Indirect tail-calls shouldn't use R9 for the branch destination, as
it's not reliably a call-clobbered register.

rdar://14793425

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

11 years agoFixed typo.
Michael Gottesman [Wed, 21 Aug 2013 22:53:54 +0000 (22:53 +0000)]
Fixed typo.

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

11 years agoRemoved trailing whitespace.
Michael Gottesman [Wed, 21 Aug 2013 22:53:29 +0000 (22:53 +0000)]
Removed trailing whitespace.

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

11 years agoSelectionDAG: Make sure stores are always added to the LegalizedNodes list
Tom Stellard [Wed, 21 Aug 2013 22:42:58 +0000 (22:42 +0000)]
SelectionDAG: Make sure stores are always added to the LegalizedNodes list

When truncated vector stores were being custom lowered in
VectorLegalizer::LegalizeOp(), the old (illegal) and new (legal) node pair
was not being added to LegalizedNodes list.  Instead of the legalized
result being passed to VectorLegalizer::TranslateLegalizeResult(),
the result was being passed back into VectorLegalizer::LegalizeOp(),
which ended up adding a (new, new) pair to the list instead.

This was causing an assertion failure when a custom lowered truncated
vector store was the last instruction a basic block and the VectorLegalizer
was unable to find it in the LegalizedNodes list when updating the
DAG root.

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

11 years ago[lit] Fix a couple lingering Py3 compat issues in ProgressBar.
Daniel Dunbar [Wed, 21 Aug 2013 22:26:47 +0000 (22:26 +0000)]
[lit] Fix a couple lingering Py3 compat issues in ProgressBar.

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

11 years ago[tests] Update fma3 check to work with Py3.
Daniel Dunbar [Wed, 21 Aug 2013 22:26:44 +0000 (22:26 +0000)]
[tests] Update fma3 check to work with Py3.

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

11 years ago[lit] Lift XFAIL handling to core infrastructure.
Daniel Dunbar [Wed, 21 Aug 2013 22:26:42 +0000 (22:26 +0000)]
[lit] Lift XFAIL handling to core infrastructure.

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

11 years ago[lit] Allow formats to return lit.Test.Result instances directly.
Daniel Dunbar [Wed, 21 Aug 2013 22:26:40 +0000 (22:26 +0000)]
[lit] Allow formats to return lit.Test.Result instances directly.

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

11 years ago[lit] Factor out a separate Test.Result() object.
Daniel Dunbar [Wed, 21 Aug 2013 22:26:37 +0000 (22:26 +0000)]
[lit] Factor out a separate Test.Result() object.

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

11 years ago[lit] Simplify --time-tests code.
Daniel Dunbar [Wed, 21 Aug 2013 22:26:34 +0000 (22:26 +0000)]
[lit] Simplify --time-tests code.

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

11 years ago[lit] Extract TestFormat base class, for future use.
Daniel Dunbar [Wed, 21 Aug 2013 22:26:26 +0000 (22:26 +0000)]
[lit] Extract TestFormat base class, for future use.

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

11 years agoTBAA: remove !tbaa from testing cases when they are not needed.
Manman Ren [Wed, 21 Aug 2013 22:20:53 +0000 (22:20 +0000)]
TBAA: remove !tbaa from testing cases when they are not needed.

This will make it easier to turn on struct-path aware TBAA since the metadata
format will change.

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

11 years agoAdding a document to describe the MCJIT execution engine implementation.
Andrew Kaylor [Wed, 21 Aug 2013 22:15:09 +0000 (22:15 +0000)]
Adding a document to describe the MCJIT execution engine implementation.

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

11 years agoR600: Remove unnecessary casts
Tom Stellard [Wed, 21 Aug 2013 22:14:17 +0000 (22:14 +0000)]
R600: Remove unnecessary casts

Spotted by Bill Wendling.

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

11 years agoNo functionality change.
Yunzhong Gao [Wed, 21 Aug 2013 22:11:15 +0000 (22:11 +0000)]
No functionality change.
Replace "(255 & value)" with "(0xFF & value)" to improve clarity.

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

11 years agoTeach BaseIndexOffset::match to identify base pointers in loops.
Juergen Ributzka [Wed, 21 Aug 2013 21:53:38 +0000 (21:53 +0000)]
Teach BaseIndexOffset::match to identify base pointers in loops.

The small utility function that pattern matches Base + Index +
Offset patterns for loads and stores fails to recognize the base
pointer for loads/stores from/into an array at offset 0 inside a
loop. As a result DAGCombiner::MergeConsecutiveStores was not able
to merge all stores.

This commit fixes the issue by adding an additional pattern match
and also a test case.

Reviewer: Nadav

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

11 years agoADT/Triple: Helper to determine if we are targeting the Windows CRT
David Majnemer [Wed, 21 Aug 2013 21:53:33 +0000 (21:53 +0000)]
ADT/Triple: Helper to determine if we are targeting the Windows CRT

Summary:
This support will be utilized in things like clang to help check printf
format specifiers that are only valid when using the VSCRT.

Reviewers: rnk, asl, chandlerc

Reviewed By: chandlerc

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1455

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

11 years agoBasic unit tests for PointerUnion
David Blaikie [Wed, 21 Aug 2013 21:30:23 +0000 (21:30 +0000)]
Basic unit tests for PointerUnion

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

11 years agoReorder headers according to lint.
Bill Wendling [Wed, 21 Aug 2013 21:14:19 +0000 (21:14 +0000)]
Reorder headers according to lint.

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

11 years agoRemove use of forbidden 'iostream' header.
Bill Wendling [Wed, 21 Aug 2013 20:36:42 +0000 (20:36 +0000)]
Remove use of forbidden 'iostream' header.

Also obsessively reorder the headers to be in something closer to alphabetical order.

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

11 years agoTeach InstCombine about address spaces
Matt Arsenault [Wed, 21 Aug 2013 19:53:10 +0000 (19:53 +0000)]
Teach InstCombine about address spaces

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

11 years agoMC CFG: Remap enough for data too, analoguous to r188873.
Ahmed Bougacha [Wed, 21 Aug 2013 19:40:28 +0000 (19:40 +0000)]
MC CFG: Remap enough for data too, analoguous to r188873.

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

11 years agoStyle cleanup following David's review for r188876.
Ahmed Bougacha [Wed, 21 Aug 2013 19:40:25 +0000 (19:40 +0000)]
Style cleanup following David's review for r188876.

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

11 years agoAdd testcase for r188873: MCTextAtom boundaries.
Ahmed Bougacha [Wed, 21 Aug 2013 19:40:22 +0000 (19:40 +0000)]
Add testcase for r188873: MCTextAtom boundaries.

Check that they are correctly computed if the last instruction is
larger than 1 byte.

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

11 years ago[CMake] Automatically pick up subdirectories in llvm/tools as 'external projects...
Argyrios Kyrtzidis [Wed, 21 Aug 2013 19:13:44 +0000 (19:13 +0000)]
[CMake] Automatically pick up subdirectories in llvm/tools as 'external projects' if they contain a 'CMakeLists.txt' file.

Allow CMake to pick up external projects in llvm/tools without the need to modify the "llvm/tools/CMakeLists.txt" file.
This makes it easier to work with projects that live in other repositories, without needing to specify each one in "llvm/tools/CMakeLists.txt".

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

11 years agoAdd test for bitcast array ptrs with address spaces
Matt Arsenault [Wed, 21 Aug 2013 19:09:28 +0000 (19:09 +0000)]
Add test for bitcast array ptrs with address spaces

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