aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* New testcase for CSE of call instructionsChris Lattner2004-03-151-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12418 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a minor bug, implementing GCSE/call_pure_function.llChris Lattner2004-03-151-3/+6
| | | | | | | Also, add some stuff I missed before. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12417 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that pure calls don't kill loadsChris Lattner2004-03-151-0/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12416 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement LICM of calls in simple cases. This is sufficient to move aroundChris Lattner2004-03-151-1/+31
| | | | | | | | | sin/cos/strlen calls and stuff. This implements: LICM/call_sink_pure_function.ll LICM/call_sink_const_function.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12415 91177308-0d34-0410-b5e6-96231b3b80d8
* New testcases to test LICM of call instructionsChris Lattner2004-03-152-0/+30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12414 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't be COMPLETELY pessimistic in the face of function callsChris Lattner2004-03-151-4/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12413 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak argumentChris Lattner2004-03-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12412 91177308-0d34-0410-b5e6-96231b3b80d8
* Deinline a couple of methods. Improve comment.Chris Lattner2004-03-151-12/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12411 91177308-0d34-0410-b5e6-96231b3b80d8
* Deinline some virtual methods, provide better mod/ref answers through theChris Lattner2004-03-151-5/+21
| | | | | | | use of the boolean queries git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12410 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass through the boolean queriesChris Lattner2004-03-151-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12409 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach basicaa about some stdc functions.Chris Lattner2004-03-151-5/+100
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12408 91177308-0d34-0410-b5e6-96231b3b80d8
* Add two new methods which can be used to enable a bunch of transformationsChris Lattner2004-03-151-0/+22
| | | | | | | in common cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12407 91177308-0d34-0410-b5e6-96231b3b80d8
* Mostly cosmetic improvements. Do fix the bug where a global value was ↵Chris Lattner2004-03-151-35/+23
| | | | | | considered an input. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12406 91177308-0d34-0410-b5e6-96231b3b80d8
* Assert that input blocks meet the invariants we expectChris Lattner2004-03-151-42/+38
| | | | | | | | | Simplify the input/output finder. All elements of a basic block are instructions. Any used arguments are also inputs. An instruction can only be used by another instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12405 91177308-0d34-0410-b5e6-96231b3b80d8
* New testcase that causes the code extractor to generate bogus code.Chris Lattner2004-03-151-0/+34
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12404 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix several bugs in the loop extractor. In particular, subloops were neverChris Lattner2004-03-151-8/+48
| | | | | | | | extracted, and a function that contained a single top-level loop never had the loop extracted, regardless of how much non-loop code there was. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12403 91177308-0d34-0410-b5e6-96231b3b80d8
* No correctness fixes here, just minor qoi fixes:Chris Lattner2004-03-141-30/+26
| | | | | | | | | | | | | | * Don't insert a branch to the switch instruction after the call, just make it a single block. * Insert the new alloca instructions in the entry block of the original function instead of having them execute dynamically * Don't make the default edge of the switch instruction go back to the switch. The loop extractor shouldn't create new loops! * Give meaningful names to the alloca slots and the reload instructions * Some minor code simplifications git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12402 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify code a bit, and fix bug CodeExtractor/2004-03-14-NoSwitchSupport.llChris Lattner2004-03-141-62/+34
| | | | | | | | | | | This also implements a two minor improvements: * Don't insert live-out stores IN the region, insert them on the code path that exits the region * If the region is exited to the same block from multiple paths, share the switch statement entry, live-out store code, and the basic block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12401 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify the code a bit by making the collection of basic blocks to extractChris Lattner2004-03-141-57/+39
| | | | | | | | a member of the class. While we're at it, turn the collection into a set instead of a vector to improve efficiency and make queries simpler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12400 91177308-0d34-0410-b5e6-96231b3b80d8
* New testcase that crashes the loop extractorChris Lattner2004-03-141-0/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12399 91177308-0d34-0410-b5e6-96231b3b80d8
* After reducing a miscompiled program down to the functions which are beingChris Lattner2004-03-142-28/+110
| | | | | | | | | | miscompiled, try to use the loop extractor to reduce the program down to a loop nest that is being miscompiled. In practice, the loop extractor appears to have too many bugs for this to be useful, but hopefully they will be fixed soon... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12398 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a minor bug in runPassesOnChris Lattner2004-03-141-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12397 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new "AutoDebugCrashes" optionChris Lattner2004-03-142-4/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12396 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor to use a new methodChris Lattner2004-03-141-39/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12395 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new methodChris Lattner2004-03-142-0/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12394 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor and clean up a bunch more code. No major functionality changes.Chris Lattner2004-03-146-89/+98
| | | | | | | | | | | | | | | * Make several methods of bugdriver global functions (ParseInputFile, PrintFunctionList) * Make PrintFunctionList truncate the output after 10 entries, like the crash debugger did. This allows code sharing. * Add a couple of methods to BugDriver that allows us to eliminate some friends * Improve comments in ExtractFunction.cpp * Make classes that used to be friends up bugdriver now live in anon namespaces * Rip a bunch of functionality in the miscompilation tester into a new TestMergedProgram function for future code sharing. * Fix a bug in the miscompilation tester induced in my last checkin git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12393 91177308-0d34-0410-b5e6-96231b3b80d8
* Another API change to MRegisterInfo::foldMemoryOperand. Instead of aAlkis Evlogimenos2004-03-143-6/+5
| | | | | | | MachineBasicBlock::iterator take a MachineInstr*. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12392 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a method to extract a loopChris Lattner2004-03-142-1/+42
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12391 91177308-0d34-0410-b5e6-96231b3b80d8
* Split into two passes. Now there is the general loop extractor, usable onChris Lattner2004-03-141-6/+24
| | | | | | | the command line, and the single loop extractor, usable by bugpoint git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12390 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename createLoopExtractorPass to createSingleLoopExtractorPassChris Lattner2004-03-141-63/+64
| | | | | | | Doxygenify git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12389 91177308-0d34-0410-b5e6-96231b3b80d8
* add a fixmeChris Lattner2004-03-141-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12388 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor all of the "splitting a module into two pieces" code to avoidChris Lattner2004-03-145-129/+92
| | | | | | | | code duplication. Also, don't use ReduceMiscompilingFunctions::TestFuncs to print out the final message. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12387 91177308-0d34-0410-b5e6-96231b3b80d8
* Change MRegisterInfo::foldMemoryOperand to return the foldedAlkis Evlogimenos2004-03-145-191/+188
| | | | | | | instruction to make the API more flexible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12386 91177308-0d34-0410-b5e6-96231b3b80d8
* Passes don't print stuff!Chris Lattner2004-03-141-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12385 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not create empty basic blocks when the lowerswitch pass expects blocks toChris Lattner2004-03-141-5/+2
| | | | | | | be non-empty! This fixes LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12384 91177308-0d34-0410-b5e6-96231b3b80d8
* New testcase that crashes the -lowerswitch passChris Lattner2004-03-141-0/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12383 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor random cleanupsChris Lattner2004-03-141-9/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12382 91177308-0d34-0410-b5e6-96231b3b80d8
* FunctionPass's should not define their own 'run' method.Chris Lattner2004-03-141-8/+2
| | | | | | | | Require 'simplified' loops, not just raw natural loops. This fixes CodeExtractor/2004-03-13-LoopExtractorCrash.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12381 91177308-0d34-0410-b5e6-96231b3b80d8
* If a block is dead, dominators will not be calculated for it. Because of thisChris Lattner2004-03-141-2/+33
| | | | | | | | | loop information won't see it, and we could have unreachable blocks pointing to the non-header node of blocks in a natural loop. This isn't tidy, so have the loopsimplify pass clean it up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12380 91177308-0d34-0410-b5e6-96231b3b80d8
* Catch some more cases of broken code. The loop extractor seems to be creatingChris Lattner2004-03-141-3/+8
| | | | | | | situations where there is a branch that goes to a block in another function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12379 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify functions as they are produced if -debug is specified. ReduceChris Lattner2004-03-141-6/+5
| | | | | | | curly braceage git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12378 91177308-0d34-0410-b5e6-96231b3b80d8
* verifyFunction has been broken for a long time now. Fix it.Chris Lattner2004-03-141-12/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12377 91177308-0d34-0410-b5e6-96231b3b80d8
* New testcase that crashes the loop extractorChris Lattner2004-03-141-0/+75
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12376 91177308-0d34-0410-b5e6-96231b3b80d8
* Move prototype to IPO.h instead of Scalar.hChris Lattner2004-03-141-3/+2
| | | | | | | | Make sure that the file interface header (IPO.h) is included first remove dead #incldue git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12375 91177308-0d34-0410-b5e6-96231b3b80d8
* Move loop extractor to the IPO headerChris Lattner2004-03-142-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12374 91177308-0d34-0410-b5e6-96231b3b80d8
* Indent anon namespace properly, add copyright blockChris Lattner2004-03-141-19/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12373 91177308-0d34-0410-b5e6-96231b3b80d8
* Move to the IPO library. Utils shouldn't contain passes.Chris Lattner2004-03-141-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12372 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead fileChris Lattner2004-03-141-34/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12371 91177308-0d34-0410-b5e6-96231b3b80d8
* DemoteRegToStack got moved from DemoteRegToStack.h to Local.hChris Lattner2004-03-144-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12368 91177308-0d34-0410-b5e6-96231b3b80d8
* Move DemoteRegToStack prototype out of DemoteRegToStack.h to this file.Chris Lattner2004-03-141-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12367 91177308-0d34-0410-b5e6-96231b3b80d8