oota-llvm.git
11 years agoSort the #include lines for the include/... tree with the script.
Chandler Carruth [Mon, 3 Dec 2012 17:02:12 +0000 (17:02 +0000)]
Sort the #include lines for the include/... tree with the script.

AKA: Recompile *ALL* the source code!

This one went much better. No manual edits here. I spot-checked for
silliness and grep-checked for really broken edits and everything seemed
good. It all still compiles. Yell if you see something that looks goofy.

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

11 years agoTeach the include sorter to not choke on include guards. ;]
Chandler Carruth [Mon, 3 Dec 2012 17:01:46 +0000 (17:01 +0000)]
Teach the include sorter to not choke on include guards. ;]

Kind of important when prepping the include/... tree version of the sort
changes.

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

11 years agoUse the new script to sort the includes of every file under lib.
Chandler Carruth [Mon, 3 Dec 2012 16:50:05 +0000 (16:50 +0000)]
Use the new script to sort the includes of every file under lib.

Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

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

11 years agoclarify that this isn't lld.
Chris Lattner [Mon, 3 Dec 2012 16:08:32 +0000 (16:08 +0000)]
clarify that this isn't lld.

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

11 years agoAdd a completely hack-ish tool to sort includes according to the coding
Chandler Carruth [Mon, 3 Dec 2012 14:23:44 +0000 (14:23 +0000)]
Add a completely hack-ish tool to sort includes according to the coding
standards.

I am a terrible Python programmer. Patches more the welcome. Please tell
me how this should look if it should look differently. It's just a tiny
little script so it didn't make sense to go through pre-commit review,
especially as someone who actually knows python may want to just rip it
apart and do it The Right Way.

I will be preparing a commit shortly that uses this script to
canonicalize *all* of the #include lines in LLVM. Really, all of them.

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

11 years agoRemove some buggy and apparantly unnecessary code from SROA.
Chandler Carruth [Mon, 3 Dec 2012 10:59:55 +0000 (10:59 +0000)]
Remove some buggy and apparantly unnecessary code from SROA.

The partitioning logic attempted to handle uses of an alloca with an
offset starting before the alloca so long as the use had some overlap
with the alloca itself. However, there was a bug where we tested
'(uint64_t)Offset >= AllocSize' without first checking whether 'Offset'
was positive. As a consequence, essentially every negative offset (that
is, starting *before* the alloca does) would be thrown out, even if it
was overlapping. The subsequent code to throw out negative offsets which
were actually non-overlapping was essentially dead. The code to *handle*
overlapping negative offsets was actually dead!

I've just removed all of this, and taught SROA to discard any uses which
start prior to the alloca from the beginning. It has the lovely property
of simplifying the code. =] All the tests still pass, and in fact no new
tests are needed as this is already covered by our testsuite. Fixing the
code so that negative offsets work the way the comments indicate they
were supposed to work causes regressions. That's how I found this.

Anyways, this is all progress in the correct direction -- tightening up
SROA to be maximally aggressive. Some day, I really hope to turn
out-of-bounds accesses to an alloca into 'unreachable'.

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

11 years agofix stats for added checks
Nuno Lopes [Mon, 3 Dec 2012 10:15:03 +0000 (10:15 +0000)]
fix stats for added checks

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

11 years agoDefine signed const-ext predicates.
Jyotsna Verma [Mon, 3 Dec 2012 06:54:50 +0000 (06:54 +0000)]
Define signed const-ext predicates.

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

11 years agoRemove 'deplibs' keyword, since it's no longer used.
Bill Wendling [Mon, 3 Dec 2012 06:34:06 +0000 (06:34 +0000)]
Remove 'deplibs' keyword, since it's no longer used.

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

11 years agoClean up, bring up-to-date and apply consistent formatting.
Eli Bendersky [Mon, 3 Dec 2012 04:10:58 +0000 (04:10 +0000)]
Clean up, bring up-to-date and apply consistent formatting.

This document is a long-time pet peeve :-) More fixes to come.

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

11 years agoAllow merging multiple store sequences on the same chain.
Nadav Rotem [Sun, 2 Dec 2012 17:14:09 +0000 (17:14 +0000)]
Allow merging multiple store sequences on the same chain.

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

11 years agoBring vim keyword lists up to date.
Benjamin Kramer [Sun, 2 Dec 2012 16:40:38 +0000 (16:40 +0000)]
Bring vim keyword lists up to date.

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

