llvm-6502/lib/Transforms/Utils
Frits van Bommel 5649ba70fb Add a parameter to ConstantFoldTerminator() that callers can use to ask it to also clean up the condition of any conditional terminator it folds to be unconditional, if that turns the condition into dead code. This just means it calls RecursivelyDeleteTriviallyDeadInstructions() in strategic spots. It defaults to the old behavior.
I also changed -simplifycfg, -jump-threading and -codegenprepare to use this to produce slightly better code without any extra cleanup passes (AFAICT this was the only place in -simplifycfg where now-dead conditions of replaced terminators weren't being cleaned up). The only other user of this function is -sccp, but I didn't read that thoroughly enough to figure out whether it might be holding pointers to instructions that could be deleted by this.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131855 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 16:24:18 +00:00
..
AddrModeMatcher.cpp
BasicBlockUtils.cpp Scanning entire basic block may be too expensive in terms of compile time. Instead, just use whatever location info first non-phi instruction has. 2011-05-02 21:57:00 +00:00
BasicInliner.cpp
BreakCriticalEdges.cpp Preserve line number information. 2011-05-17 19:43:06 +00:00
BuildLibCalls.cpp
CloneFunction.cpp
CloneLoop.cpp
CloneModule.cpp
CMakeLists.txt
CodeExtractor.cpp
DemoteRegToStack.cpp
InlineFunction.cpp Teach the inliner to emit llvm.lifetime.start/end, to scope the local variables 2011-05-22 05:22:10 +00:00
InstructionNamer.cpp
LCSSA.cpp There is no need to force DebugLoc on a PHI at this point. 2011-05-16 22:05:03 +00:00
Local.cpp Add a parameter to ConstantFoldTerminator() that callers can use to ask it to also clean up the condition of any conditional terminator it folds to be unconditional, if that turns the condition into dead code. This just means it calls RecursivelyDeleteTriviallyDeadInstructions() in strategic spots. It defaults to the old behavior. 2011-05-22 16:24:18 +00:00
LoopSimplify.cpp
LoopUnroll.cpp
LowerInvoke.cpp
LowerSwitch.cpp
Makefile
Mem2Reg.cpp
PromoteMemoryToRegister.cpp
SimplifyCFG.cpp Add a parameter to ConstantFoldTerminator() that callers can use to ask it to also clean up the condition of any conditional terminator it folds to be unconditional, if that turns the condition into dead code. This just means it calls RecursivelyDeleteTriviallyDeadInstructions() in strategic spots. It defaults to the old behavior. 2011-05-22 16:24:18 +00:00
SimplifyInstructions.cpp
SSAUpdater.cpp Assing line number info to new PHIs created by SSA updater. 2011-04-29 22:28:59 +00:00
UnifyFunctionExitNodes.cpp
Utils.cpp
ValueMapper.cpp