summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* AST/InheritViz: Remove all internal uses of PathV1.Michael J. Spencer2011-01-151-22/+17
| | | | llvm-svn: 123553
* Archive: Fix spelling.Michael J. Spencer2011-01-151-3/+3
| | | | llvm-svn: 123552
* Archive: Replace all internal uses of PathV1 with PathV2. The external API ↵Michael J. Spencer2011-01-152-38/+39
| | | | | | still uses PathV1. llvm-svn: 123551
* Support/GraphWriter: Replace all internal uses of PathV1 with PathV2. The ↵Michael J. Spencer2011-01-151-22/+12
| | | | | | external API still uses PathV1. llvm-svn: 123550
* Add an assert so we don't silently miscompile ctpop for bit widths > 128.Benjamin Kramer2011-01-151-0/+4
| | | | llvm-svn: 123549
* Support/PathV2: Add identify_magic.Michael J. Spencer2011-01-155-40/+49
| | | | llvm-svn: 123548
* Reimplement CTPOP legalization with the "best" algorithm fromBenjamin Kramer2011-01-151-18/+45
| | | | | | | | | | | | | http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel In a silly microbenchmark on a 65 nm core2 this is 1.5x faster than the old code in 32 bit mode and about 2x faster in 64 bit mode. It's also a lot shorter, especially when counting 64 bit population on a 32 bit target. I hope this is fast enough to replace Kernighan-style counting loops even when the input is rather sparse. llvm-svn: 123547
* Unittests/Support/Path: Tweak test.Michael J. Spencer2011-01-151-1/+1
| | | | llvm-svn: 123546
* Support/PathV2: Implement has_magic in terms of get_magic.Michael J. Spencer2011-01-151-26/+8
| | | | llvm-svn: 123545
* Support/PathV2: Implement get_magic.Michael J. Spencer2011-01-154-3/+79
| | | | llvm-svn: 123544
* Add missing whitespace.Nick Lewycky2011-01-151-2/+2
| | | | llvm-svn: 123543
* Add toCharUnitsInBits() to simplify the many calls to ↵Ken Dyck2011-01-152-7/+15
| | | | | | CharUnits::fromQuantity() of the form CharUnits::fromQuantity(bitSize, Context.getCharWidth()). llvm-svn: 123542
* Make constmerge a two-pass algorithm so that it won't miss mergingNick Lewycky2011-01-152-4/+52
| | | | | | opporuntities. Fixes PR8978. llvm-svn: 123541
* Make config.h.cmake similar to config.h.inOscar Fuentes2011-01-152-66/+94
| | | | | | Patch by arrowdodger! llvm-svn: 123539
* Unbreak the MSVC build again: replace bzero by memset.Francois Pichet2011-01-151-1/+1
| | | | llvm-svn: 123538
* Try to unbreak selfhost.Benjamin Kramer2011-01-151-0/+1
| | | | llvm-svn: 123537
* Add a cache that protects mergefunc's internals from more surprises in DenseSet.Nick Lewycky2011-01-151-5/+27
| | | | | | Also, replace tabs with spaces. Yes, it's 2011. llvm-svn: 123535
* Teach LazyValueInfo that allocas aren't NULL. Over all of llvm-test, this savesNick Lewycky2011-01-152-5/+31
| | | | | | | | | | | half a million non-local queries, each of which would otherwise have triggered a linear scan over a basic block. Also fix a fixme for memory intrinsics which dereference pointers. With this, we prove that a pointer is non-null because it was dereferenced by an intrinsic 112 times in llvm-test. llvm-svn: 123533
* Also set unnamed_addr on declarations.Rafael Espindola2011-01-154-8/+7
| | | | llvm-svn: 123531
* Add a clarification about merging constants with and without unnamed_addr.Rafael Espindola2011-01-151-1/+4
| | | | llvm-svn: 123530
* Allow unnamed_addr on declarations.Rafael Espindola2011-01-1510-82/+40
| | | | llvm-svn: 123529
* temporarily revert r123526. While working on a follow-on patch IChris Lattner2011-01-152-4/+3
| | | | | | realize that ConstantFoldTerminator doesn't preserve dominfo. llvm-svn: 123527
* fix rdar://8785296 - -fcatch-undefined-behavior generates inefficient codeChris Lattner2011-01-152-1/+7
| | | | | | | | | The basic issue is that isel (very reasonably!) expects conditional branches to be folded, so CGP leaving around a bunch dead computation feeding conditional branches isn't such a good idea. Just fold branches on constants into unconditional branches. llvm-svn: 123526
* simplify code, no functionality change.Chris Lattner2011-01-151-30/+37
| | | | llvm-svn: 123525
* Now that instruction optzns can update the iterator as they go, we can Chris Lattner2011-01-152-10/+40
| | | | | | | | have objectsize folding recursively simplify away their result when it folds. It is important to catch this here, because otherwise we won't eliminate the cross-block values at isel and other times. llvm-svn: 123524
* make the current instruction iterator an ivar, allowing xforms thatChris Lattner2011-01-151-35/+38
| | | | | | | potentially invalidate it (like inline asm lowering) to be sunk into their proper place, cleaning up a ton of code. llvm-svn: 123523
* clean up some dead code around __has_include() processing code identified by ↵Chris Lattner2011-01-151-13/+12
| | | | | | | | the ted-o-matic. rdar://8867482 llvm-svn: 123522
* Introduce a new kind of TemplateName that captures a substitutedDouglas Gregor2011-01-1514-38/+354
| | | | | | | | | | | | | | | template template parameter pack that cannot be fully expanded because its enclosing pack expansion could not be expanded. This form of TemplateName plays the same role as SubstTemplateTypeParmPackType and SubstNonTypeTemplateParmPackExpr do for template type parameter packs and non-type template parameter packs, respectively. We should now handle these multi-level pack expansion substitutions anywhere. The largest remaining gap in our variadic-templates support is that we cannot cope with non-type template parameter packs whose type is a pack expansion. llvm-svn: 123521
* implement an instcombine xform that canonicalizes casts outside of ↵Chris Lattner2011-01-152-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and-with-constant operations. This fixes rdar://8808586 which observed that we used to compile: union xy { struct x { _Bool b[15]; } x; __attribute__((packed)) struct y { __attribute__((packed)) unsigned long b0to7; __attribute__((packed)) unsigned int b8to11; __attribute__((packed)) unsigned short b12to13; __attribute__((packed)) unsigned char b14; } y; }; struct x foo(union xy *xy) { return xy->x; } into: _foo: ## @foo movq (%rdi), %rax movabsq $1095216660480, %rcx ## imm = 0xFF00000000 andq %rax, %rcx movabsq $-72057594037927936, %rdx ## imm = 0xFF00000000000000 andq %rax, %rdx movzbl %al, %esi orq %rdx, %rsi movq %rax, %rdx andq $65280, %rdx ## imm = 0xFF00 orq %rsi, %rdx movq %rax, %rsi andq $16711680, %rsi ## imm = 0xFF0000 orq %rdx, %rsi movl %eax, %edx andl $-16777216, %edx ## imm = 0xFFFFFFFFFF000000 orq %rsi, %rdx orq %rcx, %rdx movabsq $280375465082880, %rcx ## imm = 0xFF0000000000 movq %rax, %rsi andq %rcx, %rsi orq %rdx, %rsi movabsq $71776119061217280, %r8 ## imm = 0xFF000000000000 andq %r8, %rax orq %rsi, %rax movzwl 12(%rdi), %edx movzbl 14(%rdi), %esi shlq $16, %rsi orl %edx, %esi movq %rsi, %r9 shlq $32, %r9 movl 8(%rdi), %edx orq %r9, %rdx andq %rdx, %rcx movzbl %sil, %esi shlq $32, %rsi orq %rcx, %rsi movl %edx, %ecx andl $-16777216, %ecx ## imm = 0xFFFFFFFFFF000000 orq %rsi, %rcx movq %rdx, %rsi andq $16711680, %rsi ## imm = 0xFF0000 orq %rcx, %rsi movq %rdx, %rcx andq $65280, %rcx ## imm = 0xFF00 orq %rsi, %rcx movzbl %dl, %esi orq %rcx, %rsi andq %r8, %rdx orq %rsi, %rdx ret We now compile this into: _foo: ## @foo ## BB#0: ## %entry movzwl 12(%rdi), %eax movzbl 14(%rdi), %ecx shlq $16, %rcx orl %eax, %ecx shlq $32, %rcx movl 8(%rdi), %edx orq %rcx, %rdx movq (%rdi), %rax ret A small improvement :-) llvm-svn: 123520
* fix typoChris Lattner2011-01-151-1/+1
| | | | llvm-svn: 123519
* Fix m_Not and m_Neg to not match random ConstantInt's. BeforeChris Lattner2011-01-151-4/+0
| | | | | | | | | | | | | these would try hard to match constants by inverting the bits and recursively matching. There are two problems with this: 1) some patterns would match when we didn't want them to (theoretical) 2) this is insanely expensive to do, and most often pointless. This was apparently useful in just 2 instcombine cases, which I added code to handle explicitly. This change speeds up 'opt' time on 176.gcc by 1% and produces bitwise identical code. llvm-svn: 123518
* one more instcombine variant that is needed to work with future changes,Chris Lattner2011-01-151-0/+9
| | | | | | no functionality change currently. llvm-svn: 123517
* fix typoChris Lattner2011-01-151-1/+1
| | | | llvm-svn: 123516
* Catch ~x < cst just like ~x < ~y, we currently handle this throughChris Lattner2011-01-151-4/+8
| | | | | | means that are about to disappear. llvm-svn: 123515
* reduce indentationChris Lattner2011-01-151-29/+29
| | | | llvm-svn: 123514
* lldb-41 and debugserver-126 are set in the Xcode projects.Greg Clayton2011-01-153-16/+16
| | | | llvm-svn: 123513
* Add initial prototype for implementation ofTed Kremenek2011-01-156-0/+521
| | | | | | -Wuninitialized based on CFG dataflow analysis. WIP. llvm-svn: 123512
* Add const version if CFG::isBlkExpr().Ted Kremenek2011-01-151-1/+4
| | | | llvm-svn: 123511
* Store/retrieve -fshort-enums for PCH, fixes rdar://8854933.Argyrios Kyrtzidis2011-01-152-0/+4
| | | | llvm-svn: 123510
* Added complete complex support for displaying and parsing complex types.Greg Clayton2011-01-154-15/+64
| | | | llvm-svn: 123509
* Tweak the storage mechanism for a set of overloaded template names inDouglas Gregor2011-01-151-4/+4
| | | | | | | the TemplateName class. Nothing actually changes, but I find this less objectionable (and it will factor into an upcoming change). llvm-svn: 123508
* Enabled ObjC 2 abilities for expressions. We will enable the fragile ivarGreg Clayton2011-01-151-0/+8
| | | | | | | stuff soon when we get a fix for looking up the "OBJC_IVAR_$_Class.ivar" style symbols into IRForTarget::ResolveExternals() next week. llvm-svn: 123507
* Introduce a new expression kind, SubstNonTypeTemplateParmPackExpr,Douglas Gregor2011-01-1518-7/+237
| | | | | | | | | that captures the substitution of a non-type template argument pack for a non-type template parameter pack within a pack expansion that cannot be fully expanded. This follows the approach taken by SubstTemplateTypeParmPackType. llvm-svn: 123506
* 80-col.Eric Christopher2011-01-151-2/+4
| | | | llvm-svn: 123505
* Add empty implementation of pure virtual ↵Stephen Wilson2011-01-152-0/+8
| | | | | | | | | RegisterContext::InvalidateAllRegisters. This patch simply allows the tree to build. A proper implementation still needs to be provided. llvm-svn: 123504
* Set the ID of a ProcessLinux instance to the PID of the inferior on launch.Stephen Wilson2011-01-151-0/+1
| | | | llvm-svn: 123503
* Miscellaneous cleanups in ProcessMonitor.Stephen Wilson2011-01-151-8/+15
| | | | | | | Propagate the environment if one is not provided. Also, do not allocate the monitor threads launch arguments on the stack. llvm-svn: 123502
* Generalize LoadAndStorePromoter a bit and switch LICMChris Lattner2011-01-154-193/+131
| | | | | | to use it. llvm-svn: 123501
* Use the correct type for thread handle.Stephen Wilson2011-01-151-1/+1
| | | | llvm-svn: 123500
* Implement ProcessLinux::GetImageInfoAddress().Stephen Wilson2011-01-152-0/+16
| | | | llvm-svn: 123499
OpenPOWER on IntegriCloud