11 years agoFix a bug in FileCheck that wouldn't let define variables as follows:
Eli Bendersky [Sun, 2 Dec 2012 16:02:41 +0000 (16:02 +0000)]
Fix a bug in FileCheck that wouldn't let define variables as follows:

; CHECK: [[VAR:[a-z]]]

The problem was that to find the end of the regex var definition, it was
simplistically looking for the next ]] and finding the incorrect one. A
better approach is to count nesting of brackets (taking escaping into
account). This way the brackets that are part of the regex can be discovered
and skipped properly, and the ]] ending is detected in the right place.

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

11 years agoFix an invalid regex in the test
Eli Bendersky [Sun, 2 Dec 2012 15:46:02 +0000 (15:46 +0000)]
Fix an invalid regex in the test

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

11 years agoSimplify the coding standards for #include ordering. The ordering is now
Chandler Carruth [Sun, 2 Dec 2012 11:53:27 +0000 (11:53 +0000)]
Simplify the coding standards for #include ordering. The ordering is now
trivially achievable with an editor. I'll likely check in a silly python
script to help with this too.

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

11 years agoUnbreak Sphinx build
Justin Holewinski [Sun, 2 Dec 2012 02:47:48 +0000 (02:47 +0000)]
Unbreak Sphinx build

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

11 years agoAnother fix attempt to Makefile.sphinx - copy the PNGs from tutorial/ as well,
Eli Bendersky [Sat, 1 Dec 2012 22:21:04 +0000 (22:21 +0000)]
Another fix attempt to Makefile.sphinx - copy the PNGs from tutorial/ as well,
and recursive copying is not required for the tutorial/ directory.

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

11 years agoAttempt to fix Makefile.sphinx to not generate errors while trying to copy
Eli Bendersky [Sat, 1 Dec 2012 22:11:59 +0000 (22:11 +0000)]
Attempt to fix Makefile.sphinx to not generate errors while trying to copy
files from tutorial/.svn

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

11 years agoUpdate FileCheck's documentation to mention recently added feature of
Eli Bendersky [Sat, 1 Dec 2012 22:03:57 +0000 (22:03 +0000)]
Update FileCheck's documentation to mention recently added feature of
matching a variable defined on the same line.

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

11 years ago[python] Add markup option to disassembler
Gregory Szorc [Sat, 1 Dec 2012 21:57:30 +0000 (21:57 +0000)]
[python] Add markup option to disassembler

Patch contributed by Wladimir J. van der Laan <laanwj@gmail.com>

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

11 years agoSupport referencing variables defined on the same line.
Eli Bendersky [Sat, 1 Dec 2012 21:54:48 +0000 (21:54 +0000)]
Support referencing variables defined on the same line.

See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121126/157198.html
and related discussions.

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

11 years agoRemove bugzilla link.
James Molloy [Sat, 1 Dec 2012 14:44:23 +0000 (14:44 +0000)]
Remove bugzilla link.

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

11 years agoDocumentation: convert WritingAnLLVMBackend.html to reST
Dmitri Gribenko [Sat, 1 Dec 2012 12:13:48 +0000 (12:13 +0000)]
Documentation: convert WritingAnLLVMBackend.html to reST

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

11 years agoAdd .arcconfig to the repository. Useful if someone wants to use phabricator's comman...
Benjamin Kramer [Sat, 1 Dec 2012 12:07:58 +0000 (12:07 +0000)]
Add .arcconfig to the repository. Useful if someone wants to use phabricator's command line tool.

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

11 years agoSROA: Avoid struct and array types early to avoid creating an overly large integer...
Benjamin Kramer [Sat, 1 Dec 2012 11:53:32 +0000 (11:53 +0000)]
SROA: Avoid struct and array types early to avoid creating an overly large integer type.

Fixes PR14465.

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

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

11 years agoRevert previous check in r168581, r169079 as they are still in code review status.
Zhou Sheng [Sat, 1 Dec 2012 10:54:28 +0000 (10:54 +0000)]
Revert previous check in r168581, r169079 as they are still in code review status.

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

