oota-llvm.git
13 years agotests: Haste makes waste.
Daniel Dunbar [Thu, 19 Aug 2010 16:47:54 +0000 (16:47 +0000)]
tests: Haste makes waste.

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

13 years agotests: Ignore whitespace in llvm_supports_binding() and llvm_gcc_supports().
Daniel Dunbar [Thu, 19 Aug 2010 16:46:52 +0000 (16:46 +0000)]
tests: Ignore whitespace in llvm_supports_binding() and llvm_gcc_supports().

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

13 years agoSilence warning.
Eric Christopher [Thu, 19 Aug 2010 15:35:27 +0000 (15:35 +0000)]
Silence warning.

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

13 years agoMCELF: Count the section orders properly. Patch by Roman Divacky.
Benjamin Kramer [Thu, 19 Aug 2010 13:44:49 +0000 (13:44 +0000)]
MCELF: Count the section orders properly. Patch by Roman Divacky.

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

13 years agoFixed and reactivated a partial specialization test
Kenneth Uildriks [Thu, 19 Aug 2010 12:42:38 +0000 (12:42 +0000)]
Fixed and reactivated a partial specialization test

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

13 years agoUse std::string instead of StringRef in ClangAttrEmitter.cpp; per report on
Eli Friedman [Thu, 19 Aug 2010 06:11:05 +0000 (06:11 +0000)]
Use std::string instead of StringRef in ClangAttrEmitter.cpp; per report on
cfe-dev, fixes an error compiling with MSVC.  Using a StringRef here doesn't
look safe in any case.

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

13 years agoUpdate local stack block allocation to let PEI do the allocs if no additional
Jim Grosbach [Thu, 19 Aug 2010 02:47:08 +0000 (02:47 +0000)]
Update local stack block allocation to let PEI do the allocs if no additional
base registers were required. This will allow for slightly better packing
of the locals when alignment padding is necessary after callee saved registers.

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

13 years agoRevert r111199; it breaks -debug-pass=Structure output.
Dan Gohman [Thu, 19 Aug 2010 01:29:07 +0000 (01:29 +0000)]
Revert r111199; it breaks -debug-pass=Structure output.

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

13 years agoReapply the virtual register patch from 109102. The places where we were
Eric Christopher [Thu, 19 Aug 2010 01:25:50 +0000 (01:25 +0000)]
Reapply the virtual register patch from 109102. The places where we were
depending on the number of virtual registers appear to have all been handled
now.

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

13 years agofix PR7465, mishandling of lcall and ljmp: intersegment long
Chris Lattner [Thu, 19 Aug 2010 01:18:43 +0000 (01:18 +0000)]
fix PR7465, mishandling of lcall and ljmp: intersegment long
call and jumps.

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

13 years agoProcess the step before the start, because it's usually the simpler
Dan Gohman [Thu, 19 Aug 2010 01:02:31 +0000 (01:02 +0000)]
Process the step before the start, because it's usually the simpler
of the two.

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

13 years agominor progress towards fixing PR7465
Chris Lattner [Thu, 19 Aug 2010 01:00:34 +0000 (01:00 +0000)]
minor progress towards fixing PR7465

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

13 years agoAdd an AddOptionalDefs method and use it.
Eric Christopher [Thu, 19 Aug 2010 00:37:05 +0000 (00:37 +0000)]
Add an AddOptionalDefs method and use it.

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

13 years agolit/GoogleTest: Add .exe to the suffix when looking for tests.
Daniel Dunbar [Thu, 19 Aug 2010 00:22:45 +0000 (00:22 +0000)]
lit/GoogleTest: Add .exe to the suffix when looking for tests.

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

13 years agoAdd include missing for VC build.
Sean Hunt [Thu, 19 Aug 2010 00:19:03 +0000 (00:19 +0000)]
Add include missing for VC build.

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

13 years agoTestcase for llvm-gcc checkin 111482.
Dale Johannesen [Thu, 19 Aug 2010 00:09:07 +0000 (00:09 +0000)]
Testcase for llvm-gcc checkin 111482.

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

