2006-10-15 03:53:48 +08:00
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
// Random Notes
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
2006-11-19 09:17:45 +08:00
|
|
|
C90/C99/C++ Comparisons:
|
|
|
|
http://david.tribble.com/text/cdiffs.htm
|
|
|
|
|
2006-10-15 01:39:56 +08:00
|
|
|
//===---------------------------------------------------------------------===//
|
2006-07-05 03:29:50 +08:00
|
|
|
|
|
|
|
To time GCC preprocessing speed without output, use:
|
2006-07-05 08:08:00 +08:00
|
|
|
"time gcc -MM file"
|
2006-10-15 01:39:56 +08:00
|
|
|
This is similar to -Eonly.
|
|
|
|
|
2009-01-17 03:33:59 +08:00
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
Creating and using a PTH file for performance measurement (use a release-asserts
|
|
|
|
build).
|
|
|
|
|
2009-09-25 06:03:45 +08:00
|
|
|
$ clang -ccc-pch-is-pth -x objective-c-header INPUTS/Cocoa_h.m -o /tmp/tokencache
|
2009-12-12 08:56:47 +08:00
|
|
|
$ clang -cc1 -token-cache /tmp/tokencache INPUTS/Cocoa_h.m
|
2006-11-08 13:53:27 +08:00
|
|
|
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
C++ Template Instantiation benchmark:
|
|
|
|
http://users.rcn.com/abrahams/instantiation_speed/index.html
|
|
|
|
|
2006-10-15 01:39:56 +08:00
|
|
|
//===---------------------------------------------------------------------===//
|
2006-07-10 14:34:50 +08:00
|
|
|
|
2006-11-06 01:54:43 +08:00
|
|
|
TODO: File Manager Speedup:
|
|
|
|
|
|
|
|
We currently do a lot of stat'ing for files that don't exist, particularly
|
|
|
|
when lots of -I paths exist (e.g. see the <iostream> example, check for
|
|
|
|
failures in stat in FileManager::getFile). It would be far better to make
|
|
|
|
the following changes:
|
|
|
|
1. FileEntry contains a sys::Path instead of a std::string for Name.
|
|
|
|
2. sys::Path contains timestamp and size, lazily computed. Eliminate from
|
|
|
|
FileEntry.
|
|
|
|
3. File UIDs are created on request, not when files are opened.
|
|
|
|
These changes make it possible to efficiently have FileEntry objects for
|
|
|
|
files that exist on the file system, but have not been used yet.
|
|
|
|
|
|
|
|
Once this is done:
|
|
|
|
1. DirectoryEntry gets a boolean value "has read entries". When false, not
|
|
|
|
all entries in the directory are in the file mgr, when true, they are.
|
|
|
|
2. Instead of stat'ing the file in FileManager::getFile, check to see if
|
|
|
|
the dir has been read. If so, fail immediately, if not, read the dir,
|
|
|
|
then retry.
|
|
|
|
3. Reading the dir uses the getdirentries syscall, creating an FileEntry
|
|
|
|
for all files found.
|
|
|
|
|
2007-12-04 06:26:16 +08:00
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
// Specifying targets: -triple and -arch
|
2009-11-14 02:50:18 +08:00
|
|
|
//===---------------------------------------------------------------------===//
|
2007-12-04 06:26:16 +08:00
|
|
|
|
2008-03-09 09:36:43 +08:00
|
|
|
The clang supports "-triple" and "-arch" options. At most one -triple and one
|
|
|
|
-arch option may be specified. Both are optional.
|
2007-12-04 06:26:16 +08:00
|
|
|
|
|
|
|
The "selection of target" behavior is defined as follows:
|
|
|
|
|
2008-03-09 09:36:43 +08:00
|
|
|
(1) If the user does not specify -triple, we default to the host triple.
|
|
|
|
(2) If the user specifies a -arch, that overrides the arch in the host or
|
|
|
|
specified triple.
|
2008-03-13 11:45:48 +08:00
|
|
|
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
|
|
|
|
verifyInputConstraint and verifyOutputConstraint should not return bool.
|
|
|
|
|
|
|
|
Instead we should return something like:
|
|
|
|
|
|
|
|
enum VerifyConstraintResult {
|
|
|
|
Valid,
|
|
|
|
|
|
|
|
// Output only
|
|
|
|
OutputOperandConstraintLacksEqualsCharacter,
|
|
|
|
MatchingConstraintNotValidInOutputOperand,
|
|
|
|
|
|
|
|
// Input only
|
|
|
|
InputOperandConstraintContainsEqualsCharacter,
|
|
|
|
MatchingConstraintReferencesInvalidOperandNumber,
|
|
|
|
|
|
|
|
// Both
|
|
|
|
PercentConstraintUsedWithLastOperand
|
|
|
|
};
|
|
|
|
|
|
|
|
//===---------------------------------------------------------------------===//
|