11 years agoThe patch is to improve the memory footprint of pass GlobalOpt.
Zhou Sheng [Sat, 1 Dec 2012 04:38:53 +0000 (04:38 +0000)]
The patch is to improve the memory footprint of pass GlobalOpt.
Also check in a case to repeat the issue, on which 'opt -globalopt' consumes 1.6GB memory.
The big memory footprint cause is that current GlobalOpt one by one hoists and stores the leaf element constant into the global array, in each iteration, it recreates the global array initializer constant and leave the old initializer alone. This may result in many obsolete constants left.
For example:  we have global array @rom = global [16 x i32] zeroinitializer
After the first element value is hoisted and installed:   @rom = global [16 x i32] [ 1, 0, 0, ... ]
After the second element value is installed:  @rom = global [16 x 32] [ 1, 2, 0, 0, ... ]        // here the previous initializer is obsolete
...
When the transform is done, we have 15 obsolete initializers left useless.

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

11 years agoVMCore/DebugInfo.cpp: DICompileUnit::getSubprograms(): Check numOperands().
NAKAMURA Takumi [Sat, 1 Dec 2012 02:23:45 +0000 (02:23 +0000)]
VMCore/DebugInfo.cpp: DICompileUnit::getSubprograms(): Check numOperands().

2012-11-30-misched-dbg.ll had crashed. Then (MDNode)N was "!{}".
I am not sure it would be ill-formed or not.

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

11 years agoMC/AsmParser: Avoid unnecessary use of SourceMgr::FindBufferForLoc()
Daniel Dunbar [Sat, 1 Dec 2012 01:38:48 +0000 (01:38 +0000)]
MC/AsmParser: Avoid unnecessary use of SourceMgr::FindBufferForLoc()

 - Each macro instantiation introduces a new buffer, and FindBufferForLoc() is
   linear, so previously macro instantiation could be N^2 for some pathological
   inputs.

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

11 years agomisched: Fix RegisterPressureTracker handling of DebugVals.
Andrew Trick [Sat, 1 Dec 2012 01:22:49 +0000 (01:22 +0000)]
misched: Fix RegisterPressureTracker handling of DebugVals.

Assertion failed: (TopRPTracker.getPos() == RegionBegin && "bad initial Top tracker").
rdar://12790302.

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

11 years agomisched: Fix the DAG builder to handle an undef operand at ExitSU.
Andrew Trick [Sat, 1 Dec 2012 01:22:44 +0000 (01:22 +0000)]
misched: Fix the DAG builder to handle an undef operand at ExitSU.

Assertion failed: (VNI && "No value to read by operand")
rdar://12790267.

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

11 years agomisched: Fix LiveInterval update to better handle DebugVal.
Andrew Trick [Sat, 1 Dec 2012 01:22:41 +0000 (01:22 +0000)]
misched: Fix LiveInterval update to better handle DebugVal.

Assertion failed: (itr != mi2iMap.end() && "Instruction not found in maps.")
rdar://12777252.

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

11 years agomisched: fix RegionBegin when DebugValues get shuffled to the top.
Andrew Trick [Sat, 1 Dec 2012 01:22:38 +0000 (01:22 +0000)]
misched: fix RegionBegin when DebugValues get shuffled to the top.

assert (RemainingInstrs == 0 && "Instruction count mismatch!")

rdar://12776937.

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

11 years agoSimplify REG_SEQUENCE lowering.
Jakob Stoklund Olesen [Sat, 1 Dec 2012 01:06:44 +0000 (01:06 +0000)]
Simplify REG_SEQUENCE lowering.

The TwoAddressInstructionPass takes the machine code out of SSA form by
expanding REG_SEQUENCE instructions into copies. It is no longer
necessary to rewrite the registers used by a REG_SEQUENCE instruction
because the new coalescer algorithm can do it now.

REG_SEQUENCE is just converted to a sequence of sub-register copies now.

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

11 years agoUpdate the emacs mode to recognize fadd, fsum, fmul, fdiv, frem, fcmp, icmp
Michael Ilseman [Sat, 1 Dec 2012 00:42:27 +0000 (00:42 +0000)]
Update the emacs mode to recognize fadd, fsum, fmul, fdiv, frem, fcmp, icmp

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

11 years agoAdd some first skeleton work for the DWARF5 Fission proposal. Emit
Eric Christopher [Fri, 30 Nov 2012 23:59:06 +0000 (23:59 +0000)]
Add some first skeleton work for the DWARF5 Fission proposal. Emit
part of the compile unit CU and start separating out information into
the various sections that will be pulled out later.

