summaryrefslogtreecommitdiffstats
path: root/clang/Driver
Commit message (Collapse)AuthorAgeFilesLines
* don't print codegen time unless -ftime-report was passed.Chris Lattner2009-02-181-1/+3
| | | | llvm-svn: 64928
* privatize all of the string literal memory allocation/creationChris Lattner2009-02-181-13/+13
| | | | | | stuff behind a private static function. llvm-svn: 64898
* change the StringLiteral AST node to track all of the SourceLocations of Chris Lattner2009-02-181-13/+7
| | | | | | | | the various PPTokens that are pasted together to make it. In the course of working on this, I discovered ParseObjCStringLiteral which needs some work. I'll tackle it next. llvm-svn: 64892
* Optimize dyld startup time by specifying a trivial export map Chris Lattner2009-02-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (only export main) on the mac. This improves DYLD_PRINT_STATISTICS from: total time: 6.0 milliseconds (100.0%) total images loaded: 5 (4 from dyld shared cache, 3 needed no fixups) total segments mapped: 0, into 0 pages with 0 pages pre-fetched total images loading time: 0.0 milliseconds (1.4%) total rebase fixups: 0 total rebase fixups time: 0.0 milliseconds (0.0%) total binding fixups: 7,928 total binding symbol lookups: 4,087, average images searched per symbol: 1.9 total binding fixups time: 4.7 milliseconds (79.2%) total bindings lazily fixed up: 170 of 4,372 total init time time: 1.1 milliseconds (19.2%) total images with weak exports: 2 to: total time: 1.4 milliseconds (100.0%) total images loaded: 5 (4 from dyld shared cache, 4 needed no fixups) total segments mapped: 0, into 0 pages with 0 pages pre-fetched total images loading time: 0.0 milliseconds (5.7%) total rebase fixups: 0 total rebase fixups time: 0.0 milliseconds (0.2%) total binding fixups: 1,079 total binding symbol lookups: 75, average images searched per symbol: 1.0 total binding fixups time: 0.5 milliseconds (33.9%) total bindings lazily fixed up: 14 of 216 total init time time: 0.8 milliseconds (60.0%) total images with weak exports: 1 This reduces the time to -fsyntax-only cocoa.h with PTH from 0.192s to 0.184 (4.3%) rdar://6505315 llvm-svn: 64882
* add a bunch of timers for -E and other modes. This requiresChris Lattner2009-02-181-6/+31
| | | | | | llvm r64874 or later. llvm-svn: 64875
* teach -ftime-report to time the code generator and -emit-llvm times.Chris Lattner2009-02-181-1/+31
| | | | llvm-svn: 64873
* move llvm backend specific #includes into Backend.cpp instead of Clang.cppChris Lattner2009-02-182-8/+7
| | | | llvm-svn: 64872
* indentation and formattingChris Lattner2009-02-181-50/+50
| | | | llvm-svn: 64871
* clang will hopefully never support ratfor.Chris Lattner2009-02-181-4/+1
| | | | llvm-svn: 64870
* wire up a minimal -ftime-report, which prints the optimizer/codegen Chris Lattner2009-02-181-0/+11
| | | | | | times. Daniel, plz add driver support. llvm-svn: 64869
* Backend: Accept -mcpu and -mattr for use by TargetMachine.Daniel Dunbar2009-02-172-10/+30
| | | | llvm-svn: 64798
* Static Analyzer driver/options (partial) cleanup:Ted Kremenek2009-02-175-198/+173
| | | | | | | | | | | | | | - Move all analyzer options logic to AnalysisConsumer.cpp. - Unified specification of stores/constraints/output to be: -analyzer-output=... -analyzer-store=... -analyzer-constraints=... instead of -analyzer-range-constraints, -analyzer-store-basic, etc. - Updated drivers (ccc-analyzer, scan-builds, new ccc) to obey this new interface - Updated test cases to conform to new driver options llvm-svn: 64737
* add support for -fno-math-errno, and validate that it affects sema properly.Chris Lattner2009-02-171-1/+1
| | | | llvm-svn: 64708
* remove extraneous .Chris Lattner2009-02-171-1/+1
| | | | llvm-svn: 64706
* Support IRgen of sqrt -> llvm.sqrt, pow -> llvm.pow.Daniel Dunbar2009-02-161-3/+9
| | | | | | | | | | | | | | | | - Define pow[lf]?, sqrt[lf]? as builtins. - Add -fmath-errno option which binds to LangOptions.MathErrno - Add new builtin flag Builtin::Context::isConstWithoutErrno for functions which can be marked as const if errno isn't respected for math functions. Sema automatically marks these functions as const when they are defined, if MathErrno=0. - IRgen uses const attribute on sqrt and pow library functions to decide if it can use the llvm intrinsic. llvm-svn: 64689
* RangeConstraintManager is not on by default.Ted Kremenek2009-02-161-1/+1
| | | | llvm-svn: 64638
* castToDeclContext/castFromDeclContext are not meant to be used directly; ↵Argyrios Kyrtzidis2009-02-161-18/+18
| | | | | | | | they are used indirectly by cast/dyn_cast. All Decl <-> DeclContext casting should be done through cast/dyn_cast. llvm-svn: 64631
* PR3589: Don't simplify libcalls with -ffreestanding.Daniel Dunbar2009-02-151-1/+1
| | | | llvm-svn: 64599
* Add -ffreestanding to suppress the implicit declaration of library builtins ↵Douglas Gregor2009-02-141-0/+11
| | | | | | like printf and malloc. Fixes PR3586 llvm-svn: 64566
* Patch by Ben Laurie:Ted Kremenek2009-02-141-0/+7
| | | | | | | | | | | | | | | | | | | | ConstraintManager: - constify getSymVal() BasicConstraintManager: - Pull out logic that would be common to ConstraintManagers of a similar nature and put them in a parent class called 'SimpleConstraintManager'. RangeConstraintManager: - Added a new prototype ConstraintManager to track ranges of variables! This ConstraintManager keeps tracks of ranges of concrete integers that a symbolic integer may have. AnalysisConsumer: - Add driver option to use RangeConstraintManager with GRExprEngine-based analyses. llvm-svn: 64558
* Fix the build on win32.Cedric Venet2009-02-142-1/+6
| | | | llvm-svn: 64556
* Fix typo in printing of __private_extern__.Daniel Dunbar2009-02-131-1/+1
| | | | llvm-svn: 64501
* PTH: Cache directory and negative 'stat' calls. This gives us a 1% ↵Ted Kremenek2009-02-131-35/+74
| | | | | | performance improvement on Cocoa.h (fsyntax-only+PTH). llvm-svn: 64490
* Add some boilerplate to the PTH file to prepare for the caching of stats for ↵Ted Kremenek2009-02-131-41/+102
| | | | | | directories (and negative stats too). llvm-svn: 64477
* AnalysisConsumer: Explicitly destroy the PathDiagnosticClient at the end of ↵Ted Kremenek2009-02-131-8/+9
| | | | | | HandleTranslationUnit to ensure that the client's destructor is called even with --disable-free. llvm-svn: 64422
* factor token concatenation avoidance logic out of Chris Lattner2009-02-131-222/+9
| | | | | | PrintPreprocessedOutput into its own file. No functionality change. llvm-svn: 64418
* PTH: Cache stat information for files in the PTH file. Hook up FileManagerTed Kremenek2009-02-121-6/+23
| | | | | | | | | | | | | to use this stat information in the PTH file using a 'StatSysCallCache' object. Performance impact (Cocoa.h, PTH): - number of stat calls reduces from 1230 to 425 - fsyntax-only: time improves by 4.2% We can reduce the number of stat calls to almost zero by caching negative stat calls and directory stat calls in the PTH file as well. llvm-svn: 64353
* for now, disable all debug info generation at -O1 and above. This mirrorsChris Lattner2009-02-121-0/+7
| | | | | | similar logic in llvm-gcc and will hopefully be fixed soon. llvm-svn: 64349
* PTH: Have meta data be at the beginning of the PTH file, not the end.Ted Kremenek2009-02-111-8/+6
| | | | llvm-svn: 64338
* PTH: Replace string identifier to persistent ID lookup with a hashtable. This isTed Kremenek2009-02-111-85/+104
| | | | | | | actually *slightly* slower than the binary search. Since this is algorithmically better, further performance tuning should be able to make this faster. llvm-svn: 64326
* Fix <rdar://problem/6243503> [sema] @throw; accepted outside catch block.Steve Naroff2009-02-111-1/+2
| | | | llvm-svn: 64318
* PTH: Don't emit the PTH offset of the IdentifierInfo string data as that data isTed Kremenek2009-02-111-20/+10
| | | | | | referenced by other tables. llvm-svn: 64304
* Add private extern to pretty printer(s).Mike Stump2009-02-101-5/+6
| | | | llvm-svn: 64258
* PTH generation: Discard tokens that appear after and on the same line as ↵Ted Kremenek2009-02-101-2/+11
| | | | | | '#endif'. llvm-svn: 64250
* make -dM emit macros in a deterministic (sorted) order instead of Chris Lattner2009-02-101-2/+14
| | | | | | random hash table order, I don't like non-determinstic output. llvm-svn: 64248
* PTH generation: Don't call 'EmitToken' in the loop condition. This is ↵Ted Kremenek2009-02-101-5/+10
| | | | | | preparing for other changes within the loop. llvm-svn: 64247
* PTH: Replace ad hoc 'file name' -> 'PTH data' lookup table in the PTH file ↵Ted Kremenek2009-02-101-43/+70
| | | | | | with an on-disk chained hash table. This data structure is implemented using templates, and will be used to replace similar data structures. This change leads to no visibile performance impact on Cocoa.h, but now we only pay a price for the table on order with the number of files accessed and not the number in the PTH file. llvm-svn: 64245
* use efficient form of getSpelling, this speeds up -dM by 16%.Chris Lattner2009-02-101-1/+9
| | | | llvm-svn: 64244
* Fixup -ast-print so that:Mike Stump2009-02-101-10/+89
| | | | | | | | | | | | | | We handle indentation of decls better. We Indent extern "C" { } stuff better. We print out structure contents more often. We handle pass indentation information into the statement printer, so that nested things come out more indented. We print out FieldDecls. We print out Vars. We print out namespaces. We indent functions better. llvm-svn: 64232
* Rearrange code. No functionality change.Ted Kremenek2009-02-101-107/+112
| | | | llvm-svn: 64193
* Fix potential padding error in PTH file and add stub code for emitting an ↵Ted Kremenek2009-02-101-33/+160
| | | | | | on-disk chained hash table. llvm-svn: 64192
* CallExpr now uses ASTContext's allocate to allocate/delete its array of ↵Ted Kremenek2009-02-091-12/+18
| | | | | | subexpressions. llvm-svn: 64162
* Make one expected-diag directive match exactly one actual diagnostic.Sebastian Redl2009-02-071-36/+56
| | | | | | This uncovers some bugs, so several test cases now fail. llvm-svn: 64025
* Overhaul of Stmt allocation:Ted Kremenek2009-02-071-106/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Made allocation of Stmt objects using vanilla new/delete a *compiler error* by making this new/delete "protected" within class Stmt. - Now the only way to allocate Stmt objects is by using the new operator that takes ASTContext& as an argument. This ensures that all Stmt nodes are allocated from the same (pool) allocator. - Naturally, these two changes required that *all* creation sites for AST nodes use new (ASTContext&). This is a large patch, but the majority of the changes are just this mechanical adjustment. - The above changes also mean that AST nodes can no longer be deallocated using 'delete'. Instead, one most do StmtObject->Destroy(ASTContext&) or do ASTContextObject.Deallocate(StmtObject) (the latter not running the 'Destroy' method). Along the way I also... - Made CompoundStmt allocate its array of Stmt* using the allocator in ASTContext (previously it used std::vector). There are a whole bunch of other Stmt classes that need to be similarly changed to ensure that all memory allocated for ASTs comes from the allocator in ASTContext. - Added a new smart pointer ExprOwningPtr to Sema.h. This replaces the uses of llvm::OwningPtr within Sema, as llvm::OwningPtr used 'delete' to free memory instead of a Stmt's 'Destroy' method. Big thanks to Doug Gregor for helping with the acrobatics of making 'new/delete' private and the new smart pointer ExprOwningPtr! llvm-svn: 63997
* Semantic checking for class template declarations andDouglas Gregor2009-02-061-2/+1
| | | | | | | | | | | | | | | redeclarations. For example, checks that a class template redeclaration has the same template parameters as previous declarations. Detangled class-template checking from ActOnTag, whose logic was getting rather convoluted because it tried to handle C, C++, and C++ template semantics in one shot. Made some inroads toward eliminating extraneous "declaration does not declare anything" errors by adding an "error" type specifier. llvm-svn: 63973
* Move StringLiteral to allocate its internal string data using the allocator inTed Kremenek2009-02-061-15/+22
| | | | | | | | | | | ASTContext. This required changing all clients to pass in the ASTContext& to the constructor of StringLiteral. I also changed all allocations of StringLiteral to use new(ASTContext&). Along the way, I updated a bunch of new()'s in StmtSerialization.cpp to use the allocator from ASTContext& (not complete). llvm-svn: 63958
* Add an implementation of -dM that follows GCC closely enough to permitChris Lattner2009-02-061-25/+87
| | | | | | | diffing the output of: clang -dM -o - -E -x c foo.c | sort llvm-svn: 63926
* add support for -x c++-header, update comment.Chris Lattner2009-02-061-20/+25
| | | | llvm-svn: 63924
* factor some code out into a helper function.Chris Lattner2009-02-061-40/+49
| | | | llvm-svn: 63922
* default diag::err_pp_file_not_found to mapping to fatal,Chris Lattner2009-02-061-2/+7
| | | | | | implementing PR3492: #include failures should be a fatal error llvm-svn: 63915
OpenPOWER on IntegriCloud