summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix another case where debug info interferes withDale Johannesen2009-03-061-2/+6
| | | | | | an optimization. llvm-svn: 66288
* While hoisting instruction to speculatively execute simple bb, ignore dbg ↵Devang Patel2009-03-061-18/+30
| | | | | | intrinsics. llvm-svn: 66255
* Remove accidental check-ins in r65960. :-(Bill Wendling2009-03-031-5/+1
| | | | llvm-svn: 65961
* Use > instead of >=. We want to promote aggregates of 128-bytes.Bill Wendling2009-03-031-1/+5
| | | | llvm-svn: 65960
* Ignore dbg info intrinsics when folding conditional branch to Zhou Sheng2009-02-261-1/+5
| | | | | | conditional branch predecessors. llvm-svn: 65509
* Don't block basic block with only SwitchInst to fold into predecessors.Zhou Sheng2009-02-251-1/+5
| | | | llvm-svn: 65456
* While folding unconditional return move DbgRegionEndInst into the ↵Devang Patel2009-02-241-1/+8
| | | | | | | | | | | predecessor, instead of removing it. This fixes following tests from llvmgcc42 testsuite. gcc.c-torture/execute/20000605-3.c gcc.c-torture/execute/20020619-1.c gcc.c-torture/execute/20030920-1.c gcc.c-torture/execute/loop-ivopts-1.c llvm-svn: 65353
* If llvm.dbg.region.end is disappearing then remove corresponding ↵Devang Patel2009-02-111-1/+1
| | | | | | llvm.dbg.func.start also. llvm-svn: 64278
* Ignore dbg intrinsic while folding unconditional branch.Devang Patel2009-02-101-1/+2
| | | | llvm-svn: 64242
* Revert rev. 63876. It is causing llvm-gcc bootstrap failure.Devang Patel2009-02-051-0/+14
| | | | llvm-svn: 63888
* Ignore dbg intrinsics while propagating conditional expression info.Devang Patel2009-02-051-14/+0
| | | | llvm-svn: 63876
* Ignore dbg intrinsics while folding switch instruction.Devang Patel2009-02-051-8/+19
| | | | llvm-svn: 63802
* Ignore dbg intrinsics.Devang Patel2009-02-041-7/+29
| | | | llvm-svn: 63781
* While folding vallue comparison terminators ignore dbg intrinsics.Devang Patel2009-02-041-0/+3
| | | | llvm-svn: 63700
* Ignore dbg intrinsics while hoisting common code in the two blocks up into ↵Devang Patel2009-02-041-3/+14
| | | | | | the branch block. llvm-svn: 63687
* Do not let dbg intrinsic block folding of two entry phi node.Devang Patel2009-02-031-2/+3
| | | | llvm-svn: 63671
* another fix for PR3354Chris Lattner2009-01-201-0/+5
| | | | llvm-svn: 62561
* Doxygen-ify comments.Bill Wendling2009-01-191-45/+43
| | | | llvm-svn: 62546
* Fix a problem exposed by PR3354: simplifycfg was making a potentiallyChris Lattner2009-01-191-1/+14
| | | | | | trapping instruction be executed unconditionally. llvm-svn: 62541
* Temporarily revert r62487. It's causing this error during a release bootstrap ofBill Wendling2009-01-191-77/+2
| | | | | | | | | | | | | | | | llvm-gcc. Most likely, it's miscompiling one of the "gen*" programs: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./prev-gcc/xgcc -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./prev-gcc/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.6.0/bin/ -c -g -O2 -mdynamic-no-pic -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -mdynamic-no-pic -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/build -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include -DENABLE_LLVM -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/../llvm.src/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -o build/gencondmd.o build/gencondmd.c ../../llvm-gcc.src/gcc/config/i386/mmx.md:926: error: expected '}' before ')' token ../../llvm-gcc.src/gcc/config/i386/mmx.md:926: warning: excess elements in struct initializer ../../llvm-gcc.src/gcc/config/i386/mmx.md:926: warning: (near initialization for 'insn_conditions[4]') ../../llvm-gcc.src/gcc/config/i386/mmx.md:926: error: expected '}' before ')' token ../../llvm-gcc.src/gcc/config/i386/mmx.md:926: error: expected ',' or ';' before ')' token ../../llvm-gcc.src/gcc/config/i386/mmx.md:927: error: expected identifier or '(' before ',' token ../../llvm-gcc.src/gcc/config/i386/sse.md:3458: error: expected identifier or '(' before ',' token ... llvm-svn: 62506
* Fix PR3016, a bug which can occur do to an invalid assumption:Chris Lattner2009-01-191-2/+77
| | | | | | | | | we assumed a CFG structure that would be valid when all code in the function is reachable, but not all code is necessarily reachable. Do a simple, but horrible, CFG walk to check for this case. llvm-svn: 62487
* reduce indentation by using 'continue', no functionality change.Chris Lattner2009-01-191-20/+22
| | | | llvm-svn: 62477
* Fix some problems in SpeculativelyExecuteBB. Basically,Chris Lattner2009-01-191-5/+16
| | | | | | | | | | because of dead code, a phi could use the speculated instruction that was not in "BB2". Make this check explicit and tighten up some other corners. This fixes PR3292. No testcase becauase this depends entirely on visitation order of blocks and requires a sequence of 8 passes to repro. llvm-svn: 62476
* Make this a bit more explicit about which cases need the Chris Lattner2009-01-181-2/+6
| | | | | | check. No functionality change. llvm-svn: 62474
* Add a helper to remove a branch and DCE the condition, and use it Eli Friedman2008-12-161-32/+25
| | | | | | | | consistently for deleting branches. In addition to being slightly more readable, this makes SimplifyCFG a bit better about cleaning up after itself when it makes conditions unused. llvm-svn: 61100
* fix a bug I introduced in simplifycfg handling single entry phi Chris Lattner2008-12-071-1/+0
| | | | | | | nodes. FoldSingleEntryPHINodes deletes the PHI, so there is no need to delete it afterward. llvm-svn: 60653
* Factor some code into a new FoldSingleEntryPHINodes method.Chris Lattner2008-12-031-4/+1
| | | | llvm-svn: 60501
* Rename DeleteBlockIfDead to DeleteDeadBlock and make it Chris Lattner2008-12-031-1/+1
| | | | | | | unconditionally delete the block. All likely clients will do the checking anyway. llvm-svn: 60464
* Factor some code out of SimplifyCFG, forming a new Chris Lattner2008-12-031-21/+1
| | | | | | DeleteBlockIfDead method. llvm-svn: 60463
* delete ErasePossiblyDeadInstructionTree, replacing uses of it withChris Lattner2008-11-271-41/+9
| | | | | | RecursivelyDeleteTriviallyDeadInstructions. llvm-svn: 60196
* simplify this code a bit.Chris Lattner2008-11-271-4/+4
| | | | llvm-svn: 60164
* Fix PR2967 by not deleting volatile load/stores that occur before unreachable.Chris Lattner2008-10-291-0/+11
| | | | | | | I don't really see this as being needed, but there is little harm from doing it. llvm-svn: 58385
* Nick Lewycky's patch.Devang Patel2008-10-031-1/+1
| | | | | | While hosting instruction check PHI node. llvm-svn: 57025
* Large mechanical patch.Devang Patel2008-09-251-2/+2
| | | | | | | | | | | | | | | s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. This requires corresponding changes in llvm-gcc and clang. llvm-svn: 56622
* Try to place hoisted instructions befoe icmp instruction.Devang Patel2008-09-181-2/+23
| | | | llvm-svn: 56315
* Do not hoist instruction above branch condition. The instruction may use ↵Devang Patel2008-09-171-9/+2
| | | | | | branch condition. llvm-svn: 56286
* Use empty() instead of begin() == end().Dan Gohman2008-08-141-1/+1
| | | | llvm-svn: 54780
* Enable first-class aggregates support.Dan Gohman2008-07-231-43/+34
| | | | | | | | | | | | Remove the GetResultInst instruction. It is still accepted in LLVM assembly and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove support for return instructions with multiple values. These are auto-upgraded to use InsertValueInst instructions. The IRBuilder still accepts multiple-value returns, and auto-upgrades them to InsertValueInst instructions. llvm-svn: 53941
* Reapply r53735. My last patch fixed the failures Dan observed.Owen Anderson2008-07-181-52/+9
| | | | llvm-svn: 53761
* Revert r53735. It broke SPEC 464.h264ref.Dan Gohman2008-07-181-9/+52
| | | | llvm-svn: 53757
* Use MergeBlockIntoPredecessor to simplify some code.Owen Anderson2008-07-171-52/+9
| | | | llvm-svn: 53735
* Fix mishandling of the infinite loop case when merging two blocks. ThisChris Lattner2008-07-131-17/+26
| | | | | | fixes PR2540. llvm-svn: 53533
* more refactoring. Use early exits instead of really complex logic.Chris Lattner2008-07-131-109/+98
| | | | | | No functionality change. llvm-svn: 53532
* improve comments.Chris Lattner2008-07-131-2/+4
| | | | llvm-svn: 53531
* factor another large hunk of code out into its own function. Chris Lattner2008-07-131-155/+172
| | | | | | No functionality change. llvm-svn: 53530
* Final bit of simplification for FoldBranchToCommonDest.Chris Lattner2008-07-131-32/+34
| | | | llvm-svn: 53528
* simplify logic a bitChris Lattner2008-07-131-9/+10
| | | | llvm-svn: 53527
* Refactor some code out into its own helper function, getting rid of crazy ↵Chris Lattner2008-07-131-54/+84
| | | | | | | | | | multiline conditionals and commenting the code better. No functionality change. llvm-svn: 53526
* - Use O(1) check of basic block size limit.Evan Cheng2008-06-251-4/+8
| | | | | | - Avoid speculatively execute vector ops. llvm-svn: 52703
* Do not speculatively execute an instruction by hoisting it to its ↵Evan Cheng2008-06-121-2/+16
| | | | | | predecessor BB if any of its operands are defined but not used in BB. The transformation will prevent the operand from being sunk into the use block. llvm-svn: 52244
OpenPOWER on IntegriCloud