WIP.

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

11 years agoConvert COPY instructions into KILLs if they have implicit defs.
Jakob Stoklund Olesen [Fri, 30 Nov 2012 23:53:00 +0000 (23:53 +0000)]
Convert COPY instructions into KILLs if they have implicit defs.

MachineCopyPropagation doesn't understand super-register liveness well
enough to be able to remove implicit defs of super-registers.

This fixes a problem in ARM/2012-01-26-CopyPropKills.ll that is exposed
by an future TwoAddressInstructionPass change. The KILL instructions are
removed before the machine code is emitted.

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

11 years agoAdd support for fission attributes/forms/operations -> string.
Eric Christopher [Fri, 30 Nov 2012 23:20:43 +0000 (23:20 +0000)]
Add support for fission attributes/forms/operations -> string.

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

11 years agoVim mode updated to recognize fast-math flags
Michael Ilseman [Fri, 30 Nov 2012 23:18:21 +0000 (23:18 +0000)]
Vim mode updated to recognize fast-math flags

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

11 years agoRemoved redundancy in wording
Michael Ilseman [Fri, 30 Nov 2012 23:14:52 +0000 (23:14 +0000)]
Removed redundancy in wording

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

11 years agoClean up the documentation to have a common description area for fast-math flags.
Michael Ilseman [Fri, 30 Nov 2012 23:12:42 +0000 (23:12 +0000)]
Clean up the documentation to have a common description area for fast-math flags.

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

11 years agoBe more clear on what parts of code I own.
Bill Wendling [Fri, 30 Nov 2012 23:00:25 +0000 (23:00 +0000)]
Be more clear on what parts of code I own.

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

11 years agoreversed the logic of the log2 detection routine to reduce the number of nested ifs
Pedro Artigas [Fri, 30 Nov 2012 22:47:15 +0000 (22:47 +0000)]
reversed the logic of the log2 detection routine to reduce the number of nested ifs

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

11 years agominor cleanups
Nadav Rotem [Fri, 30 Nov 2012 22:37:11 +0000 (22:37 +0000)]
minor cleanups

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

11 years agoFix a bug in APFloat.cpp: declare APFloat after fltSemantics it
Alexey Samsonov [Fri, 30 Nov 2012 22:27:54 +0000 (22:27 +0000)]
Fix a bug in APFloat.cpp: declare APFloat after fltSemantics it
uses. APFloat::convert() takes the pointer to the fltSemantics
variable, which is later accessed it in ~APFloat() desctructor.
That is, semantics must still be alive at the moment we delete
APFloat.

Found by experimental AddressSanitizer use-after-scope checker.

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

11 years agoAdd me as LTO code owner.
Bill Wendling [Fri, 30 Nov 2012 22:15:08 +0000 (22:15 +0000)]
Add me as LTO code owner.

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

11 years agoReplace r168930 with a more reasonable patch.
Bill Wendling [Fri, 30 Nov 2012 22:08:55 +0000 (22:08 +0000)]
Replace r168930 with a more reasonable patch.

The original patch removed a bunch of code that the SjLjEHPrepare pass placed
into the entry block if all of the landing pads were removed during the
CodeGenPrepare class. The more natural way of doing things is to run the CGP
*before* we run the SjLjEHPrepare pass.

Make it so!

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

11 years agoAddresses many style issues with prior checkin (r169025)
Pedro Artigas [Fri, 30 Nov 2012 22:07:05 +0000 (22:07 +0000)]
Addresses many style issues with prior checkin (r169025)

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

11 years agoAdd a -time-compilations=<N> option to llc.
Jakob Stoklund Olesen [Fri, 30 Nov 2012 21:42:47 +0000 (21:42 +0000)]
Add a -time-compilations=<N> option to llc.

This causes llc to repeat the module compilation N times, making it
possible to get more accurate information from -time-passes when
compiling small modules.

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

11 years agoAggregate pass execution time report by pass ID instead of pass instance.
Jakob Stoklund Olesen [Fri, 30 Nov 2012 21:42:45 +0000 (21:42 +0000)]
Aggregate pass execution time report by pass ID instead of pass instance.

This avoids unidentified duplicates in the pass execution time report
when a pass runs more than once in the pass manager pipeline.

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

