summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use a sign-extend instead of a zero-extend when promoting aDan Gohman2009-02-186-19/+96
| | | | | | | | | | | | trip count value when the original loop iteration condition is signed and the canonical induction variable won't undergo signed overflow. This isn't required for correctness; it just preserves more information about original loop iteration values. Add a getTruncateOrSignExtend method to ScalarEvolution, following getTruncateOrZeroExtend. llvm-svn: 64918
* Simplify by using dyn_cast instead of isa and cast.Dan Gohman2009-02-181-6/+5
| | | | llvm-svn: 64917
* Clarify the definition of "latch block" in a comment.Dan Gohman2009-02-181-4/+4
| | | | llvm-svn: 64916
* Add explicit keywords.Dan Gohman2009-02-185-6/+6
| | | | llvm-svn: 64915
* Add support to the JIT for true non-lazy operation. When a call to a functionNate Begeman2009-02-1813-40/+289
| | | | | | | | | | | | | | | | | | | | that has not been JIT'd yet, the callee is put on a list of pending functions to JIT. The call is directed through a stub, which is updated with the address of the function after it has been JIT'd. A new interface for allocating and updating empty stubs is provided. Add support for removing the ModuleProvider the JIT was created with, which would otherwise invalidate the JIT's PassManager, which is initialized with the ModuleProvider's Module. Add support under a new ExecutionEngine flag for emitting the infomration necessary to update Function and GlobalVariable stubs after JITing them, by recording the address of the stub and the name of the GlobalValue. This allows code to be copied from one address space to another, where libraries may live at different virtual addresses, and have the stubs updated with their new correct target addresses. llvm-svn: 64906
* fix styleRafael Espindola2009-02-181-4/+2
| | | | llvm-svn: 64905
* Add a test for r61358, which I forgot to add way back when.Owen Anderson2009-02-181-0/+193
| | | | llvm-svn: 64904
* nothing says "ted was here" like a random url dropped in a header :)Chris Lattner2009-02-181-1/+1
| | | | llvm-svn: 64903
* Allow "overloadable" functions in C to be declared as variadic withoutDouglas Gregor2009-02-1810-17/+61
| | | | | | | | | | | | | | | any named parameters, e.g., this is accepted in C: void f(...) __attribute__((overloadable)); although this would be rejected: void f(...); To do this, moved the checking of the "ellipsis without any named arguments" condition from the parser into Sema (where it belongs anyway). llvm-svn: 64902
* teach child iterators to walk into the child string of an ObjCStringLiteral,Chris Lattner2009-02-182-6/+5
| | | | | | so it shows up in -ast-dump. llvm-svn: 64901
* fix the ownership issues and location tracking inChris Lattner2009-02-181-16/+22
| | | | | | Sema::ParseObjCStringLiteral. llvm-svn: 64900
* add iterators for string token locations.Chris Lattner2009-02-181-0/+5
| | | | llvm-svn: 64899
* privatize all of the string literal memory allocation/creationChris Lattner2009-02-186-80/+64
| | | | | | stuff behind a private static function. llvm-svn: 64898
* Don't allow calls to functions marked "unavailable". There's more workDouglas Gregor2009-02-185-5/+56
| | | | | | | | | | to do in this area, since there are other places that reference FunctionDecls. Don't allow "overloadable" functions (in C) to be declared without a prototype. llvm-svn: 64897
* add some comments describing what is happening here.Chris Lattner2009-02-181-9/+17
| | | | llvm-svn: 64896
* simplify the code used to compute the type of an objc string. This makesChris Lattner2009-02-181-27/+29
| | | | | | it faster in the common case when NSConstantString is around. llvm-svn: 64895
* rename CheckBuiltinCFStringArgument -> CheckObjCStringChris Lattner2009-02-184-8/+10
| | | | llvm-svn: 64894
* simplify some code.Chris Lattner2009-02-181-5/+3
| | | | llvm-svn: 64893
* change the StringLiteral AST node to track all of the SourceLocations of Chris Lattner2009-02-186-42/+70
| | | | | | | | 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
* Factor out the code to add a MachineOperand to a MachineInstrBuilder.Dan Gohman2009-02-189-161/+63
| | | | llvm-svn: 64891
* Fix performance bug in RangeConstraintManager (that I introduced):Ted Kremenek2009-02-181-9/+23
| | | | | | | | | | | | | | When comparing if one Range is "less" than another, compare the actual APSInt numeric values instead of their pointer addresses. This ensures that the ImmutableSet in RangeSet always has a consistent ordering between Ranges. This is critical for generating the same digest/hash for the contents of the sets. This was a serious performance bug because it would often cause state caching to be disabled along complicated paths. Along the way: - Put Range and RangeSet in the "anonymous namespace" and mark them hidden llvm-svn: 64890
* Representation of objc gc's attribute using ExtQualType.Fariborz Jahanian2009-02-185-16/+100
| | | | | | | Note that one test attr-objc-gc.m fails. I will fix this after removing these attributes from the Decl nodes. llvm-svn: 64889
* Eliminate several more unnecessary intptr_t casts.Dan Gohman2009-02-1816-31/+31
| | | | llvm-svn: 64888
* ccc: Forward -ftime-report to clang.Daniel Dunbar2009-02-181-1/+1
| | | | llvm-svn: 64887
* pass -verify in exprs.m, merge const-id.m into message.mChris Lattner2009-02-183-9/+8
| | | | llvm-svn: 64886
* fix rdar://6597252: two exactly identical pointer types are alwaysChris Lattner2009-02-182-7/+22
| | | | | | | compatible, even if they are weird implicit objc pointer types like Class. llvm-svn: 64885
* rename some variables, no functionality change.Chris Lattner2009-02-181-71/+72
| | | | llvm-svn: 64884
* Change the argument type in this test to something less convoluted,Dan Gohman2009-02-181-1/+1
| | | | | | since it isn't actually used. llvm-svn: 64883
* 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
* Hooked up the necessary machinery to allow the retain/release checker referenceTed Kremenek2009-02-185-68/+185
| | | | | | | | | | | | | back to the summary used when evaluating the statement associated with a simulation node. This is now being used to help improve the checker's diagnostics. To get things started, the checker now emits a path diagnostic indicating that 'autorelease' is a no-op in GC mode. Some of these changes are exposing further grossness in the interface between BugReporter and the ExplodedGraph::Trim facilities. These really need to be cleaned up one day. llvm-svn: 64881
* x86_64 ABI: Two bug fixes.Daniel Dunbar2009-02-181-4/+36
| | | | | | | | | | | | | | | | | | 1. Return of _Complex long double used wrong type. 2. va_arg of types passed in two SSE registers didn't account for extra space in register save area. Down to 18 failures on gcc/compat/x86_64. Combined 32/64 results are: -- === gcc Summary === # of expected passes 1292 # of unexpected failures 34 # of unsupported tests 2 -- llvm-svn: 64880
* Update checker build.Ted Kremenek2009-02-181-1/+1
| | | | llvm-svn: 64879
* GV with null value initializer shouldn't go to BSS if it's meant for a ↵Evan Cheng2009-02-184-3/+12
| | | | | | mergeable strings section. Currently it only checks for Darwin. Someone else please check if it should apply to other targets as well. llvm-svn: 64877
* retain/release checker: Record the summary used to generate a given node.Ted Kremenek2009-02-181-5/+10
| | | | llvm-svn: 64876
* add a bunch of timers for -E and other modes. This requiresChris Lattner2009-02-181-6/+31
| | | | | | llvm r64874 or later. llvm-svn: 64875
* allow TimeRegion to take a potentially-null pointer to aChris Lattner2009-02-181-4/+9
| | | | | | timer for clang. llvm-svn: 64874
* 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-184-9/+10
| | | | 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
* Fix test: config.h is not guaranteed to exist at the location in Eli Friedman2009-02-181-5/+1
| | | | | | | question. Use __builtin_alloca instead, which is guaranteed to mean the right thing without any includes. llvm-svn: 64868
* Fix test on platforms where size_t != unsigned long.Eli Friedman2009-02-181-1/+1
| | | | llvm-svn: 64867
* Fix a corner case in the new indvars promotion logic: if thereDan Gohman2009-02-182-19/+63
| | | | | | | | | | are multiple IV's in a loop, some of them may under go signed or unsigned wrapping even if the IV that's used in the loop exit condition doesn't. Restrict sign-extension-elimination and zero-extension-elimination to only those that operate on the original loop-controlling IV. llvm-svn: 64866
* isICE was evaluating ?: incorrectly with missing-gcc-LHS extension.Daniel Dunbar2009-02-183-4/+23
| | | | | | | Add assert to isICE that, on success, result must be the same as EvaluateAsInt()... this enforces a minimum level of sanity. llvm-svn: 64865
* Convert isIntegerConstantExpr to use ASTContext::MakeIntValue. Daniel Dunbar2009-02-181-39/+29
| | | | | | | | | | | | | | | - This idiom ensures that the result will have the right width and type. - Tested on most of x86_64/llvm-test to satisfy my paranoia. - This fixes at least the following bugs: o UnaryTypeTraitExpr wasn't setting the width correctly. o Arithmetic on _Bool wasn't setting the width correctly. And probably a number more. llvm-svn: 64864
* Add ASTContext::MakeIntValueDaniel Dunbar2009-02-181-0/+12
| | | | | | | | - Makes an APSInt given a uint64_t and a type, with the appropriate width and signedness to match the type. Yay for functional over imperative. llvm-svn: 64863
* stop searching GCC install directories for standard C headers (butChris Lattner2009-02-181-79/+6
| | | | | | | | | keep searching for C++ headers when in C++ mode). In theory clang should be able to find all of its own headers now. If not, the CPATH or C_INCLUDE_PATH environment variables can be specified to add a include path. llvm-svn: 64862
* AnalysisConsumer.h is goneChris Lattner2009-02-181-2/+0
| | | | llvm-svn: 64860
* Fix a typo in a comment.Dan Gohman2009-02-181-1/+1
| | | | llvm-svn: 64859
OpenPOWER on IntegriCloud