13 years agoAdd the "isCompare" attribute to the defm instead of each individual instr.
Bill Wendling [Thu, 19 Aug 2010 00:05:48 +0000 (00:05 +0000)]
Add the "isCompare" attribute to the defm instead of each individual instr.

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

13 years agoRemove three spurious semicolons
Sean Hunt [Thu, 19 Aug 2010 00:03:05 +0000 (00:03 +0000)]
Remove three spurious semicolons

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

13 years agoDon't call Predicate_* in Mips.
Jakob Stoklund Olesen [Wed, 18 Aug 2010 23:56:46 +0000 (23:56 +0000)]
Don't call Predicate_* in Mips.

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

13 years agoRemove extra header.
Eric Christopher [Wed, 18 Aug 2010 23:38:16 +0000 (23:38 +0000)]
Remove extra header.

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

13 years agoFinish full attribute class emission for clang.
Sean Hunt [Wed, 18 Aug 2010 23:23:09 +0000 (23:23 +0000)]
Finish full attribute class emission for clang.

For more information, see the accompanying clang patch.

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

13 years agoAdd a newline to debug output
Jim Grosbach [Wed, 18 Aug 2010 23:14:02 +0000 (23:14 +0000)]
Add a newline to debug output

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

13 years agorefix PR1143 by making basicaa analyze zexts of indices aggresively,
Chris Lattner [Wed, 18 Aug 2010 23:09:49 +0000 (23:09 +0000)]
refix PR1143 by making basicaa analyze zexts of indices aggresively,
which I broke with a recent patch.

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

13 years agoIf any def of a machine-sink candidate has local uses, it's obviously not safe to...
Evan Cheng [Wed, 18 Aug 2010 23:09:25 +0000 (23:09 +0000)]
If any def of a machine-sink candidate has local uses, it's obviously not safe to sink it to a successor block. This bug has been hidden because a later check for critical-edge disable these illegal optimizations. This patch should significantly reduce the amount of time spent on checking dominator information for obviously unsafe sinking.

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

13 years agoGetLinearExpression is only called when TD is non-null, pass as
Chris Lattner [Wed, 18 Aug 2010 22:52:09 +0000 (22:52 +0000)]
GetLinearExpression is only called when TD is non-null, pass as
a reference instead of pointer.

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

13 years agorework GEP decomposition to make a new VariableGEPIndex struct instead of
Chris Lattner [Wed, 18 Aug 2010 22:47:56 +0000 (22:47 +0000)]
rework GEP decomposition to make a new VariableGEPIndex struct instead of
using a pair.  This tidies up the code a bit.  While setting things up, add
a (currently unused) field to keep track of how the value is extended.

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

13 years agoEnable ARM base register reuse to local stack slot allocation. Whenever a new
Jim Grosbach [Wed, 18 Aug 2010 22:44:49 +0000 (22:44 +0000)]
Enable ARM base register reuse to local stack slot allocation. Whenever a new
frame index reference to an object in the local block is seen, check if
it's near enough to any previously allocaated base register to re-use.

rdar://8277890

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

13 years agoAdd a testcase to verify that commands don't crash when they hit
Dan Gohman [Wed, 18 Aug 2010 22:35:56 +0000 (22:35 +0000)]
Add a testcase to verify that commands don't crash when they hit
errors on stderr.

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

13 years agoMake raw_fd_ostream consider itself the owner of STDOUT_FILENO when
Dan Gohman [Wed, 18 Aug 2010 22:26:19 +0000 (22:26 +0000)]
Make raw_fd_ostream consider itself the owner of STDOUT_FILENO when
constructed with an output filename of "-". In particular, allow the
file descriptor to be closed, and close the file descriptor in the
destructor if it hasn't been explicitly closed already, to ensure
that any write errors are detected.

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

13 years agoWhen sending stats output to stdout for grepping, don't emit normal
Dan Gohman [Wed, 18 Aug 2010 22:22:44 +0000 (22:22 +0000)]
When sending stats output to stdout for grepping, don't emit normal
output to standard output also.

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