11 years agolit: Add a simple test suite for checking test runner parallelism.
Daniel Dunbar [Fri, 30 Nov 2012 21:34:04 +0000 (21:34 +0000)]
lit: Add a simple test suite for checking test runner parallelism.

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

11 years agotest/CodeGen/PowerPC/vec_mul.ll: Add a triple. Thanks, Hal.
Chad Rosier [Fri, 30 Nov 2012 19:15:10 +0000 (19:15 +0000)]
test/CodeGen/PowerPC/vec_mul.ll: Add a triple. Thanks, Hal.

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

11 years agoAdd fast math inst combine X*log2(Y*0.5)-->X*log2(Y)-X
Pedro Artigas [Fri, 30 Nov 2012 19:09:41 +0000 (19:09 +0000)]
Add fast math inst combine X*log2(Y*0.5)-->X*log2(Y)-X

reviewed by Michael Ilseman <milseman@apple.com>

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

11 years agoCodegen failure for vmull with small vectors
Sebastian Pop [Fri, 30 Nov 2012 19:08:04 +0000 (19:08 +0000)]
Codegen failure for vmull with small vectors

Codegen was failing with an assertion because of unexpected vector
operands when legalizing the selection DAG for a MUL instruction.

The asserting code was legalizing multiplies for vectors of size 128
bits. It uses a custom lowering to try and detect cases where it can
use a VMULL instruction instead of a VMOVL + VMUL.  The code was
looking for input operands to the MUL that had been sign or zero
extended. If it found the extended operands it would drop the
sign/zero extension and use the original vector size as input to a
VMULL instruction.

The code assumed that the original input vector was 64 bits so that
after dropping the extension it would fit directly into a D register
and could be used as an operand of a VMULL instruction. The input
code that trigger the failure used a vector of <4 x i8> that was
sign extended to <4 x i32>. It was not safe to drop the sign
extension in this case because the original vector is only 32 bits
wide. The fix is to insert a sign extension for the vector to reach
the required 64 bit size. In this particular example, the vector would
need to be sign extented to a <4 x i16>.

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

11 years agotest/CodeGen/PowerPC/vec_mul.ll: Fix register operands.
Chad Rosier [Fri, 30 Nov 2012 18:29:01 +0000 (18:29 +0000)]
test/CodeGen/PowerPC/vec_mul.ll: Fix register operands.

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

11 years agoUse multiclass for the load instructions with MEMri operand.
Jyotsna Verma [Fri, 30 Nov 2012 17:31:52 +0000 (17:31 +0000)]
Use multiclass for the load instructions with MEMri operand.

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

11 years agoRemove the use of LPPassManager. We can remove LPM because we dont need to run any...
Nadav Rotem [Fri, 30 Nov 2012 17:27:53 +0000 (17:27 +0000)]
Remove the use of LPPassManager. We can remove LPM because we dont need to run any additional loop passes on the new vector loop.

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

11 years agoClean up whitespace and add comments
Eli Bendersky [Fri, 30 Nov 2012 14:22:14 +0000 (14:22 +0000)]
Clean up whitespace and add comments

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

11 years agoMake FileCheck return 2 in case of an error as documented,
Eli Bendersky [Fri, 30 Nov 2012 13:51:33 +0000 (13:51 +0000)]
Make FileCheck return 2 in case of an error as documented,
instead of 1 or true (?!)

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

11 years agotest/CodeGen/PowerPC: Add explicit -march=ppc32.
NAKAMURA Takumi [Fri, 30 Nov 2012 13:28:31 +0000 (13:28 +0000)]
test/CodeGen/PowerPC: Add explicit -march=ppc32.

FIXME: Please add another RUN line if you would like to check also on ppc64.

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

11 years agoThis patch fixes the Altivec addend construction for the fused multiply-add
Adhemerval Zanella [Fri, 30 Nov 2012 13:05:44 +0000 (13:05 +0000)]
This patch fixes the Altivec addend construction for the fused multiply-add
instruction (vmaddfp) to conform with IEEE to ensure the sign of a zero
result when resulting product is -0.0.

The -0.0 vector addend to vmaddfp is generated by a creating a vector
with full bits sets and then shifting each elements by 31-bits to the
left, resulting in a vector of 0x80000000 (or -0.0 as float).

The 'buildvec_canonicalize.ll' was adjusted to reflect this change and
the 'vec_mul.ll' was complemented with the float vector multiplication
test.

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

