summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Mark test as passing on all x86, which it should,Dale Johannesen2009-08-311-1/+1
| | | | | | | although I don't think anyone cares about this feature except Darwin. PR 4825. llvm-svn: 80596
* cleanups pointed out by duncanChris Lattner2009-08-311-2/+1
| | | | llvm-svn: 80595
* Revert commit 80428. It completely broke exceptionDuncan Sands2009-08-316-137/+18
| | | | | | handling on x86-32 linux. llvm-svn: 80592
* Free the constants that have no uses in ~LLVMContext.Torok Edwin2009-08-314-4/+31
| | | | | | | | | | | This fixes leaks from LLVMContext in multithreaded apps. Since constants are only deleted if they have no uses, it is safe to not delete a Module on shutdown, as many single-threaded tools do. Multithreaded apps should however delete the Module before destroying the Context to ensure that there are no leaks (assuming they use a different context for each thread). llvm-svn: 80590
* Fix ExplicitSymbols leak.Torok Edwin2009-08-311-0/+7
| | | | llvm-svn: 80589
* Normalize makefile comments and sort cmake file lists.Benjamin Kramer2009-08-3122-24/+24
| | | | llvm-svn: 80584
* llvm-mc: Pass values to MCStreamer as MCExprs, not MCValues.Daniel Dunbar2009-08-318-67/+58
| | | | llvm-svn: 80578
* llvm-mc: Simplify EmitAssignment ('.set' is identical to '=').Daniel Dunbar2009-08-319-41/+18
| | | | llvm-svn: 80577
* llvm-mc: Remove MCAsmParser::Parse[Paren]RelocatableExpression.Daniel Dunbar2009-08-313-55/+27
| | | | llvm-svn: 80576
* llvm-mc: Switch MCInst to storing an MCExpr* instead of an MCValue.Daniel Dunbar2009-08-3110-86/+116
| | | | | | Also, use MCInst::print instead of custom code in MCAsmPrinter. llvm-svn: 80575
* llvm-mc: Add MCAsmParser::Parse[Paren]Expression forms which return an MCExpr.Daniel Dunbar2009-08-313-0/+26
| | | | llvm-svn: 80574
* llvm-mc: Make MCSymbolData symbol member const.Daniel Dunbar2009-08-313-9/+9
| | | | llvm-svn: 80573
* llvm-mc: Add MCContext to MCAssembler.Daniel Dunbar2009-08-313-5/+9
| | | | llvm-svn: 80572
* llvm-mc: Add MCAsmParser::getContext.Daniel Dunbar2009-08-313-18/+16
| | | | llvm-svn: 80571
* llvm-mc: Add MCExpr::{dump,print}.Daniel Dunbar2009-08-312-0/+75
| | | | llvm-svn: 80570
* llvm-mc: Switch MCExpr construction to using static member functions, and ↵Daniel Dunbar2009-08-314-62/+218
| | | | | | taking the MCContext (which now owns all MCExprs). llvm-svn: 80569
* llvm-mc: Add some doxyment markers.Daniel Dunbar2009-08-311-1/+10
| | | | llvm-svn: 80568
* llvm-mc: Move AsmExpr into MC lib (as MCExpr).Daniel Dunbar2009-08-316-122/+122
| | | | llvm-svn: 80567
* Step #1 to giving Callgraph some sane invariants. The problems with callgraphChris Lattner2009-08-313-27/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stem from the fact that we have two types of passes that need to update it: 1. callgraphscc and module passes that are explicitly aware of it 2. Functionpasses (and loop passes etc) that are interlaced with CGSCC passes by the CGSCC Passmgr. In the case of #1, we can reasonably expect the passes to update the call graph just like any analysis. However, functionpasses are not and generally should not be CG aware. This has caused us no end of problems, so this takes a new approach. Logically, the CGSCC Pass manager can rescan every function after it runs a function pass over it to see if the functionpass made any updates to the IR that affect the callgraph. This allows it to catch new calls introduced by the functionpass. In practice, doing this would be slow. This implementation keeps track of whether or not the current scc is dirtied by a function pass, and, if so, delays updating the callgraph until it is actually needed again. This was we avoid extraneous rescans, but we still have good invariants when the callgraph is needed. Step #2 of the "give Callgraph some sane invariants" is to change CallGraphNode to use a CallBackVH for the callsite entry of the CallGraphNode. This way we can immediately remove entries from the callgraph when a FunctionPass is active instead of having dangling pointers. The current pass tries to tolerate these dangling pointers, but it is just an evil hack. This is related to PR3601/4835/4029. This also reverts r80541, a hack working around the sad lack of invariants. llvm-svn: 80566
* fix some cases where instcombine would change hte IR but not return trueChris Lattner2009-08-311-8/+10
| | | | | | from runOnFunction llvm-svn: 80562
* cleanups, factor some code out to a helper functionChris Lattner2009-08-311-22/+39
| | | | llvm-svn: 80542
* fix a crash building SPASS by tolerating a callsite that doesn't existChris Lattner2009-08-312-8/+70
| | | | | | in the callgraph, see the big comment at the top of the testcase. llvm-svn: 80541
* comment and simplify some code.Chris Lattner2009-08-311-19/+14
| | | | llvm-svn: 80540
* add -debug outputChris Lattner2009-08-311-0/+4
| | | | llvm-svn: 80539
* 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
* 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
OpenPOWER on IntegriCloud