oota-llvm.git
14 years agoFix buildbots.
Bob Wilson [Wed, 18 Nov 2009 23:30:38 +0000 (23:30 +0000)]
Fix buildbots.

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

14 years agoAdd XCore support for indirectbr / blockaddress.
Richard Osborne [Wed, 18 Nov 2009 23:20:42 +0000 (23:20 +0000)]
Add XCore support for indirectbr / blockaddress.

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

14 years agoDe-bork CMake build
Douglas Gregor [Wed, 18 Nov 2009 23:20:09 +0000 (23:20 +0000)]
De-bork CMake build

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

14 years agoAttempt #2:
Bill Wendling [Wed, 18 Nov 2009 23:18:46 +0000 (23:18 +0000)]
Attempt #2:

Place the EH table in the __TEXT section on MachO. It saves space.

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

14 years agoTail duplication still needs to iterate. Duplicating new instructions onto
Bob Wilson [Wed, 18 Nov 2009 22:52:37 +0000 (22:52 +0000)]
Tail duplication still needs to iterate.  Duplicating new instructions onto
the tail of a block may make that block a new candidate for duplication.

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

14 years agoAdd another statistic to measure code size due to tail duplication.
Bob Wilson [Wed, 18 Nov 2009 22:12:31 +0000 (22:12 +0000)]
Add another statistic to measure code size due to tail duplication.

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

14 years agoRemove spurious @verbatim. Patch by Timo Juhani Lindfors!
Jeffrey Yasskin [Wed, 18 Nov 2009 22:04:44 +0000 (22:04 +0000)]
Remove spurious @verbatim.  Patch by Timo Juhani Lindfors!

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

14 years agoNot all ASM has # for comments.
Bill Wendling [Wed, 18 Nov 2009 21:54:13 +0000 (21:54 +0000)]
Not all ASM has # for comments.

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

14 years agoFix PR5300.
Jakob Stoklund Olesen [Wed, 18 Nov 2009 21:33:35 +0000 (21:33 +0000)]
Fix PR5300.

When TwoAddressInstructionPass deletes a dead instruction, make sure that all
register kills are accounted for. The 2-addr register does not get special
treatment.

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

14 years agoTableGen: Add initial backend for clang Driver's option parsing.
Daniel Dunbar [Wed, 18 Nov 2009 21:29:51 +0000 (21:29 +0000)]
TableGen: Add initial backend for clang Driver's option parsing.

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

14 years agoAllow the machine verifier to be run outside the PassManager.
Jakob Stoklund Olesen [Wed, 18 Nov 2009 20:36:57 +0000 (20:36 +0000)]
Allow the machine verifier to be run outside the PassManager.

Verify LiveVariables information when present.

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

14 years agoRemove the -early-coalescing option
Jakob Stoklund Olesen [Wed, 18 Nov 2009 20:36:47 +0000 (20:36 +0000)]
Remove the -early-coalescing option

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

14 years agoFixed the in-place spiller and trivial rewriter, which had been broken by the recent...
Lang Hames [Wed, 18 Nov 2009 20:31:20 +0000 (20:31 +0000)]
Fixed the in-place spiller and trivial rewriter, which had been broken by the recent SlotIndexes work.

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

14 years agoAdded getDefaultSubtargetFeatures method to SubtargetFeatures class which returns...
Viktor Kutuzov [Wed, 18 Nov 2009 20:20:05 +0000 (20:20 +0000)]
Added getDefaultSubtargetFeatures method to SubtargetFeatures class which returns a correct feature string for given triple.

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

14 years agoAdd statistics for tail duplication.
Bob Wilson [Wed, 18 Nov 2009 19:29:37 +0000 (19:29 +0000)]
Add statistics for tail duplication.

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

14 years agoAdd ARMv6 itineraries.
David Goodwin [Wed, 18 Nov 2009 18:39:57 +0000 (18:39 +0000)]
Add ARMv6 itineraries.

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

14 years agoFix a few places that were missed when we converted to unified syntax.
Bob Wilson [Wed, 18 Nov 2009 18:10:35 +0000 (18:10 +0000)]
Fix a few places that were missed when we converted to unified syntax.

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