11 years ago[msan] Tests for vector manipulation instructions.
Evgeniy Stepanov [Fri, 30 Nov 2012 12:12:20 +0000 (12:12 +0000)]
[msan] Tests for vector manipulation instructions.

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

11 years agoSwitch LLVM_USE_RVALUE_REFERENCES to LLVM_HAS_RVALUE_REFERENCES.
Chandler Carruth [Fri, 30 Nov 2012 11:45:22 +0000 (11:45 +0000)]
Switch LLVM_USE_RVALUE_REFERENCES to LLVM_HAS_RVALUE_REFERENCES.

Rationale:
1) This was the name in the comment block. ;]
2) It matches Clang's __has_feature naming convention.
3) It matches other compiler-feature-test conventions.

Sorry for the noise. =]

I've also switch the comment block to use a \brief tag and not duplicate
the name.

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

11 years ago[asan] simplify the code around doesNotReturn call. It now magically works.
Kostya Serebryany [Fri, 30 Nov 2012 11:08:59 +0000 (11:08 +0000)]
[asan] simplify the code around doesNotReturn call. It now magically works.

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

11 years agoSeparate out the tests for whether the compiler suports R-value
Chandler Carruth [Fri, 30 Nov 2012 11:04:18 +0000 (11:04 +0000)]
Separate out the tests for whether the compiler suports R-value
references from whether it supports an R-value reference *this. No
version of GCC today supports the latter, which breaks GCC C++11
compiles of LLVM and Clang now.

Also add doxygen comments clarifying what's going on here, and update
the usage in Optional. I'll update the usages in Clang next.

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

11 years agoMore strict error checking in parseSpecifier + simplified code.
Patrik Hagglund [Fri, 30 Nov 2012 10:06:59 +0000 (10:06 +0000)]
More strict error checking in parseSpecifier + simplified code.

For example, don't allow empty strings to be passed to getInt.

Move asserts inside parseSpecifier. (One day we may want to pass parse
error messages to the user - from LLParser - instead of using asserts,
but keep the code simple until then. There have been an attempt to do
this. See r142288, which got reverted, and r142605.)

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

11 years agoFix non-determinism introduced in r168970 and pointed out by Duncan.
Chandler Carruth [Fri, 30 Nov 2012 09:34:29 +0000 (09:34 +0000)]
Fix non-determinism introduced in r168970 and pointed out by Duncan.

We're iterating over a non-deterministically ordered container looking
for two saturating flags. To do this correctly, we have to saturate
both, and only stop looping if both saturate to their final value.
Otherwise, which flag we see first changes the result.

This is also a micro-optimization of the previous version as now we
don't go into the (possibly expensive) test logic once the first
violation of either constraint is detected.

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

11 years agoRearrange the comments, control flow, and variable names; no
Chandler Carruth [Fri, 30 Nov 2012 09:26:25 +0000 (09:26 +0000)]
Rearrange the comments, control flow, and variable names; no
functionality changed.

Evan's commit r168970 moved the code that the primary comment in this
function referred to to the other end of the function without moving the
comment, and there has been a steady creep of "boolean" logic in it that
is simpler if handled via early exit. That way each special case can
have its own comments. I've also made the variable name a bit more
explanatory than "AllFit". This is in preparation to fix the
non-deterministic output of this function.

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

11 years agoAdd the rest of the experimental fission sections to MC.
Eric Christopher [Fri, 30 Nov 2012 06:47:06 +0000 (06:47 +0000)]
Add the rest of the experimental fission sections to MC.

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

11 years agoUse multiclass for the store instructions with MEMri operand.
Jyotsna Verma [Fri, 30 Nov 2012 06:10:22 +0000 (06:10 +0000)]
Use multiclass for the store instructions with MEMri operand.

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

11 years agoUse multiclass for the load instructions with 'base + register offset'
Jyotsna Verma [Fri, 30 Nov 2012 04:19:09 +0000 (04:19 +0000)]
Use multiclass for the load instructions with 'base + register offset'
addressing mode.

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

11 years agoMove library call simplification statistic to instcombine
Meador Inge [Fri, 30 Nov 2012 04:05:06 +0000 (04:05 +0000)]
Move library call simplification statistic to instcombine

The simplify-libcalls pass maintained a statistic to count the number
of library calls that have been simplified.  Now that library call
simplification is being carried out in instcombine the statistic should
be moved to there.

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

