Commit Graph

40592 Commits

Author SHA1 Message Date
Dan Gohman
a8c763b307 Use empty() instead of begin() == end().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54780 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-14 18:13:49 +00:00
Matthijs Kooijman
c1f1d46f00 Replace two for loops with while(!X->use_empty()) loops. This prevents
invalidating the iterator by deleting the current use. This fixes a segfault on
64 bit linux reported in PR2675.

Also remove an unneeded if.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54778 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-14 15:03:05 +00:00
Owen Anderson
97382166dd Get rid of a use of std::map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54770 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 23:36:23 +00:00
Dan Gohman
a60832b018 Fix a bogus srem rule - a negative value srem'd by a power-of-2
can have a non-negative result; for example, -16%16 is 0. Also,
clarify the related comments. This fixes PR2670.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54767 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 23:12:35 +00:00
Owen Anderson
289983123b Expunge the last uses of std::map from LiveIntervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54766 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 22:28:50 +00:00
Owen Anderson
20e2839cb9 Move r2iMap_ over to DenseMap from std::map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54765 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 22:08:30 +00:00
Dan Gohman
6ab6422f25 Allow SelectionDAG to create EXTRACT_VECTOR_ELT nodes with
non-constant indices. Only a few of the peephole checks require
a constant index.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54764 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 21:51:37 +00:00
Owen Anderson
03857b29d8 Make the allocation of LiveIntervals explicit, rather than holding them in the r2iMap_ by value. This will prevent references to them from being invalidated
if the map is changed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54763 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 21:49:13 +00:00
Owen Anderson
49bfdd63f4 Switch this from std::map to DenseMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54761 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 21:24:24 +00:00
Dan Gohman
2edeb63ece Fix SCCP's handling of struct value loads and stores. SCCP doesn't
track individual leaf values in such cases, so it needs to treat
struct values as normal values in this case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54760 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 21:22:48 +00:00
Daniel Dunbar
38db6ccb47 Add svn:ignore on several Release-Asserts directories
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54758 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 20:54:16 +00:00
Daniel Dunbar
7fb842420a Add default constructor to APSInt
- Creates uninitialized APInt. 
 - Prevents need for embedding arbitrary constants when used as an out
   parameter, for example.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54757 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 20:53:17 +00:00