13 years agomove gep decomposition out of ValueTracking into BasicAA. The form of
Chris Lattner [Wed, 18 Aug 2010 22:07:29 +0000 (22:07 +0000)]
move gep decomposition out of ValueTracking into BasicAA.  The form of
decomposition that it is doing is very basicaa specific and is only used
by basicaa.

Now with less tree breakingness.

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

13 years agoTidy.
Dan Gohman [Wed, 18 Aug 2010 22:04:43 +0000 (22:04 +0000)]
Tidy.

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

13 years agoMinor simplification. Gets rid of a needless temporary.
Bill Wendling [Wed, 18 Aug 2010 21:32:07 +0000 (21:32 +0000)]
Minor simplification. Gets rid of a needless temporary.

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

13 years agoUse ConstantRange to propagate information through value definitions.
Owen Anderson [Wed, 18 Aug 2010 21:11:37 +0000 (21:11 +0000)]
Use ConstantRange to propagate information through value definitions.

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

13 years agoWhen sending stats output to stdout for grepping, don't emit normal
Dan Gohman [Wed, 18 Aug 2010 20:32:46 +0000 (20:32 +0000)]
When sending stats output to stdout for grepping, don't emit normal
output to standard output also.

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

13 years agoThinking about it, we don't need MachineDominatorTree after all. The DomValue
Jakob Stoklund Olesen [Wed, 18 Aug 2010 20:29:53 +0000 (20:29 +0000)]
Thinking about it, we don't need MachineDominatorTree after all. The DomValue
map discovers the iterated dominance frontier for free.

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

13 years agoIntroduce a ScopedFatalErrorHandler class to make it easy to register
Dan Gohman [Wed, 18 Aug 2010 20:16:39 +0000 (20:16 +0000)]
Introduce a ScopedFatalErrorHandler class to make it easy to register
fatal error handlers which automatically get unregistered at the end
of a scope.

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

13 years agoRevert r111394. It was too aggressive.
Jakob Stoklund Olesen [Wed, 18 Aug 2010 20:06:05 +0000 (20:06 +0000)]
Revert r111394. It was too aggressive.

We must complete the DFS, otherwise we might miss needed phi-defs, and
prematurely color live ranges with a non-dominating value.

This is not a big deal since we get to color more of the CFG and the next
mapValue call will be faster.

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

13 years agoAggressively prune the DFS when inserting phi-defs.
Jakob Stoklund Olesen [Wed, 18 Aug 2010 19:00:11 +0000 (19:00 +0000)]
Aggressively prune the DFS when inserting phi-defs.

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

13 years agoAdd the LiveIntervalMap class. Don't hook it up yet.
Jakob Stoklund Olesen [Wed, 18 Aug 2010 19:00:08 +0000 (19:00 +0000)]
Add the LiveIntervalMap class. Don't hook it up yet.

LiveIntervalMap maps values from a parent LiveInterval to a child interval that
is a strict subset. It will create phi-def values as needed to preserve the
VNInfo SSA form in the child interval.

This leads to an algorithm very similar to the one in SSAUpdaterImpl.h, but with
enough differences that the code can't be reused:

- We don't need to manipulate PHI instructions.
- LiveIntervals have kills.
- We have MachineDominatorTree.
- We can use df_iterator.

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

13 years agoAdd df_iterator::getPathLength and getPath as a way of getting a path from the
Jakob Stoklund Olesen [Wed, 18 Aug 2010 19:00:05 +0000 (19:00 +0000)]
Add df_iterator::getPathLength and getPath as a way of getting a path from the
entry node to the current node.

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

13 years agoRevert r111375, "move gep decomposition out of ValueTracking into BasicAA. The
Daniel Dunbar [Wed, 18 Aug 2010 18:43:08 +0000 (18:43 +0000)]
Revert r111375, "move gep decomposition out of ValueTracking into BasicAA.  The
form of", it doesn't pass tests.

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

13 years agoImprove whitespace.
Bill Wendling [Wed, 18 Aug 2010 18:41:13 +0000 (18:41 +0000)]
Improve whitespace.

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

13 years agoMarked with ATTRIBUTE_USED so that clang doesn't complain.
Bill Wendling [Wed, 18 Aug 2010 18:40:57 +0000 (18:40 +0000)]
Marked with ATTRIBUTE_USED so that clang doesn't complain.

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