11 years agoMove the InstVisitor utility into VMCore where it belongs. It heavily
Chandler Carruth [Fri, 30 Nov 2012 03:08:41 +0000 (03:08 +0000)]
Move the InstVisitor utility into VMCore where it belongs. It heavily
depends on the IR infrastructure, there is no sense in it being off in
Support land.

This is in preparation to start working to expand InstVisitor into more
special-purpose visitors that are still generic and can be re-used
across different passes. The expansion will go into the Analylis tree
though as nothing in VMCore needs it.

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

11 years agoFix logic to determine whether to turn a switch into a lookup table. When
Evan Cheng [Fri, 30 Nov 2012 02:02:42 +0000 (02:02 +0000)]
Fix logic to determine whether to turn a switch into a lookup table. When
the tables cannot fit in registers (i.e. bitmap), do not emit the table
if it's using an illegal type.

rdar://12779436

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

11 years agoModified dump() to provide a little
Preston Briggs [Fri, 30 Nov 2012 00:44:47 +0000 (00:44 +0000)]
Modified dump() to provide a little
more information for dependences between
instructions that don't share a common loop.

Updated the test results appropriately.

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

11 years agoAdd a new C++11 compatibility macro, LLVM_LVALUE_FUNCTION.
Jordan Rose [Fri, 30 Nov 2012 00:38:53 +0000 (00:38 +0000)]
Add a new C++11 compatibility macro, LLVM_LVALUE_FUNCTION.

This expands to '&', and is intended to be used when an /optional/ rvalue
override is available.

Before:
  void foo() const { ... }

After:
  void foo() const LLVM_LVALUE_FUNCTION { ... }
  void foo() && { ... }

This is used to allow moving the contents of an Optional.

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

11 years agoFixed the arm disassembly of invalid BFI instructions to not build a bad MCInst
Kevin Enderby [Thu, 29 Nov 2012 23:47:11 +0000 (23:47 +0000)]
Fixed the arm disassembly of invalid BFI instructions to not build a bad MCInst
which would then cause an assert when printed.  rdar://11437956

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

11 years agoMore comment.
Eric Christopher [Thu, 29 Nov 2012 22:56:13 +0000 (22:56 +0000)]
More comment.

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

11 years agoUpdate comment for malloc being a library call now, rather than an instruction.
Dan Gohman [Thu, 29 Nov 2012 21:58:47 +0000 (21:58 +0000)]
Update comment for malloc being a library call now, rather than an instruction.

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

11 years agocopyFastMathFlags utility and test case
Michael Ilseman [Thu, 29 Nov 2012 21:25:12 +0000 (21:25 +0000)]
copyFastMathFlags utility and test case

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

11 years agoAdd a FileCheck test that makes sure two different CHECKs won't match the
Eli Bendersky [Thu, 29 Nov 2012 21:24:44 +0000 (21:24 +0000)]
Add a FileCheck test that makes sure two different CHECKs won't match the
same string

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

11 years agoUpdate my email address.
Dan Gohman [Thu, 29 Nov 2012 21:17:26 +0000 (21:17 +0000)]
Update my email address.

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

11 years agoWhitespace.
Chad Rosier [Thu, 29 Nov 2012 20:58:08 +0000 (20:58 +0000)]
Whitespace.

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

11 years agoFix 80-column violations.
Chad Rosier [Thu, 29 Nov 2012 20:56:58 +0000 (20:56 +0000)]
Fix 80-column violations.

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

11 years agoObject: Pass the buffer name through when making a copy.
Benjamin Kramer [Thu, 29 Nov 2012 20:08:03 +0000 (20:08 +0000)]
Object: Pass the buffer name through when making a copy.

Should bring the buildbots back to life.

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

11 years agoAdd cortex-a5 subtarget to the supported ARM architectures
Quentin Colombet [Thu, 29 Nov 2012 19:48:01 +0000 (19:48 +0000)]
Add cortex-a5 subtarget to the supported ARM architectures

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

11 years agoCleanup recent addition of DAGTypeLegalizer::SplitVecOp_VSELECT
Justin Holewinski [Thu, 29 Nov 2012 19:42:09 +0000 (19:42 +0000)]
Cleanup recent addition of DAGTypeLegalizer::SplitVecOp_VSELECT

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

