Commit Graph

42844 Commits

Author SHA1 Message Date
Duncan Sands a07136ee2d Merge LLVMBuilder and FoldingBuilder, calling
the result IRBuilder.  Patch by Dominic Hamon.

llvm-svn: 49604
2008-04-13 06:22:09 +00:00
Sam Bishop fcd78b02c2 Use static_cast<> instead of cast<> in Decl::Destroy(). Suggestion by Argiris
Kirtzidis!

llvm-svn: 49603
2008-04-13 04:32:18 +00:00
Chris Lattner a0a58b63f7 Gabor points out that reserveOperandSpace takes # of values,
not # of operands as an input.

llvm-svn: 49599
2008-04-13 00:14:42 +00:00
Chris Lattner b0d3844fb8 Default argument cleanups and minor improvements, patch by
Doug Gregor!

llvm-svn: 49598
2008-04-12 23:52:44 +00:00
Anton Korobeynikov b9f38f38fa Provide option for stack alignment override
llvm-svn: 49593
2008-04-12 22:12:22 +00:00
Chris Lattner 8fc77b7945 final cleanup, the code is now in a reviewable state.
llvm-svn: 49592
2008-04-12 22:04:18 +00:00
Chris Lattner cbb6bad435 move the DeltaTree implementation out of line, remove debugging printfs etc.
llvm-svn: 49591
2008-04-12 22:00:40 +00:00
Chris Lattner 0c8d17fc43 remove ifdefs
llvm-svn: 49587
2008-04-12 20:34:05 +00:00
Chris Lattner d154731131 Do an initial hack at replacing one of the incredibly inefficient
(but simple!) datastructures in the rewriter with a more complex but
more efficient one.

This replaces the Deltas vector with a specialized BTree that makes
delta lookups much more efficient.  This speeds up -emit-html on a 500K
.i file from 157.154 to 27.127 seconds on my machine (5.8x).

While this code is functional, it isn't very pretty, I have much 
refactoring planned for it, and will remove the USE_VECTOR ifdef.
Stay tuned.

llvm-svn: 49586
2008-04-12 20:28:24 +00:00
Arnold Schwaighofer 634fc9a33a This patch corrects the handling of byval arguments for tailcall
optimized x86-64 (and x86) calls so that they work (... at least for
my test cases).

Should fix the following problems:

Problem 1: When i introduced the optimized handling of arguments for
tail called functions (using a sequence of copyto/copyfrom virtual
registers instead of always lowering to top of the stack) i did not
handle byval arguments correctly e.g they did not work at all :).

Problem 2: On x86-64 after the arguments of the tail called function
are moved to their registers (which include ESI/RSI etc), tail call
optimization performs byval lowering which causes xSI,xDI, xCX
registers to be overwritten. This is handled in this patch by moving
the arguments to virtual registers first and after the byval lowering
the arguments are moved from those virtual registers back to
RSI/RDI/RCX.

llvm-svn: 49584
2008-04-12 18:11:06 +00:00
Duncan Sands 844d55a42a Factor some libcall code.
llvm-svn: 49583
2008-04-12 17:14:18 +00:00
Argyrios Kyrtzidis 740525a6b7 Use std::list's push_back instead of resize to add an element.
llvm-svn: 49582
2008-04-12 12:38:58 +00:00
Chris Lattner 8f96d04ceb don't diagnose empty source files, thanks Neil!
llvm-svn: 49575
2008-04-12 05:54:25 +00:00
Dan Gohman 544ab2c50b Drop ISD::MEMSET, ISD::MEMMOVE, and ISD::MEMCPY, which are not Legal
on any current target and aren't optimized in DAGCombiner. Instead
of using intermediate nodes, expand the operations, choosing between
simple loads/stores, target-specific code, and library calls,
immediately.

Previously, the code to emit optimized code for these operations
was only used at initial SelectionDAG construction time; now it is
used at all times. This fixes some cases where rep;movs was being
used for small copies where simple loads/stores would be better.

This also cleans up code that checks for alignments less than 4;
let the targets make that decision instead of doing it in
target-independent code. This allows x86 to use rep;movs in
low-alignment cases.

Also, this fixes a bug that resulted in the use of rep;stos for
memsets of 0 with non-constant memory size when the alignment was
at least 4. It's better to use the library in this case, which
can be significantly faster when the size is large.

This also preserves more SourceValue information when memory
intrinsics are lowered into simple loads/stores.

llvm-svn: 49572
2008-04-12 04:36:06 +00:00
Dan Gohman 8c7cf88f7e Fix a bug that prevented x86-64 from using rep.movsq for
8-byte-aligned data.

llvm-svn: 49571
2008-04-12 02:35:39 +00:00
Argyrios Kyrtzidis dfd52220d7 Fixed comments.
Moved IdDeclInfo class to anonymous namespace.
Replaced array with a std::vector.

llvm-svn: 49570
2008-04-12 01:50:47 +00:00
Nate Begeman 7417348a7e 80 col fix
llvm-svn: 49569
2008-04-12 00:47:57 +00:00
Nate Begeman 4840515dff Restore code to disable crash catcher on older OS X systems
llvm-svn: 49568
2008-04-12 00:47:46 +00:00
Argyrios Kyrtzidis b8a4920d62 Added PushOnScopeChains method to Sema, that adds a decl to both the IdResolver and the Scope.
llvm-svn: 49567
2008-04-12 00:47:19 +00:00
Evan Cheng 213ea6b276 Add debugging code.
llvm-svn: 49566
2008-04-12 00:22:01 +00:00
Fariborz Jahanian 4572b45574 AST generation for objc2's property declarations.
llvm-svn: 49565
2008-04-11 23:40:25 +00:00
Ted Kremenek 8784a7c006 Add some boilerplate to report memory leaks at the end of an analyzed function.
Still need some boilerplate in BugReporter to report bugs at the end
of a function (not associated with a particular statement).