13 years agoInform LazyValueInfo whenever a block is deleted, to avoid dangling pointer issues.
Owen Anderson [Wed, 18 Aug 2010 18:39:01 +0000 (18:39 +0000)]
Inform LazyValueInfo whenever a block is deleted, to avoid dangling pointer issues.

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

13 years agoMC/ELF: Allow null values in virtual sections, ELF doesn't use special
Daniel Dunbar [Wed, 18 Aug 2010 18:22:37 +0000 (18:22 +0000)]
MC/ELF: Allow null values in virtual sections, ELF doesn't use special
directives for putting contents in .bss, for example.

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

13 years agomove gep decomposition out of ValueTracking into BasicAA. The form of
Chris Lattner [Wed, 18 Aug 2010 18:22:17 +0000 (18:22 +0000)]
move gep decomposition out of ValueTracking into BasicAA.  The form of
decomposition that it is doing is very basicaa specific and is only used
by basicaa.

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

13 years agoAdd hook for re-using virtual base registers for local stack slot access.
Jim Grosbach [Wed, 18 Aug 2010 17:57:37 +0000 (17:57 +0000)]
Add hook for re-using virtual base registers for local stack slot access.
Nothing fancy, just ask the target if any currently available base reg
is in range for the instruction under consideration and use the first one
that is. Placeholder ARM implementation simply returns false for now.

ongoing saga of rdar://8277890

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

13 years agoEliminate some redundancy by relying on raw_fd_ostream to handle "-"
Dan Gohman [Wed, 18 Aug 2010 17:55:15 +0000 (17:55 +0000)]
Eliminate some redundancy by relying on raw_fd_ostream to handle "-"
properly.

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

13 years agoAllow the -analyze option to follow the -o option, which defaults to
Dan Gohman [Wed, 18 Aug 2010 17:42:59 +0000 (17:42 +0000)]
Allow the -analyze option to follow the -o option, which defaults to
standard output, instead of just hardcoding outs().

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

13 years agoDon't translate "-" to outs() manually; raw_ostream does that automatically.
Dan Gohman [Wed, 18 Aug 2010 17:40:10 +0000 (17:40 +0000)]
Don't translate "-" to outs() manually; raw_ostream does that automatically.

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

13 years agoDon't translate "-" to outs() manually; raw_ostream does that
Dan Gohman [Wed, 18 Aug 2010 17:26:50 +0000 (17:26 +0000)]
Don't translate "-" to outs() manually; raw_ostream does that
automatically.

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

13 years agoDon't register stdout to be deleted on a signal.
Dan Gohman [Wed, 18 Aug 2010 17:21:42 +0000 (17:21 +0000)]
Don't register stdout to be deleted on a signal.

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

13 years agoRemove an unused command-line option.
Dan Gohman [Wed, 18 Aug 2010 17:20:51 +0000 (17:20 +0000)]
Remove an unused command-line option.

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

13 years agoPreserve subregs on PHI source operands. Patch by Krister Wombell!
Jakob Stoklund Olesen [Wed, 18 Aug 2010 16:09:47 +0000 (16:09 +0000)]
Preserve subregs on PHI source operands. Patch by Krister Wombell!

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

13 years agoFix a bug with insertelement on SPU.
Kalle Raiskila [Wed, 18 Aug 2010 10:20:29 +0000 (10:20 +0000)]
Fix a bug with insertelement on SPU.
The previous algorithm in LowerVECTOR_SHUFFLE
didn't check all requirements for "monotonic" shuffles.

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

13 years agoRemove all traces of v2[i,f]32 on SPU.
Kalle Raiskila [Wed, 18 Aug 2010 10:04:39 +0000 (10:04 +0000)]
Remove all traces of v2[i,f]32 on SPU.

The "half vectors" are now widened to full size by the legalizer.
The only exception is in parameter passing, where half vectors are
expanded. This causes changes to some dejagnu tests.

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

