Dan Gohman
cd111d96c6
Enable FastISel by default (on x86 and x86-64) with the -fast option.
...
llvm-svn: 56930
2008-10-01 20:39:19 +00:00
Chris Lattner
91e5279de1
add a new form of Type::dump that takes a module for type names,
...
patch provided by Tomas Lindquist Olsen!
llvm-svn: 56929
2008-10-01 20:16:19 +00:00
Dan Gohman
e1d0930044
Make some implicit conversions explicit, to avoid compiler warnings.
...
llvm-svn: 56927
2008-10-01 19:58:59 +00:00
Dan Gohman
be88cf29b6
Split this test and move it into target-specific directories.
...
This fixes failures on configurations that don't have one or the
other targets enabled.
llvm-svn: 56926
2008-10-01 19:46:30 +00:00
Dan Gohman
4aacc3ab83
Split x86's ADJCALLSTACK instructions into 32-bit and 64-bit forms.
...
This allows the 64-bit forms to use+def RSP instead of ESP. This
doesn't fix any real bugs today, but it is more precise and it
makes the debug dumps on x86-64 look more consistent.
Also, add some comments describing the CALL instructions' physreg
operand uses and defs.
llvm-svn: 56925
2008-10-01 18:28:06 +00:00
Jim Grosbach
0268ee4c25
Fix typo s/ther/there/
...
llvm-svn: 56924
2008-10-01 18:16:49 +00:00
Duncan Sands
88d8323743
Factorize code: remove variants of "strip off
...
pointer bitcasts and GEP's", and centralize the
logic in Value::getUnderlyingObject. The
difference with stripPointerCasts is that
stripPointerCasts only strips GEPs if all
indices are zero, while getUnderlyingObject
strips GEPs no matter what the indices are.
llvm-svn: 56922
2008-10-01 15:25:41 +00:00
Dan Gohman
6466b44315
Fold trivial two-operand tokenfactors where the operands are equal
...
immediately.
llvm-svn: 56921
2008-10-01 15:11:19 +00:00
Dan Gohman
8ba73d6d60
Don't prepend a space character for constants in Value::print.
...
llvm-svn: 56920
2008-10-01 15:09:37 +00:00
Dan Gohman
81ade97fe0
Fix typos in comments.
...
llvm-svn: 56919
2008-10-01 15:07:49 +00:00
Dan Gohman
5508abb3bf
nounwind-ify this test.
...
llvm-svn: 56918
2008-10-01 15:07:14 +00:00
Nuno Lopes
8bf32ebde6
revert the addition of Preverves(CallGraph), per Duncan's comments
...
llvm-svn: 56917
2008-10-01 09:13:40 +00:00
Dan Gohman
d6e96e9888
Mark CALL instructions as having a Use of ESP/RSP.
...
llvm-svn: 56911
2008-10-01 04:14:30 +00:00
Dan Gohman
54356cf3ca
Don't leave an output file in the test directory.
...
llvm-svn: 56910
2008-10-01 04:13:23 +00:00
Dan Gohman
b6d0fe7797
Call ScalarEvolution's deleteValueFromRecords before deleting an
...
instruction, not after. This fixes some uses of free'd memory.
llvm-svn: 56908
2008-10-01 02:02:03 +00:00
Bill Wendling
c807050f44
Moved this option to the front-end.
...
llvm-svn: 56901
2008-10-01 01:02:18 +00:00
Bill Wendling
d7effcf8da
Implement the -fno-builtin option in the front-end, not in the back-end.
...
llvm-svn: 56900
2008-10-01 00:59:58 +00:00
Dan Gohman
d456cc01eb
Use explicit target-triples to unbreak this test on non-darwin systems.
...
llvm-svn: 56896
2008-10-01 00:25:38 +00:00
Owen Anderson
9c1e298f14
Mark merged-in VNInfo's as being PHIKilled.
...
llvm-svn: 56893
2008-09-30 23:58:47 +00:00
Owen Anderson
b89aa47081
Fix a simple error in renumbering kill markaers, that took an inordinant amount of time to track down.
...
llvm-svn: 56889
2008-09-30 22:51:54 +00:00
Bill Wendling
618d422cdd
Just don't transform this memset into "bzero" if no-builtin is specified.
...
llvm-svn: 56888
2008-09-30 22:05:33 +00:00
Nuno Lopes
36e7e0b190
add preserversCFG() + preservers(CallGraph)
...
llvm-svn: 56887
2008-09-30 22:04:30 +00:00
Bill Wendling
86f6fdc7e3
- Initialize "--no-builtin" to "false".
...
- Testcase for r56885.
llvm-svn: 56886
2008-09-30 21:40:30 +00:00
Bill Wendling
9ad453e943
Add the new `-no-builtin' flag. This flag is meant to mimic the GCC
...
`-fno-builtin' flag. Currently, it's used to replace "memset" with "_bzero"
instead of "__bzero" on Darwin10+. This arguably violates the meaning of this
flag, but is currently sufficient. The meaning of this flag should become more
specific over time.
llvm-svn: 56885
2008-09-30 21:22:07 +00:00
Dan Gohman
19530c810d
Move the primary fast-isel top-level comments to FastISel.cpp, where
...
they'll be a little more visible. Also, update and reword them a bit.
llvm-svn: 56877
2008-09-30 20:48:29 +00:00
Nuno Lopes
2219758606
add AU.setPreservesCFG() since this pass only adds and removes function attributes
...
llvm-svn: 56868
2008-09-30 18:34:38 +00:00
Dan Gohman
5a2169ee6e
Optimize SelectionDAG's AssignTopologicalOrder even further.
...
Completely eliminate the TopOrder std::vector. Instead, sort
the AllNodes list in place. This also eliminates the need to
call AllNodes.size(), a linear-time operation, before
performing the sort.
Also, eliminate the Sources temporary std::vector, since it
essentially duplicates the sorted result as it is being
built.
This also changes the direction of the topological sort
from bottom-up to top-down. The AllNodes list starts out in
roughly top-down order, so this reduces the amount of
reordering needed. Top-down is also more convenient for
Legalize, and ISel needed only minor adjustments.
llvm-svn: 56867
2008-09-30 18:30:35 +00:00
Evan Cheng
7eea8fb7cd
Add runStaticConstructorsDestructors which runs ctors / dtors of a single module. Patch by David Chisnall.
...
llvm-svn: 56849
2008-09-30 15:51:21 +00:00
Evan Cheng
1c8ff02eeb
Re-apply 56835 along with header file changes.
...
llvm-svn: 56848
2008-09-30 15:44:16 +00:00
Duncan Sands
f5f028df85
Stacker is dead.
...
llvm-svn: 56844
2008-09-30 15:18:29 +00:00
Duncan Sands
a2c8482495
Revert commit 56835 since it breaks the build.
...
"If a re-materializable instruction has a register
operand, the spiller will change the register operand's
spill weight to HUGE_VAL to avoid it being spilled.
However, if the operand is already in the queue ready
to be spilled, avoid re-materializing it".
llvm-svn: 56837
2008-09-30 10:00:30 +00:00
Evan Cheng
4eee17f4fb
If a re-materializable instruction has a register operand, the spiller will change the register operand's spill weight to HUGE_VAL to avoid it being spilled. However, if the operand is already in the queue ready to be spilled, avoid re-materializing it.
...
llvm-svn: 56835
2008-09-30 06:36:58 +00:00
Nick Lewycky
9e918179c8
Fix misoptimization of: xor i1 (icmp eq (X, C1), icmp s[lg]t (X, C2))
...
llvm-svn: 56834
2008-09-30 06:08:34 +00:00
Dan Gohman
b5824675e4
Fix X86FastISel's output for x86-32 PIC constant pool addresses.
...
llvm-svn: 56829
2008-09-30 01:21:32 +00:00
Dan Gohman
c28f40a821
Move the GlobalBaseReg field out of X86ISelDAGToDAG.cpp
...
and X86FastISel.cpp into X86MachineFunction.h, so that it
can be shared, instead of having each selector keep track
of its own.
llvm-svn: 56825
2008-09-30 00:58:23 +00:00
Dan Gohman
e76be890c9
Disable all x87 usage, including f32 and f64 when the subtarget
...
doesn't have SSE(2), with X86FastISel.
llvm-svn: 56823
2008-09-30 00:48:39 +00:00
Dale Johannesen
52987eab6e
Remove misuse of ReplaceNodeResults for atomics with
...
valid types. No functional change.
llvm-svn: 56808
2008-09-29 22:25:26 +00:00
Dan Gohman
f78676d0b6
Fix FastISel to not initialize the PIC-base register multiple times
...
in functions with PIC references from more than one basic block.
llvm-svn: 56807
2008-09-29 21:55:50 +00:00
Dan Gohman
c6184c4473
Fix an over-pessimization about GlobalVariable addresses in X86FastISel.
...
llvm-svn: 56802
2008-09-29 21:13:15 +00:00
Devang Patel
7536edca09
Support inreg, zext and sext as return value attributes.
...
llvm-svn: 56801
2008-09-29 20:49:50 +00:00
Devang Patel
1721a1a319
Fix grammar.
...
llvm-svn: 56796
2008-09-29 18:34:44 +00:00
Devang Patel
f9711b6002
Fix grammer.
...
llvm-svn: 56795
2008-09-29 18:16:38 +00:00
Devang Patel
ed4b84c801
Fix sentence.
...
llvm-svn: 56794
2008-09-29 18:16:09 +00:00
Evan Cheng
b749199c34
Fix PR2835. Do not change the width of a volatile load.
...
llvm-svn: 56792
2008-09-29 17:26:18 +00:00
Duncan Sands
187322048e
Speed up these passes when the callgraph has
...
huge simply connected components. Suggested
by Chris.
llvm-svn: 56787
2008-09-29 14:59:04 +00:00
Nuno Lopes
a4d69747c1
remove redundant test (mayBeOverriden() includes hasLinkOnceLinkage)
...
llvm-svn: 56786
2008-09-29 14:40:32 +00:00
Duncan Sands
60dc0b5cbe
Tweak some comments.
...
llvm-svn: 56784
2008-09-29 13:35:31 +00:00
Matthijs Kooijman
4dd694b586
Add some hands-on documentation about which files to create and edit when
...
adding a backend.
llvm-svn: 56783
2008-09-29 11:52:22 +00:00
Duncan Sands
651eeb4be2
Rename isWeakForLinker to mayBeOverridden. Use it
...
instead of hasWeakLinkage in a bunch of optimization
passes.
llvm-svn: 56782
2008-09-29 11:25:42 +00:00
Matthijs Kooijman
9fb8d5f5b1
Add a testcase showing that scalarrepl supports first class structs.
...
I originally made this script to show that scalarrepl didn't support them, but
it turned out it does. Better to still add the testcase then.
llvm-svn: 56781
2008-09-29 10:42:13 +00:00