Add include needed for MSVC.
[clang/acc.git] / NOTES.txt
blob3b5ad16e3e10bac32e4c4500d22257ffdf16b45a
1 //===---------------------------------------------------------------------===//
2 // Random Notes
3 //===---------------------------------------------------------------------===//
5 C90/C99/C++ Comparisons:
6 http://david.tribble.com/text/cdiffs.htm
8 //===---------------------------------------------------------------------===//
10 To time GCC preprocessing speed without output, use:
11    "time gcc -MM file"
12 This is similar to -Eonly.
14 //===---------------------------------------------------------------------===//
16 Creating and using a PTH file for performance measurement (use a release-asserts
17 build).
19 $ clang -x objective-c-header INPUTS/Cocoa_h.m -o /tmp/tokencache
20 $ clang -token-cache /tmp/tokencache INPUTS/Cocoa_h.m
22 //===---------------------------------------------------------------------===//
24   C++ Template Instantiation benchmark:
25      http://users.rcn.com/abrahams/instantiation_speed/index.html
27 //===---------------------------------------------------------------------===//
29 TODO: File Manager Speedup:
31  We currently do a lot of stat'ing for files that don't exist, particularly
32  when lots of -I paths exist (e.g. see the <iostream> example, check for
33  failures in stat in FileManager::getFile).  It would be far better to make
34  the following changes:
35    1. FileEntry contains a sys::Path instead of a std::string for Name.
36    2. sys::Path contains timestamp and size, lazily computed.  Eliminate from
37       FileEntry.
38    3. File UIDs are created on request, not when files are opened.
39  These changes make it possible to efficiently have FileEntry objects for
40  files that exist on the file system, but have not been used yet.
42  Once this is done:
43    1. DirectoryEntry gets a boolean value "has read entries".  When false, not
44       all entries in the directory are in the file mgr, when true, they are.
45    2. Instead of stat'ing the file in FileManager::getFile, check to see if 
46       the dir has been read.  If so, fail immediately, if not, read the dir,
47       then retry.
48    3. Reading the dir uses the getdirentries syscall, creating an FileEntry
49       for all files found.
51 //===---------------------------------------------------------------------===//
52 // Specifying targets:  -triple and -arch
53 ===---------------------------------------------------------------------===//
55 The clang supports "-triple" and "-arch" options. At most one -triple and one
56 -arch option may be specified.  Both are optional.
58 The "selection of target" behavior is defined as follows:
60 (1) If the user does not specify -triple, we default to the host triple.
61 (2) If the user specifies a -arch, that overrides the arch in the host or
62     specified triple. 
64 //===---------------------------------------------------------------------===//
67 verifyInputConstraint and verifyOutputConstraint should not return bool. 
69 Instead we should return something like:
71 enum VerifyConstraintResult {
72   Valid,
73   
74   // Output only
75   OutputOperandConstraintLacksEqualsCharacter,
76   MatchingConstraintNotValidInOutputOperand,
78   // Input only
79   InputOperandConstraintContainsEqualsCharacter,
80   MatchingConstraintReferencesInvalidOperandNumber,
81   
82   // Both
83   PercentConstraintUsedWithLastOperand
86 //===---------------------------------------------------------------------===//