Commit Graph

34061 Commits

Author SHA1 Message Date
Chris Lattner 569ce145d8 rename Builder.cpp -> ASTBuilder.cpp
llvm-svn: 39096
2006-11-03 06:45:47 +00:00
Chris Lattner 7cee11f078 Export the ASTBuilder class from the AST module.
llvm-svn: 39095
2006-11-03 06:42:29 +00:00
Chris Lattner db9c7f284a minor updates
llvm-svn: 39094
2006-10-31 00:54:25 +00:00
Chris Lattner 9f6604fa60 Add altivec version of block comment skipping code.
llvm-svn: 39093
2006-10-30 20:01:22 +00:00
Chris Lattner c07ba1fe2f Refactor the paths used for checking and getting the spelling of #include
filenames (and also '#pragma GCC dependency' of course).  Now, assuming
no cleaning is needed, we can go all the way from lexing the filename to
doing filename lookups with no mallocs.  This speeds up user PP time from
0.077 to 0.075s for Cocoa.h (2.6%).

llvm-svn: 39092
2006-10-30 05:58:32 +00:00
Chris Lattner b8b94f1e9b Make Preprocessor::LookupFile take a character range instead of a string.
This avoids some copying in its clients.

llvm-svn: 39091
2006-10-30 05:38:06 +00:00
Chris Lattner 7cdbad945d Push strings out of the HeaderSearch interface, it now deals solely with
character ranges.

llvm-svn: 39090
2006-10-30 05:33:15 +00:00
Chris Lattner ee7bf89cd6 Change framework cache map from map to CStringMap. This speeds up PP user
time on Cocoa.h from 0.078 to 0.077s.

llvm-svn: 39089
2006-10-30 05:19:23 +00:00
Chris Lattner b201d9b13d Eliminate string use in DoFrameworkLookup. This speeds up pp of Cocoa.h
marginally from 0.079 to 0.078s.

llvm-svn: 39088
2006-10-30 05:09:49 +00:00
Chris Lattner cf8ddac4bc Use SmallString instead of string in HeaderSearch::LookupFile. This avoids
malloc traffic, speeding up user time preprocessing Carbon.h 5% (0.083s to
0.079s).

llvm-svn: 39087
2006-10-30 04:42:33 +00:00
Chris Lattner 9c59bdace4 simplify logic, eliminate a copy of string data.
llvm-svn: 39086
2006-10-30 04:34:28 +00:00
Chris Lattner 2f4a89a5e8 Switch the FileManager::FileEntries map over to using a CStringMap. This
speeds up preprocessing Cocoa.h 16% (from 0.99 to 0.85s).

llvm-svn: 39085
2006-10-30 03:55:17 +00:00
Chris Lattner 43fd42e4d9 Wean LookupSubframeworkHeader off std::strings, use the new SmallString
class instead.  SmallString allows to code to avoid hitting malloc in
the normal case (or will, when some other stuff is converted over).

llvm-svn: 39084
2006-10-30 03:40:58 +00:00
Chris Lattner a85cbe28a0 Avoid storing a directory name in both the DirEntries map keys and in the
UniqueDirs value.  Instead, just have the UniqueDirs value contain a pointer
to the key in the DirEntries map.

llvm-svn: 39083
2006-10-30 03:11:40 +00:00
Chris Lattner af65375944 Switch DirEntries over to using a CStringMap. This speeds it up
'clang -Eonly INPUTS/Cocoa_h.m' by about 4%.

llvm-svn: 39082
2006-10-30 03:06:54 +00:00
Chris Lattner 8b1e848a04 Avoid some mallocs, and avoid leaking some memory, by making the
UniqueDirs/UniqueFiles maps own the memory for the FileEntry and DirEntries.

llvm-svn: 39081
2006-10-30 02:45:16 +00:00
Chris Lattner da933aac0c remove some temporary testing code
llvm-svn: 39080
2006-10-29 23:49:15 +00:00
Chris Lattner 2b9e19be87 Pull the string hashtable out of the IdentifierTable, moving into LLVM's
libsupport.  Now it can be used for other things besides identifier hashing.

llvm-svn: 39079
2006-10-29 23:43:13 +00:00
Chris Lattner ec659fce46 move memory allocation abstraction stuff out into LLVM's libsupport
llvm-svn: 39078
2006-10-29 22:09:44 +00:00
Chris Lattner cf163aa407 no need for these classes to be so friendly anymore.
llvm-svn: 39077
2006-10-29 21:37:52 +00:00
Chris Lattner 3bc804ed3d genericize IdentifierInfo interface to make it work more naturally.
llvm-svn: 39076
2006-10-28 23:46:24 +00:00
Chris Lattner 2abeb12df6 Fix building after the pure virtual function name changed.
llvm-svn: 39075
2006-10-28 19:51:26 +00:00
Steve Naroff b419d3a80e - Added basic structure for parsing top level Objective-C forms.
- Extended the typedef mechanism for classes, improved performance of the common case.
- Implemented @class in the parser.