14 years agoDon't require LiveVariables for PHIElimination. Enable critical edge splitting
Jakob Stoklund Olesen [Wed, 18 Nov 2009 18:01:35 +0000 (18:01 +0000)]
Don't require LiveVariables for PHIElimination. Enable critical edge splitting
when LiveVariables is available.

The -split-phi-edges is now gone, and so is the hack to disable it when using
the local register allocator. The PHIElimination pass no longer has
LiveVariables as a prerequisite - that is what broke the local allocator.
Instead we do critical edge splitting when possible - that is when
LiveVariables is available.

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

14 years agoTurn LLVM_BUILD_EXAMPLES off by default in CMake builds, to match Makefiles &
Daniel Dunbar [Wed, 18 Nov 2009 17:42:22 +0000 (17:42 +0000)]
Turn LLVM_BUILD_EXAMPLES off by default in CMake builds, to match Makefiles &
Clang.

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

14 years agolit: Fix exclude dirs functionality.
Daniel Dunbar [Wed, 18 Nov 2009 17:42:17 +0000 (17:42 +0000)]
lit: Fix exclude dirs functionality.

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

14 years agoFix passing of float arguments through ffi.
Nick Lewycky [Wed, 18 Nov 2009 05:43:15 +0000 (05:43 +0000)]
Fix passing of float arguments through ffi.

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

14 years agoAdd a target hook to allow changing the tail duplication limit based on the
Bob Wilson [Wed, 18 Nov 2009 03:34:27 +0000 (03:34 +0000)]
Add a target hook to allow changing the tail duplication limit based on the
contents of the block to be duplicated.  Use this for ARM Cortex A8/9 to
be more aggressive tail duplicating indirect branches, since it makes it
much more likely that they will be predicted in the branch target buffer.
Testcase coming soon.

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

14 years agoThe llvm-gcc front-end and the pass manager use two separate TargetData objects.
Bill Wendling [Wed, 18 Nov 2009 01:03:56 +0000 (01:03 +0000)]
The llvm-gcc front-end and the pass manager use two separate TargetData objects.
This is probably not confined to *just* these two things.

Anyway, the llvm-gcc front-end may look up the structure layout information for
an abstract type. That information will be stored into a table with the FE's
TD. Instruction combine can come along and also ask for information on that
abstract type, but for a separate TD (the one associated with the pass manager).

After the type is refined, the old structure layout information in the pass
manager's TD file is out of date. If a new type is allocated in the same space
as the old-unrefined type, then the structure type information in the pass
manager's TD file will be wrong, but won't know it.

Fix this by making the TD's structure type information an abstract type user.

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

14 years agoSimplify ComputeMultiple so that it doesn't depend on TargetData.
Dan Gohman [Wed, 18 Nov 2009 00:58:27 +0000 (00:58 +0000)]
Simplify ComputeMultiple so that it doesn't depend on TargetData.

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

14 years agoFix inverted test and add testcase from failing self-host.
Jakob Stoklund Olesen [Wed, 18 Nov 2009 00:02:18 +0000 (00:02 +0000)]
Fix inverted test and add testcase from failing self-host.

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

14 years agoRemove dead code.
Devang Patel [Tue, 17 Nov 2009 22:39:08 +0000 (22:39 +0000)]
Remove dead code.

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

14 years agoAdd ability to set code model within the execution engine builders
Eric Christopher [Tue, 17 Nov 2009 21:58:16 +0000 (21:58 +0000)]
Add ability to set code model within the execution engine builders
and creation interfaces.

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

14 years agoRemove fragile test.
Jakob Stoklund Olesen [Tue, 17 Nov 2009 21:52:40 +0000 (21:52 +0000)]
Remove fragile test.

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

14 years agogrammar
Jim Grosbach [Tue, 17 Nov 2009 21:37:04 +0000 (21:37 +0000)]
grammar

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

14 years agoEnable arm jumpt table adjustment.
Jim Grosbach [Tue, 17 Nov 2009 21:24:11 +0000 (21:24 +0000)]
Enable arm jumpt table adjustment.

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

