Commit Graph

45025 Commits

Author SHA1 Message Date
Ted Kremenek 675a6e6dfa Patch by Anders Bergh:
'There's not much to say about this patch, it just adds the Arch Linux
gcc 4.3.1 header paths for i686 and amd64. The patch was generated
using "svn diff" with clang at revision 52660. The paths aren't
distribution-specific, so they should work for all Linux distributions
using the default(?) names like "i686-pc-linux-gnu".'

llvm-svn: 52665
2008-06-24 03:33:47 +00:00
Dan Gohman 4aef821183 Fix some signed vs. unsigned issues in array and vector handling.
llvm-svn: 52664
2008-06-24 01:17:52 +00:00
Dan Gohman 02a2aaf2e7 Add a note about a potential PIC optimization.
llvm-svn: 52663
2008-06-24 00:53:07 +00:00
Dan Gohman 76600aa35c Fixes for being compiled PIC on Linux. This isn't the most
general solution possible, but it's a fairly simple one.
Based on a patch from the OpenGTL project!

llvm-svn: 52662
2008-06-24 00:50:01 +00:00
Owen Anderson 04bbf4b5b7 Remove an incorrect comment.
llvm-svn: 52660
2008-06-24 00:15:10 +00:00
Owen Anderson c2ec2f20f9 Use InstrSlots::NUM rather than pre-dividing by four. Also, mark this const.
llvm-svn: 52659
2008-06-24 00:08:35 +00:00
Dan Gohman 6269cc1ced Comment fixes, and make Schedule() pure virtual.
llvm-svn: 52658
2008-06-24 00:02:44 +00:00
Dan Gohman 9cc3f68ab1 A brief survey of priority_queue usage in the tree turned this up
as a questionable case, but the code isn't actually needed.

