aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* EE/JIT: Do not invoke parent's ctors/dtors from main()! (PR3897)NAKAMURA Takumi2010-08-301-0/+12
| | | | | | | | | | On Mingw and Cygwin, the symbol __main is resolved to callee's(eg. tools/lli) one, to invoke wrong duplicated ctors (and register wrong callee's dtors with atexit(3)). We expect, by callee, ExecutionEngine::runStaticConstructorsDestructors() is called before ExecutionEngine::runFunctionAsMain() is called. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112474 91177308-0d34-0410-b5e6-96231b3b80d8
* The value is offset from the start of the section for non-common symbols, ↵Benjamin Kramer2010-08-301-0/+2
| | | | | | submitted by Jordan Gordeev. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112473 91177308-0d34-0410-b5e6-96231b3b80d8
* Index external symbols by symbol table instead of parent section, by Roman ↵Benjamin Kramer2010-08-301-1/+1
| | | | | | Divacky. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112472 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark all common symbols external. This is not exactly correct but it lets appsBenjamin Kramer2010-08-301-2/+3
| | | | | | | link for now and can be adjusted later. Patch by Roman Divacky. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112471 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a hack that tries to understand incorrect triples from theDuncan Sands2010-08-302-16/+5
| | | | | | | | | | | | Triple class constructor. Only valid triples should now be used inside LLVM - front-ends are now responsable for rejecting or correcting invalid target triples. The Triple::normalize method can be used to straighten out funky triples provided by users. Give this a whirl through the buildbots to see if I caught all places where triples enter LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112470 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct bogus module triple specifications.Duncan Sands2010-08-3046-46/+46
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112469 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new example to the LLVM distribution: a trace-based Brainfuck compiler ↵Owen Anderson2010-08-309-1/+850
| | | | | | that uses LLVM as its code generator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112465 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt to remove the MSIL backend from CMake as well based on Chris's r112375.Chandler Carruth2010-08-302-4/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112464 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r112461. It was failing on PPC...Bill Wendling2010-08-301-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112463 91177308-0d34-0410-b5e6-96231b3b80d8
* Create Thumb2sI_cpsr and T2sI_cpsr. These new classes indicate that CPSR is theBill Wendling2010-08-302-11/+71
| | | | | | | | | optional modified register (instead of reg0). Along with r112461 it will make sure that the optional define of CPSR is marked as "def" and will thus mark the instructions using these classes (t2ANDS*) as setting the 's' flag. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112462 91177308-0d34-0410-b5e6-96231b3b80d8
* When adding a register, we should mark it as "def" if it can optionally defineBill Wendling2010-08-301-2/+4
| | | | | | | said (physical) register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112461 91177308-0d34-0410-b5e6-96231b3b80d8
* revert 112457, it looks like it broke selfhost.Chris Lattner2010-08-291-133/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112459 91177308-0d34-0410-b5e6-96231b3b80d8
* rewrite DwarfEHPrepare to use SSAUpdater to promote its allocasChris Lattner2010-08-292-24/+134
| | | | | | | | | instead of PromoteMemToReg. This allows it to stop using DF and DT, eliminating a computation of DT and DF from clang -O3. Clang is now down to 2 runs of DomFrontier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112457 91177308-0d34-0410-b5e6-96231b3b80d8
* inline function into its only caller.Chris Lattner2010-08-291-13/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112455 91177308-0d34-0410-b5e6-96231b3b80d8
* two changes: 1) make AliasSet hold the list of call sites with anChris Lattner2010-08-293-16/+29
| | | | | | | | | | | | | | | assertingvh so we get a violent explosion if the pointer dangles. 2) Fix AliasSetTracker::deleteValue to remove call sites with by-pointer comparisons instead of by-alias queries. Using findAliasSetForCallSite can cause alias sets to get merged when they shouldn't, and can also miss alias sets when the call is readonly. #2 fixes PR6889, which only repros with a .c file :( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112452 91177308-0d34-0410-b5e6-96231b3b80d8
* LICM does get dead instructions input to it. Instead of sinking themChris Lattner2010-08-292-1/+26
| | | | | | | out of loops, just delete them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112451 91177308-0d34-0410-b5e6-96231b3b80d8
* use moveBefore instead of remove+insert, it avoids some Chris Lattner2010-08-291-9/+3
| | | | | | | | symtab manipulation, so its faster (in addition to being more elegant) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112450 91177308-0d34-0410-b5e6-96231b3b80d8
* revert 112448 for now.Chris Lattner2010-08-291-5/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112449 91177308-0d34-0410-b5e6-96231b3b80d8
* optimize LICM::hoist to use moveBefore. Correct its updatingChris Lattner2010-08-291-6/+5
| | | | | | | | of AST to remove the hoisted instruction from the AST, since it is no longer in the loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112448 91177308-0d34-0410-b5e6-96231b3b80d8
* fix some bugs (found by inspection) where LICM would not updateChris Lattner2010-08-291-1/+3
| | | | | | | | | | | LICM correctly. When sinking an instruction, it should not add entries for the sunk instruction to the AST, it should remove the entry for the sunk instruction. The blocks being sunk to are not in the loop, so their instructions shouldn't be in the AST (yet)! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112447 91177308-0d34-0410-b5e6-96231b3b80d8
* rework the ownership of subloop alias information: instead ofChris Lattner2010-08-291-16/+25
| | | | | | | | | | | keeping them around until the pass is destroyed, keep them around a) just when useful (not for outer loops) and b) destroy them right after we use them. This should reduce memory use and fixes potential bugs where a loop is deleted and another loop gets allocated to the same address. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112446 91177308-0d34-0410-b5e6-96231b3b80d8
* apparently unswitch had the same "Feature". Stop itsChris Lattner2010-08-291-7/+2
| | | | | | | claims that it preserves domfrontier if it doesn't really. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112445 91177308-0d34-0410-b5e6-96231b3b80d8
* now that loop passes don't use DomFrontier, there is no reasonChris Lattner2010-08-291-8/+2
| | | | | | | | for the unroller to pretend it supports updating it. It still has a horrible hack for DomTree. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112444 91177308-0d34-0410-b5e6-96231b3b80d8
* Make IVUsers iterative instead of recursive.Dan Gohman2010-08-293-84/+98
| | | | | | | | This has the side effect of reversing the order of most of IVUser's results. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112442 91177308-0d34-0410-b5e6-96231b3b80d8
* Optionally rerun dedicated-register filtering after applyingDan Gohman2010-08-291-0/+20
| | | | | | | | other filtering techniques, as those may allow it to filter out more obviously unprofitable candidates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112441 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix several areas in LSR to do a better job keeping the mainDan Gohman2010-08-291-50/+106
| | | | | | | | | LSRInstance data structures up to date. This fixes some pessimizations caused by stale data which will be exposed in an upcoming change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112440 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor the three main groups of code out ofDan Gohman2010-08-291-5/+28
| | | | | | | NarrowSearchSpaceUsingHeuristics into separate functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112439 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete a bogus check.Dan Gohman2010-08-291-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112438 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some comments.Dan Gohman2010-08-291-4/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112437 91177308-0d34-0410-b5e6-96231b3b80d8
* Move this debug output into GenerateAllReuseFormula, to declutterDan Gohman2010-08-291-4/+4
| | | | | | | the high-level logic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112436 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete an unused declaration.Dan Gohman2010-08-291-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112435 91177308-0d34-0410-b5e6-96231b3b80d8
* Do one lookup instead of two.Dan Gohman2010-08-291-3/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112434 91177308-0d34-0410-b5e6-96231b3b80d8
* Restructure the {A,+,B}<L> * {C,+,D}<L> folding so that it foldsDan Gohman2010-08-291-21/+24
| | | | | | | | all applicable addrecs before recursing on getMulExpr, instead of recursing on getMulExpr for each one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112433 91177308-0d34-0410-b5e6-96231b3b80d8
* Batch up subtracts along with adds, when analyzing long chains ofDan Gohman2010-08-291-4/+9
| | | | | | | operations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112432 91177308-0d34-0410-b5e6-96231b3b80d8
* Micro-optimize GroupByComplexity.Dan Gohman2010-08-291-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112431 91177308-0d34-0410-b5e6-96231b3b80d8
* Hold AddRec->getLoop() in a variable, to make the Mul code more consistentDan Gohman2010-08-291-3/+4
| | | | | | | with the Add code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112430 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename a variable, for consistency.Dan Gohman2010-08-291-5/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112429 91177308-0d34-0410-b5e6-96231b3b80d8
* Use iterators instead of indices.Dan Gohman2010-08-291-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112428 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't worry about union types.Dan Gohman2010-08-291-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112427 91177308-0d34-0410-b5e6-96231b3b80d8
* Make this test less dependent on register allocation choices.Dan Gohman2010-08-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112426 91177308-0d34-0410-b5e6-96231b3b80d8
* Use exec.Dan Gohman2010-08-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112425 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete an unused declaration.Dan Gohman2010-08-291-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112424 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix lowering of INSERT_VECTOR_ELT in SPU. Kalle Raiskila2010-08-292-3/+12
| | | | | | | The IDX was treated as byte index, not element index. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112422 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix whitespaces. No functionality changes.Bill Wendling2010-08-291-26/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112421 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop explicitly scheduling domfrontier before the loop passes,Chris Lattner2010-08-291-3/+0
| | | | | | | | | | | | | since none of them use it. With this, we now only run domfrontier (an N^2 analysis) 3 times at clang -O3: once for "early" per-function cleanup, once at the start of the per-function pipeline to support SRoA, and once late because the EHPrepare class uses it. EHPrepare needs to stop using it, this is silly and wasteful. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112420 91177308-0d34-0410-b5e6-96231b3b80d8
* licm preserves the cfg, it doesn't have to explicitly say itChris Lattner2010-08-291-1/+1
| | | | | | | preserves domfrontier. It does preserve AA though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112419 91177308-0d34-0410-b5e6-96231b3b80d8
* now that it doesn't use the PromoteMemToReg function, LICM doesn'tChris Lattner2010-08-291-4/+1
| | | | | | | | require DomFrontier. Dropping this doesn't actually save any runs of the pass though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112418 91177308-0d34-0410-b5e6-96231b3b80d8
* completely rewrite the memory promotion algorithm in LICM.Chris Lattner2010-08-291-200/+215
| | | | | | | | Among other things, this uses SSAUpdater instead of PromoteMemToReg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112417 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove NEON vaddl, vaddw, vsubl, and vsubw intrinsics. Instead, use llvmBob Wilson2010-08-297-124/+225
| | | | | | | | IR add/sub operations with one or both operands sign- or zero-extended. Auto-upgrade the old intrinsics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112416 91177308-0d34-0410-b5e6-96231b3b80d8
* use getUniqueExitBlocks instead of a manual set.Chris Lattner2010-08-291-10/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112412 91177308-0d34-0410-b5e6-96231b3b80d8