Mikhail Glushenkov
3faece9462
Make example/Hello compile again.
...
llvm-svn: 89363
2009-11-19 17:29:25 +00:00
Dan Gohman
91431b008b
Fix a typo in a comment.
...
llvm-svn: 89360
2009-11-19 16:35:11 +00:00
Benjamin Kramer
1dfe1bead6
cstdlib is not automatically included with StringRef anymore.
...
llvm-svn: 89359
2009-11-19 16:08:04 +00:00
Benjamin Kramer
99b5bd9074
Reenable Split2 StringRef test with Apple gcc.
...
llvm-svn: 89357
2009-11-19 16:04:41 +00:00
David Greene
f37756d609
Add support for spreading register allocation.
...
Add a -linearscan-skip-count argument (default to 0) that tells the
allocator to remember the last N registers it allocated and skip them
when looking for a register candidate. This tends to spread out
register usage and free up post-allocation scheduling at the cost of
slightly more register pressure. The primary benefit is the ability
to backschedule reloads.
This is turned off by default.
llvm-svn: 89356
2009-11-19 15:55:49 +00:00
Benjamin Kramer
879f8c1382
Remove the now obsolete algorithm include from StringRef.h.
...
llvm-svn: 89354
2009-11-19 15:48:14 +00:00
Torok Edwin
5400cd9b8c
Workaround PR5482, because all the gcc versions that I had were miscompiling StringRef:
...
4.2.4, 4.3.4, 4.4.2.
The workaround is to use a local min/max implementation that takes an integer
param, and not a reference to integer param (like std::min does).
llvm-svn: 89352
2009-11-19 15:39:50 +00:00
Benjamin Kramer
3846506466
Unbreak x64 MSVC build. Patch by Nicolas Capens!
...
llvm-svn: 89341
2009-11-19 12:17:31 +00:00
Edward O'Callaghan
ba993b8add
Add PS3 Triple class, Credit to John Thompson.
...
llvm-svn: 89339
2009-11-19 11:59:00 +00:00
Evan Cheng
82adca8373
80 col violation.
...
llvm-svn: 89337
2009-11-19 08:16:50 +00:00
Daniel Dunbar
0b2099ad5f
Unbreak test, Bruno please check.
...
llvm-svn: 89329
2009-11-19 07:18:49 +00:00
Evan Cheng
b18525937c
More consistent thumb1 asm printing.
...
llvm-svn: 89328
2009-11-19 06:57:41 +00:00
Evan Cheng
2a6c92fcb6
Shrink ldr / str [sp, imm0-1024] to 16-bit instructions.
...
llvm-svn: 89326
2009-11-19 06:32:27 +00:00
Evan Cheng
547abae38d
Eliminate more * 4 in Thumb1 asm printing for consistency sake.
...
llvm-svn: 89325
2009-11-19 06:31:26 +00:00
Bruno Cardoso Lopes
4713b282ce
- Add sugregister logic to handle f64=(f32,f32).
...
- Support mips1 like load/store of doubles:
Instead of:
sdc $f0, X($3)
Generate:
swc $f0, X($3)
swc $f1, X+4($3)
llvm-svn: 89322
2009-11-19 06:06:13 +00:00
Bruno Cardoso Lopes
8bd87239d7
Only use small sections for non linux targets!
...
llvm-svn: 89316
2009-11-19 05:28:18 +00:00
Lang Hames
6912be4ad6
Added a new Spiller implementation which wraps LiveIntervals::addIntervalsForSpills.
...
All spiller calls in RegAllocLinearScan now go through the new Spiller interface.
The "-new-spill-framework" command line option has been removed. To use the trivial in-place spiller you should now pass "-spiller=trivial -rewriter=trivial".
(Note the trivial spiller/rewriter are only meant to serve as examples of the new in-place modification work. Enabling them will yield terrible, though hopefully functional, code).
llvm-svn: 89311
2009-11-19 04:15:33 +00:00
Edward O'Callaghan
a724e48f79
autoconf config.* claims to not know about auroraux triple.
...
llvm-svn: 89301
2009-11-19 02:25:50 +00:00
Jim Grosbach
50d67e791b
Teach IVUsers to keep things simpler and track loop-invariant strides only
...
for uses inside the loop. This works better with LSR. Disabled behind
-simplify-iv-users while benchmarking.
llvm-svn: 89299
2009-11-19 02:05:44 +00:00
Jim Grosbach
dcef55b2ef
Eliminate duplicate phi nodes in loops. Loop rotation, for example, can introduce these, and it's beneficial to later passes to clean them up.
...
llvm-svn: 89298
2009-11-19 02:03:18 +00:00
Jim Grosbach
cc69a1ba9a
Make EliminateDuplicatePHINodes() available as a utility function
...
llvm-svn: 89297
2009-11-19 02:02:10 +00:00
Bill Wendling
77f0ea6b93
Test from Dhrystone to make sure that we're not emitting an aligned load for a
...
string that's aligned at 8-bytes instead of 16-bytes.
llvm-svn: 89295
2009-11-19 01:33:57 +00:00
Daniel Dunbar
0dd2b817c2
Add TOOLALIAS makefile variable; this defines an alternate name for a program
...
which the makefiles will create by symlinking the actual tool to.
- For use by clang, where we want to make 'clang++' and alias for clang (which
enables C++ support in the driver)
- Not sure this is the best approach, alternative suggestions welcome!
llvm-svn: 89282
2009-11-19 00:14:53 +00:00
Bill Wendling
4b384b0294
The "ReadOnlyWithRel" enum seems to apply more to what Darwin does with the EH
...
exception table than DataRel.
llvm-svn: 89279
2009-11-19 00:09:14 +00:00
Daniel Dunbar
cf11886f1e
Twine: Stores kinds as uchar instead of bitfield to be friendlier to the
...
optimizer.
llvm-svn: 89278
2009-11-19 00:04:43 +00:00
Bob Wilson
b3c5aa20ea
There should be no need to keep renumbering blocks during tail duplication.
...
llvm-svn: 89275
2009-11-18 23:48:57 +00:00
Bob Wilson
6456fb94f5
Fix buildbots.
...
llvm-svn: 89274
2009-11-18 23:30:38 +00:00
Richard Osborne
3bd09434a6
Add XCore support for indirectbr / blockaddress.
...
llvm-svn: 89273
2009-11-18 23:20:42 +00:00
Douglas Gregor
361a376879
De-bork CMake build
...
llvm-svn: 89272
2009-11-18 23:20:09 +00:00
Bill Wendling
07e6e2c6f8
Attempt #2 :
...
Place the EH table in the __TEXT section on MachO. It saves space.
llvm-svn: 89270
2009-11-18 23:18:46 +00:00
Bob Wilson
108aadf972
Tail duplication still needs to iterate. Duplicating new instructions onto
...
the tail of a block may make that block a new candidate for duplication.
llvm-svn: 89264
2009-11-18 22:52:37 +00:00
Bob Wilson
5d87f7d5f8
Add another statistic to measure code size due to tail duplication.
...
llvm-svn: 89254
2009-11-18 22:12:31 +00:00
Jeffrey Yasskin
c85e9c563a
Remove spurious @verbatim. Patch by Timo Juhani Lindfors!
...
llvm-svn: 89252
2009-11-18 22:04:44 +00:00
Bill Wendling
e9e9121f94
Not all ASM has # for comments.
...
llvm-svn: 89250
2009-11-18 21:54:13 +00:00
Jakob Stoklund Olesen
575c3f3d72
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.
llvm-svn: 89246
2009-11-18 21:33:35 +00:00
Daniel Dunbar
57ee0b0be3
TableGen: Add initial backend for clang Driver's option parsing.
...
llvm-svn: 89245
2009-11-18 21:29:51 +00:00
Jakob Stoklund Olesen
9cbffd2155
Allow the machine verifier to be run outside the PassManager.
...
Verify LiveVariables information when present.
llvm-svn: 89241
2009-11-18 20:36:57 +00:00
Jakob Stoklund Olesen
520039fcb6
Remove the -early-coalescing option
...
llvm-svn: 89240
2009-11-18 20:36:47 +00:00
Lang Hames
e9e0cd4e27
Fixed the in-place spiller and trivial rewriter, which had been broken by the recent SlotIndexes work.
...
llvm-svn: 89238
2009-11-18 20:31:20 +00:00
Viktor Kutuzov
c3e2b6bcf5
Added getDefaultSubtargetFeatures method to SubtargetFeatures class which returns a correct feature string for given triple.
...
llvm-svn: 89236
2009-11-18 20:20:05 +00:00
Bob Wilson
8984e6ec8c
Add statistics for tail duplication.
...
llvm-svn: 89225
2009-11-18 19:29:37 +00:00
David Goodwin
1fd5fdaa7b
Add ARMv6 itineraries.
...
llvm-svn: 89218
2009-11-18 18:39:57 +00:00
Bob Wilson
9dea05d724
Fix a few places that were missed when we converted to unified syntax.
...
llvm-svn: 89214
2009-11-18 18:10:35 +00:00
Jakob Stoklund Olesen
736888f7fa
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.
llvm-svn: 89213
2009-11-18 18:01:35 +00:00
Daniel Dunbar
06d8c2427a
Turn LLVM_BUILD_EXAMPLES off by default in CMake builds, to match Makefiles &
...
Clang.
llvm-svn: 89211
2009-11-18 17:42:22 +00:00
Daniel Dunbar
a5b5be1815
lit: Fix exclude dirs functionality.
...
llvm-svn: 89210
2009-11-18 17:42:17 +00:00
Nick Lewycky
41ee792832
Fix passing of float arguments through ffi.
...
llvm-svn: 89198
2009-11-18 05:43:15 +00:00
Bob Wilson
290e9a47a9
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.
llvm-svn: 89187
2009-11-18 03:34:27 +00:00
Bill Wendling
dfd8daaf61
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.
llvm-svn: 89176
2009-11-18 01:03:56 +00:00
Dan Gohman
6a976bbcb7
Simplify ComputeMultiple so that it doesn't depend on TargetData.
...
llvm-svn: 89175
2009-11-18 00:58:27 +00:00
Jakob Stoklund Olesen
4797e58d6b
Fix inverted test and add testcase from failing self-host.
...
llvm-svn: 89167
2009-11-18 00:02:18 +00:00
Devang Patel
ee07075010
Remove dead code.
...
llvm-svn: 89156
2009-11-17 22:39:08 +00:00
Eric Christopher
700d08e18d
Add ability to set code model within the execution engine builders
...
and creation interfaces.
llvm-svn: 89151
2009-11-17 21:58:16 +00:00
Jakob Stoklund Olesen
50ee5e7ddb
Remove fragile test.
...
llvm-svn: 89150
2009-11-17 21:52:40 +00:00
Jim Grosbach
6bf5305f5d
grammar
...
llvm-svn: 89145
2009-11-17 21:37:04 +00:00
Jim Grosbach
cdde77c6a3
Enable arm jumpt table adjustment.
...
llvm-svn: 89143
2009-11-17 21:24:11 +00:00
Jakob Stoklund Olesen
31e24b2d0c
Disable -split-phi-edges to unbreak the buildbots
...
llvm-svn: 89142
2009-11-17 21:23:49 +00:00
Jakob Stoklund Olesen
f992022e54
Never call UpdateTerminator() when AnalyzeBranch would fail.
...
llvm-svn: 89139
2009-11-17 20:46:00 +00:00
Anton Korobeynikov
a2873f4d59
Forgot to commit test fixes
...
llvm-svn: 89138
2009-11-17 20:38:36 +00:00
Anton Korobeynikov
f24804413d
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.
llvm-svn: 89137
2009-11-17 20:04:59 +00:00
Evan Cheng
57be2f2c40
Add a WriteAsOperand for MachineBasicBlock so MachineLoopInfo dump looks sane.
...
llvm-svn: 89130
2009-11-17 19:19:59 +00:00
Evan Cheng
0229536301
Fix comment.
...
llvm-svn: 89129
2009-11-17 19:19:01 +00:00
Jakob Stoklund Olesen
fffff88a3c
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.
llvm-svn: 89125
2009-11-17 19:15:50 +00:00
Jim Grosbach
e4e018ae67
80-column violations
...
llvm-svn: 89123
2009-11-17 19:05:35 +00:00
Viktor Kutuzov
dafdd883bc
Added getArchNameForAssembler method to the Triple class for which returns OS and Vendor independent target assembler arch.
...
llvm-svn: 89122
2009-11-17 18:48:27 +00:00
Bob Wilson
eeac7ce769
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.
llvm-svn: 89121
2009-11-17 18:30:09 +00:00
Evan Cheng
ba4e5da727
Generalize OptimizeLoopTermCond to optimize more loop terminating icmp to use postinc iv.
...
llvm-svn: 89116
2009-11-17 18:10:11 +00:00
Dan Gohman
2650723d81
Set MadeChange instead of MadeChangeThisIteration.
...
llvm-svn: 89114
2009-11-17 18:04:15 +00:00
Benjamin Kramer
713fd3564a
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.
llvm-svn: 89111
2009-11-17 17:57:04 +00:00
Jim Grosbach
60f4854c76
Remove trailing whitespace
...
llvm-svn: 89110
2009-11-17 17:53:56 +00:00
Bob Wilson
724d8a45c1
Update a comment, now that tail duplication happens after other branch
...
folding optimizations.
llvm-svn: 89109
2009-11-17 17:40:31 +00:00
Johnny Chen
14b25eb87b
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).
llvm-svn: 89108
2009-11-17 17:17:50 +00:00
Bob Wilson
bd22f1965d
Perform tail duplication only once, after tail merging is complete.
...
It was too difficult to keep the heuristics for merging and duplication
consistent.
llvm-svn: 89105
2009-11-17 17:06:18 +00:00
Nuno Lopes
6f6668cac2
add Case() with 5 args
...
llvm-svn: 89099
2009-11-17 15:35:39 +00:00
Jay Foad
658af5a9e2
Fix HTML formatting.
...
llvm-svn: 89093
2009-11-17 13:13:59 +00:00
Duncan Sands
7a04e7df6d
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.
llvm-svn: 89091
2009-11-17 10:54:25 +00:00
Duncan Sands
3246fe0b6b
Make bugpoint pass -load arguments to LLI. This lets one use bugpoint with
...
programs that depend on native shared libraries. Patch by Timo Lindfors.
llvm-svn: 89087
2009-11-17 10:20:22 +00:00
Evan Cheng
84efacfaad
Revert 89021. It's miscompiling llvm-gcc driver driver at -O0.
...
llvm-svn: 89082
2009-11-17 09:55:52 +00:00
Evan Cheng
5392cc9d14
Re-apply 89011. It's not to be blamed.
...
llvm-svn: 89081
2009-11-17 09:51:18 +00:00
Daniel Dunbar
1acdfbd60b
"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.
llvm-svn: 89077
2009-11-17 09:29:59 +00:00
Evan Cheng
05938e819b
Revert 89011. Buildbot thinks it might be breaking stuff.
...
llvm-svn: 89076
2009-11-17 09:20:28 +00:00
Nick Lewycky
a1c09d674e
Remove VISIBILITY_HIDDEN from the classes in this directory. Fixes bug 5507.
...
llvm-svn: 89075
2009-11-17 09:17:08 +00:00
Duncan Sands
8b9336bd98
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.
llvm-svn: 89067
2009-11-17 08:34:52 +00:00
Nick Lewycky
b7993d61f2
Revert r88939.
...
llvm-svn: 89066
2009-11-17 08:11:44 +00:00
Nick Lewycky
7efd07fd9d
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.
llvm-svn: 89062
2009-11-17 07:52:09 +00:00
Lang Hames
48770eb61f
Fixed call to wrong constructor.
...
llvm-svn: 89059
2009-11-17 07:19:50 +00:00
Owen Anderson
759d72dc8e
Fix a race condition in the Timer class.
...
llvm-svn: 89056
2009-11-17 07:06:10 +00:00
Bill Wendling
bc0020174b
Refactor the code that creates the "dot-label" difference. This may be used in
...
more than one place. No intended functionality change.
llvm-svn: 89024
2009-11-17 01:23:53 +00:00
Jim Grosbach
af1ad30a23
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.
llvm-svn: 89022
2009-11-17 01:21:04 +00:00
Jakob Stoklund Olesen
9f0d55d8d8
Enable -split-phi-edges by default
...
llvm-svn: 89021
2009-11-17 01:07:22 +00:00
Evan Cheng
d33400e636
MOV64rm should be marked isReMaterializable.
...
llvm-svn: 89019
2009-11-17 00:55:55 +00:00
Dan Gohman
82e80019a5
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.
llvm-svn: 89017
2009-11-17 00:47:23 +00:00
Devang Patel
12144a2348
Remove debug info attached with an instruction.
...
llvm-svn: 89016
2009-11-17 00:47:06 +00:00
Jeffrey Yasskin
7c57c41d5f
In GlobalVariable::setInitializer, assert that the initializer has the
...
right type.
llvm-svn: 89014
2009-11-17 00:43:13 +00:00
Evan Cheng
ce28f6f478
A few more instructions that should be marked re-materializable.
...
llvm-svn: 89011
2009-11-17 00:23:22 +00:00
Jim Grosbach
0ad7efbace
Convert to FileCheck
...
llvm-svn: 89007
2009-11-17 00:20:26 +00:00
Jim Grosbach
4781c3caf8
Convert to FileCheck
...
llvm-svn: 89002
2009-11-17 00:03:38 +00:00
Jim Grosbach
805d195649
Cleanup. Missed removing these when converting. Oops.
...
llvm-svn: 89001
2009-11-17 00:00:33 +00:00
Johnny Chen
18183b6d8e
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.
llvm-svn: 89000
2009-11-16 23:57:56 +00:00
Dan Gohman
b43e1ff236
Fix this test - there don't appear to be any actual Reload Reuses
...
in this testcase.
llvm-svn: 88998
2009-11-16 23:49:55 +00:00