oota-llvm.git
12 years agoCorrect use of const in ParseCommandLineOptions
David Blaikie [Tue, 7 Feb 2012 19:36:01 +0000 (19:36 +0000)]
Correct use of const in ParseCommandLineOptions

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

12 years agoocaml bindings: landing pad is now the last opcode.
Benjamin Kramer [Tue, 7 Feb 2012 18:58:19 +0000 (18:58 +0000)]
ocaml bindings: landing pad is now the last opcode.

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

12 years agoAdd a unittest for rotating a really big APInt.
Benjamin Kramer [Tue, 7 Feb 2012 16:27:39 +0000 (16:27 +0000)]
Add a unittest for rotating a really big APInt.

Clang miscompiles it under certain circumstances, and it's a good exercise for APInt.

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

12 years agoBitcode/BitstreamReader.h: Tweak for big endian hosts.
NAKAMURA Takumi [Tue, 7 Feb 2012 10:53:19 +0000 (10:53 +0000)]
Bitcode/BitstreamReader.h: Tweak for big endian hosts.

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

12 years agoRephrase to add clarity.
Bill Wendling [Tue, 7 Feb 2012 08:42:29 +0000 (08:42 +0000)]
Rephrase to add clarity.

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

12 years agotest commit
Anat Shemer [Tue, 7 Feb 2012 08:18:05 +0000 (08:18 +0000)]
test commit

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