llvm-svn: 52657
2008-06-23 23:51:16 +00:00
Dan Gohman cb236f7de9 Add a clear() method to PriorityQueue.
llvm-svn: 52656
2008-06-23 23:47:46 +00:00
Bill Wendling c44659b92a This situation can occur:
,------.
    |      |
    |      v
    |   t2 = phi ... t1 ...
    |      |
    |      v
    |   t1 = ...
    |  ... = ... t1 ...
    |      |
    `------'

where there is a use in a PHI node that's a predecessor to the defining
block. We don't want to mark all predecessors as having the value "alive" in
this case. Also, the assert was too restrictive and didn't handle this case.

llvm-svn: 52655
2008-06-23 23:41:14 +00:00
Dan Gohman 0d8a61eb60 Use the new PriorityQueue in ScheduleDAGList too, which also
needs arbitrary-element removal.

llvm-svn: 52654
2008-06-23 23:40:09 +00:00
Ted Kremenek 0cfc16100b Added ObjCSummaryCache, a new summary cache object to cache summaries for Objective-C methods. Instead of mapping from Selectors -> Summaries, we will now map from (ObjCInterfaceDecl*,Selectors) -> Summaries. This will allow more nuanced summary generation. This patch just swaps in the new data structure; the rest of the code works as before by allowing the ObjCInterfaceDecl* to be null.
llvm-svn: 52653
2008-06-23 23:30:29 +00:00
Owen Anderson ba3e9de279 Add getScaledIntervalSize, which gives a measure of the size of an interval that is independent of the scaling of
the function due to empty index slots.  This is suitable for use in backend heuristics that need to reason about the density
of an interval.

llvm-svn: 52652
2008-06-23 23:25:37 +00:00
Dan Gohman abd8f41c81 Use use_empty() instead of getNumUses(), avoiding a use list traversal.
llvm-svn: 52651
2008-06-23 23:23:49 +00:00
Ted Kremenek ea736c5d02 Rename summary methods for "instance methods" to "class methods" (the names got screwed up). No functionality change.
llvm-svn: 52650
2008-06-23 22:21:20 +00:00
Owen Anderson 79d2fa52fa Use getMBBEndIdx rather than assuming that the end is right after the last instruction in the block.
llvm-svn: 52649
2008-06-23 22:12:23 +00:00
Dan Gohman ac563833ae Fix spelling and grammar in a comment.
llvm-svn: 52648
2008-06-23 22:11:52 +00:00
Bill Wendling e2af44d9c0 Extract the x86_64 part for the executables.
llvm-svn: 52647
2008-06-23 22:08:30 +00:00
Dan Gohman e7ccb2c8c1 Simplify erase_one slightly. It's not necessary to preserve
the value of the element to be erased while the heap is
being updated.

llvm-svn: 52646
2008-06-23 21:46:21 +00:00
Dan Gohman 48c5c7e860 Revamp the loop unroller, extending it to correctly update PHI nodes
in the presence of out-of-loop users of in-loop values and the trip
count is not a known multiple of the unroll count, and to be a bit
simpler overall. This fixes PR2253.

llvm-svn: 52645
2008-06-23 21:29:41 +00:00
Evan Cheng 71013f8c78 Remove option used to debug stack coloring bugs. It's no longer needed since stack coloring is now bug free.
llvm-svn: 52644
2008-06-23 21:24:32 +00:00
Evan Cheng 403e567043 Disable PRE. It's breaking bootstrapping.
llvm-svn: 52643
2008-06-23 21:22:35 +00:00
Dan Gohman fa63cc4e91 Move a DenseMap's declaration outside of a loop, and just call
clear() on each iteration. This avoids allocating and deallocating
all of DenseMap's memory on each iteration.

llvm-svn: 52642
2008-06-23 21:15:00 +00:00
Dan Gohman 29a8220501 Use StringMap instead of std::map<std::string, SDNode*>.
llvm-svn: 52641
2008-06-23 21:08:32 +00:00
Dan Gohman 54cf756621 Add methods to StringMap to erase entries by key.
llvm-svn: 52640
2008-06-23 21:07:03 +00:00
Evan Cheng c72dcd103c Instead of adding an isSS field to LiveInterval to denote stack slot. Use top bit of 'reg' instead. If the top bit is set, than the LiveInterval represents a stack slot live interval.
llvm-svn: 52639
2008-06-23 21:03:19 +00:00
Wojciech Matyjewicz 41b744dc51 First step to fix PR2088. Implement routine to compute the
multiplicative inverse of a given number. Modify udivrem to allow input and 
output pairs of arguments to overlap. Patch is based on the work by Chandler
Carruth.

llvm-svn: 52638
2008-06-23 19:39:50 +00:00
Dan Gohman b936ea7fc4 Update the .cvs files.
llvm-svn: 52637
2008-06-23 18:43:26 +00:00
Dan Gohman a7c3e0e120 Fix the types for NumElements variables, and add a comment
explaining why empty array constants use ValID::createUndef().

llvm-svn: 52636
2008-06-23 18:40:28 +00:00
Ted Kremenek 4c9e587db0 Updated latest checker build to checker-44.
llvm-svn: 52635
2008-06-23 18:32:25 +00:00
Ted Kremenek ab4a8b5213 The CF retain/release checker now assumes that allocations do not fail. Eventually we will add a flag to the driver to enable allocation failures (documented as a FIXME).
llvm-svn: 52632
2008-06-23 18:02:52 +00:00
Owen Anderson 54e02194a1 Tighten the conditions under which we do PRE, remove some unneeded code, and correct our preserved analyses list, since we
do now change the CFG by splitting critical edges during PRE.

llvm-svn: 52631
2008-06-23 17:49:45 +00:00
Chris Lattner 4d754bc97b minor tidying of comments.
llvm-svn: 52630
2008-06-23 17:11:23 +00:00
Dan Gohman 210e6c1876 Remove two convenience constructors because they're now private, and the
private implementation doesn't really need the convenience.

llvm-svn: 52629
2008-06-23 16:48:17 +00:00
Dan Gohman 031f0bba15 Use std::copy instead of a loop.
llvm-svn: 52628
2008-06-23 16:45:24 +00:00
Dan Gohman a469bdbcdf More changes from Chris' review: simplify getIndices and avoid
copying its return value.

llvm-svn: 52627
2008-06-23 16:39:44 +00:00
Dan Gohman 4193f34538 Remove an unnecessary cast.
llvm-svn: 52626
2008-06-23 16:38:10 +00:00
Ted Kremenek 75c93eed9a Update VS project files. Patch by Cedric Venet!
llvm-svn: 52625
2008-06-23 16:18:59 +00:00
Dan Gohman b4e2637e9b Duncan pointed out this code could be tidied.
llvm-svn: 52624
2008-06-23 15:29:14 +00:00
Dan Gohman 88ce1a5b6b Fix the syntax of insertvalue in the example.
llvm-svn: 52623
2008-06-23 15:26:37 +00:00
Duncan Sands d803ce29a8 Port some integer multiplication fixes from LegalizeDAG.
Bail out with an error if there is no libcall available
for the given size of integer.

llvm-svn: 52622
2008-06-23 15:15:44 +00:00
Duncan Sands 73ceffa3df Support for expanding the result of EXTRACT_ELEMENT.
llvm-svn: 52621
2008-06-23 15:08:15 +00:00
Duncan Sands bc12dce8bb Cleanup up LegalizeTypes handling of loads and
stores.

llvm-svn: 52620
2008-06-23 14:19:45 +00:00
Bill Wendling 559067c55c Make test work on non-x86 machines (like my G4 PPC).
llvm-svn: 52619
2008-06-23 06:16:31 +00:00
Owen Anderson 00fdbd01e5 At Chris' suggestion, move the liveness and worklist datastructures into
instance variables so they can be allocated just once, and reuse the worklist
as the dead list as well.

llvm-svn: 52618
2008-06-23 06:13:12 +00:00
Dan Gohman 5ca5e02480 Improve LSR's dead-phi detection to handle use-def cycles
with more than two nodes.

llvm-svn: 52617
2008-06-22 20:44:02 +00:00
Dan Gohman 90071075e2 Use Loop::block_iterator.
llvm-svn: 52616
2008-06-22 20:18:58 +00:00
Dan Gohman 05e8973559 Generalize createSCEV to be able to form SCEV expressions from
ConstantExprs.

llvm-svn: 52615
2008-06-22 19:56:46 +00:00
Dan Gohman 6829fffaee Use SCEVAddRecExpr::isAffine.
llvm-svn: 52614
2008-06-22 19:23:09 +00:00
Dan Gohman 1f2b2a4abe Remove unnecessary #includes.
llvm-svn: 52613
2008-06-22 19:21:26 +00:00