summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Make jump threading eliminate blocks that just contain phi nodes,Chris Lattner2009-11-102-3/+34
| | | | | | | | debug intrinsics, and an unconditional branch when possible. This reuses the TryToSimplifyUncondBranchFromEmptyBlock function split out of simplifycfg. llvm-svn: 86722
* Update CMake file.Ted Kremenek2009-11-101-0/+1
| | | | llvm-svn: 86721
* Add newline at EOF.Benjamin Kramer2009-11-101-1/+1
| | | | llvm-svn: 86720
* Silence warning.Benjamin Kramer2009-11-101-1/+1
| | | | llvm-svn: 86719
* Use #include <stdio.h> when using fprintf and stderr.Dan Gohman2009-11-101-0/+1
| | | | llvm-svn: 86717
* Generalize lsr code that optimize loop to count down towards zero.Evan Cheng2009-11-102-80/+168
| | | | llvm-svn: 86715
* Optimize test more.Dan Gohman2009-11-101-1/+1
| | | | llvm-svn: 86714
* make this handle redefinition of malloc function with different prototype ↵Victor Hernandez2009-11-101-7/+9
| | | | | | correctly llvm-svn: 86712
* clang-cc: Start moving "pure" option handling to Options.cpp, to separate itDaniel Dunbar2009-11-103-147/+198
| | | | | | from the logic part of clang-cc, and to enforce limited scoping. llvm-svn: 86711
* clang-cc: Sink more options inside codegenopts namespace.Daniel Dunbar2009-11-101-20/+19
| | | | llvm-svn: 86710
* Change LangOpts initialization to directly test the code generation options,Daniel Dunbar2009-11-101-6/+8
| | | | | | instead of reproducing their logic. llvm-svn: 86709
* Improve parsing of template arguments to lay the foundation forDouglas Gregor2009-11-1017-200/+359
| | | | | | | | | | | | | | | | | | | | | | handling template template parameters properly. This refactoring: - Parses template template arguments as id-expressions, representing the result of the parse as a template name (Action::TemplateTy) rather than as an expression (lame!). - Represents all parsed template arguments via a new parser-specific type, ParsedTemplateArgument, which stores the kind of template argument (type, non-type, template) along with all of the source information about the template argument. This replaces an ad hoc set of 3 vectors (one for a void*, which was either a type or an expression; one for a bit telling whether the first was a type or an expression; and one for a single source location pointing at the template argument). - Moves TemplateIdAnnotation into the new Parse/Template.h. It never belonged in the Basic library anyway. llvm-svn: 86708
* Change Thumb1 address mode printing, instead ofEvan Cheng2009-11-101-5/+2
| | | | | | | | | | [r0, #2 * 4] Now [r0, #8] This makes Thumb2 assembly more uniform and frankly the scale doesn't add much. llvm-svn: 86707
* Add a comment.Evan Cheng2009-11-101-0/+2
| | | | llvm-svn: 86706
* Add defensive break.Duncan Sands2009-11-101-0/+1
| | | | llvm-svn: 86705
* Changed a variable name to match what it representsFariborz Jahanian2009-11-101-3/+3
| | | | | | (Ted's feedback). llvm-svn: 86702
* This patch implements Code gen. for destruction ofFariborz Jahanian2009-11-103-8/+101
| | | | | | global array of objects. llvm-svn: 86701
* CIndex: Only display diagnostics to llvm::errs() when the client has set the ↵Ted Kremenek2009-11-101-3/+3
| | | | | | 'displayDiagnostics' option to 1 in clang_createIndex(). This fixes <rdar://problem/7370691>. llvm-svn: 86700
* Only generate a VTT for classes that need a VTT.Mike Stump2009-11-101-0/+4
| | | | llvm-svn: 86699
* Driver: Run 'clang' in C++ mode based on the name it was invoked by. We matchDaniel Dunbar2009-11-101-0/+9
| | | | | | | | | | | | anything that ends with ++ or ++-FOO (e.g., c++, clang++, clang++-1.1) as being a "C++ compiler". This allows easy testing of the C++ compiler by 'ln -s clang clang++', or by 'cp clang clang++'. Based on patch by Roman Divacky. llvm-svn: 86697
* Factor out parts of InitializeCompileOptions that depend on the LangOptions.Daniel Dunbar2009-11-101-6/+16
| | | | llvm-svn: 86696
* Add a monstrous hack to improve X86ISelDAGToDAG compile time.Daniel Dunbar2009-11-101-0/+8
| | | | | | | | | | - Force NDEBUG on in any Release build. This drops the compile time to ~100s from ~600s, in Release mode. - This may just be a temporary workaround, I don't know the true nature of the gcc-4.2 compile time performance problem. llvm-svn: 86695
* Fix obvious typo.Duncan Sands2009-11-101-1/+1
| | | | llvm-svn: 86694
* Localize -disable-llvm-optzns handling to BackendConsumer::CreatePasses.Daniel Dunbar2009-11-103-26/+28
| | | | | | | | | | | - This is conceptually better since the only thing we want this option to do is preserve the internal module as constructed by IRgen, before running any passes. - This also fixes bugs in -disable-llvm-optzns handling with regards to debug info. llvm-svn: 86691
* clang-cc: Start sinking (CodeGen) options into namespaces to limit their scope.Daniel Dunbar2009-11-101-19/+25
| | | | llvm-svn: 86690
* clarify logic.Chris Lattner2009-11-101-4/+4
| | | | llvm-svn: 86689
* Cleanup some clang-cc FIXMEsDaniel Dunbar2009-11-102-16/+11
| | | | llvm-svn: 86686
* Add CompileOptions to CompilerInvocation.Daniel Dunbar2009-11-102-15/+34
| | | | llvm-svn: 86685
* CMake: Add Darwin-specific linker flags for building loadable modulesDouglas Gregor2009-11-101-1/+7
| | | | llvm-svn: 86684
* Teach DSE to eliminate useless trampolines.Duncan Sands2009-11-102-6/+35
| | | | llvm-svn: 86683
* Add brackets to make gcc-4.4 happy.Duncan Sands2009-11-101-3/+3
| | | | llvm-svn: 86681
* Fix a similar problem with qualified lookup through using directives,John McCall2009-11-101-1/+1
| | | | | | | although in this case we probably just run a risk of duplicating work; I can't think of how this could cause a bug. llvm-svn: 86680
* Make a somewhat more convincing test case for unqualified lookup throughJohn McCall2009-11-103-2/+131
| | | | | | | | | using directives, and fix a bug thereby exposed: since we're playing tricks with pointers, we need to make certain we're always using the same pointers for things. Also tweak an existing error message. llvm-svn: 86679
* Codegen support for the llvm.invariant/lifetime.start/end intrinsics:Duncan Sands2009-11-102-0/+19
| | | | | | just throw them away. llvm-svn: 86678
* Ignore parentheses when check the type of the expr.Zhongxing Xu2009-11-101-1/+1
| | | | llvm-svn: 86677
* Update computeArraySize() to use ComputeMultiple() to determine the array ↵Victor Hernandez2009-11-104-110/+30
| | | | | | size associated with a malloc; also extend PerformHeapAllocSRoA() to check if the optimized malloc's arg had its highest bit set, so that it is safe for ComputeMultiple() to look through sext instructions while determining the optimized malloc's array size llvm-svn: 86676
* Add ComputeMultiple() analysis function that recursively determines if a ↵Victor Hernandez2009-11-102-0/+134
| | | | | | Value V is a multiple of unsigned Base llvm-svn: 86675
* Simple test case for [basic.lookup.udir].John McCall2009-11-101-0/+35
| | | | llvm-svn: 86674
* SizeofPointerChecker: Many false positives have the form 'sizeof *p'. Zhongxing Xu2009-11-101-1/+9
| | | | | | | | This is reasonable because people know what they are doing when they intentionally dereference the pointer. So now we only emit warning when a pointer variable is use literally. llvm-svn: 86673
* optimize testChris Lattner2009-11-101-1/+1
| | | | llvm-svn: 86672
* Add vtable caching to prevent multiple vtables for the same class fromMike Stump2009-11-105-24/+41
| | | | | | | | being generated. Add the most derived vtable pointer to the VTT. llvm-svn: 86671
* unify the code that determines whether it is a good idea to change the typeChris Lattner2009-11-103-29/+38
| | | | | | | of a computation. This fixes some infinite loops when dealing with TD that has no native types. llvm-svn: 86670
* Fix unqualified lookup through using directives.John McCall2009-11-102-83/+192
| | | | | | This is a pretty minimal test case; I'll make a better one later. llvm-svn: 86669
* Simplify.Nick Lewycky2009-11-101-3/+1
| | | | llvm-svn: 86668
* Reapply r86359, "Teach dead store elimination that certain intrinsics write toNick Lewycky2009-11-104-63/+198
| | | | | | | memory just like a store" with bug fixed (partial-overwrite.ll is the regression test). llvm-svn: 86667
* refactor TryToSimplifyUncondBranchFromEmptyBlock out of SimplifyCFG.Chris Lattner2009-11-103-165/+181
| | | | llvm-svn: 86666
* When trying to assign a regular string literal to an Objective-C 'id' type ↵Anders Carlsson2009-11-102-3/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | or a pointer to an NSString, emit a code insertion hint that turns it into an Objective-C string. For example: @class NSString; @interface Test + (void)test:(NSString *)string; @end void g(NSString *a); void f() { NSString *a = "Foo"; g("Foo"); [Test test:"Foo"]; } will produce t.m:10:17: warning: incompatible pointer types initializing 'char [4]', expected 'NSString *' NSString *a = "Foo"; ^~~~~ @ t.m:11:5: warning: incompatible pointer types passing 'char [4]', expected 'NSString *' g("Foo"); ^~~~~ @ t.m:12:14: warning: incompatible pointer types sending 'char [4]', expected 'NSString *' [Test test:"Foo"]; ^~~~~ @ 3 diagnostics generated. llvm-svn: 86665
* Don't try to emit null fixit hints.Anders Carlsson2009-11-101-0/+7
| | | | llvm-svn: 86664
* Now we can safely use the argument expression's source range.Zhongxing Xu2009-11-101-1/+1
| | | | llvm-svn: 86663
* SizeofPointerChecker: If an explicit type specifier is used, do not issue ↵Zhongxing Xu2009-11-101-0/+5
| | | | | | warnings. llvm-svn: 86662
OpenPOWER on IntegriCloud