14 years agoDisable -split-phi-edges to unbreak the buildbots
Jakob Stoklund Olesen [Tue, 17 Nov 2009 21:23:49 +0000 (21:23 +0000)]
Disable -split-phi-edges to unbreak the buildbots

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

14 years agoNever call UpdateTerminator() when AnalyzeBranch would fail.
Jakob Stoklund Olesen [Tue, 17 Nov 2009 20:46:00 +0000 (20:46 +0000)]
Never call UpdateTerminator() when AnalyzeBranch would fail.

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

14 years agoForgot to commit test fixes
Anton Korobeynikov [Tue, 17 Nov 2009 20:38:36 +0000 (20:38 +0000)]
Forgot to commit test fixes

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

14 years agoBoth Darwin as and GNU as violate ARM docs wrt printing of addrmode6
Anton Korobeynikov [Tue, 17 Nov 2009 20:04:59 +0000 (20:04 +0000)]
Both Darwin as and GNU as violate ARM docs wrt printing of addrmode6
alignment imm (in the same way). Fix asmprinting for non-darwin platforms.

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

14 years agoAdd a WriteAsOperand for MachineBasicBlock so MachineLoopInfo dump looks sane.
Evan Cheng [Tue, 17 Nov 2009 19:19:59 +0000 (19:19 +0000)]
Add a WriteAsOperand for MachineBasicBlock so MachineLoopInfo dump looks sane.

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

14 years agoFix comment.
Evan Cheng [Tue, 17 Nov 2009 19:19:01 +0000 (19:19 +0000)]
Fix comment.

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

14 years agoEnable -split-phi-edges by default, except when -regalloc=local.
Jakob Stoklund Olesen [Tue, 17 Nov 2009 19:15:50 +0000 (19:15 +0000)]
Enable -split-phi-edges by default, except when -regalloc=local.

The local register allocator doesn't like it when LiveVariables is run.
We should also disable edge splitting under -O0, but that has to wait a bit.

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

14 years ago80-column violations
Jim Grosbach [Tue, 17 Nov 2009 19:05:35 +0000 (19:05 +0000)]
80-column violations

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

14 years agoAdded getArchNameForAssembler method to the Triple class for which returns OS and...
Viktor Kutuzov [Tue, 17 Nov 2009 18:48:27 +0000 (18:48 +0000)]
Added getArchNameForAssembler method to the Triple class for which returns OS and Vendor independent target assembler arch.

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

14 years agoRemove a special case for tail merging that seems to be both broken and
Bob Wilson [Tue, 17 Nov 2009 18:30:09 +0000 (18:30 +0000)]
Remove a special case for tail merging that seems to be both broken and
unnecessary.  It is broken because the "isIdenticalTo" check should be
negated.  If that is fixed, this code causes the CodeGen/X86/tail-opts.ll
test to fail, in the dont_merge_oddly function.  And, I confirmed that the
regression is real -- the generated code is worse.  As far as I can tell,
that tail-opts.ll test is checking for what this code is supposed to handle
and we're doing the right thing anyway.

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

14 years agoGeneralize OptimizeLoopTermCond to optimize more loop terminating icmp to use postinc iv.
Evan Cheng [Tue, 17 Nov 2009 18:10:11 +0000 (18:10 +0000)]
Generalize OptimizeLoopTermCond to optimize more loop terminating icmp to use postinc iv.

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

14 years agoSet MadeChange instead of MadeChangeThisIteration.
Dan Gohman [Tue, 17 Nov 2009 18:04:15 +0000 (18:04 +0000)]
Set MadeChange instead of MadeChangeThisIteration.

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

14 years agoRevert CPU detection code to return "generic" instead of an empty string in case
Benjamin Kramer [Tue, 17 Nov 2009 17:57:04 +0000 (17:57 +0000)]
Revert CPU detection code to return "generic" instead of an empty string in case
of failure. The x86 target didn't like empty cpu names and broke x86 tests on
non-x86 buildbots.

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

14 years agoRemove trailing whitespace
Jim Grosbach [Tue, 17 Nov 2009 17:53:56 +0000 (17:53 +0000)]
Remove trailing whitespace

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