13 years agoChange SPU C calling convention to match that described in
Kalle Raiskila [Wed, 18 Aug 2010 09:50:30 +0000 (09:50 +0000)]
Change SPU C calling convention to match that described in
"SPU Application Binary Interface Specification, v1.9" by
IBM.
Specifically: use r3-r74 to pass parameters and the return value.

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

13 years agofix a buggy test
Chris Lattner [Wed, 18 Aug 2010 04:55:12 +0000 (04:55 +0000)]
fix a buggy test

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

13 years agofix PR7589: In brief:
Chris Lattner [Wed, 18 Aug 2010 04:28:19 +0000 (04:28 +0000)]
fix PR7589: In brief:
  gep P, (zext x) != gep P, (sext x)

DecomposeGEPExpression was getting this wrong, confusing
basicaa.

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

13 years agofilecheckize and detrivialize.
Chris Lattner [Wed, 18 Aug 2010 04:25:43 +0000 (04:25 +0000)]
filecheckize and detrivialize.

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

13 years agoFix PR7755: knowing something about an inval for a pred
Chris Lattner [Wed, 18 Aug 2010 03:14:36 +0000 (03:14 +0000)]
Fix PR7755: knowing something about an inval for a pred
from the LHS should disable reconsidering that pred on the
RHS.  However, knowing something about the pred on the RHS
shouldn't disable subsequent additions on the RHS from
happening.

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

13 years agofit in 80 cols
Chris Lattner [Wed, 18 Aug 2010 03:13:35 +0000 (03:13 +0000)]
fit in 80 cols

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

13 years agoremove some dead code.
Chris Lattner [Wed, 18 Aug 2010 02:42:11 +0000 (02:42 +0000)]
remove some dead code.

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

13 years agoremove some dead code.
Chris Lattner [Wed, 18 Aug 2010 02:41:56 +0000 (02:41 +0000)]
remove some dead code.

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

13 years agoremove some code that is dead now that lea's are modeled with segment registers.
Chris Lattner [Wed, 18 Aug 2010 02:40:44 +0000 (02:40 +0000)]
remove some code that is dead now that lea's are modeled with segment registers.

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

13 years agoremove dead prototype.
Chris Lattner [Wed, 18 Aug 2010 02:37:06 +0000 (02:37 +0000)]
remove dead prototype.

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

13 years agoExpand ZERO_EXTEND operations for NEON vector types.
Bob Wilson [Wed, 18 Aug 2010 01:45:52 +0000 (01:45 +0000)]
Expand ZERO_EXTEND operations for NEON vector types.
Testcase from Nick Lewycky.

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

13 years agoFix the "Finished Creating" messages for aliases to print the
Dan Gohman [Wed, 18 Aug 2010 01:35:53 +0000 (01:35 +0000)]
Fix the "Finished Creating" messages for aliases to print the
right name.

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

13 years agoRevert r111321. This doesn't fix a problem.
Dan Gohman [Wed, 18 Aug 2010 01:34:52 +0000 (01:34 +0000)]
Revert r111321. This doesn't fix a problem.

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

13 years agostomp some more undefined behavior, PR7775.
Chris Lattner [Wed, 18 Aug 2010 00:33:47 +0000 (00:33 +0000)]
stomp some more undefined behavior, PR7775.

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

13 years agodon't emit zero bit fields with Emit, fixing undefined behavior,
Chris Lattner [Wed, 18 Aug 2010 00:29:18 +0000 (00:29 +0000)]
don't emit zero bit fields with Emit, fixing undefined behavior,
PR7778

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

13 years agoDon't pass in a null pointer to std::string's ctor, an empty string
Chris Lattner [Wed, 18 Aug 2010 00:11:25 +0000 (00:11 +0000)]
Don't pass in a null pointer to std::string's ctor, an empty string
ref should produce an empty std::string.  This fixes PR7879.

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

13 years agofix a broken link
Chris Lattner [Tue, 17 Aug 2010 23:26:04 +0000 (23:26 +0000)]
fix a broken link

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

13 years agoinclude config.h to get config params, hopefully unbreaking mingw builder.
Chris Lattner [Tue, 17 Aug 2010 23:22:10 +0000 (23:22 +0000)]
include config.h to get config params, hopefully unbreaking mingw builder.

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