llvm-svn: 49564
2008-04-11 22:25:11 +00:00
Ted Kremenek bc888b47b9 Added "EvalEndPath" to GRTransferFuncs: the default implementation does not
change the state (and thus the GREndPathNodeBuilder automatically contructs a
node).

llvm-svn: 49563
2008-04-11 22:07:59 +00:00
Ted Kremenek 811c2b4edb Added "GREndPathNodeBuilder", a new node builder that will be used for
evaluating transfer functions at the end-of-path.

llvm-svn: 49561
2008-04-11 22:03:04 +00:00
Ted Kremenek 0a86fdb1ff Added FIXME
llvm-svn: 49558
2008-04-11 20:51:02 +00:00
Ted Kremenek 831f327568 Fix regression introduced by my last commit.
llvm-svn: 49556
2008-04-11 20:23:24 +00:00
Ted Kremenek a7c44113bc Changed behavior of how we handle "NULL" summaries: just call
GRSimpleVals::EvalCal(), and don't change reference counts.

Remove "getDoNothingSummary()", as a NULL summary does the same thing.

Added temporary hack for the "Get" rule for objects that return a pointer type:
treat them as non-owned CF objects.

Added test case to detect the release of a non-owned object.

llvm-svn: 49555
2008-04-11 20:11:19 +00:00
Steve Naroff 5a4611cdda Add class and super class location info to ObjCInterfaceDecl...
llvm-svn: 49553
2008-04-11 19:35:35 +00:00
Ted Kremenek 988990f842 Use RangedBugReport to report better ranges for reference count errors.
llvm-svn: 49552
2008-04-11 18:40:51 +00:00
Ted Kremenek 6e38ffa517 Added "RangedBugReport".
llvm-svn: 49551
2008-04-11 18:40:29 +00:00
Ted Kremenek 2cf508c880 Update Xcode project with missing files.
llvm-svn: 49550
2008-04-11 18:30:21 +00:00
Chris Lattner ad281e8e19 Reenable JIT symbol table.
llvm-svn: 49548
2008-04-11 18:11:56 +00:00
Sam Bishop ef8b94ae84 Invoke destructors in Decl::Destroy().
llvm-svn: 49547
2008-04-11 18:04:39 +00:00
Evan Cheng 305d268ac3 Do not add empty live intervals to handled_. They should never be undone for backtracking.
llvm-svn: 49544
2008-04-11 17:55:47 +00:00
Evan Cheng 33281864c1 If a PHI node has a single implicit_def source, replace it with an implicit_def instead of a copy.
llvm-svn: 49543
2008-04-11 17:54:45 +00:00
Evan Cheng 499ffa9055 Use of implicit_def is not part of live interval. Create empty intervals for the uses when the live interval is being spilled.
llvm-svn: 49542
2008-04-11 17:53:36 +00:00
Devang Patel bde1bbed16 Change llvm tools install location.
llvm-svn: 49540
2008-04-11 17:45:39 +00:00
Fariborz Jahanian 963767476c Minor changes per Chris L's review.
llvm-svn: 49539
2008-04-11 16:55:42 +00:00
Chris Lattner 0b596c3f5a improvements for IntrusiveRefCntPtr, patch by Mikhail Glushenkov
llvm-svn: 49538
2008-04-11 16:42:06 +00:00
Chris Lattner 9b7206eb4f don't read off the front of the buffer. Thanks to Sam for pointing this out.
llvm-svn: 49535
2008-04-11 16:20:41 +00:00
Sam Bishop 703ae9624b Stub out and start using a Decl::Destroy() method.
llvm-svn: 49532
2008-04-11 15:01:25 +00:00
Sam Bishop 4c088b766d Use the ASTContext allocator when creating deserialized Decl objects.
llvm-svn: 49530
2008-04-11 14:49:10 +00:00
Duncan Sands 21285fc04c The Ada front-end from the LLVM 2.2 release
cannot be build with GNAT GPL 2006, only with
GNAT GPL 2005.

llvm-svn: 49529
2008-04-11 13:24:43 +00:00
Gabor Greif c422383e08 detabify
llvm-svn: 49524
2008-04-11 09:34:57 +00:00
Chris Lattner 9950c80c83 two new files for previous patch, by Argiris Kirtzidis
llvm-svn: 49521
2008-04-11 07:06:57 +00:00
Chris Lattner c5c95b52a8 Switch sema to maintaining its own scope chain information for variable
shadowing, instead of threading it through the AST.  This patch contributed
by Argiris Kirtzidis!

llvm-svn: 49520
2008-04-11 07:00:53 +00:00
Chris Lattner 47fb9efa5d Fix rdar://5843510 don't assert and die when an invalid output
file is specified, print a happy little error message.

llvm-svn: 49518
2008-04-11 06:14:11 +00:00
Owen Anderson 90bde997b3 Add testcase for PR2213.
llvm-svn: 49517
2008-04-11 05:13:32 +00:00
Owen Anderson 1e73f29a7f Fix PR2213 by simultaneously making GVN more aggressive with the return values
of calls and less aggressive with non-readnone calls.

llvm-svn: 49516
2008-04-11 05:11:49 +00:00
Evan Cheng b53d560150 New test.
llvm-svn: 49514
2008-04-10 23:49:09 +00:00