14 years agoUpdate a comment, now that tail duplication happens after other branch
Bob Wilson [Tue, 17 Nov 2009 17:40:31 +0000 (17:40 +0000)]
Update a comment, now that tail duplication happens after other branch
folding optimizations.

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

14 years agoSet Inst{15-12} (Rd/Rt) to 0b1111 (PC) for BR_JTadd, BR_JTr, and BR_JTm to
Johnny Chen [Tue, 17 Nov 2009 17:17:50 +0000 (17:17 +0000)]
Set Inst{15-12} (Rd/Rt) to 0b1111 (PC) for BR_JTadd, BR_JTr, and BR_JTm to
distinguish between them and the more generic instructions (add, mov, and ldr).

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

14 years agoPerform tail duplication only once, after tail merging is complete.
Bob Wilson [Tue, 17 Nov 2009 17:06:18 +0000 (17:06 +0000)]
Perform tail duplication only once, after tail merging is complete.
It was too difficult to keep the heuristics for merging and duplication
consistent.

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

14 years agoadd Case() with 5 args
Nuno Lopes [Tue, 17 Nov 2009 15:35:39 +0000 (15:35 +0000)]
add Case() with 5 args

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

14 years agoFix HTML formatting.
Jay Foad [Tue, 17 Nov 2009 13:13:59 +0000 (13:13 +0000)]
Fix HTML formatting.

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

14 years ago1. Allow SCCIterator to work with GraphT types that are constant.
Duncan Sands [Tue, 17 Nov 2009 10:54:25 +0000 (10:54 +0000)]
1.  Allow SCCIterator to work with GraphT types that are constant.
2.  Allow SCCIterator to work with inverse graphs.
3.  Fix an incorrect comment in GraphTraits.h (the type in the comment
was given as GraphType* when it is actually const GraphType &).
Patch by Patrick Alexander Simmons.

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

14 years agoMake bugpoint pass -load arguments to LLI. This lets one use bugpoint with
Duncan Sands [Tue, 17 Nov 2009 10:20:22 +0000 (10:20 +0000)]
Make bugpoint pass -load arguments to LLI.  This lets one use bugpoint with
programs that depend on native shared libraries.  Patch by Timo Lindfors.

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

14 years agoRevert 89021. It's miscompiling llvm-gcc driver driver at -O0.
Evan Cheng [Tue, 17 Nov 2009 09:55:52 +0000 (09:55 +0000)]
Revert 89021. It's miscompiling llvm-gcc driver driver at -O0.

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

14 years agoRe-apply 89011. It's not to be blamed.
Evan Cheng [Tue, 17 Nov 2009 09:51:18 +0000 (09:51 +0000)]
Re-apply 89011. It's not to be blamed.

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

14 years ago"XFAIL" the Split2 StringReft test with Apple gcc, which miscompiles it.
Daniel Dunbar [Tue, 17 Nov 2009 09:29:59 +0000 (09:29 +0000)]
"XFAIL" the Split2 StringReft test with Apple gcc, which miscompiles it.
 - I plan on fixing/workarounding this, but until then I'd like the bots to stay
   green.

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

14 years agoRevert 89011. Buildbot thinks it might be breaking stuff.
Evan Cheng [Tue, 17 Nov 2009 09:20:28 +0000 (09:20 +0000)]
Revert 89011. Buildbot thinks it might be breaking stuff.

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

14 years agoRemove VISIBILITY_HIDDEN from the classes in this directory. Fixes bug 5507.
Nick Lewycky [Tue, 17 Nov 2009 09:17:08 +0000 (09:17 +0000)]
Remove VISIBILITY_HIDDEN from the classes in this directory. Fixes bug 5507.

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

14 years agoFollowing a suggestion of Daniel Dunbar, stop people passing the name
Duncan Sands [Tue, 17 Nov 2009 08:34:52 +0000 (08:34 +0000)]
Following a suggestion of Daniel Dunbar, stop people passing the name
as the isSigned bool to CreateIntCast by having this resolve to a call
to a private method, rather than by using a gcc attribute.

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