Daniel Dunbar
8bd79a8cae Update makellvm to return correct result code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54756 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 20:43:56 +00:00
Devang Patel
c677de2713 Rename. s/FindIVForUser/FindIVUserForCond/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54754 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 20:31:11 +00:00
Duncan Sands
81b06be055 Teach constant folding that an inttoptr of a
ptrtoint can be turned into a bitcast if the
integer is at least as wide as a pointer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54752 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 20:20:35 +00:00
Dan Gohman
b0cf29c5cf Initial checkin of the new "fast" instruction selection support. See
the comments in FastISelEmitter.cpp for details on what this is.
This is currently experimental and unusable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54751 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 20:19:35 +00:00
Dan Gohman
ea9587bf41 Oops, check in these files too, for the FastISel -> Fast rename.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54750 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 19:55:00 +00:00
Dan Gohman
925a7e8ed6 Rename SelectionDAGISel's FastISel to Fast, to begin to make
room for the new FastISel instruction selection code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54749 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 19:47:40 +00:00
Dale Johannesen
20ab78b8b0 Generated files for 54744.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54745 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 18:41:46 +00:00
Dale Johannesen
7dc00abd86 Add read/write support for X86's sseregparm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54744 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 18:40:23 +00:00
Owen Anderson
32767955a4 Get rid of unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54742 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 17:44:52 +00:00
Owen Anderson
27d6681496 1) Merge entire live intervals instead of parts of them.
2) Conditionalize temporary insertion if we don't need it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54741 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 17:25:42 +00:00
Duncan Sands
9d8658a129 Rename this, in case people think that NullFolder
has something to do with folding null values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54725 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 08:56:48 +00:00
Bruno Cardoso Lopes
739e441311 Removed SELECT_CC custom lowering. This is not needed anymore, the SELECT node
is lowered properly and covers everything LowerSELECT_CC did.
Added method printUnsignedImm in AsmPrinter to print uimm16 operands. This
avoid the ugly instruction by instruction checking in printOperand.
Added a swap instruction present in the allegrex core.
Added two conditional instructions present in the allegrex core : MOVZ and MOVN.
They both allow a more efficient SELECT operation for integers.
Also added SELECT patterns to optimize MOVZ and MOVN usage.
The brcond and setcc patterns were cleaned: redundant and suboptimal patterns
were
removed. The suboptimals were replaced by more efficient ones.
Fixed some instructions that were using immZExt16 instead of immSExt16.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54724 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 07:13:40 +00:00
Devang Patel
d16aba22c9 Check sign to detect overflow before changing compare stride.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54710 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 02:05:14 +00:00
Dale Johannesen
6f83be0c61 When resolving a stub in x86-64 JIT, use a PC-relative branch
rather than the absolute address if the target is within range.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54708 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 23:20:24 +00:00
Bill Wendling
f9e67aca52 Remove tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54707 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 23:15:44 +00:00
Bill Wendling
aad66bf606 Update. Remove bogus webpage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54705 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 21:55:54 +00:00
Dale Johannesen
5f777192a0 Make x86-64 JIT changes Darwin-specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54700 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 21:02:08 +00:00
Duncan Sands
fe24bd3a89 Add a NullFolder class that doesn't fold constants.
This may be used as the second IRBuilder template
parameter, the idea being that people learning LLVM
may find it helpful (several people asked on IRC
if it was possible to turn off constant folding
because it made it hard for them to see what was
going on).  Compiles, but otherwise completely
untested.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54698 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 20:39:27 +00:00
Dan Gohman
3837218ea0 Extend ScalarEvolution's executesAtLeastOnce logic to be able to
continue past the first conditional branch when looking for a
relevant test. This helps it avoid using MAX expressions in
loop trip counts in more cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54697 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 20:17:31 +00:00
Jim Grosbach
1a6c683315 Whitespace cleanup. Test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54695 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 18:34:45 +00:00
Dale Johannesen
ec867a22b3 In the absence of a linker to build the GOT, use the 32-bit
non_lazy_ptr mechanism on x86-64 Darwin JIT.  Fixes a bunch
of last night's failures.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54692 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 18:23:48 +00:00
Dan Gohman
04f4f4f447 Correct the filename in the top-of-file comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54688 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 17:42:33 +00:00
Dan Gohman
ee4bd9a5b4 Avoid repeatedly reallocating the FoldingSetNodeID when searching
through multiple nodes in a bucket.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54687 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 17:40:22 +00:00
Devang Patel
78766ff67c Use SmallVector instead of std::vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54685 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 15:44:31 +00:00
Duncan Sands
20df07ba22 Point people to ConstantExpr and ConstantFolding,
in case they get the wrong idea.  Fit in 80 columns.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54676 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 09:43:15 +00:00
Devang Patel
721e59cfb2 Use DenseMap to keep track of last users.
Use inversed map for faster queries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54662 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 00:26:16 +00:00
Dale Johannesen
50dd1d0280 Some fixes for x86-64 JIT. Make it use small code
model, except for external calls; this makes
addressing modes PC-relative.  Incomplete.

The assertion at the top of Emitter::runOnMachineFunction
was obviously bogus (always true) so I removed it.
If someone knows what the correct test should be to cover
all the various targets, please fix.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54656 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 23:46:25 +00:00
Chris Lattner
0eab5e2efa add a helper method to sys::Path for clang, patch by
Kovarththanan Rajaratnam!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54655 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 23:39:47 +00:00
Chris Lattner
b8cd4d3d49 Implement support for simplifying vector comparisons by 0.0 and 1.0 like we
do for scalars.  Patch contributed by Nicolas Capens

This also generalizes the previous xforms to work on long double, now that 
isExactlyValue works for long double.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54653 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 22:06:05 +00:00
Devang Patel
3b8a90686a Keep track of analysis usage information for passes. Avoid invoking
getAnalysisUsage() repeatedly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54650 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 21:13:39 +00:00
Dan Gohman
00f19b6542 Improve the grep commands for this test to be tolerant of ABI
differences, and to be more specific.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54648 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 20:10:41 +00:00
Dan Gohman
8cea8ff34c Take the FrameOffset into account when computing the alignment
of stack objects. This fixes PR2656.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54646 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 18:27:03 +00:00
Nate Begeman
1db3c92306 Implement ISD::TRAP support on PPC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54644 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 17:36:31 +00:00
Duncan Sands
1e7f7865eb Make it possible to use different constant
folding policies with IRBuilder.  The default,
provided by ConstantFolder, is to do minimal
folding like now: what ConstantExpr provides.
An alternative is to use TargetFolder, which
uses target information to fold constants more.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54640 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 15:29:30 +00:00
Chris Lattner
4630e4ddcf the stacker doc is way out of date.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54631 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 06:13:31 +00:00
Chris Lattner
6bd9f586d9 remove obsolete files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54630 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 06:12:45 +00:00
Chris Lattner
26e150f361 move some more stuff out of my email into readme.txt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54603 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-10 01:14:08 +00:00
Chris Lattner
c90b866797 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54602 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-10 00:47:21 +00:00