summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* improve -debug output, so that -debug is more likely to print whenChris Lattner2009-08-311-3/+6
| | | | | | instcombine is changing stuff. llvm-svn: 80538
* fix a bug I introduced with my 'instcombine builder' refactoring Chris Lattner2009-08-312-2/+20
| | | | | | | | changes: SimplifyDemandedBits can't use the builder yet because it has the wrong insertion point. This fixes a crash building MultiSource/Benchmarks/PAQ8p llvm-svn: 80537
* simplify some code by making the SCCNodes set contain Function*'sChris Lattner2009-08-311-12/+9
| | | | | | | | | | | | | | instead of CallGraphNode*'s. This also papers over a callgraph problem where a pass (in this case, MemCpyOpt) introduces a new function into the module (llvm.memset.i64) but doesn't add it to the call graph (nor should it, since it is a function pass). While it might be a good idea for MemCpyOpt to not synthesize functions in a runOnFunction(), there is no need for FunctionAttrs to be boneheaded, so fix it there. This fixes an assertion building 176.gcc. llvm-svn: 80535
* only print the override triple if it exists!Chris Lattner2009-08-311-2/+3
| | | | llvm-svn: 80534
* Fix PR4834, a tricky case where the inliner would resolve anChris Lattner2009-08-314-32/+76
| | | | | | | | | | | | | | | indirect function pointer, inline it, then go to delete the body. The problem is that the callgraph had other references to the function, though the inliner had no way to know it, so we got a dangling pointer and an invalid iterator out of the deal. The fix to this is pretty simple: stop the inliner from deleting the function by knowing that there are references to it. Do this by making CallGraphNodes contain a refcount. This requires moving deletion of available_externally functions to the module-level cleanup sweep where it belongs. llvm-svn: 80533
* use an accessor instead of poking internals of a node.Chris Lattner2009-08-311-1/+1
| | | | llvm-svn: 80532
* CMake: updated library dependencies.Oscar Fuentes2009-08-311-1/+1
| | | | llvm-svn: 80531
* PR4747Jim Grosbach2009-08-312-36/+23
| | | | | | | | | | | | | Shared landing pads run into trouble with SJLJ, as the dispatch table is mapped to call sites, and merging the pads will throw that off. There needs to be a one-to-one mapping of landing pad exception table entries to invoke call points. Detecting the shared pad during lowering of SJLJ info insn't sufficient, as the dispatch function may still need separate destinations to properly handle phi-nodes. llvm-svn: 80530
* More fleshing out the C-based indexing API (under construction).Steve Naroff2009-08-315-65/+166
| | | | llvm-svn: 80529
* update unit test for previous change.Chris Lattner2009-08-311-1/+1
| | | | llvm-svn: 80528
* Fix some nasty callgraph dangling pointer problems in Chris Lattner2009-08-3111-88/+112
| | | | | | | | | | | | | | | | | | | | | | | | | argpromotion and structretpromote. Basically, when replacing a function, they used the 'changeFunction' api which changes the entry in the function map (and steals/reuses the callgraph node). This has some interesting effects: first, the problem is that it doesn't update the "callee" edges in any callees of the function in the call graph. Second, this covers for a major problem in all the CGSCC pass stuff, which is that it is completely broken when functions are deleted if they *don't* reuse a CGN. (there is a cute little fixme about this though :). This patch changes the protocol that CGSCC passes must obey: now the CGSCC pass manager copies the SCC and preincrements its iterator to avoid passes invalidating it. This allows CGSCC passes to mutate the current SCC. However multiple passes may be run on that SCC, so if passes do this, they are now required to *update* the SCC to be current when they return. Other less interesting parts of this patch are that it makes passes update the CG more directly, eliminates changeFunction, and requires clients of replaceCallSite to specify the new callee CGN if they are changing it. llvm-svn: 80527
* Fix header comment for bindings/ocaml/llvm/Makefile.Erick Tryzelaar2009-08-301-1/+1
| | | | llvm-svn: 80526
* Make sure we specify no arguments for context functions.Erick Tryzelaar2009-08-301-2/+2
| | | | llvm-svn: 80525
* add a dump() method on callgraph.Chris Lattner2009-08-302-1/+4
| | | | llvm-svn: 80524
* rename testChris Lattner2009-08-301-0/+0
| | | | llvm-svn: 80523
* merge all sinking tests into one and convert them to filecheck.Chris Lattner2009-08-3013-223/+264
| | | | llvm-svn: 80522
* convert scalar_promote to filecheck style and merge ↵Chris Lattner2009-08-302-23/+45
| | | | | | 2003-12-13-VolatilePromote.ll into it. llvm-svn: 80521
* eliminate some uses of prcontext. Any help here would be appreciated :)Chris Lattner2009-08-304-9/+26
| | | | llvm-svn: 80520
* rename test so that name reflects what it is testing for.Chris Lattner2009-08-301-0/+0
| | | | llvm-svn: 80519
* convert to filecheck format.Chris Lattner2009-08-301-2/+14
| | | | llvm-svn: 80518
* suck a bunch more gep tests into getelementptr.ll and filecheckize them all.Chris Lattner2009-08-3019-813/+271
| | | | llvm-svn: 80517
* Tweak comment.Daniel Dunbar2009-08-301-3/+1
| | | | llvm-svn: 80516
* Fix some possible-use-of-uninitialized warnings.Daniel Dunbar2009-08-301-2/+2
| | | | llvm-svn: 80515
* consolodate various GEP tests into getelementptr.ll using filecheck.Chris Lattner2009-08-308-158/+106
| | | | llvm-svn: 80514
* another huge testcase, this time from 'gs' in llvm-test.Chris Lattner2009-08-301-519/+0
| | | | llvm-svn: 80513
* remove another poorly-reduced testcase which came from ldecod in llvm-test.Chris Lattner2009-08-301-444/+0
| | | | llvm-svn: 80512
* this testcase is 500 lines long and is distilled from bzip2, justChris Lattner2009-08-301-508/+0
| | | | | | remove it. llvm-svn: 80511
* convert to filecheckChris Lattner2009-08-301-25/+44
| | | | llvm-svn: 80510
* Fix PR4748: don't fold gep(bitcast(x)) into bitcast(gep) when x Chris Lattner2009-08-302-0/+28
| | | | | | | | | is itself a bitcast. Since we have gep(bitcast(bitcast(y))) in this case, just wait for the two bitcasts to get zapped. This prevents instcombine from confusing some aliasing stuff, and allows it to directly eliminate the load in the testcase. llvm-svn: 80508
* misc cleanupChris Lattner2009-08-301-13/+13
| | | | llvm-svn: 80507
* add getPointerAddressSpace() to GEP instruction, use the methodChris Lattner2009-08-304-9/+10
| | | | | | in a few scalar xforms to simplify things. llvm-svn: 80506
* eliminate InsertCastBefore, use the builder instead.Chris Lattner2009-08-301-50/+19
| | | | llvm-svn: 80505
* eliminate InsertBitCastBefore, just use the builder instead.Chris Lattner2009-08-301-27/+24
| | | | llvm-svn: 80504
* add a "getPointerAddressSpace" helper method to LoadInst and StoreInst.Chris Lattner2009-08-301-0/+9
| | | | llvm-svn: 80503
* Add missed patternAnton Korobeynikov2009-08-302-0/+9
| | | | llvm-svn: 80502
* convert a bunch more calls to InsertNewInstBefore to useChris Lattner2009-08-301-205/+137
| | | | | | the new Instcombine builder. llvm-svn: 80501
* fix typoChris Lattner2009-08-301-1/+1
| | | | llvm-svn: 80500
* hopefully unbreak the build by making this-> explicit for dependentChris Lattner2009-08-301-1/+1
| | | | | | base class lookup. llvm-svn: 80499
* EXTRACT_VECTOR_ELEMENT can have result type different from element type.Anton Korobeynikov2009-08-302-3/+73
| | | | | | Remove the assertion and generalize the code for ARM NEON stuff. llvm-svn: 80498
* Add regular expression matching support, based on OpenBSD regexec()/regcomp()Torok Edwin2009-08-3018-0/+4532
| | | | | | implementation. llvm-svn: 80493
* give instcombine a custom IRBuilder that adds new instructions to theChris Lattner2009-08-301-304/+193
| | | | | | | | | | workslist and is set to insert new instructions before the current one. Convert a bunch of stuff that used to call InsertNewInstBefore over to use it, greatly simplifying code and making it more natural. There is still a lot more to go, but this is a good start. llvm-svn: 80492
* More missing member goodness.Anders Carlsson2009-08-302-3/+16
| | | | llvm-svn: 80491
* Update test.Daniel Dunbar2009-08-301-2/+4
| | | | llvm-svn: 80490
* Improve missing error messages as suggested by Doug.Anders Carlsson2009-08-303-16/+16
| | | | llvm-svn: 80489
* add a new InstCombineWorklist::AddValue method that works evenChris Lattner2009-08-301-16/+13
| | | | | | | | | if the operand is not an instruction. Simplify most uses of AddOperandsToWorkList to use AddValue and inline it into the one remaining callsite. llvm-svn: 80488
* move AddUsersToWorkList to the worklist processing class, make theChris Lattner2009-08-301-16/+16
| | | | | | argument stronger typed. llvm-svn: 80487
* rename AddUsesToWorkList -> AddOperandsToWorkList. The Chris Lattner2009-08-301-31/+13
| | | | | | | | | | former looks too much like AddUsersToWorkList and keeps confusing me. Remove AddSoonDeadInstToWorklist and change its two callers to do the same thing in a simpler way. llvm-svn: 80486
* llvm-mc/X86: Encode constant MCValue's correctly.Daniel Dunbar2009-08-301-0/+6
| | | | llvm-svn: 80485
* llvm-mc: MCStreamer cleanups. - Remove EmitLocalSymbol, this is unsupported ↵Daniel Dunbar2009-08-306-71/+48
| | | | | | | | for now. - Switch Emit{CommonSymbol,Zerofill} to take alignment in bytes (for consistency). llvm-svn: 80484
* inline the trivial AddToWorkList/RemoveFromWorkList methodsChris Lattner2009-08-301-104/+65
| | | | | | | | | | | | | into their callers. simplify ReplaceInstUsesWith. Make EraseInstFromFunction only add operands to the worklist if there aren't too many of them (this was a scalability win for crazy programs that was only infrequently enforced). Switch more code to using EraseInstFromFunction instead of duplicating it inline. Change some fcmp/icmp optimizations to modify fcmp/icmp in place instead of creating a new one and deleting the old one just to change the predicate. llvm-svn: 80483
OpenPOWER on IntegriCloud