14 years agoRevert r88939.
Nick Lewycky [Tue, 17 Nov 2009 08:11:44 +0000 (08:11 +0000)]
Revert r88939.

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

14 years agoFail less mysteriously; inform the user that their LLVM was not built with
Nick Lewycky [Tue, 17 Nov 2009 07:52:09 +0000 (07:52 +0000)]
Fail less mysteriously; inform the user that their LLVM was not built with
libffi support and that the interpreter can't call external functions without
it. Patch by Timo Juhani Lindfors! Fixes PR5466.

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

14 years agoFixed call to wrong constructor.
Lang Hames [Tue, 17 Nov 2009 07:19:50 +0000 (07:19 +0000)]
Fixed call to wrong constructor.

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

14 years agoFix a race condition in the Timer class.
Owen Anderson [Tue, 17 Nov 2009 07:06:10 +0000 (07:06 +0000)]
Fix a race condition in the Timer class.

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

14 years agoRefactor the code that creates the "dot-label" difference. This may be used in
Bill Wendling [Tue, 17 Nov 2009 01:23:53 +0000 (01:23 +0000)]
Refactor the code that creates the "dot-label" difference. This may be used in
more than one place. No intended functionality change.

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

14 years agoWhen moving a block for table jumps, make sure the prior block terminator
Jim Grosbach [Tue, 17 Nov 2009 01:21:04 +0000 (01:21 +0000)]
When moving a block for table jumps, make sure the prior block terminator
is analyzable so it can be updated. If it's not, be safe and don't move the
block.

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

14 years agoEnable -split-phi-edges by default
Jakob Stoklund Olesen [Tue, 17 Nov 2009 01:07:22 +0000 (01:07 +0000)]
Enable -split-phi-edges by default

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

14 years agoMOV64rm should be marked isReMaterializable.
Evan Cheng [Tue, 17 Nov 2009 00:55:55 +0000 (00:55 +0000)]
MOV64rm should be marked isReMaterializable.

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

14 years agoRemove the optimizations that convert BRCOND and BR_CC into
Dan Gohman [Tue, 17 Nov 2009 00:47:23 +0000 (00:47 +0000)]
Remove the optimizations that convert BRCOND and BR_CC into
unconditional branches or fallthroghes. Instcombine/SimplifyCFG
should be simplifying branches with known conditions.

This fixes some problems caused by these transformations not
updating the MachineBasicBlock CFG.

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

14 years agoRemove debug info attached with an instruction.
Devang Patel [Tue, 17 Nov 2009 00:47:06 +0000 (00:47 +0000)]
Remove debug info attached with an instruction.

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

14 years agoIn GlobalVariable::setInitializer, assert that the initializer has the
Jeffrey Yasskin [Tue, 17 Nov 2009 00:43:13 +0000 (00:43 +0000)]
In GlobalVariable::setInitializer, assert that the initializer has the
right type.

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

14 years agoA few more instructions that should be marked re-materializable.
Evan Cheng [Tue, 17 Nov 2009 00:23:22 +0000 (00:23 +0000)]
A few more instructions that should be marked re-materializable.

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

14 years agoConvert to FileCheck
Jim Grosbach [Tue, 17 Nov 2009 00:20:26 +0000 (00:20 +0000)]
Convert to FileCheck

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

14 years agoConvert to FileCheck
Jim Grosbach [Tue, 17 Nov 2009 00:03:38 +0000 (00:03 +0000)]
Convert to FileCheck

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

14 years agoCleanup. Missed removing these when converting. Oops.
Jim Grosbach [Tue, 17 Nov 2009 00:00:33 +0000 (00:00 +0000)]
Cleanup. Missed removing these when converting. Oops.

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

14 years agoSet Rm bits of BX_RET to 0b1110 (R14); and set condition code bits of BRIND to
Johnny Chen [Mon, 16 Nov 2009 23:57:56 +0000 (23:57 +0000)]
Set Rm bits of BX_RET to 0b1110 (R14); and set condition code bits of BRIND to
0b1110 (ALways).  This is so that the disassembler decoder can distinguish among
BX_RET, BRIND, and BXr9.

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

