blob: c658fe96bdfb33c83b5d9f67a645acd61429676e [file] [log] [blame]
Reid Spencer5f016e22007-07-11 17:01:13 +00001//===---------------------------------------------------------------------===//
2// Random Notes
3//===---------------------------------------------------------------------===//
4
5C90/C99/C++ Comparisons:
6http://david.tribble.com/text/cdiffs.htm
7
8//===---------------------------------------------------------------------===//
Reid Spencer5f016e22007-07-11 17:01:13 +00009
10To time GCC preprocessing speed without output, use:
11 "time gcc -MM file"
12This is similar to -Eonly.
13
Chris Lattnereab819b2009-01-16 19:33:59 +000014//===---------------------------------------------------------------------===//
15
16Creating and using a PTH file for performance measurement (use a release-asserts
17build).
18
John McCall2ff24892009-09-24 22:03:45 +000019$ clang -ccc-pch-is-pth -x objective-c-header INPUTS/Cocoa_h.m -o /tmp/tokencache
20$ clang-cc -token-cache /tmp/tokencache INPUTS/Cocoa_h.m
Reid Spencer5f016e22007-07-11 17:01:13 +000021
22//===---------------------------------------------------------------------===//
23
24 C++ Template Instantiation benchmark:
25 http://users.rcn.com/abrahams/instantiation_speed/index.html
26
27//===---------------------------------------------------------------------===//
28
29TODO: File Manager Speedup:
30
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.
41
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.
50
51//===---------------------------------------------------------------------===//
Ted Kremenekf4c45b02007-12-03 22:26:16 +000052// Specifying targets: -triple and -arch
53===---------------------------------------------------------------------===//
54
Chris Lattner177b1c72008-03-09 01:36:43 +000055The clang supports "-triple" and "-arch" options. At most one -triple and one
56-arch option may be specified. Both are optional.
Ted Kremenekf4c45b02007-12-03 22:26:16 +000057
58The "selection of target" behavior is defined as follows:
59
Chris Lattner177b1c72008-03-09 01:36:43 +000060(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.
Anders Carlsson3de54ff2008-03-13 03:45:48 +000063
64//===---------------------------------------------------------------------===//
65
66
67verifyInputConstraint and verifyOutputConstraint should not return bool.
68
69Instead we should return something like:
70
71enum VerifyConstraintResult {
72 Valid,
73
74 // Output only
75 OutputOperandConstraintLacksEqualsCharacter,
76 MatchingConstraintNotValidInOutputOperand,
77
78 // Input only
79 InputOperandConstraintContainsEqualsCharacter,
80 MatchingConstraintReferencesInvalidOperandNumber,
81
82 // Both
83 PercentConstraintUsedWithLastOperand
84};
85
86//===---------------------------------------------------------------------===//