11 years agordar://12100355 (part 1)
Shuxin Yang [Thu, 29 Nov 2012 19:38:54 +0000 (19:38 +0000)]
rdar://12100355 (part 1)

This revision attempts to recognize following population-count pattern:

 while(a) { c++; ... ; a &= a - 1; ... },
  where <c> and <a>could be used multiple times in the loop body.

 TODO: On X8664 and ARM, __buildin_ctpop() are not expanded to a efficent
instruction sequence, which need to be improved in the following commits.

Reviewed by Nadav, really appreciate!

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

11 years agoHandle the situation where CodeGenPrepare removes a reference to a BB that has
Bill Wendling [Thu, 29 Nov 2012 19:38:06 +0000 (19:38 +0000)]
Handle the situation where CodeGenPrepare removes a reference to a BB that has
the last invoke instruction in the function. This also removes the last landing
pad in an function. This is fine, but with SjLj EH code, we've already placed a
bunch of code in the 'entry' block, which expects the landing pad to stick
around.

When we get to the situation where CGP has removed the last landing pad, go
ahead and nuke the SjLj instructions from the 'entry' block.
<rdar://problem/12721258>

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

11 years agoUse multiclass for 'transfer' instructions.
Jyotsna Verma [Thu, 29 Nov 2012 19:35:44 +0000 (19:35 +0000)]
Use multiclass for 'transfer' instructions.

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

11 years agoNo need to run LICM after loop vectorization because we dont generate invariant code...
Nadav Rotem [Thu, 29 Nov 2012 19:28:29 +0000 (19:28 +0000)]
No need to run LICM after loop vectorization because we dont generate invariant code any more.

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

11 years agoWhen broadcasting invariant scalars into vectors, place the broadcast code in the...
Nadav Rotem [Thu, 29 Nov 2012 19:25:41 +0000 (19:25 +0000)]
When broadcasting invariant scalars into vectors, place the broadcast code in the preheader.

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

11 years agoDocumentation for FileCheck: use 'option' and 'program' directives.
Dmitri Gribenko [Thu, 29 Nov 2012 19:21:02 +0000 (19:21 +0000)]
Documentation for FileCheck: use 'option' and 'program' directives.

This enables option cross-referencing and now '--' in option names are no more turned into en dashes.

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

11 years agoinstcombine: Migrate puts optimizations
Meador Inge [Thu, 29 Nov 2012 19:15:17 +0000 (19:15 +0000)]
instcombine: Migrate puts optimizations

This patch migrates the puts optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

All the simplifiers from simplify-libcalls have now been migrated to
instcombine.  Yay!  Just a few other bits to migrate (prototype attribute
inference and a few statistics) and simplify-libcalls can finally be put
to rest.

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

11 years agoDocumentation for llvm-link: reformat
Dmitri Gribenko [Thu, 29 Nov 2012 19:14:35 +0000 (19:14 +0000)]
Documentation for llvm-link: reformat

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

11 years agoFix a memory leak in MachOObjectFile.
Jim Grosbach [Thu, 29 Nov 2012 19:14:11 +0000 (19:14 +0000)]
Fix a memory leak in MachOObjectFile.

MachOObjectFile owns a MachOObj, but never frees it. Both MachOObjectFile
and MachOObj want to own the MemoryBuffer, though, so we have to be careful
and give them each one of their own.

Thanks to Greg Clayton, Eric Christopher and Michael Spencer for helping
figure out what's going wrong here.

rdar://12561773

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

11 years agoDocumentation for llvm-cov: reformat
Dmitri Gribenko [Thu, 29 Nov 2012 19:10:21 +0000 (19:10 +0000)]
Documentation for llvm-cov: reformat

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

11 years agoFollow up to 168711: It's safe to base this analysis on the found compare, just retur...
Benjamin Kramer [Thu, 29 Nov 2012 19:07:57 +0000 (19:07 +0000)]
Follow up to 168711: It's safe to base this analysis on the found compare, just return the value for the right predicate.

Thanks to Andy for catching this.

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

11 years agoDocumentation for llvm-stress: reformat
Dmitri Gribenko [Thu, 29 Nov 2012 19:05:55 +0000 (19:05 +0000)]
Documentation for llvm-stress: reformat

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

11 years agoDocumentation for opt: reformat
Dmitri Gribenko [Thu, 29 Nov 2012 19:02:50 +0000 (19:02 +0000)]
Documentation for opt: reformat

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