13 years agoFix the rest of rdar://8318441 which happens when a raw_fd_ostream
Chris Lattner [Tue, 17 Aug 2010 23:11:56 +0000 (23:11 +0000)]
Fix the rest of rdar://8318441 which happens when a raw_fd_ostream
(e.g. errs()) fails in close() due to (e.g.) a broken pipe.  As
previously written, the had_error() flag would get set and then
the raw_ostream dtor would report a fatal error.  There is nothing
the client can do about this and we have no way to report the error,
so just eat it.

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

13 years agoreport_fatal_error can't use errs(), because errs() can call
Chris Lattner [Tue, 17 Aug 2010 23:03:53 +0000 (23:03 +0000)]
report_fatal_error can't use errs(), because errs() can call
into report_fatal_error.  Just blast the string to stderr with write(2)
and hope for the best!  Part of rdar://8318441

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

13 years agoTemporarily revert r110987 as it's causing some miscompares in
Eric Christopher [Tue, 17 Aug 2010 22:55:27 +0000 (22:55 +0000)]
Temporarily revert r110987 as it's causing some miscompares in
vector heavy code.  I'll re-enable when we've tracked down the problem.

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

13 years agoTweak IVUsers' concept of "interesting" to exclude add recurrences
Dan Gohman [Tue, 17 Aug 2010 22:50:37 +0000 (22:50 +0000)]
Tweak IVUsers' concept of "interesting" to exclude add recurrences
where the step value is an induction variable from an outer loop, to
avoid trouble trying to re-expand such expressions. This effectively
hides such expressions from indvars and lsr, which prevents them
from getting into trouble.

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

13 years agoAdd materialization of virtual base registers for frame indices allocated into
Jim Grosbach [Tue, 17 Aug 2010 22:41:55 +0000 (22:41 +0000)]
Add materialization of virtual base registers for frame indices allocated into
the local block. Resolve references to those indices to a new base register.
For simplification and testing purposes, a new virtual base register is
allocated for each frame index being resolved. The result is truly horrible,
but correct, code that's good for exercising the new code paths.

Next up is adding thumb1 support, which should be very simple. Following that
will be adding base register re-use and implementing a reasonable ARM
heuristic for when a virtual base register should be generated at all.

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

13 years agoAdd nounwind.
Evan Cheng [Tue, 17 Aug 2010 22:35:20 +0000 (22:35 +0000)]
Add nounwind.

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

13 years agoCrashRecovery: Clear the current context on the first crash, to avoid re-entering...
Daniel Dunbar [Tue, 17 Aug 2010 22:32:39 +0000 (22:32 +0000)]
CrashRecovery: Clear the current context on the first crash, to avoid re-entering it if the cleanup code crashes.

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

13 years agoCrashRecovery: Add CrashRecoveryContext::GetCurrent(), so clients can find the active...
Daniel Dunbar [Tue, 17 Aug 2010 22:32:37 +0000 (22:32 +0000)]
CrashRecovery: Add CrashRecoveryContext::GetCurrent(), so clients can find the active context from anywhere.

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

13 years agoCrashRecovery: Make CrashRecoveryContext static methods thread safe.
Daniel Dunbar [Tue, 17 Aug 2010 22:32:34 +0000 (22:32 +0000)]
CrashRecovery: Make CrashRecoveryContext static methods thread safe.

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

13 years agoMake fast scheduler handle asm clobbers correctly.
Dale Johannesen [Tue, 17 Aug 2010 22:17:24 +0000 (22:17 +0000)]
Make fast scheduler handle asm clobbers correctly.
PR 7882.  Follows suggestion by Amaury Pouly, thanks.

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

13 years agoRevert part of one of the prev. patches - tailjmp will follow later.
Anton Korobeynikov [Tue, 17 Aug 2010 21:08:28 +0000 (21:08 +0000)]
Revert part of one of the prev. patches - tailjmp will follow later.

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

13 years agoMore fixes for win64:
Anton Korobeynikov [Tue, 17 Aug 2010 21:06:07 +0000 (21:06 +0000)]
More fixes for win64:
  - Do not clobber al during variadic calls, this is AMD64 ABI-only feature
  - Emit wincall64, where necessary
