Commit Graph

42290 Commits

Author SHA1 Message Date
Ted Kremenek f6d2919a3e Updated Xcode project with HTMLDiagnostics.[h,cpp]
llvm-svn: 48866
2008-03-27 06:18:34 +00:00
Ted Kremenek 6efb026623 Added "HTMLDiagnostic", a generic DiagnosticClient (that also implements PathDiagnostic)
so that all diagnostics can be piped to HTML files instead of as text diagnostics using --html-diags.

llvm-svn: 48865
2008-03-27 06:17:42 +00:00
Ted Kremenek 710714c365 PathDiagnosticPiece no longer contains a vector of strings; just one string.
PathDiagnostic no longer contains a diagnostic ID or diagnostic level.

llvm-svn: 48864
2008-03-27 06:16:40 +00:00
Ted Kremenek c875201ee1 Fixed copy-paste error.
llvm-svn: 48863
2008-03-27 05:52:45 +00:00
Ted Kremenek 9c27b057da Added PathDiagnostic.[h,cpp] to Xcode project.
llvm-svn: 48862
2008-03-27 03:50:10 +00:00
Ted Kremenek 4fa20c9bba Added classes "PathDiagnosticPiece", "PathDiagnostic", and "PathDiagnosticClient", which encapsulate diagnostic reporting for paths.
llvm-svn: 48861
2008-03-27 03:49:32 +00:00
Ted Kremenek afa66e246e In ObjCMessageExpr: getSelector() const should just return "Selector", not "const Selector&" because Selector is just a smart pointer.
llvm-svn: 48860
2008-03-27 03:47:43 +00:00
Chris Lattner cb058e41a2 when a node is removed from an ilist, set its next/prev pointers to
null.  This means that uses of invalidated iterators will explode violently
with:
ilist:143: failed assertion `NodePtr && "++'d off the end of an ilist!"'

instead of happening to work "most of the time".

llvm-svn: 48859
2008-03-27 02:43:03 +00:00
Devang Patel c9c9e406ad New test case.
llvm-svn: 48858
2008-03-27 01:51:31 +00:00
Evan Cheng 308e564693 Code clean up.
llvm-svn: 48856
2008-03-27 01:45:11 +00:00
Evan Cheng 29e62a59f3 Allow certain lea instructions to be rematerialized.
llvm-svn: 48855
2008-03-27 01:41:09 +00:00
Evan Cheng 4fb07c6500 Remove an unused command line option.
llvm-svn: 48854
2008-03-27 01:30:24 +00:00
Evan Cheng 5832410d77 Fix a memory bug: increment an iterator of a deleted machine instr.
llvm-svn: 48853
2008-03-27 01:27:25 +00:00
Erick Tryzelaar 8ac07c2834 Expose ExecutionEngine::getTargetData() to c and ocaml bindings.
llvm-svn: 48851
2008-03-27 00:27:14 +00:00
Chuck Rose III f1dcb00266 Updating win32 VStudio project files with new file references and removing dead references.
llvm-svn: 48849
2008-03-27 00:02:53 +00:00
Dale Johannesen 87c6ada5de Fix a bug in Darwin EH: FDE->CIE pointer must
be relocatable.  Describe why .set is needed better.

llvm-svn: 48848
2008-03-26 23:31:39 +00:00
Steve Naroff c10c2e339f Fix rewriter tests to work with new output file logic. This changes forces the output to standard out (rather than generate a .cpp file, which is the new default for the rewriter).
llvm-svn: 48847
2008-03-26 22:28:40 +00:00
Ted Kremenek ea128437b3 Bug fix: use GetRVal instead of GetLVal (were getting the value of a DeclRefExpr, not it's address).
llvm-svn: 48846
2008-03-26 22:21:58 +00:00
Ted Kremenek 9dd6ddec63 Added test case for static analysis to warn about passing uninitialized values as arguments (not the receiver) in message expressions.
llvm-svn: 48845
2008-03-26 22:00:11 +00:00
Ted Kremenek a1d9ed137a Added test case for static analyzer to detect uses of uninitialized pointers as receivers in Objective-C message expressions.
Added test case directory "Analysis-Apple" which is only run on Apple (darwin) machines.

llvm-svn: 48844
2008-03-26 21:51:44 +00:00
Mikhail Glushenkov ea7cb37a5c Another test commit (with git-svn)
llvm-svn: 48843
2008-03-26 21:37:43 +00:00
Ted Kremenek cb047289a8 Bug fix in transfer function for ObjCMessageExpr: Visit the receiver expression as an ordinary expression, not using VisitLVal.
llvm-svn: 48842
2008-03-26 21:36:08 +00:00
Steve Naroff c06ee808d7 Alloc redeclaration of typedefs within ExternCSystemHeaderDir's AND SystemHeaderDir's.
llvm-svn: 48841
2008-03-26 21:27:00 +00:00
Mikhail Glushenkov 19e24df3a4 Test commit
llvm-svn: 48840
2008-03-26 21:18:58 +00:00
Evan Cheng db390694ff One more coalescer fix wrt deadness propagation.
llvm-svn: 48837
2008-03-26 20:15:49 +00:00
Evan Cheng 289ba4f335 Avoid commuting a def MI in order to coalesce a copy instruction away if any use of the same val# is a copy instruction that has already been coalesced.
llvm-svn: 48833
2008-03-26 19:03:01 +00:00
Roman Levenstein 358e04a185 Use a linked data structure for the uses lists of an SDNode, just like
LLVM Value/Use does and MachineRegisterInfo/MachineOperand does.
This allows constant time for all uses list maintenance operations.

The idea was suggested by Chris. Reviewed by Evan and Dan.
Patch is tested and approved by Dan.

On normal use-cases compilation speed is not affected. On very big basic
blocks there are compilation speedups in the range of 15-20% or even better. 

llvm-svn: 48822
2008-03-26 12:39:26 +00:00
Roman Levenstein 733a4d6e85 Fixed some spelling errors. Thanks, Duncan!
llvm-svn: 48819
2008-03-26 11:23:38 +00:00
Roman Levenstein 7e71b4baaf Some improvements related to the computation of isReachable.
This fixes Bugzilla #1835 (http://llvm.org/bugs/show_bug.cgi?id=1835).
This patched is reviewed by Tanya and Dan. Dan tested and approved it.

The reason for the bad performance of the old algorithm is that it is very naive and scans every
time all nodes of the DAG in the worst case.

This patch introduces  a new algorithm based on the paper "Online algorithms
for maintaining the topological order of a directed acyclic graph" by
David J.Pearce and Paul H.J.Kelly. This is the MNR algorithm. It has a
linear time worst-case and performs much better in most situations.

The paper can be found here:
http://fano.ics.uci.edu/cites/Document/Online-algorithms-for-maintaining-the-topological-order-of-a-directed-acyclic-graph.html

The main idea of the new algorithm is to compute the topological ordering of the SNodes in the
DAG and to maintain it even after DAG modifications. The topological ordering allows for very fast 
node reachability checks. 

Tests on very big  input files with tens of thousands of instructions in a BB indicate huge 
speed-ups (up to 10x compilation time improvement) compared to the old version.

llvm-svn: 48817
2008-03-26 09:18:09 +00:00
Evan Cheng 292063603e Fix some SSE4.1 instruction encoding bugs.
llvm-svn: 48815
2008-03-26 08:11:49 +00:00
Owen Anderson 5d2d1776e0 Dead PHI instructions need to be handled specially.
llvm-svn: 48811
2008-03-26 03:03:23 +00:00
Erick Tryzelaar 05acd73a73 Test commit (removed trailing whitespace)
llvm-svn: 48809
2008-03-26 00:38:56 +00:00
Dale Johannesen ad6c23d5e9 Use ## for comment delimiter on darwin x86-32, so
llvm's output .s files will go through gcc -std=c99
without triggering preprocesser errors.  Approach
suggested by Daveed Vandevoorde.

llvm-svn: 48808
2008-03-25 23:29:30 +00:00
Nuno Lopes 623207d603 allow the format attribute to be specified in function pointer prototypes
# this is my first commit here, so please be gentle :)

llvm-svn: 48807
2008-03-25 23:01:48 +00:00
Ted Kremenek 5efdf8457f Added hacked version of ccc script used to invoke the static analyzer. This
will gradually get pruned down, as it doesn't need to be as functional as
'ccc'.

llvm-svn: 48806
2008-03-25 22:35:32 +00:00
Evan Cheng ddc58ff92a Smaller function alignment when optimizing for size.
llvm-svn: 48805
2008-03-25 22:29:46 +00:00
Evan Cheng 88c44ef91f Rename option -optimizefor-size to -optimize-size.
llvm-svn: 48804
2008-03-25 22:28:39 +00:00
Owen Anderson 9f129318dc Remove some debugging code.
llvm-svn: 48803
2008-03-25 22:26:43 +00:00
Owen Anderson 1d46d45e35 StrongPHIElimination doesn't support swapping live intervals like the coalescer does.
llvm-svn: 48802
2008-03-25 22:25:27 +00:00
Dan Gohman c60c67fc37 Add explicit keywords.
llvm-svn: 48801
2008-03-25 22:06:05 +00:00
Dan Gohman bdc24adaaf A quick nm audit turned up several fixed tables and objects that were
marked read-write. Use const so that they can be allocated in a
read-only segment.

llvm-svn: 48800
2008-03-25 21:45:14 +00:00
Dan Gohman a7ba51f6ec Avoid outputing spaces at the ends of lines.
llvm-svn: 48797
2008-03-25 21:38:12 +00:00
Devang Patel 72cfe84f05 Do not align loops if optimizing for size.
llvm-svn: 48794
2008-03-25 21:03:02 +00:00
Devang Patel 246a52740b Add optimize-for-size knob.
llvm-svn: 48793
2008-03-25 21:02:35 +00:00
Evan Cheng df1690dc7c Handle a special case xor undef, undef -> 0. Technically this should be transformed to undef. But this is such a common idiom (misuse) we are going to handle it.
llvm-svn: 48792
2008-03-25 20:08:07 +00:00
Evan Cheng 2b72c05992 Handle a special case xor undef, undef -> 0. Technically this should be transformed to undef. But this is such a common idiom (misuse) we are going to handle it.
llvm-svn: 48791
2008-03-25 20:07:13 +00:00
Anton Korobeynikov 4c1559f54e Fix the Cygwin/Mingw-On-Cygwin build. Patch by Alain Frisch!
llvm-svn: 48786
2008-03-25 18:53:36 +00:00
Nate Begeman c506c78117 Extend QualType::getAddressSpace to do the right thing for array types, and in
the future, RecordTypes.

llvm-svn: 48784
2008-03-25 18:36:32 +00:00
Nate Begeman 03851eb91f Add missing files
llvm-svn: 48783
2008-03-25 18:31:12 +00:00
Bill Wendling e9e706a249 De-constify the input to the "operator >>" method as it is modified.
Patch by dekruijf@cs.wisc.edu!

llvm-svn: 48782
2008-03-25 18:16:52 +00:00