14 years agoFix this test - there don't appear to be any actual Reload Reuses
Dan Gohman [Mon, 16 Nov 2009 23:49:55 +0000 (23:49 +0000)]
Fix this test - there don't appear to be any actual Reload Reuses
in this testcase.

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

14 years agoRevert r87049, which was the workaround for the regression triggered
Dan Gohman [Mon, 16 Nov 2009 23:43:42 +0000 (23:43 +0000)]
Revert r87049, which was the workaround for the regression triggered
by the recent FixedStackPseudoSourceValue-related changes, now that
the specific bug that affected it is fixed, in r88954.

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

14 years agoRevert the test from r88984. It relies on being able to mmap 16GB of
Jeffrey Yasskin [Mon, 16 Nov 2009 23:32:30 +0000 (23:32 +0000)]
Revert the test from r88984. It relies on being able to mmap 16GB of
address space (though it only uses a small fraction of that), and the
buildbots disallow that.

Also add a comment to the Makefile's ulimit line warning future
developers that changing it won't work.

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

14 years agoConvert to FileCheck
Jim Grosbach [Mon, 16 Nov 2009 23:19:29 +0000 (23:19 +0000)]
Convert to FileCheck

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

14 years agoInitialize the new AsmPrinterFlags field to 0, fixing uses of
Dan Gohman [Mon, 16 Nov 2009 22:49:38 +0000 (22:49 +0000)]
Initialize the new AsmPrinterFlags field to 0, fixing uses of
uninitialized memory.

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

14 years agoMake X86-64 in the Large model always emit 64-bit calls.
Jeffrey Yasskin [Mon, 16 Nov 2009 22:41:33 +0000 (22:41 +0000)]
Make X86-64 in the Large model always emit 64-bit calls.
The large code model is documented at
http://www.x86-64.org/documentation/abi.pdf and says that calls should
assume their target doesn't live within the 32-bit pc-relative offset
that fits in the call instruction.

To do this, we turn off the global-address->target-global-address
conversion in X86TargetLowering::LowerCall(). The first attempt at
this broke the lazy JIT because it can separate the movabs(imm->reg)
from the actual call instruction. The lazy JIT receives the address of
the movabs as a relocation and needs to record the return address from
the call; and then when that call happens, it needs to patch the
movabs with the newly-compiled target. We could thread the call
instruction into the relocation and record the movabs<->call mapping
explicitly, but that seems to require at least as much new
complication in the code generator as this change.

To fix this, we make lazy functions _always_ go through a call
stub. You'd think we'd only have to force lazy calls through a stub on
difficult platforms, but that turns out to break indirect calls
through a function pointer. The right fix for that is to distinguish
between calls and address-of operations on uncompiled functions, but
that's complex enough to leave for someone else to do.

Another attempt at this defined a new CALL64i pseudo-instruction,
which expanded to a 2-instruction sequence in the assembly output and
was special-cased in the X86CodeEmitter's emitInstruction()
function. That broke indirect calls in the same way as above.

This patch also removes a hack forcing Darwin to the small code model.
Without far-call-stubs, the small code model requires things of the
JITMemoryManager that the DefaultJITMemoryManager can't provide.

Thanks to echristo for lots of testing!

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

14 years agoDon't build examples by default, use BUILD_EXAMPLES=1 to build them. The only utility...
Daniel Dunbar [Mon, 16 Nov 2009 22:38:00 +0000 (22:38 +0000)]
Don't build examples by default, use BUILD_EXAMPLES=1 to build them. The only utility of this is testing that we keep the examples up to date, I will just make the buildbots run with this flag.

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

14 years agoAdd "Unoptimized" build (NO_DEBUG_SYMBOLS=1 ENABLE_OPTIMIZED=1), for reducing
Daniel Dunbar [Mon, 16 Nov 2009 22:37:52 +0000 (22:37 +0000)]
Add "Unoptimized" build (NO_DEBUG_SYMBOLS=1 ENABLE_OPTIMIZED=1), for reducing
disk space, and increasing battery lifetime. :)

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