llvm-svn: 39074
2006-10-27 23:18:49 +00:00
Chris Lattner 21b691d573 add some of the smaller test inputs I use.
llvm-svn: 39073
2006-10-27 18:15:56 +00:00
Chris Lattner 00a6be6f7b test again
llvm-svn: 39072
2006-10-27 18:09:32 +00:00
Chris Lattner a0ed5fe382 test
llvm-svn: 39071
2006-10-27 18:03:57 +00:00
Chris Lattner 91e911ad75 test
llvm-svn: 39070
2006-10-27 18:00:23 +00:00
Chris Lattner bcb416bbd5 Implement test/Preprocessor/comment_save_if.c
llvm-svn: 39069
2006-10-27 05:43:50 +00:00
Chris Lattner ce999c490a new testcase
llvm-svn: 39068
2006-10-27 05:43:33 +00:00
Chris Lattner 9916c5ca7e Remove GNU C++ min/max operator extension support, they have been removed
from gcc mainline.

llvm-svn: 39067
2006-10-27 05:24:37 +00:00
Chris Lattner ffda89611f Change DirectoryEntry::getName() to return a const char *
llvm-svn: 39066
2006-10-27 05:15:55 +00:00
Chris Lattner 480434865d change FileEntry::getName to return a const char*.
llvm-svn: 39065
2006-10-27 05:12:36 +00:00
Chris Lattner 1eb290b2e9 remove namelen field, it is now dead
llvm-svn: 39064
2006-10-27 05:07:16 +00:00
Chris Lattner 56bdb9a9a1 Remove identifier length field from IdentifierInfo, it is now dead.
llvm-svn: 39063
2006-10-27 05:06:38 +00:00
Chris Lattner a883116ece fix bug reprobing.
llvm-svn: 39062
2006-10-27 04:54:47 +00:00
Chris Lattner 089e51923e remove todo
llvm-svn: 39061
2006-10-27 04:53:38 +00:00
Chris Lattner aded4a977d Implement an sse2 version of the block comment scanner.
llvm-svn: 39060
2006-10-27 04:42:31 +00:00
Chris Lattner 6cc3e36cd7 Speed up block comment skipping by 35%.
llvm-svn: 39059
2006-10-27 04:12:35 +00:00
Chris Lattner f2e3ac3b54 reimplement identifier hash table in terms of a probed table instead of a chained
table.  This is about 25% faster for identifier lookup.  This also implements
resizing of the hash table.

llvm-svn: 39058
2006-10-27 03:59:10 +00:00
Chris Lattner 341fd06d3c Use the full hash as a filter to reduce # strcmps
llvm-svn: 39057
2006-10-26 05:18:38 +00:00
Chris Lattner 893f272c39 Track the full (not mod the hash table size) hash value for each token.
This lets us find interesting properties of the hash distribution.

llvm-svn: 39056
2006-10-26 05:12:31 +00:00
Chris Lattner 05646c7f0e Fix these to allow clang to be in any dir.
llvm-svn: 39055
2006-10-26 04:56:55 +00:00
Chris Lattner a32cda40b5 make this harder
llvm-svn: 39054
2006-10-25 06:21:19 +00:00
Chris Lattner 1178cbd941 new testcase
llvm-svn: 39053
2006-10-25 06:18:35 +00:00
Chris Lattner ece49761a3 update comment
llvm-svn: 39052
2006-10-25 05:55:51 +00:00
Chris Lattner 5f84a0648d add ast node for ifstmt
llvm-svn: 39051
2006-10-25 05:55:20 +00:00
Chris Lattner c52b118676 Handle __extension__ as a unary operator if requested.
llvm-svn: 39050
2006-10-25 05:45:55 +00:00
Chris Lattner 0535ebb3bd only add to LastInGroupList if at the top-level.
llvm-svn: 39049
2006-10-25 05:28:22 +00:00
Chris Lattner 6d9a685d75 Make the driver print function bodies at -parse-print-ast
llvm-svn: 39048
2006-10-25 05:11:20 +00:00
Chris Lattner b19f796e97 llvm has no EH by default, no need for these flags.
llvm-svn: 39047
2006-10-25 05:09:05 +00:00