12 years agoDo not fold ADD / SUB into load / store (to form pre-indexed, post-indexed
Evan Cheng [Tue, 7 Feb 2012 07:09:28 +0000 (07:09 +0000)]
Do not fold ADD / SUB into load / store (to form pre-indexed, post-indexed
load / store) if the ADD / SUB has a live definition of CPSR.

Bug reported by David Meyer. Alas, no test case.

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

12 years agoAdd instruction selection for 256-bit VPSHUFD and 128-bit VPERMILPS/VPERMILPD.
Craig Topper [Tue, 7 Feb 2012 06:28:42 +0000 (06:28 +0000)]
Add instruction selection for 256-bit VPSHUFD and 128-bit VPERMILPS/VPERMILPD.

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

12 years agoConvert assert(0) to llvm_unreachable
Craig Topper [Tue, 7 Feb 2012 05:05:23 +0000 (05:05 +0000)]
Convert assert(0) to llvm_unreachable

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

12 years agoConvert assert(0) to llvm_unreachable
Craig Topper [Tue, 7 Feb 2012 02:50:20 +0000 (02:50 +0000)]
Convert assert(0) to llvm_unreachable

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

12 years agoCache the sizes of vectors instead of calculating them all over the place.
Bill Wendling [Tue, 7 Feb 2012 01:48:12 +0000 (01:48 +0000)]
Cache the sizes of vectors instead of calculating them all over the place.

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

12 years agoReserve space in these vectors to prevent having to grow the array too
Bill Wendling [Tue, 7 Feb 2012 01:27:51 +0000 (01:27 +0000)]
Reserve space in these vectors to prevent having to grow the array too
much. This gets us an addition 0.9% on 445.gobmk.

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

12 years agoFix win32 build breakage from bitcode streaming patch
Derek Schuff [Tue, 7 Feb 2012 00:28:46 +0000 (00:28 +0000)]
Fix win32 build breakage from bitcode streaming patch

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

12 years ago[fast-isel] Add support for ADDs with non-legal types.
Chad Rosier [Mon, 6 Feb 2012 23:50:07 +0000 (23:50 +0000)]
[fast-isel] Add support for ADDs with non-legal types.

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

12 years agoThis is a small patch with a couple of improvements for running lit with --debug:
Andrew Trick [Mon, 6 Feb 2012 23:34:52 +0000 (23:34 +0000)]
This is a small patch with a couple of improvements for running lit with --debug:

1. Added a status note when a config file is loaded directly with load_config. This helps notice loads of lit.cfg from lit.site.cfg
2. Added a status note on the result of a config load. Previously, it was just notifying that it tries to load a config file. Now it will also say whether the load succeeded or the file wasn't found

The two changes give better visibility into which config files were actually loaded by lit. The effect is only on --debug runs.

Patch by Eli Bendersky!

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

12 years agoExpose TargetPassConfig to PEI Pass
Andrew Trick [Mon, 6 Feb 2012 22:51:18 +0000 (22:51 +0000)]
Expose TargetPassConfig to PEI Pass

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

12 years agoAdd TargetPassConfig to the PassManager for use inside passes
Andrew Trick [Mon, 6 Feb 2012 22:51:15 +0000 (22:51 +0000)]
Add TargetPassConfig to the PassManager for use inside passes

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

12 years agoThe patch resolves the conflict between AddressSanitizer and load widening (GVN).
Kostya Serebryany [Mon, 6 Feb 2012 22:48:56 +0000 (22:48 +0000)]
The patch resolves the conflict between AddressSanitizer and load widening (GVN).
The problem initially reported by Mozilla folks (http://code.google.com/p/address-sanitizer/issues/detail?id=20),
but it also prevents us from enabling LLVM bootstrap with AddressSanitizer.

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

12 years agoFix comment-rulers.
Nick Lewycky [Mon, 6 Feb 2012 22:41:47 +0000 (22:41 +0000)]
Fix comment-rulers.

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

12 years agoRemove some unused functions.
Jakob Stoklund Olesen [Mon, 6 Feb 2012 22:37:58 +0000 (22:37 +0000)]
Remove some unused functions.

LiveIntervalAnalysis has a number of functions that simply forward to
SlotIndexes.  Since SlotIndexes is a stand-alone analysis now, clients
should really refer to it directly.

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

12 years agoDon't explicitly renumber slot indices.
Jakob Stoklund Olesen [Mon, 6 Feb 2012 22:37:56 +0000 (22:37 +0000)]
Don't explicitly renumber slot indices.

We have automatic local renumbering now.

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

12 years agoSystem headers after llvm headers.
Nick Lewycky [Mon, 6 Feb 2012 22:36:39 +0000 (22:36 +0000)]
System headers after llvm headers.

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

12 years agoEnable streaming of bitcode
Derek Schuff [Mon, 6 Feb 2012 22:30:29 +0000 (22:30 +0000)]
Enable streaming of bitcode

This CL delays reading of function bodies from initial parse until
materialization, allowing overlap of compilation with bitcode download.

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

12 years agoDocument the 'unwind' removal.
Bill Wendling [Mon, 6 Feb 2012 21:59:44 +0000 (21:59 +0000)]
Document the 'unwind' removal.

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

12 years ago[unwind removal] Remove any mention of the 'unwind' instruction. What was that
Bill Wendling [Mon, 6 Feb 2012 21:57:33 +0000 (21:57 +0000)]
[unwind removal] Remove any mention of the 'unwind' instruction. What was that
instruction anyway?!

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

12 years agoRemove some dead code and tidy things up now that vectors use ConstantDataVector
Chris Lattner [Mon, 6 Feb 2012 21:56:39 +0000 (21:56 +0000)]
Remove some dead code and tidy things up now that vectors use ConstantDataVector
instead of always using ConstantVector.

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

12 years ago[unwind removal] Remove a the obsolete 'unwind' enum value.
Bill Wendling [Mon, 6 Feb 2012 21:55:35 +0000 (21:55 +0000)]
[unwind removal] Remove a the obsolete 'unwind' enum value.

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

12 years agoMake sure a reserved register has a live interval before merging.
Jakob Stoklund Olesen [Mon, 6 Feb 2012 21:52:18 +0000 (21:52 +0000)]
Make sure a reserved register has a live interval before merging.

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

12 years ago[unwind removal] Remove all of the code for the dead 'unwind' instruction. There
Bill Wendling [Mon, 6 Feb 2012 21:44:22 +0000 (21:44 +0000)]
[unwind removal] Remove all of the code for the dead 'unwind' instruction. There
were no 'unwind' instructions being generated before this, so this is in effect
a no-op.

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

12 years ago[unwind removal] Don't write out the dead 'unwind' instruction.
Bill Wendling [Mon, 6 Feb 2012 21:30:37 +0000 (21:30 +0000)]
[unwind removal] Don't write out the dead 'unwind' instruction.

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

12 years ago[unwind removal] We no longer have 'unwind' instructions being generated, so
Bill Wendling [Mon, 6 Feb 2012 21:16:41 +0000 (21:16 +0000)]
[unwind removal] We no longer have 'unwind' instructions being generated, so
remove the code that handles them.

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

12 years ago'unwind' is a keyword, not an instruction.
Bill Wendling [Mon, 6 Feb 2012 21:02:43 +0000 (21:02 +0000)]
'unwind' is a keyword, not an instruction.

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

12 years ago[unwind removal] Remove the 'unwind' instruction parsing bits.
Bill Wendling [Mon, 6 Feb 2012 20:50:27 +0000 (20:50 +0000)]
[unwind removal] Remove the 'unwind' instruction parsing bits.

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

12 years agoIntroduce helpers to compute the 32-bit varaints and 64-bit variants of
Chandler Carruth [Mon, 6 Feb 2012 20:46:33 +0000 (20:46 +0000)]
Introduce helpers to compute the 32-bit varaints and 64-bit variants of
some architectures. These are useful for interacting with multiarch or
bi-arch GCC (or GCC-based) toolchains.

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

12 years agoTest commit; also removes some trailing whitespace
Derek Schuff [Mon, 6 Feb 2012 19:03:04 +0000 (19:03 +0000)]
Test commit; also removes some trailing whitespace

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

12 years agoThe 'unwind' instruction is deprecated and will be removed, making this test
Bill Wendling [Mon, 6 Feb 2012 18:18:47 +0000 (18:18 +0000)]
The 'unwind' instruction is deprecated and will be removed, making this test
obsolete.

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

12 years agoUpdate docs describing objective-c property encoding. This includes support for prope...
Devang Patel [Mon, 6 Feb 2012 18:18:25 +0000 (18:18 +0000)]
Update docs describing objective-c property encoding. This includes support for properties that are not backed by an ivar.

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

12 years agoMention that the 'unwind' instruction is now deprecated.
Bill Wendling [Mon, 6 Feb 2012 17:58:34 +0000 (17:58 +0000)]
Mention that the 'unwind' instruction is now deprecated.

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

12 years agoDebugInfo: Provide a new hook to encode relationship between a property and an ivar.
Devang Patel [Mon, 6 Feb 2012 17:49:43 +0000 (17:49 +0000)]
DebugInfo: Provide a new hook to encode relationship between a property and an ivar.

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

12 years agoUpdate ExceptionDemo to use ConstantDataArray.
Peter Collingbourne [Mon, 6 Feb 2012 14:09:13 +0000 (14:09 +0000)]
Update ExceptionDemo to use ConstantDataArray.

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

12 years agoX86: Don't call malloc for 4 bits. No functionality change.
Benjamin Kramer [Mon, 6 Feb 2012 12:06:18 +0000 (12:06 +0000)]
X86: Don't call malloc for 4 bits. No functionality change.

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

12 years agoMake helper static.
Benjamin Kramer [Mon, 6 Feb 2012 11:28:19 +0000 (11:28 +0000)]
Make helper static.

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

12 years agoHexagon: Remove forbidden iostream includes (it introduces static initializers)
Benjamin Kramer [Mon, 6 Feb 2012 10:19:29 +0000 (10:19 +0000)]
Hexagon: Remove forbidden iostream includes (it introduces static initializers)

Reorder includes while at it.

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

12 years agoSplit part of EvaluateFunction into a new EvaluateBlock method. No functionality
Nick Lewycky [Mon, 6 Feb 2012 08:24:44 +0000 (08:24 +0000)]
Split part of EvaluateFunction into a new EvaluateBlock method. No functionality
change.

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

12 years agoMove some llvm_unreachable's from r149849 out of switch statements to satisfy -Wcover...
Craig Topper [Mon, 6 Feb 2012 08:17:43 +0000 (08:17 +0000)]
Move some llvm_unreachable's from r149849 out of switch statements to satisfy -Wcovered-switch-default

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

12 years agoAdd shuffle decoding support for 256-bit pshufd. Merge vpermilp* and pshufd decoding.
Craig Topper [Mon, 6 Feb 2012 07:17:51 +0000 (07:17 +0000)]
Add shuffle decoding support for 256-bit pshufd. Merge vpermilp* and pshufd decoding.

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

12 years agofix indentation
Sebastian Pop [Mon, 6 Feb 2012 05:29:32 +0000 (05:29 +0000)]
fix indentation

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

12 years agofix typo
Sebastian Pop [Mon, 6 Feb 2012 05:29:29 +0000 (05:29 +0000)]
fix typo

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

12 years agoSmallVector's construct_range is the same thing as std::uninitialized_fill, no need...
Benjamin Kramer [Sun, 5 Feb 2012 22:48:31 +0000 (22:48 +0000)]
SmallVector's construct_range is the same thing as std::uninitialized_fill, no need to reinvent it.

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

12 years agoSimplify code. No functionality change.
Benjamin Kramer [Sun, 5 Feb 2012 22:14:48 +0000 (22:14 +0000)]
Simplify code. No functionality change.

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

12 years agoConvert assert(0) to llvm_unreachable
Craig Topper [Sun, 5 Feb 2012 22:14:15 +0000 (22:14 +0000)]
Convert assert(0) to llvm_unreachable

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

12 years agoEfficient Constant Uniquing.
Talin [Sun, 5 Feb 2012 20:54:10 +0000 (20:54 +0000)]
Efficient Constant Uniquing.

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

12 years agoTeach GlobalOpt to handle atomic accesses to globals.
Nick Lewycky [Sun, 5 Feb 2012 19:56:38 +0000 (19:56 +0000)]
Teach GlobalOpt to handle atomic accesses to globals.

 * Most of the transforms come through intact by having each transformed load or
store copy the ordering and synchronization scope of the original.
 * The transform that turns a global only accessed in main() into an alloca
(since main is non-recursive) with a store of the initial value uses an
unordered store, since it's guaranteed to be the first thing to happen in main.
(Threads may have started before main (!) but they can't have the address of a
function local before the point in the entry block we insert our code.)
 * The heap-SRoA transforms are disabled in the face of atomic operations. This
can probably be improved; it seems odd to have atomic accesses to an alloca
that doesn't have its address taken.

AnalyzeGlobal keeps track of the strongest ordering found in any use of the
global. This is more information than we need right now, but it's cheap to
compute and likely to be useful.

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

12 years agoDefinesPredicate should only look for def operands. Patch by Ludwig Meier.
Evan Cheng [Sun, 5 Feb 2012 19:55:04 +0000 (19:55 +0000)]
DefinesPredicate should only look for def operands. Patch by Ludwig Meier.

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

12 years agoClean up some whitespace and comments. No functionality change.
Nick Lewycky [Sun, 5 Feb 2012 19:48:37 +0000 (19:48 +0000)]
Clean up some whitespace and comments. No functionality change.

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

12 years agoFixing a warning in MSVC (this is also a test commit)
Aaron Ballman [Sun, 5 Feb 2012 19:43:39 +0000 (19:43 +0000)]
Fixing a warning in MSVC (this is also a test commit)

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

12 years agoNeaten up this method. Check that if there is only one
Duncan Sands [Sun, 5 Feb 2012 19:43:37 +0000 (19:43 +0000)]
Neaten up this method.  Check that if there is only one
predecessor then it's Src.

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

12 years agoRemove dead test: this was already checked and handled a few lines
Duncan Sands [Sun, 5 Feb 2012 19:30:06 +0000 (19:30 +0000)]
Remove dead test: this was already checked and handled a few lines
above.

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

12 years agoTestcase for commit 149833 (use of an uninitialized variable noticed
Duncan Sands [Sun, 5 Feb 2012 19:27:57 +0000 (19:27 +0000)]
Testcase for commit 149833 (use of an uninitialized variable noticed
by GCC).

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

12 years agoFix a thinko pointed out by Eli and the buildbots.
Duncan Sands [Sun, 5 Feb 2012 18:56:50 +0000 (18:56 +0000)]
Fix a thinko pointed out by Eli and the buildbots.

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

12 years agoReduce the number of dom queries made by GVN's conditional propagation
Duncan Sands [Sun, 5 Feb 2012 18:25:50 +0000 (18:25 +0000)]
Reduce the number of dom queries made by GVN's conditional propagation
logic by half: isOnlyReachableViaThisEdge was trying to be clever and
handle the case of a branch to a basic block which is contained in a
loop.  This costs a domtree lookup and is completely useless due to
GVN's position in the pass pipeline: all loops have preheaders at this
point, which means it is enough for isOnlyReachableViaThisEdge to check
that Dst has only one predecessor.  (I checked this theoretical argument
by running over the entire nightly testsuite, and indeed it is so!).

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

12 years agoReduce the number of non-trivial domtree queries by about 1% when
Duncan Sands [Sun, 5 Feb 2012 15:50:43 +0000 (15:50 +0000)]
Reduce the number of non-trivial domtree queries by about 1% when
compiling sqlite3, by only doing dom queries after the cheap check
rather than interleaved with it.

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

12 years agoPersuade GCC that there is nothing worth warning about here (there isn't).
Duncan Sands [Sun, 5 Feb 2012 14:20:11 +0000 (14:20 +0000)]
Persuade GCC that there is nothing worth warning about here (there isn't).

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

12 years agoDon't initialize CV in terms of itself! Spotted by GCC.
Duncan Sands [Sun, 5 Feb 2012 14:16:09 +0000 (14:16 +0000)]
Don't initialize CV in terms of itself!  Spotted by GCC.

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

12 years agoExplain to the compiler why TargetAddr is not used uninitialized later.
Duncan Sands [Sun, 5 Feb 2012 14:14:35 +0000 (14:14 +0000)]
Explain to the compiler why TargetAddr is not used uninitialized later.

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

12 years agoAdd additional documentation to the extract-and-trunc dagcombine optimization.
Nadav Rotem [Sun, 5 Feb 2012 11:39:23 +0000 (11:39 +0000)]
Add additional documentation to the extract-and-trunc dagcombine optimization.

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

12 years agoTesting vector code without sse doesn't make much sense.
Benjamin Kramer [Sun, 5 Feb 2012 11:19:39 +0000 (11:19 +0000)]
Testing vector code without sse doesn't make much sense.

Should bring arm and ppc testers back to life (they default to -mcpu=generic)

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

12 years agoFix typo and broken link
Eli Bendersky [Sun, 5 Feb 2012 11:17:49 +0000 (11:17 +0000)]
Fix typo and broken link

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

12 years agoAdd missing paren
Eli Bendersky [Sun, 5 Feb 2012 09:21:25 +0000 (09:21 +0000)]
Add missing paren

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

12 years agoConvert assert(0) to llvm_unreachable
Craig Topper [Sun, 5 Feb 2012 08:31:47 +0000 (08:31 +0000)]
Convert assert(0) to llvm_unreachable

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

12 years agoBegin fleshing out more convenience predicates in llvm::Triple and
Chandler Carruth [Sun, 5 Feb 2012 08:26:40 +0000 (08:26 +0000)]
Begin fleshing out more convenience predicates in llvm::Triple and
convert at least one client over to use them. Subsequent patches both to
LLVM and Clang will try to convert more people over to a common set of
predicates.

This round of predicates is focused on OS-categorization predicates.

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

12 years agoConvert assert(0) to llvm_unreachable
Craig Topper [Sun, 5 Feb 2012 07:21:30 +0000 (07:21 +0000)]
Convert assert(0) to llvm_unreachable

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

12 years agoSimplify contains tests using 'count'.
David Blaikie [Sun, 5 Feb 2012 06:35:36 +0000 (06:35 +0000)]
Simplify contains tests using 'count'.

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

12 years agoBBVectorize.cpp: Get rid of comparision to bool to fix a warning.
NAKAMURA Takumi [Sun, 5 Feb 2012 05:47:51 +0000 (05:47 +0000)]
BBVectorize.cpp: Get rid of comparision to bool to fix a warning.

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

12 years agoConvert assert(0) to llvm_unreachable in X86 Target directory.
Craig Topper [Sun, 5 Feb 2012 05:38:58 +0000 (05:38 +0000)]
Convert assert(0) to llvm_unreachable in X86 Target directory.

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

12 years agoConvert some assert(0) in default of switch statements to llvm_unreachable.
Craig Topper [Sun, 5 Feb 2012 03:43:23 +0000 (03:43 +0000)]
Convert some assert(0) in default of switch statements to llvm_unreachable.

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

12 years agoAdd target specific node for PMULUDQ. Change patterns to use it and custom lower...
Craig Topper [Sun, 5 Feb 2012 03:14:49 +0000 (03:14 +0000)]
Add target specific node for PMULUDQ. Change patterns to use it and custom lower intrinsics to it. Use it instead of intrinsic to handle 64-bit vector multiplies.

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

12 years agoImprove the bitcode reader's handling of constant strings to use
Chris Lattner [Sun, 5 Feb 2012 02:41:35 +0000 (02:41 +0000)]
Improve the bitcode reader's handling of constant strings to use
ConstantDataArray::getString direction, instead of "boxing" each
byte into a ConstantInt and using ConstantArray::get.

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

12 years agoAdd a test for the miscompilation my recent ConstantDataArray patches introduced...
Chris Lattner [Sun, 5 Feb 2012 02:37:36 +0000 (02:37 +0000)]
Add a test for the miscompilation my recent ConstantDataArray patches introduced, to make sure
we don't regress on it in the future.

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

12 years agoreapply the patches reverted in r149470 that reenable ConstantDataArray,
Chris Lattner [Sun, 5 Feb 2012 02:29:43 +0000 (02:29 +0000)]
reapply the patches reverted in r149470 that reenable ConstantDataArray,
but with a critical fix to the SelectionDAG code that optimizes copies
from strings into immediate stores: the previous code was stopping reading
string data at the first nul.  Address this by adding a new argument to
llvm::getConstantStringInfo, preserving the behavior before the patch.

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

12 years agoRemove most of the intrinsics for XOP VPCMOV instruction. They all aliased to the...
Craig Topper [Sun, 5 Feb 2012 00:55:56 +0000 (00:55 +0000)]
Remove most of the intrinsics for XOP VPCMOV instruction. They all aliased to the same instruction with different types. This would be better accomplished with casts in the not yet created xopintrin.h header file.

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

12 years agoModified the Enhanced Disassembler to create and
Sean Callanan [Sat, 4 Feb 2012 07:45:35 +0000 (07:45 +0000)]
Modified the Enhanced Disassembler to create and
cache disassemblers according to the string value
of the target triple, not according to the enum
of the triple CPU.  The reason for this is that
certain attributes of the instruction set are not
reflected in the enum, but only in the string.

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

12 years agoDrop the REDEF_BY_EC VNInfo flag.
Jakob Stoklund Olesen [Sat, 4 Feb 2012 05:51:25 +0000 (05:51 +0000)]
Drop the REDEF_BY_EC VNInfo flag.

A live range that has an early clobber tied redef now looks like a
normal tied redef, except the early clobber def uses the early clobber
slot.

This is enough to handle any strange interference problems.

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

12 years agoCorrectly terminate a physreg redefined by an early clobber.
Jakob Stoklund Olesen [Sat, 4 Feb 2012 05:41:20 +0000 (05:41 +0000)]
Correctly terminate a physreg redefined by an early clobber.

I don't have a test that fails because of this, but a test case like
CodeGen/X86/2009-12-01-EarlyClobberBug.ll exposes the problem.  EAX is
redefined by a tied early clobber operand on inline asm, and the live
range should look like this:

  %EAX,inf = [48r,64e:0)[64e,80r:1)  0@48r 1@64e

Previously, the two values got merged:

  %EAX,inf = [48r,80r:0)  0@48r

With this bug fixed, the REDEF_BY_EC VNInfo flag is no longer needed.

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

12 years agoFix a leak!
Nick Lewycky [Sat, 4 Feb 2012 05:26:17 +0000 (05:26 +0000)]
Fix a leak!

Andy, in a previous commit you made this into an ImmutablePass so that you could
add it to the PassManager, then in the next commit you left it a Pass but
removed the code that added it to the PM. If you do add it to the PM then the PM
should take care of deleting it, but it's also true that nothing in codegen
needs this object to exist after it's done its work here. It's not clear to me
which design you want; this should likely either cease to be a Pass or be added
to the PM where other parts of CodeGen will request it.

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

12 years agoDon't store COPY pointers in VNInfo.
Jakob Stoklund Olesen [Sat, 4 Feb 2012 05:20:49 +0000 (05:20 +0000)]
Don't store COPY pointers in VNInfo.

If a value is defined by a COPY, that instuction can easily and cheaply
be found by getInstructionFromIndex(VNI->def).

This reduces the size of VNInfo from 24 to 16 bytes, and improves
llc compile time by 3%.

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

12 years agoBoost the effective chain depth of loads and stores.
Hal Finkel [Sat, 4 Feb 2012 04:14:04 +0000 (04:14 +0000)]
Boost the effective chain depth of loads and stores.

By default, boost the chain depth contribution of loads and stores. This will allow a load/store pair to vectorize even when it would not otherwise be long enough to satisfy the chain depth requirement.

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

12 years agoremove the blank line from previous ci.
Qirun Zhang [Sat, 4 Feb 2012 03:18:47 +0000 (03:18 +0000)]
remove the blank line from previous ci.

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

12 years agotest commit.
Qirun Zhang [Sat, 4 Feb 2012 03:15:26 +0000 (03:15 +0000)]
test commit.
add a blank line.

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

12 years agoautoconf: put generated clang files in build dir
Dylan Noblesmith [Sat, 4 Feb 2012 03:00:50 +0000 (03:00 +0000)]
autoconf: put generated clang files in build dir

It was writing generated files to the clang srcdir when
'--with-clang-srcdir' was specified.

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

12 years agoTargetPassConfig: confine the MC configuration to TargetMachine.
Andrew Trick [Sat, 4 Feb 2012 02:56:59 +0000 (02:56 +0000)]
TargetPassConfig: confine the MC configuration to TargetMachine.

Passes prior to instructon selection are now split into separate configurable stages.
Header dependencies are simplified.
The bulk of this diff is simply removal of the silly DisableVerify flags.

Sorry for the target header churn. Attempting to stabilize them.

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

12 years agoMove TargetPassConfig implementation into Passes.cpp
Andrew Trick [Sat, 4 Feb 2012 02:56:48 +0000 (02:56 +0000)]
Move TargetPassConfig implementation into Passes.cpp

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

12 years agoMake TargetPassConfig an ImmutablePass so CodeGenPasses can query options
Andrew Trick [Sat, 4 Feb 2012 02:56:45 +0000 (02:56 +0000)]
Make TargetPassConfig an ImmutablePass so CodeGenPasses can query options

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

12 years agocmake: update outdated CPack version info
Dylan Noblesmith [Sat, 4 Feb 2012 02:52:48 +0000 (02:52 +0000)]
cmake: update outdated CPack version info

Left over from r116516.

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

12 years agoObject: avoid undefined behavior when bounds-checking
Dylan Noblesmith [Sat, 4 Feb 2012 02:41:39 +0000 (02:41 +0000)]
Object: avoid undefined behavior when bounds-checking

Don't form an out of bounds pointer just to test if it
would be out of bounds.

Also perform the same bounds checking for all the previous
mapped structures.

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

12 years agoautoconf: fix clang detection
Dylan Noblesmith [Sat, 4 Feb 2012 02:41:36 +0000 (02:41 +0000)]
autoconf: fix clang detection

Now this works with and without --with-clang-srcdir, with and
without an out-of-tree build.

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

12 years agoEmit new property tag.
Devang Patel [Sat, 4 Feb 2012 01:30:32 +0000 (01:30 +0000)]
Emit new property tag.

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

12 years agoUpdate llvm debug version to support new structure and tag for Objective-C property...
Devang Patel [Sat, 4 Feb 2012 01:30:01 +0000 (01:30 +0000)]
Update llvm debug version to support new structure and tag for Objective-C property's debug info.

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

12 years agoIntroduce DIObjCProperty. This will be used to encode objective-c property.
Devang Patel [Sat, 4 Feb 2012 00:59:25 +0000 (00:59 +0000)]
Introduce DIObjCProperty. This will be used to encode objective-c property.

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

12 years ago[fast-isel] HandlePHINodesInSuccessorBlocks() can promite i8 and i16 types too.
Chad Rosier [Sat, 4 Feb 2012 00:39:19 +0000 (00:39 +0000)]
[fast-isel] HandlePHINodesInSuccessorBlocks() can promite i8 and i16 types too.

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