oota-llvm.git
13 years agofix some typos
Chris Lattner [Tue, 21 Dec 2010 18:05:22 +0000 (18:05 +0000)]
fix some typos

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

13 years agoRevert 122341. It breaks some darwin tests.
David Greene [Tue, 21 Dec 2010 17:25:43 +0000 (17:25 +0000)]
Revert 122341.  It breaks some darwin tests.

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

13 years agoFix indentation, add comment.
Stuart Hastings [Tue, 21 Dec 2010 17:16:58 +0000 (17:16 +0000)]
Fix indentation, add comment.

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

13 years agoVisit instructions deterministically. Use a FIFO so as to approximately
Duncan Sands [Tue, 21 Dec 2010 17:08:55 +0000 (17:08 +0000)]
Visit instructions deterministically.  Use a FIFO so as to approximately
visit instructions before their uses, since InstructionSimplify does a
better job in that case.  All this prompted by Frits van Bommel.

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

13 years agoMissing logic for nested CALLSEQ_START/END.
Stuart Hastings [Tue, 21 Dec 2010 17:07:24 +0000 (17:07 +0000)]
Missing logic for nested CALLSEQ_START/END.

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

13 years agoFix PR 8199. This patch prepends the build tool dir to LLVM programs
David Greene [Tue, 21 Dec 2010 16:55:53 +0000 (16:55 +0000)]
Fix PR 8199.  This patch prepends the build tool dir to LLVM programs
being tested.  This ensures that we test the tools just built and not
some random tools that might happen to be in the user's PATH.  This
makes LLVM testing much more stable and predictable.

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

13 years agoTidy up a bit. Trailing whitespace, hard tabs and 80-columns.
Jim Grosbach [Tue, 21 Dec 2010 16:16:00 +0000 (16:16 +0000)]
Tidy up a bit. Trailing whitespace, hard tabs and 80-columns.

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

13 years agoIf an instruction simplifies, try again to simplify any uses of it. This is
Duncan Sands [Tue, 21 Dec 2010 16:12:03 +0000 (16:12 +0000)]
If an instruction simplifies, try again to simplify any uses of it.  This is
not very important since the pass is only used for testing, but it does make
it more realistic.  Suggested by Frits van Bommel.

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

13 years agoMC/Mach-O: Shuffle enums a bit to make it harder to inadvertently use the wrong
Daniel Dunbar [Tue, 21 Dec 2010 15:26:45 +0000 (15:26 +0000)]
MC/Mach-O: Shuffle enums a bit to make it harder to inadvertently use the wrong
type.

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

13 years agoAdd an additional InstructionSimplify factorization test.
Duncan Sands [Tue, 21 Dec 2010 15:12:22 +0000 (15:12 +0000)]
Add an additional InstructionSimplify factorization test.

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

13 years agoWhile I don't think any later transforms can fire, it seems cleaner to
Duncan Sands [Tue, 21 Dec 2010 15:03:43 +0000 (15:03 +0000)]
While I don't think any later transforms can fire, it seems cleaner to
not assume this (for example in case more transforms get added below
it).  Suggested by Frits van Bommel.

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

13 years agoFix inverted condition noticed by Frits van Bommel.
Duncan Sands [Tue, 21 Dec 2010 14:48:48 +0000 (14:48 +0000)]
Fix inverted condition noticed by Frits van Bommel.

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

