llvm-6502/include/llvm
Chandler Carruth 6b980541df Refactor the interface to recursively simplifying instructions to be tad
bit simpler by handling a common case explicitly.

Also, refactor the implementation to use a worklist based walk of the
recursive users, rather than trying to use value handles to detect and
recover from RAUWs during the recursive descent. This fixes a very
subtle bug in the previous implementation where degenerate control flow
structures could cause mutually recursive instructions (PHI nodes) to
collapse in just such a way that From became equal to To after some
amount of recursion. At that point, we hit the inf-loop that the assert
at the top attempted to guard against. This problem is defined away when
not using value handles in this manner. There are lots of comments
claiming that the WeakVH will protect against just this sort of error,
but they're not accurate about the actual implementation of WeakVHs,
which do still track RAUWs.

I don't have any test case for the bug this fixes because it requires
running the recursive simplification on unreachable phi nodes. I've no
way to either run this or easily write an input that triggers it. It was
found when using instruction simplification inside the inliner when
running over the nightly test-suite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153393 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-24 21:11:24 +00:00
..
ADT Move ftostr into its last user (cppbackend) and simplify it a bit. 2012-03-23 11:26:29 +00:00
Analysis Refactor the interface to recursively simplifying instructions to be tad 2012-03-24 21:11:24 +00:00
Assembly
Bitcode Fix windows compilation warning. Patch by Micah. 2012-03-21 20:00:30 +00:00
CodeGen MachineInstr: Inline the fast path (non-bundle instruction) of hasProperty. 2012-03-17 17:03:45 +00:00
Config Remove the C backend. 2012-03-23 05:50:46 +00:00
DebugInfo
ExecutionEngine Make it feasible for clients using EngineBuilder to capture the TargetMachine that is created as part of selecting the appropriate target. 2012-03-23 17:40:56 +00:00
MC Add a hook in MCELFObjectTargetWriter to allow targets to sort relocation 2012-03-23 23:06:45 +00:00
Object [Object/COFF]: Expose getSectionContents. 2012-03-19 20:27:37 +00:00
Support Make the formatting of this file more consistent, and fix the 80-columns 2012-03-18 23:45:14 +00:00
TableGen Add Foreach Loop 2012-02-22 16:09:41 +00:00
Target Target override to allow CodeGenPrepare to sink address operands to intrinsics in the same way it current does for loads and stores 2012-03-13 20:59:56 +00:00
Transforms add EP_OptimizerLast extension point 2012-03-23 23:22:59 +00:00
Argument.h
Attributes.h Don't use static CTORs for the Attributes constants, while still keeping the class type-safe 2012-02-08 01:11:21 +00:00
AutoUpgrade.h
BasicBlock.h Add a constified getLandingPad() method. 2012-01-31 00:26:24 +00:00
CallGraphSCCPass.h
CallingConv.h
CMakeLists.txt
Constant.h Convert assert(0) to llvm_unreachable 2012-02-05 22:14:15 +00:00
Constants.h Efficient Constant Uniquing. 2012-02-05 20:54:10 +00:00
DefaultPasses.h
DerivedTypes.h Cache the sized-ness of struct types, once we reach the steady state of 2012-03-07 02:33:09 +00:00
Function.h [Support] Drop verbose _ATTRIBUTE from LLVM_ATTRIBUTE_{READONLY,READNONE} macro 2012-03-09 16:30:33 +00:00
GlobalAlias.h
GlobalValue.h
GlobalVariable.h
GVMaterializer.h
InitializePasses.h ThreadSanitizer, a race detector. First LLVM commit. 2012-02-13 22:50:51 +00:00
InlineAsm.h
InstrTypes.h
Instruction.def [unwind removal] Remove all of the code for the dead 'unwind' instruction. There 2012-02-06 21:44:22 +00:00
Instruction.h
Instructions.h Fixed comments for SwitchInst::addCase and for SwitchInst::removeCase. 2012-03-13 12:37:10 +00:00
IntrinsicInst.h Remove the eh.exception and eh.selector intrinsics. Also remove a hack to copy 2012-01-31 01:46:13 +00:00
Intrinsics.h
Intrinsics.td Remove the now-dead llvm.eh.exception and llvm.eh.selector intrinsics. 2012-01-31 01:58:48 +00:00
IntrinsicsARM.td
IntrinsicsCellSPU.td
IntrinsicsHexagon.td
IntrinsicsPowerPC.td
IntrinsicsPTX.td
IntrinsicsX86.td Remove GCC builtins for vpermilp* intrinsics as clang no longer needs them. Custom lower the intrinsics to the vpermilp target specific node and remove intrinsic patterns. 2012-02-08 06:36:57 +00:00
IntrinsicsXCore.td
LinkAllPasses.h Add a basic-block autovectorization pass. 2012-02-01 03:51:43 +00:00
LinkAllVMCore.h
Linker.h
LLVMContext.h First part of PR12251. Add documentation and verifier support for the range 2012-03-24 00:14:51 +00:00
Metadata.h Add a way to replace a field inside a metadata node. This can be 2012-02-15 09:09:29 +00:00
Module.h s/ModAttrBehavior/ModFlagBehavior/g to be consistent with how module flags are named elsewhere. 2012-02-16 10:28:10 +00:00
OperandTraits.h
Operator.h
Pass.h Added TargetPassConfig::disablePass/substitutePass as a general mechanism to override specific passes. 2012-02-15 03:21:47 +00:00
PassAnalysisSupport.h
PassManager.h Add pass printer passes in the right place. 2012-02-01 07:16:20 +00:00
PassManagers.h Add pass printer passes in the right place. 2012-02-01 07:16:20 +00:00
PassRegistry.h
PassSupport.h
SymbolTableListTraits.h
Type.h
Use.h
User.h Convert assert(0) to llvm_unreachable 2012-02-05 22:14:15 +00:00
Value.h Extend the inline cost calculation to account for bonuses due to 2012-03-14 23:19:53 +00:00
ValueSymbolTable.h