Commit Graph

42290 Commits

Author SHA1 Message Date
Ted Kremenek 2c71d51513 Added initial hacked support for display path diagnostics with
GRSimpleVals warnings.  Cleaning up, but now we get multiple bubbles (branches are annotated).

llvm-svn: 49077
2008-04-02 05:15:22 +00:00
Ted Kremenek 52595d7551 Fix copy-paste error.
llvm-svn: 49076
2008-04-02 05:13:10 +00:00
Chris Lattner 800817bf6d remove blank line.
llvm-svn: 49075
2008-04-02 05:09:38 +00:00
Chris Lattner 091718d300 print cvr qualifiers on simplified typedefs
llvm-svn: 49074
2008-04-02 05:06:23 +00:00
Ted Kremenek cb75937198 Added special handling when the build command is "gcc", "cc", or "llvm-gcc";
in these cases we directly call ccc-analyzer.

llvm-svn: 49073
2008-04-02 04:43:42 +00:00
Chris Lattner 24d5bfe0b2 rename some variables, fix 80 col violation. No
functionality change.

llvm-svn: 49072
2008-04-02 04:24:33 +00:00
Sam Bishop 02f78df76b a bunch of random cleanups
llvm-svn: 49071
2008-04-02 03:35:43 +00:00
Owen Anderson 2412158111 In some situations, we need to check for local interferences between the PHI
node and its inputs.

llvm-svn: 49070
2008-04-02 03:00:13 +00:00
Owen Anderson edfc2eb558 Correctly mark a valno that was previous defined by a PHI node as having an
unknown defining inst after PHI elimination.

llvm-svn: 49069
2008-04-02 02:12:45 +00:00
Chris Lattner 81cb9e8637 Fix PR2017 and silence some bogus errors.
llvm-svn: 49068
2008-04-02 01:05:10 +00:00
Steve Naroff 9b94b17806 Fix a comment typo and add a couple suggestions from Chris.
llvm-svn: 49066
2008-04-02 00:39:51 +00:00
Chris Lattner 1f17cce2eb more edits from Jon Sargeant
llvm-svn: 49065
2008-04-02 00:38:26 +00:00
Dale Johannesen fd967cf3fa Recommitting EH patch; this should answer most of the
review feedback.
-enable-eh is still accepted but doesn't do anything.
EH intrinsics use Dwarf EH if the target supports that,
and are handled by LowerInvoke otherwise.
The separation of the EH table and frame move data is,
I think, logically figured out, but either one still
causes full EH info to be generated (not sure how to
split the metadata correctly).
MachineModuleInfo::needsFrameInfo is no longer used and
is removed.

llvm-svn: 49064
2008-04-02 00:25:04 +00:00
Evan Cheng ac38d444e2 1. Drop default inline threshold back down to 200.
2. Do not use # of basic blocks as part of the cost computation since it doesn't really figure into function size.
3. More aggressively inline function with vector code.

llvm-svn: 49061
2008-04-01 23:59:29 +00:00
Tanya Lattner 052838c55d Reverting 49056 due to the build being broken.
llvm-svn: 49060
2008-04-01 23:41:44 +00:00
Evan Cheng b86595fb0a ReMat of load from stub in pic mode extends the life of pic base. Currently spiller doesn't do a good job of estimating the impact. Disable for now.
llvm-svn: 49059
2008-04-01 23:26:12 +00:00
Steve Naroff 257520b1b4 Fairly large "cleaup" related to changing ObjCCompatibleAliasDecl superclass (to inherit from NamedDecl, instead of ScopedDecl).
- Added a DenseMap to associate an IdentifierInfo with the ObjCCompatibleAliasDecl.
- Renamed LookupScopedDecl->LookupDecl and changed it's return type to Decl. Also added lookup for ObjCCompatibleAliasDecl's.
- Removed Sema::LookupInterfaceDecl(). Converted clients to used LookupDecl().
- Some minor indentation changes.

Will deal with ObjCInterfaceDecl and getObjCInterfaceDecl() in a separate commit...

llvm-svn: 49058
2008-04-01 23:04:06 +00:00
Ted Kremenek 94896e17bb Patch by Argiris Kirtzidis: Fix a dangling pointer error!
llvm-svn: 49057
2008-04-01 22:35:58 +00:00
David Greene 7f7edc3824 Iterators folloring a SmallVector erased element are invalidated so
don't access cached iterators from after the erased element.

llvm-svn: 49056
2008-04-01 22:14:23 +00:00
Bill Wendling fc9f25dab0 Fix compilation errors on MSVC. Patch by Argiris Kirtzidis!
llvm-svn: 49055
2008-04-01 22:09:20 +00:00
Evan Cheng 19a6dd9f2a Remove unnecessary and non-deterministic checking code. Re-enable remat of load from gv stub.
llvm-svn: 49054
2008-04-01 21:38:20 +00:00
Evan Cheng 985a0b51d7 Re-materialization is for uses only.
llvm-svn: 49053
2008-04-01 21:37:32 +00:00
Ted Kremenek ce4f31d3ce Minor cleanups.
llvm-svn: 49052
2008-04-01 21:36:28 +00:00
Ted Kremenek 33187168ab Added help text for scan-build.
llvm-svn: 49051
2008-04-01 21:22:03 +00:00
Dan Gohman cb9f8f6e4e Don't use __bzero for memset if the second argument isn't zero.
llvm-svn: 49050
2008-04-01 20:56:18 +00:00
Ted Kremenek bf1a7c6440 Initial checking of 'scan-build' script, a script used to wrap builds and
interpose calls to gcc with calls to the analyzer.