Patch by Cameron Esfahani!

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

13 years agoEnable more win64 calls folding opportunities.
Anton Korobeynikov [Tue, 17 Aug 2010 21:06:01 +0000 (21:06 +0000)]
Enable more win64 calls folding opportunities.
Patch by Cameron Esfahani!

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

13 years agoAdd some win64 coff goodness.
Anton Korobeynikov [Tue, 17 Aug 2010 21:05:54 +0000 (21:05 +0000)]
Add some win64 coff goodness.
Patch by Cameron Esfahani!

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

13 years agoPHI elimination shouldn't require machineloopinfo since it's used at -O0. Move the...
Evan Cheng [Tue, 17 Aug 2010 21:00:37 +0000 (21:00 +0000)]
PHI elimination shouldn't require machineloopinfo since it's used at -O0. Move the requirement to LiveIntervalAnalysis instead. Note this does not change the number of times machineloopinfo is computed.

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

13 years agoMachine CSE preserves CFG. Pass manager was freeing machineloopinfo after machine...
Evan Cheng [Tue, 17 Aug 2010 20:57:42 +0000 (20:57 +0000)]
Machine CSE preserves CFG. Pass manager was freeing machineloopinfo after machine cse before.

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

13 years agoDon't call tablegen'ed Predicate_* functions in the ARM target.
Jakob Stoklund Olesen [Tue, 17 Aug 2010 20:39:04 +0000 (20:39 +0000)]
Don't call tablegen'ed Predicate_* functions in the ARM target.

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

13 years agosilence warning
Jim Grosbach [Tue, 17 Aug 2010 20:21:30 +0000 (20:21 +0000)]
silence warning

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

13 years agoRemove dead code. Fixes a GCC warning.
Benjamin Kramer [Tue, 17 Aug 2010 19:45:05 +0000 (19:45 +0000)]
Remove dead code. Fixes a GCC warning.

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

13 years agoThis patch enables "make unittests" on enable-shared/mingw.
Anton Korobeynikov [Tue, 17 Aug 2010 19:34:40 +0000 (19:34 +0000)]
This patch enables "make unittests" on enable-shared/mingw.
Patch by Takumi Nakamura!

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

13 years agoThis patch enables ENABLE_SHARED=1 to build DLL based LLVM toolchain on MingW & Cygwin.
Anton Korobeynikov [Tue, 17 Aug 2010 19:03:03 +0000 (19:03 +0000)]
This patch enables ENABLE_SHARED=1 to build DLL based LLVM toolchain on MingW & Cygwin.
Patch by Takumi Nakamura!

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

13 years ago80 column cleanup.
Jim Grosbach [Tue, 17 Aug 2010 18:39:16 +0000 (18:39 +0000)]
80 column cleanup.

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

13 years agoSketch i386 relocations handling, from Roman Divacky.
Benjamin Kramer [Tue, 17 Aug 2010 18:20:28 +0000 (18:20 +0000)]
Sketch i386 relocations handling, from Roman Divacky.

Hello world builds & runs now on i386/ELF with -integrated-as.

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

13 years agoDon't call Predicate_* methods directly from Sparc target.
Jakob Stoklund Olesen [Tue, 17 Aug 2010 18:17:12 +0000 (18:17 +0000)]
Don't call Predicate_* methods directly from Sparc target.
Modernize predicates a bit.

The Predicate_* methods are not used by TableGen any longer. They are only
emitted for the sake of legacy code.

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

13 years agoAdd hook to examine an instruction referencing a frame index to determine
Jim Grosbach [Tue, 17 Aug 2010 18:13:53 +0000 (18:13 +0000)]
Add hook to examine an instruction referencing a frame index to determine
whether to allocate a virtual frame base register to resolve the frame
index reference in it. Implement a simple version for ARM to aid debugging.

In LocalStackSlotAllocation, scan the function for frame index references
to local frame indices and ask the target whether to allocate virtual
frame base registers for any it encounters. Purely infrastructural for
debug output. Next step is to actually allocate base registers, then add
intelligent re-use of them.

rdar://8277890

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