14 years agoFix unused variables warnings.
Eric Christopher [Mon, 16 Nov 2009 22:34:32 +0000 (22:34 +0000)]
Fix unused variables warnings.

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

14 years ago- Check memoperand alignment instead of checking stack alignment. Most load / store...
Evan Cheng [Mon, 16 Nov 2009 21:56:03 +0000 (21:56 +0000)]
- Check memoperand alignment instead of checking stack alignment. Most load / store folding instructions are not referencing spill stack slots.
- Mark MOVUPSrm re-materializable.

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

14 years agoRevert r88939.
Devang Patel [Mon, 16 Nov 2009 21:53:40 +0000 (21:53 +0000)]
Revert r88939.

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

14 years agoFix an expensive-checks error.
David Greene [Mon, 16 Nov 2009 21:52:23 +0000 (21:52 +0000)]
Fix an expensive-checks error.

The Mask and LHSMask may not be of the same size, so don't do the
transformation if they're different.

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

14 years agoMake the pass class name more explicit.
Jim Grosbach [Mon, 16 Nov 2009 21:13:22 +0000 (21:13 +0000)]
Make the pass class name more explicit.

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

14 years agomake pass name a bit more clear
Jim Grosbach [Mon, 16 Nov 2009 21:03:58 +0000 (21:03 +0000)]
make pass name a bit more clear

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

14 years agoRevert 88957. This file uses CodeGenOpt, which is defined in TargetMachine.h.
Dan Gohman [Mon, 16 Nov 2009 20:45:50 +0000 (20:45 +0000)]
Revert 88957. This file uses CodeGenOpt, which is defined in TargetMachine.h.

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

14 years agoRemove an unnecessary #include.
Dan Gohman [Mon, 16 Nov 2009 20:41:12 +0000 (20:41 +0000)]
Remove an unnecessary #include.

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

14 years agoSink a #include <map> to where it's actually needed.
Dan Gohman [Mon, 16 Nov 2009 20:40:47 +0000 (20:40 +0000)]
Sink a #include <map> to where it's actually needed.

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

14 years agoMake PseudoSourceValue's classof recognize
Dan Gohman [Mon, 16 Nov 2009 20:40:06 +0000 (20:40 +0000)]
Make PseudoSourceValue's classof recognize
FixedStackPseudoSourceValueVal, to respect this isa relationship.

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

14 years agoFix a typo in a comment.
Dan Gohman [Mon, 16 Nov 2009 20:35:59 +0000 (20:35 +0000)]
Fix a typo in a comment.

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

14 years agoConvert to FileCheck
Jim Grosbach [Mon, 16 Nov 2009 20:04:15 +0000 (20:04 +0000)]
Convert to FileCheck

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

14 years agoAdded a testcase for PR5495.
Lang Hames [Mon, 16 Nov 2009 20:03:13 +0000 (20:03 +0000)]
Added a testcase for PR5495.

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

14 years agoAdd configure options for specifying where to look for libstdc++.
Rafael Espindola [Mon, 16 Nov 2009 19:46:55 +0000 (19:46 +0000)]
Add configure options for specifying where to look for libstdc++.

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

14 years agoConvert to FileCheck
Jim Grosbach [Mon, 16 Nov 2009 19:46:46 +0000 (19:46 +0000)]
Convert to FileCheck

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

14 years agoFix a comment.
Bob Wilson [Mon, 16 Nov 2009 19:33:27 +0000 (19:33 +0000)]
Fix a comment.

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

14 years agoAdd VISIBILITY_HIDDEN marker.
Devang Patel [Mon, 16 Nov 2009 19:20:48 +0000 (19:20 +0000)]
Add VISIBILITY_HIDDEN marker.

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

14 years agoSimplify thumb2 jump table adjustments. Remove unnecessary calculation and
Jim Grosbach [Mon, 16 Nov 2009 18:58:52 +0000 (18:58 +0000)]
Simplify thumb2 jump table adjustments. Remove unnecessary calculation and
usage of block sizes and offsets.

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

14 years agoclarify comment
Jim Grosbach [Mon, 16 Nov 2009 18:55:47 +0000 (18:55 +0000)]
clarify comment

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