llvm-svn: 49049
2008-04-01 20:47:38 +00:00
Dan Gohman 980d7200c1 Speculatively micro-optimize memory-zeroing calls on Darwin 10.
llvm-svn: 49048
2008-04-01 20:38:36 +00:00
Dale Johannesen 5e4e051c2a Revert 49006 for the moment.
llvm-svn: 49046
2008-04-01 20:00:57 +00:00
Chris Lattner 81f929763c add a dropped hunk from Jon Sargeant's patch.
llvm-svn: 49045
2008-04-01 18:47:32 +00:00
Chris Lattner 1429e6fb29 make langref more precise, wave 1, from Jon Sargeant
llvm-svn: 49044
2008-04-01 18:45:27 +00:00
Owen Anderson 49dd9f16a9 Don't dereference MBB->end().
llvm-svn: 49043
2008-04-01 18:05:08 +00:00
Chris Lattner 595cf9ff81 Update to match simplified llvm MemoryBuffer interfaces for files.
llvm-svn: 49042
2008-04-01 18:04:30 +00:00
Chris Lattner 6f2ffdb73f Change the MemoryBuffer::getFile* methods to take just a pointer to the
start of a filename, not a filename+length.  All clients can produce a
null terminated name, and the system api's require null terminated 
strings anyway.

llvm-svn: 49041
2008-04-01 18:04:03 +00:00
Chris Lattner 5db870c904 minor typo
llvm-svn: 49040
2008-04-01 18:02:36 +00:00
Evan Cheng 306e3dcff4 Disabling remat of load from gv stub (temporarily) again to fix llvmgcc bootstrap miscompare.
llvm-svn: 49037
2008-04-01 07:33:13 +00:00
Chris Lattner ba98fca5e5 add some #includes.
llvm-svn: 49036
2008-04-01 06:25:23 +00:00
Chris Lattner 18356d8857 MappedFile is dead, remove it.
llvm-svn: 49035
2008-04-01 06:20:44 +00:00
Chris Lattner 4c5e15f7da Implement Path::MapInFilePages/UnMapFilePages on unix, which
provides fast MappedFile::getFile for large files.

llvm-svn: 49034
2008-04-01 06:16:24 +00:00
Chris Lattner 4f6002c79a prune dead #includes
llvm-svn: 49033
2008-04-01 06:08:11 +00:00
Chris Lattner 47448288ee MemoryBuffer::getFile got smarter, obviating the need for readfilefast.
The new MemoryBuffer doesn't "leak" file descriptors and handles the
small file case efficiently.

llvm-svn: 49032
2008-04-01 06:06:37 +00:00
Chris Lattner a542518315 Reimplement MemoryBuffer::getFile with three enhancements:
1) stop using MappedFile.
2) if profitable use the sys::path::MapInFilePages api to
   read the file.
3) otherwise fallback to read.

When sys::path::MapInFilePages is implemented, this provides
several benefits:

#1: this avoids fragmenting memory for small files.
#2: this avoids extraneous stat calls when the file size is known.
#3: this only keeps the file descriptor open while reading the 
    file, not for the duration of the lifetime of the memory 
    buffer.  This fixes a serious clang FD 'leak' problem.

I believe that this will work on a win32 machine, but I don't have
one to test on.  I'd appreciate it if someone could check.

llvm-svn: 49031
2008-04-01 06:05:21 +00:00
Chris Lattner 3089e1d82e Stub out some sys::Path::MapInFilePages/UnMapFilePages methods.
llvm-svn: 49030
2008-04-01 06:00:12 +00:00
Chris Lattner d4310a27aa change the archive stuff to use MemoryBuffer instead of mappedfile.
MemoryBuffer is higher level and more closely matches the model
needed.

llvm-svn: 49029
2008-04-01 04:26:46 +00:00
Chris Lattner 014dea94b2 prune unneeded #includes
llvm-svn: 49028
2008-04-01 04:00:45 +00:00
Chris Lattner 4ac7bb0294 rewrite SourceFile to be in terms of MemoryBuffer, not MappedFile.
llvm-svn: 49027
2008-04-01 03:59:34 +00:00
Chris Lattner 64959dcf03 Make MappedFile::map return a const correct pointer, don't leak address space on Unix platforms.
llvm-svn: 49026
2008-04-01 03:49:38 +00:00
Chris Lattner bcfa564759 Remove the MappedFile::charBase member, rename base -> getBase() and
make getBase() return a const-correct pointer.

llvm-svn: 49025
2008-04-01 03:40:53 +00:00
Chris Lattner 314a1414d0 Change DiffFilesWithTolerance to be written in terms of MemoryBuffer,
not an mmapped file.  This more closely matches its requirements and
provides an implicitly null terminated buffer, something this
routine had to emulate itself before.

llvm-svn: 49024
2008-04-01 03:39:49 +00:00
Chris Lattner 5a7d4e4f6d add an accessor.
llvm-svn: 49023
2008-04-01 03:20:31 +00:00
Chris Lattner 62385ba3a0 Remove MappedFile support for mapping files for write and exec
and shared.  This complicates the design, is not used, and probably
doesn't even work.

llvm-svn: 49022
2008-04-01 03:10:22 +00:00