summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Use .empty() instead of .size().Bill Wendling2010-02-111-2/+2
| | | | llvm-svn: 95871
* Suppress warnings if their instantiation location is in a system header, notJohn McCall2010-02-111-1/+1
| | | | | | | | | | | | | their spelling location. This prevents warnings from being swallowed just because the caret is on the first parenthesis in, say, NULL. This is an experiment; the risk is that there might be a substantial number of system headers which #define symbols to expressions which inherently cause warnings. My theory is that that's rare enough that it can be worked around case-by-case, and that producing useful warnings around NULL is worth it. But I'm willing to accept that I might be empirically wrong. llvm-svn: 95870
* Patch by Cristian Draghici:Ted Kremenek2010-02-114-3/+58
| | | | | | | | | | | | Enhance the printf format string checking when using the format specifier flags ' ', '0', '+' with the 'p' or 's' conversions (since they are nonsensical and undefined). This is similar to GCC's checking. Also warning when a precision is used with the 'p' conversin specifier, since it has no meaning. llvm-svn: 95869
* dont' call getX86RegNum on X86::RIP, it doesn't like that. ThisChris Lattner2010-02-112-3/+7
| | | | | | fixes the remaining x86-64 jit failures afaik. llvm-svn: 95867
* fix a really nasty bug I introduced in r95693: r12 (and r12d, Chris Lattner2010-02-112-7/+12
| | | | | | | | | r12b, etc) also encodes to a R/M value of 4, which is just as illegal as ESP/RSP for the non-sib version an address. This fixes x86-64 jit miscompilations of a bunch of programs. llvm-svn: 95866
* Check in the beginnings of my new vtable layout builder idea.Anders Carlsson2010-02-115-10/+231
| | | | | | | | Right now, it's off by default but can be tested by passing -fdump-vtable-layouts to clang -cc1. This option will cause all vtables that will normally be emitted as part of codegen to also be dumped using the new layout code. I've also added a very simple new vtable layout test case. llvm-svn: 95865
* Attempt to always dispose of the CXIndex object in c-index-test.Ted Kremenek2010-02-111-3/+12
| | | | llvm-svn: 95864
* Use the allocator associated with ASTContext to allocate the argsTed Kremenek2010-02-114-15/+21
| | | | | | | | array associated with NonNullAttr. This fixes yet another leak when ASTContext uses a BumpPtrAllocator. Fixes: <rdar://problem/7637150> llvm-svn: 95863
* Fix (harmless) memory leak found by memcheck.Jeffrey Yasskin2010-02-111-0/+1
| | | | llvm-svn: 95862
* Have ~ASTContext() delete StoredDeclsMap (internal to DeclContext) byTed Kremenek2010-02-113-5/+44
| | | | | | | | | storing the set of StoredDeclsMaps in an internal vector of void*. This isn't an ideal solution, but for the time being this fixes a major memory leak with these DenseMaps not being freed. Fixes: <rdar://problem/7634755> llvm-svn: 95861
* Add and commonize encoder support for all immediates.Chris Lattner2010-02-111-110/+35
| | | | | | | | | | | | | | | Stub out some dummy fixups to make things work. We can now emit fixups like this: subl $20, %esp ## encoding: [0x83,0xec,A] ## fixup A - offset: 2, value: 20, kind: fixup_1byte_imm Emitting $20 as a single-byte fixup to be later resolved by the assembler is ridiculous of course (vs just emitting the byte) but this is a failure of the matcher, which should be producing an imm of 20, not an MCExpr of 20. llvm-svn: 95860
* generalize EmitDisplacementField to work with any sizeChris Lattner2010-02-111-14/+13
| | | | | | and rename it to EmitImmediate. llvm-svn: 95859
* eliminate the dead IsPCRel argument.Chris Lattner2010-02-111-9/+6
| | | | llvm-svn: 95858
* eliminate the dead "PCAdj" logic.Chris Lattner2010-02-111-22/+9
| | | | llvm-svn: 95857
* Fix some of the memcheck errors found in the JIT unittests.Jeffrey Yasskin2010-02-115-31/+20
| | | | llvm-svn: 95856
* Rename ValueRequiresCast to ShouldOptimizeCast, to better reflectChris Lattner2010-02-114-55/+113
| | | | | | | | | | | | | | what it does. Enhance it to return false to optimizing vector sign extensions from vector comparisions, which is the idiom used to get a splatted vector for a vector comparison. Doing this breaks vector-casts.ll, add some compensating transformations to handle the important case they cover without depending on this canonicalization. This fixes rdar://7434900 a serious pessimization of vector compares. llvm-svn: 95855
* convert to filecheck.Chris Lattner2010-02-111-4/+2
| | | | llvm-svn: 95854
* Remove use of 'std::string' from Attr objects, using instead a byteTed Kremenek2010-02-117-56/+90
| | | | | | | | | array allocated using the allocator in ASTContext. This addresses these strings getting leaked when using a BumpPtrAllocator (in ASTContext). Fixes: <rdar://problem/7636765> llvm-svn: 95853
* Make DSE only scan blocks that are reachable from the entryChris Lattner2010-02-112-1/+21
| | | | | | | | | block. Other blocks may have pointer cycles that will crash basicaa and other alias analyses. In any case, there is no point wasting cycles optimizing dead blocks. This fixes rdar://7635088 llvm-svn: 95852
* a testcase that doesn't crash GVN but could someday.Chris Lattner2010-02-111-3/+19
| | | | llvm-svn: 95851
* Make jump threading honor x|undef -> true and x&undef -> false,Chris Lattner2010-02-112-3/+77
| | | | | | instead of considering x|undef -> x, which may not be true. llvm-svn: 95850
* Driver: Add -rewrite-objc, which is an interface to clang -cc1 -rewrite-objc.Daniel Dunbar2010-02-116-3/+39
| | | | llvm-svn: 95849
* Driver: Fix infinite loop and wrong message on invalid -ccc-clang-arch argument.Daniel Dunbar2010-02-111-4/+2
| | | | llvm-svn: 95848
* Clean up ownership of 'AttributeList' objects in Parser. ApparentlyTed Kremenek2010-02-115-46/+83
| | | | | | | | | | | | | | | | | | | | | we would just leak them all over the place, with no clear ownership of these objects at all. AttributeList objects would get leaked on both error and non-error paths. Note: I introduced the usage of llvm::OwningPtr<AttributeList> to manage these objects, which is particularly useful for methods with multiple return sites. In at least one method I used them even when they weren't strictly necessary because it clarified the ownership semantics and made the code easier to read. Should the excessive 'take()' and 'reset()' calls become a performance issue we can always re-evaluate. Note+1: I believe I have not introduced any double-frees, but it would be nice for someone to review this. This fixes <rdar://problem/7635046>. llvm-svn: 95847
* Add ConstantExpr handling to Intrinsic::objectsize lowering.Eric Christopher2010-02-112-3/+27
| | | | | | | Update testcase accordingly now that we can optimize another section. llvm-svn: 95846
* Strip attributes and 'inline' off the "previous declaration" of aJohn McCall2010-02-111-15/+27
| | | | | | | template explicit specialization. Complete an apparently stalled refactor towards using CheckSpecializationInstantiationRedecl(). llvm-svn: 95845
* test case for r95842.Devang Patel2010-02-111-0/+7
| | | | llvm-svn: 95844
* Remove another redundant ASTContext parameterDouglas Gregor2010-02-114-6/+6
| | | | llvm-svn: 95843
* Eliminate a bunch of unnecessary ASTContexts from members functions ofDouglas Gregor2010-02-1113-65/+54
| | | | | | Decl subclasses. No functionality change. llvm-svn: 95841
* Fix to get it to compile.Bill Wendling2010-02-111-1/+1
| | | | llvm-svn: 95840
* Don't print out a default newline when emitting the section offset. There areBill Wendling2010-02-112-2/+1
| | | | | | almost always comments afterwards that need printing. llvm-svn: 95839
* Diagnose when user provided getter is being used as lvalueFariborz Jahanian2010-02-115-8/+39
| | | | | | using property dot-syntax. Fixes radar 7628953. llvm-svn: 95838
* Make it possible to create multiple JIT instances at the same time, by removingJeffrey Yasskin2010-02-115-43/+297
| | | | | | | | | | the global TheJIT and TheJITResolver variables. Lazy compilation is supported by a global map from a stub address to the JITResolver that knows how to compile it. Patch by Olivier Meurant! llvm-svn: 95837
* Eliminate the ASTContext parameter from RecordDecl::getDefinition()Douglas Gregor2010-02-1118-34/+33
| | | | | | | and CXXRecordDecl::getDefinition(); it's totally unnecessary. No functionality change. llvm-svn: 95836
* Allocate 'ObjCMethodList' objects (owned by Sema) using Sema's ↵Ted Kremenek2010-02-112-4/+10
| | | | | | BumpPtrAllocator. Previously they were not getting freed. Fixes <rdar://problem/7635663>. llvm-svn: 95834
* Implement basic AST merging for classes, structs, and unions in C.Douglas Gregor2010-02-112-0/+232
| | | | llvm-svn: 95833
* Reuse operand location when updating PHI instructions.Jakob Stoklund Olesen2010-02-111-7/+26
| | | | | | | | Calling RemoveOperand is very expensive on huge PHI instructions. This makes early tail duplication run twice as fast on the Firefox JavaScript interpreter. llvm-svn: 95832
* Remove duplicate successors from indirectbr instructions before building the ↵Jakob Stoklund Olesen2010-02-111-2/+8
| | | | | | | | | machine CFG. This makes early tail duplication run 60 times faster when compiling the Firefox JavaScript interpreter, see PR6186. llvm-svn: 95831
* Ignore dbg info intrinsics.Devang Patel2010-02-111-0/+4
| | | | llvm-svn: 95828
* Remove the few # TAILCALL comments that snuck in. As they may fail on linux.Kevin Enderby2010-02-111-4/+4
| | | | llvm-svn: 95827
* Update the X86 assembler matcher test case now that a few more things matchKevin Enderby2010-02-111-5/+161
| | | | | | with some of the recent changes that have gone into llvm-mc. llvm-svn: 95826
* Add support to llvm-extract for extracting multiple functions and/orDan Gohman2010-02-102-24/+36
| | | | | | multiple global variables at a time. llvm-svn: 95825
* The previous fix of widening divides that trap was too fragile as it depends ↵Mon P Wang2010-02-105-24/+141
| | | | | | | | | | | on custom lowering and requires that certain types exist in ValueTypes.h. Modified widening to check if an op can trap and if so, the widening algorithm will apply only the op on the defined elements. It is safer to do this in widening because the optimizer can't guarantee removing unused ops in some cases. llvm-svn: 95823
* Generate the objc_read_weak API when callingFariborz Jahanian2010-02-102-1/+45
| | | | | | a __weak block. Fixes radar 7628591. llvm-svn: 95822
* Fix a potential null-pointer use, and fix the style of my new function.Charles Davis2010-02-101-2/+2
| | | | | | Thanks, Anton! llvm-svn: 95821
* Add support for the force_align_arg_pointer attribute. This is an x86-specificCharles Davis2010-02-104-1/+65
| | | | | | | | attribute, so it uses Anton's new target-specific attribute support. It's supposed to ensure that the stack is 16-byte aligned, but since necessary support is lacking from LLVM, this is a no-op for now. llvm-svn: 95820
* Ignore debug info one more place during coalescing.Dale Johannesen2010-02-101-0/+2
| | | | llvm-svn: 95819
* Allow isDebug inquiry on any MO.Dale Johannesen2010-02-101-1/+0
| | | | llvm-svn: 95818
* Delete dead PHI machine instructions. These can be created due to typeBob Wilson2010-02-103-5/+7
| | | | | | | | | legalization even when the IR-level optimizer has removed dead phis, such as when the high half of an i64 value is unused on a 32-bit target. I had to adjust a few test cases that had dead phis. This is a partial fix for Radar 7627077. llvm-svn: 95816
* Skip debug info in a couple of places.Dale Johannesen2010-02-101-3/+7
| | | | llvm-svn: 95814
OpenPOWER on IntegriCloud