13 years agoPull a few more simplifications out of instcombine (there are still
Duncan Sands [Tue, 21 Dec 2010 14:00:22 +0000 (14:00 +0000)]
Pull a few more simplifications out of instcombine (there are still
plenty left though!), in particular for multiplication.

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

13 years agoFix typo in comment, spotted by Deewiant.
Duncan Sands [Tue, 21 Dec 2010 13:39:20 +0000 (13:39 +0000)]
Fix typo in comment, spotted by Deewiant.

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

13 years agoTeach InstructionSimplify about distributive laws. These transforms fire
Duncan Sands [Tue, 21 Dec 2010 13:32:22 +0000 (13:32 +0000)]
Teach InstructionSimplify about distributive laws.  These transforms fire
quite often, but don't make much difference in practice presumably because
instcombine also knows them and more.

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

13 years agoMove checking of the recursion limit into the various Thread methods.
Duncan Sands [Tue, 21 Dec 2010 09:09:15 +0000 (09:09 +0000)]
Move checking of the recursion limit into the various Thread methods.
No functionality change.

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

13 years agoAdd generic simplification of associative operations, generalizing
Duncan Sands [Tue, 21 Dec 2010 08:49:00 +0000 (08:49 +0000)]
Add generic simplification of associative operations, generalizing
a couple of existing transforms.  This fires surprisingly often, for
example when compiling gcc "(X+(-1))+1->X" fires quite a lot as well
as various "and" simplifications (usually with a phi node operand).
Most of the time this doesn't make a real difference since the same
thing would have been done elsewhere anyway, eg: by instcombine, but
there are a few places where this results in simplifications that we
were not doing before.

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

13 years agoIncremental progress towards a new implementation of StrongPHIElimination. Most
Cameron Zwarich [Tue, 21 Dec 2010 06:54:43 +0000 (06:54 +0000)]
Incremental progress towards a new implementation of StrongPHIElimination. Most
of the problems with my last attempt were in the updating of LiveIntervals
rather than the coalescing itself. Therefore, I decided to get that right first
by essentially reimplementing the existing PHIElimination using LiveIntervals.

It works correctly, with only a few tests failing (which may not be legitimate
failures) and no new verifier failures (at least as far as I can tell, I didn't
count the number per file).

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

13 years agoAdd ARM-specific DAG combining to cast i64 vector element load/stores to f64.
Bob Wilson [Tue, 21 Dec 2010 06:43:19 +0000 (06:43 +0000)]
Add ARM-specific DAG combining to cast i64 vector element load/stores to f64.
Type legalization splits up i64 values into pairs of i32 values, which leads
to poor quality code when inserting or extracting i64 vector elements.
If the vector element is loaded or stored, it can be treated as an f64 value
and loaded or stored directly from a VPR register.  Use the pre-legalization
DAG combiner to cast those vector elements to f64 types so that the type
legalizer won't mess them up.  Radar 8755338.

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

13 years agoLayout one section until no relaxations are done and then move to the next
Rafael Espindola [Tue, 21 Dec 2010 04:22:09 +0000 (04:22 +0000)]
Layout one section until no relaxations are done and then move to the next
section.

This helps because in practice sections form a dag with debug sections pointing
to text sections. Finishing up the text sections first makes the debug section
relaxation trivial.

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

13 years agoArm and thumb call instructions are also in different orders.
Eric Christopher [Tue, 21 Dec 2010 03:50:43 +0000 (03:50 +0000)]
Arm and thumb call instructions are also in different orders.

Fixes rdar://8782223

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

13 years agoGrammar corrections and some formatting changes.
Bill Wendling [Tue, 21 Dec 2010 03:31:05 +0000 (03:31 +0000)]
Grammar corrections and some formatting changes.

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

13 years agorename MVT::Flag to MVT::Glue. "Flag" is a terrible name for
Chris Lattner [Tue, 21 Dec 2010 02:38:05 +0000 (02:38 +0000)]
rename MVT::Flag to MVT::Glue.  "Flag" is a terrible name for
something that just glues two nodes together, even if it is
sometimes used for flags.

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

13 years agoIf we're not using reg+reg offset we're using reg+imm, set the opcode
Eric Christopher [Tue, 21 Dec 2010 02:12:07 +0000 (02:12 +0000)]
If we're not using reg+reg offset we're using reg+imm, set the opcode
to be the one we want to use. bugpoint reduced testcase is a little large,
I'll see if I can simplify it down more.

Fixes part of rdar://8782207

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

13 years agoimprove "cannot yet select" errors a trivial amount: now
Chris Lattner [Tue, 21 Dec 2010 02:07:03 +0000 (02:07 +0000)]
improve "cannot yet select" errors a trivial amount: now
they are just as useless, but at least a bit more gramatical

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

13 years agoFix a copy-pasto. When the tBR_JTr instruction was converted to using the
Bill Wendling [Tue, 21 Dec 2010 01:57:15 +0000 (01:57 +0000)]
Fix a copy-pasto. When the tBR_JTr instruction was converted to using the
tPseudoInst class, its size was changed from "special" to "2 bytes". This is
incorrect because the jump table will no longer be taken into account when
calculating branch offsets.
<rdar://problem/8782216>

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

13 years agoComment cleanups.
Bill Wendling [Tue, 21 Dec 2010 01:54:40 +0000 (01:54 +0000)]
Comment cleanups.

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

13 years agoAdd EdgeBundles to SplitKit.
Jakob Stoklund Olesen [Tue, 21 Dec 2010 01:50:21 +0000 (01:50 +0000)]
Add EdgeBundles to SplitKit.

Edge bundles is an annotation on the CFG that turns it into a bipartite directed
graph where each basic block is connected to an outgoing and an ingoing bundle.
These bundles are useful for identifying regions of the CFG for live range
splitting.

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

13 years agoUse IntEqClasses to compute connected components of live intervals.
Jakob Stoklund Olesen [Tue, 21 Dec 2010 00:48:17 +0000 (00:48 +0000)]
Use IntEqClasses to compute connected components of live intervals.

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

13 years agoAdd ADT/IntEqClasses.h as a light-weight implementation of EquivalenceClasses.h.
Jakob Stoklund Olesen [Tue, 21 Dec 2010 00:04:46 +0000 (00:04 +0000)]
Add ADT/IntEqClasses.h as a light-weight implementation of EquivalenceClasses.h.

This implementation already exists as ConnectedVNInfoEqClasses in
LiveInterval.cpp, and it seems to be generally useful to have a light-weight way
of forming equivalence classes of small integers.

IntEqClasses doesn't allow enumeration of the elements in a class.

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

13 years agoSpeculatively revert the use of DenseMap in LazyValueInfo, which may be causing Linux...
Owen Anderson [Mon, 20 Dec 2010 23:53:19 +0000 (23:53 +0000)]
Speculatively revert the use of DenseMap in LazyValueInfo, which may be causing Linux self-host failures.

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

13 years agoAttempt to appease the DragonEgg buildbots.
Owen Anderson [Mon, 20 Dec 2010 23:23:18 +0000 (23:23 +0000)]
Attempt to appease the DragonEgg buildbots.

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

13 years agoRevert r122114 (CallbackVH observing use-list changes) because it caused severe slowd...
Owen Anderson [Mon, 20 Dec 2010 22:28:03 +0000 (22:28 +0000)]
Revert r122114 (CallbackVH observing use-list changes) because it caused severe slowdowns on the Linux self-host configuration.

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

13 years agoImplement feedback from Bruno on making pblendvb an x86-specific ISD node in addition...
Nate Begeman [Mon, 20 Dec 2010 22:04:24 +0000 (22:04 +0000)]
Implement feedback from Bruno on making pblendvb an x86-specific ISD node in addition to being an intrinsic, and convert
lowering to use it.  Hopefully the pattern fragment is doing the right thing with XMM0, looks correct in testing.

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

13 years agoUpdate the target feature matrix to reflect some new features in the MBlaze backend.
Wesley Peck [Mon, 20 Dec 2010 21:54:50 +0000 (21:54 +0000)]
Update the target feature matrix to reflect some new features in the MBlaze backend.

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

13 years agoConvert one of LVI's primary maps to a DenseMap, now that we know are more assured...
Owen Anderson [Mon, 20 Dec 2010 21:30:54 +0000 (21:30 +0000)]
Convert one of LVI's primary maps to a DenseMap, now that we know are more assured of iterator stability.

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

13 years agoTeach the MBlaze disassembler to disassemble special purpose registers.
Wesley Peck [Mon, 20 Dec 2010 21:18:04 +0000 (21:18 +0000)]
Teach the MBlaze disassembler to disassemble special purpose registers.

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

13 years agoSet the value of absolute symbols.
Roman Divacky [Mon, 20 Dec 2010 21:14:39 +0000 (21:14 +0000)]
Set the value of absolute symbols.

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

13 years agoThis is still used and issuing an annoying warning. Don't deprecate something in
Bill Wendling [Mon, 20 Dec 2010 21:14:18 +0000 (21:14 +0000)]
This is still used and issuing an annoying warning. Don't deprecate something in
the library unless *all* uses have been converted over to the new form.

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

13 years agoOops, forgot to add the pass itself!
Duncan Sands [Mon, 20 Dec 2010 21:07:42 +0000 (21:07 +0000)]
Oops, forgot to add the pass itself!

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

13 years agoAdd a new convenience pass for testing InstructionSimplify. Previously
Duncan Sands [Mon, 20 Dec 2010 20:54:37 +0000 (20:54 +0000)]
Add a new convenience pass for testing InstructionSimplify.  Previously
it could only be tested indirectly, via instcombine, gvn or some other
pass that makes use of InstructionSimplify, which means that testcases
had to be carefully contrived to dance around any other transformations
that that pass did.

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

13 years agoPrint all 64bits for st_value and st_size. Adjust tests accordingly.
Roman Divacky [Mon, 20 Dec 2010 20:49:43 +0000 (20:49 +0000)]
Print all 64bits for st_value and st_size. Adjust tests accordingly.

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

13 years agoTeach the MBlaze asm parser how to parse special purpose register names.
Wesley Peck [Mon, 20 Dec 2010 20:43:24 +0000 (20:43 +0000)]
Teach the MBlaze asm parser how to parse special purpose register names.

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

13 years agoCosmetic changes.
Dale Johannesen [Mon, 20 Dec 2010 20:10:50 +0000 (20:10 +0000)]
Cosmetic changes.

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

13 years agoAdd a check missing from my last commit and avoid a potential overflow situation.
Benjamin Kramer [Mon, 20 Dec 2010 20:00:31 +0000 (20:00 +0000)]
Add a check missing from my last commit and avoid a potential overflow situation.

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

13 years agoMore LVI cleanups, including trying to simplify the process of maintaining the OverDe...
Owen Anderson [Mon, 20 Dec 2010 19:33:41 +0000 (19:33 +0000)]
More LVI cleanups, including trying to simplify the process of maintaining the OverDefinedCache.

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

13 years agoReuse the reference into the LVI cache throughout the solver subsystem. This is...
Owen Anderson [Mon, 20 Dec 2010 18:18:16 +0000 (18:18 +0000)]
Reuse the reference into the LVI cache throughout the solver subsystem.  This is much easier to
verify as being safe thanks its recent de-recursivization.

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

13 years agoReduce indentation.
Benjamin Kramer [Mon, 20 Dec 2010 16:21:59 +0000 (16:21 +0000)]
Reduce indentation.

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

13 years agoTeach InstCombine to merge (icmp ult (X + CA), C1) | (icmp eq X, C2) into (icmp ult...
Benjamin Kramer [Mon, 20 Dec 2010 16:18:51 +0000 (16:18 +0000)]
Teach InstCombine to merge (icmp ult (X + CA), C1) | (icmp eq X, C2) into (icmp ult (X + CA), C1 + 1) if C2 + CA == C1.

InstCombine creates these so now we compile x == 23 || x == 24 || x == 25 to
  %x.off = add i32 %x, -23
  %1 = icmp ult i32 %x.off, 3
instead of
  %x.off = add i32 %x, -23
  %1 = icmp ult i32 %x.off, 2
  %cmp3 = icmp eq i32 %x, 25
  %ret2 = or i1 %1, %cmp3

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

13 years agoAdd header...
Daniel Dunbar [Mon, 20 Dec 2010 15:45:51 +0000 (15:45 +0000)]
Add header...

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

13 years agoX86/MC/Mach-O: Split out createX86MachObjectWriter().
Daniel Dunbar [Mon, 20 Dec 2010 15:07:39 +0000 (15:07 +0000)]
X86/MC/Mach-O: Split out createX86MachObjectWriter().

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

13 years agoHave SimplifyBinOp dispatch Xor, Add and Sub to the corresponding methods
Duncan Sands [Mon, 20 Dec 2010 14:47:04 +0000 (14:47 +0000)]
Have SimplifyBinOp dispatch Xor, Add and Sub to the corresponding methods
(they had just been forgotten before).  Adding Xor causes "main" in the
existing testcase 2010-11-01-lshr-mask.ll to be hugely more simplified.

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

13 years agoFix spelling.
Michael J. Spencer [Mon, 20 Dec 2010 13:30:37 +0000 (13:30 +0000)]
Fix spelling.

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

13 years agoSupport/PathV2: Add missing has_relative_path impl.
Michael J. Spencer [Mon, 20 Dec 2010 13:30:28 +0000 (13:30 +0000)]
Support/PathV2: Add missing has_relative_path impl.

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

13 years agoThere is no need for isAssociative to take the type as an argument anymore.
Duncan Sands [Mon, 20 Dec 2010 13:10:23 +0000 (13:10 +0000)]
There is no need for isAssociative to take the type as an argument anymore.

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

13 years agoDiscourage people from using isWeakForLinker when they should be using
Duncan Sands [Mon, 20 Dec 2010 10:57:01 +0000 (10:57 +0000)]
Discourage people from using isWeakForLinker when they should be using
mayBeOverridden.

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

13 years agoNew cmake option LLVM_APPEND_VC_REV for controlling when the VC
Oscar Fuentes [Mon, 20 Dec 2010 09:47:13 +0000 (09:47 +0000)]
New cmake option LLVM_APPEND_VC_REV for controlling when the VC
revision id is appended to the LLVM version string. Defaults to
OFF.

Until now the VC revision id was always appended to the revision
string whenever cmake was invoked (either explicitly or implicitly
because a cmake source file changed). This was causing massive
recompilations because config.h are reconfigured with the new contents
of PACKAGE_VERSION.

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

13 years agoUpdate cmake library dependencies.
Oscar Fuentes [Mon, 20 Dec 2010 09:47:08 +0000 (09:47 +0000)]
Update cmake library dependencies.

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

13 years agofix PR8807 by making transformConstExprCastCall aware of byval arguments.
Chris Lattner [Mon, 20 Dec 2010 08:36:38 +0000 (08:36 +0000)]
fix PR8807 by making transformConstExprCastCall aware of byval arguments.

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

13 years agovarious cleanups for transformConstExprCastCall
Chris Lattner [Mon, 20 Dec 2010 08:25:06 +0000 (08:25 +0000)]
various cleanups for transformConstExprCastCall

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

13 years agowhen eliding a byval copy due to inlining a readonly function, we have
Chris Lattner [Mon, 20 Dec 2010 08:10:40 +0000 (08:10 +0000)]
when eliding a byval copy due to inlining a readonly function, we have
to make sure that the reused alloca has sufficient alignment.

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

13 years agopull byval processing out to its own helper function.
Chris Lattner [Mon, 20 Dec 2010 07:57:41 +0000 (07:57 +0000)]
pull byval processing out to its own helper function.

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

13 years agofix PR8769, a miscompilation by inliner when inlining a function with a byval
Chris Lattner [Mon, 20 Dec 2010 07:45:28 +0000 (07:45 +0000)]
fix PR8769, a miscompilation by inliner when inlining a function with a byval
argument.  The generated alloca has to have at least the alignment of the
byval, if not, the client may be making assumptions that the new alloca won't
satisfy.

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

13 years agomerge two tests.
Chris Lattner [Mon, 20 Dec 2010 07:39:57 +0000 (07:39 +0000)]
merge two tests.

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

13 years agofilecheckize
Chris Lattner [Mon, 20 Dec 2010 07:38:24 +0000 (07:38 +0000)]
filecheckize

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

13 years agoMachineVerifier should count landing pad successors as basic blocks rather than
Cameron Zwarich [Mon, 20 Dec 2010 04:19:48 +0000 (04:19 +0000)]
MachineVerifier should count landing pad successors as basic blocks rather than
out-edges. Fixes PR8824.

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

13 years agoTeach MachineVerifier that early clobber defs begin at USE slots and other defs
Cameron Zwarich [Mon, 20 Dec 2010 03:15:20 +0000 (03:15 +0000)]
Teach MachineVerifier that early clobber defs begin at USE slots and other defs
begin at DEF slots. Fixes the second half of PR8813.

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

13 years agoAdd a missing check from r122218.
Cameron Zwarich [Mon, 20 Dec 2010 02:59:51 +0000 (02:59 +0000)]
Add a missing check from r122218.

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

13 years agotemporarily disable this: PR8823.
Chris Lattner [Mon, 20 Dec 2010 02:11:23 +0000 (02:11 +0000)]
temporarily disable this: PR8823.

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

13 years agoimplement type legalization promotion support for SMULO and UMULO, giving
Chris Lattner [Mon, 20 Dec 2010 02:05:39 +0000 (02:05 +0000)]
implement type legalization promotion support for SMULO and UMULO, giving
ARM (and other 32-bit-only) targets support for i8 and i16 overflow
multiplies.  The generated code isn't great, but this at least fixes
CodeGen/Generic/overflow.ll when running on ARM hosts.

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

13 years agonow that addc/adde are gone, "ADDC" in the X86 backend uses EFLAGS results,
Chris Lattner [Mon, 20 Dec 2010 01:37:09 +0000 (01:37 +0000)]
now that addc/adde are gone, "ADDC" in the X86 backend uses EFLAGS results,
the same as setcc.  Optimize ADDC(0,0,FLAGS) -> SET_CARRY(FLAGS).  This is
a step towards finishing off PR5443.  In the testcase in that bug we now  get:

movq %rdi, %rax
addq %rsi, %rax
sbbq %rcx, %rcx
testb $1, %cl
setne %dl
ret

instead of:

movq %rdi, %rax
addq %rsi, %rax
movl $0, %ecx
adcq $0, %rcx
testq %rcx, %rcx
setne %dl
ret

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

13 years agoDon't assume that an instruction ending a register's live range always reads
Cameron Zwarich [Mon, 20 Dec 2010 01:22:37 +0000 (01:22 +0000)]
Don't assume that an instruction ending a register's live range always reads
the register; it may be a dead def instead. Fixes PR8820.

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

13 years agoWe lower setb to sbb with the hope that the and will go away, when it
Chris Lattner [Mon, 20 Dec 2010 01:16:03 +0000 (01:16 +0000)]
We lower setb to sbb with the hope that the and will go away, when it
doesn't, match it back to setb.

On a 64-bit version of the testcase before we'd get:

movq %rdi, %rax
addq %rsi, %rax
sbbb %dl, %dl
andb $1, %dl
ret

now we get:

movq %rdi, %rax
addq %rsi, %rax
setb %dl
ret

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

13 years agoTest case for r122215 when InstCombine optimizes memset
Mon P Wang [Mon, 20 Dec 2010 01:06:23 +0000 (01:06 +0000)]
Test case for r122215 when InstCombine optimizes memset

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

13 years agoAvoid dropping the address space when InstCombine optimizes memset
Mon P Wang [Mon, 20 Dec 2010 01:05:30 +0000 (01:05 +0000)]
Avoid dropping the address space when InstCombine optimizes memset

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

13 years agouse for loop over types.
Chris Lattner [Mon, 20 Dec 2010 01:03:27 +0000 (01:03 +0000)]
use for loop over types.

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

13 years agoChange the X86 backend to stop using the evil ADDC/ADDE/SUBC/SUBE nodes (which
Chris Lattner [Mon, 20 Dec 2010 00:59:46 +0000 (00:59 +0000)]
Change the X86 backend to stop using the evil ADDC/ADDE/SUBC/SUBE nodes (which
their carry depenedencies with MVT::Flag operands) and use clean and beautiful
EFLAGS dependences instead.

We do this by changing the modelling of SBB/ADC to have EFLAGS input and outputs
(which is what requires the previous scheduler change) and change X86 ISelLowering
to custom lower ADDC and friends down to X86ISD::ADD/ADC/SUB/SBB nodes.

With the previous series of changes, this causes no changes in the testsuite, woo.

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

13 years agoupdate comment.
Chris Lattner [Mon, 20 Dec 2010 00:56:59 +0000 (00:56 +0000)]
update comment.

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

13 years agoFix a bug in the scheduler's handling of "unspillable" vregs.
Chris Lattner [Mon, 20 Dec 2010 00:55:43 +0000 (00:55 +0000)]
Fix a bug in the scheduler's handling of "unspillable" vregs.
Imagine we see:

EFLAGS = inst1
EFLAGS = inst2 FLAGS
gpr = inst3 EFLAGS

Previously, we would refuse to schedule inst2 because it clobbers
the EFLAGS of the predecessor.  However, it also uses the EFLAGS
of the predecessor, so it is safe to emit.  SDep edges ensure that
the right order happens already anyway.

This fixes 2 testsuite crashes with the X86 patch I'm going to
commit next.

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

13 years agoAdd comment for testcase for 122206
Mon P Wang [Mon, 20 Dec 2010 00:54:26 +0000 (00:54 +0000)]
Add comment for testcase for 122206

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

13 years agothe result of CheckForLiveRegDef is dead, remove it.
Chris Lattner [Mon, 20 Dec 2010 00:51:56 +0000 (00:51 +0000)]
the result of CheckForLiveRegDef is dead, remove it.

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

13 years agoreduce indentation, no functionality change.
Chris Lattner [Mon, 20 Dec 2010 00:50:16 +0000 (00:50 +0000)]
reduce indentation, no functionality change.

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

13 years agoIgnore debug values when performing MachineVerifier liveness checks. Fixes
Cameron Zwarich [Mon, 20 Dec 2010 00:08:10 +0000 (00:08 +0000)]
Ignore debug values when performing MachineVerifier liveness checks. Fixes
PR8822.

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

13 years agoPrevents PerformShuffleCombine from creating a node with an illegal type after legali...
Mon P Wang [Sun, 19 Dec 2010 23:55:53 +0000 (23:55 +0000)]
Prevents PerformShuffleCombine from creating a node with an illegal type after legalize types
has run, e.g., prevent creating an i64 node from a v2i64 when i64 is not a legal type.

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

13 years agoEarly clobber operands are allowed to be defined at use indices. This fixes one
Cameron Zwarich [Sun, 19 Dec 2010 23:50:53 +0000 (23:50 +0000)]
Early clobber operands are allowed to be defined at use indices. This fixes one
half of PR8813.

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

13 years agofix an oversight caught by Frits!
Chris Lattner [Sun, 19 Dec 2010 23:24:04 +0000 (23:24 +0000)]
fix an oversight caught by Frits!

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

13 years agoUpdate the Target Feature Matrix for Mips
Bruno Cardoso Lopes [Sun, 19 Dec 2010 22:41:43 +0000 (22:41 +0000)]
Update the Target Feature Matrix for Mips

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

13 years agoFix PR8815 by checking for an explicit clobber def tied to a use operand in
Cameron Zwarich [Sun, 19 Dec 2010 22:12:45 +0000 (22:12 +0000)]
Fix PR8815 by checking for an explicit clobber def tied to a use operand in
ConnectedVNInfoEqClasses::Classify().

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

13 years agoimprove the setcc -> setcc_carry optimization to happen more
Chris Lattner [Sun, 19 Dec 2010 22:08:31 +0000 (22:08 +0000)]
improve the setcc -> setcc_carry optimization to happen more
consistently by moving it out of lowering into dag combine.

Add some missing patterns for matching away extended versions of setcc_c.

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

13 years agoFix PR8811 by teaching MachineVerifier about optional defs.
Cameron Zwarich [Sun, 19 Dec 2010 21:37:23 +0000 (21:37 +0000)]
Fix PR8811 by teaching MachineVerifier about optional defs.

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

13 years agoStrongPHIElimination will never run before TwoAddressInstructionPass.
Cameron Zwarich [Sun, 19 Dec 2010 21:32:29 +0000 (21:32 +0000)]
StrongPHIElimination will never run before TwoAddressInstructionPass.

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

13 years agosimplify some code to just reuse a setcc if we can instead of
Chris Lattner [Sun, 19 Dec 2010 21:23:48 +0000 (21:23 +0000)]
simplify some code to just reuse a setcc if we can instead of
going through the CSE maps to get it.

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

13 years agoUse the new way of silencing this warning.
Nick Lewycky [Sun, 19 Dec 2010 20:57:14 +0000 (20:57 +0000)]
Use the new way of silencing this warning.

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

13 years agoAdd missing standard headers. Patch by Joerg Sonnenberger!
Nick Lewycky [Sun, 19 Dec 2010 20:43:38 +0000 (20:43 +0000)]
Add missing standard headers. Patch by Joerg Sonnenberger!

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

13 years agoAdd missing std:: prefixes to some calls. C++ doesn't require that <cfoo>
Nick Lewycky [Sun, 19 Dec 2010 20:42:43 +0000 (20:42 +0000)]
Add missing std:: prefixes to some calls. C++ doesn't require that <cfoo>
headers provide symbols outside namespace std and the LLVM coding standards
state that we should prefix all of them.

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

13 years agoteach MaskedValueIsZero how to analyze ADDE. This is
Chris Lattner [Sun, 19 Dec 2010 20:38:28 +0000 (20:38 +0000)]
teach MaskedValueIsZero how to analyze ADDE.  This is
enough to teach it that ADDE(0,0) is known 0 except the
low bit, for example.

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

13 years agotidy up
Chris Lattner [Sun, 19 Dec 2010 20:24:28 +0000 (20:24 +0000)]
tidy up

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

13 years agonow that generic vector types aren't selected onto MMX operations,
Chris Lattner [Sun, 19 Dec 2010 20:19:20 +0000 (20:19 +0000)]
now that generic vector types aren't selected onto MMX operations,
we don't need -disable-mmx anymore.

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

13 years agonow that generic vector types aren't selected onto MMX registers, these
Chris Lattner [Sun, 19 Dec 2010 20:12:58 +0000 (20:12 +0000)]
now that generic vector types aren't selected onto MMX registers, these
tests don't need -disable-mmx.

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

13 years agoreduce copy/paste programming with the power of for loops.
Chris Lattner [Sun, 19 Dec 2010 20:07:10 +0000 (20:07 +0000)]
reduce copy/paste programming with the power of for loops.

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