Commit Graph

17 Commits

Author SHA1 Message Date
Chris Lattner d427542a9b Implement a simple cache in headersearch. This speeds up
preprocessing 483.xalancbmk by about 10%, reducing the number
of file lookup queries from 2139411 to 199466 (over 10x)

llvm-svn: 40390
2007-07-22 07:28:00 +00:00
Chris Lattner 23b7eb677d Finally bite the bullet and make the major change: split the clang namespace
out of the llvm namespace.  This makes the clang namespace be a sibling of
llvm instead of being a child.

The good thing about this is that it makes many things unambiguous.  The
bad things is that many things in the llvm namespace (notably data structures
like smallvector) now require an llvm:: qualifier.  IMO, libsystem and libsupport
should be split out of llvm into their own namespace in the future, which will fix
this issue.

llvm-svn: 39659
2007-06-15 23:05:46 +00:00
Bill Wendling 44ebec5310 Submitted by: Bill Wendling
Removed #include <iostream>.

llvm-svn: 39554
2007-06-02 05:06:35 +00:00
Chris Lattner 23d890337b Specify an initial size for StringMap.
llvm-svn: 39378
2007-04-03 22:14:25 +00:00
Chris Lattner 34d1f5a8de adjust to CStringMap interface change.
llvm-svn: 39333
2007-02-08 19:08:49 +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 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 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 5ed76da296 Implement framework filesystem caching.
llvm-svn: 39031
2006-10-22 07:24:13 +00:00
Chris Lattner 641a0be31b count # framework lookups
llvm-svn: 39026
2006-10-20 06:23:14 +00:00
Chris Lattner 577377e847 Speed up [sub]framework searching
llvm-svn: 39017
2006-10-20 04:55:45 +00:00
Chris Lattner 63dd32b656 Implement subframework lookup
llvm-svn: 39015
2006-10-20 04:42:40 +00:00
Chris Lattner 59a9ebdb17 refactor header searching stuff out of the main Preprocessor object into
it's own HeaderSearch object.  This makes Preprocessor simpler and easier
to understand.

llvm-svn: 39012
2006-10-18 05:34:33 +00:00