1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/test/Transforms/SimplifyCFG
Hal Finkel 502475d4f3 Make processing @llvm.assume more efficient by using operand bundles
There was an efficiency problem with how we processed @llvm.assume in
ValueTracking (and other places). The AssumptionCache tracked all of the
assumptions in a given function. In order to find assumptions relevant to
computing known bits, etc. we searched every assumption in the function. For
ValueTracking, that means that we did O(#assumes * #values) work in InstCombine
and other passes (with a constant factor that can be quite large because we'd
repeat this search at every level of recursion of the analysis).

Several of us discussed this situation at the last developers' meeting, and
this implements the discussed solution: Make the values that an assume might
affect operands of the assume itself. To avoid exposing this detail to
frontends and passes that need not worry about it, I've used the new
operand-bundle feature to add these extra call "operands" in a way that does
not affect the intrinsic's signature. I think this solution is relatively
clean. InstCombine adds these extra operands based on what ValueTracking, LVI,
etc. will need and then those passes need only search the users of the values
under consideration. This should fix the computational-complexity problem.

At this point, no passes depend on the AssumptionCache, and so I'll remove
that as a follow-up change.

Differential Revision: https://reviews.llvm.org/D27259

llvm-svn: 289755
2016-12-15 02:53:42 +00:00
..
AArch64 [SimplifyCFG] Rewrite SinkThenElseCodeToEnd 2016-08-22 19:07:15 +00:00
AMDGPU AMDGPU: Fix some places missed in rename 2015-06-19 17:39:03 +00:00
ARM [llvm] Remove redundant --check-prefix=CHECK from tests 2016-10-24 18:57:55 +00:00
Mips [MIPS] add overrides for isCheapToSpeculateCttz() and isCheapToSpeculateCtlz() 2015-11-11 17:24:56 +00:00
PowerPC [CodeGenPrepare] Removed duplicate logic. SimplifyCFG already knows how to speculate calls to cttz/ctlz. 2015-02-13 14:15:48 +00:00
SPARC
X86 [SimplifyCFG] auto-generate better checks; NFC 2016-11-25 21:07:13 +00:00
2002-05-21-PHIElimination.ll
2002-09-24-PHIAssertion.ll
2003-03-07-DominateProblem.ll
2003-08-05-InvokeCrash.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
2003-08-17-BranchFold.ll
2003-08-17-BranchFoldOrdering.ll
2003-08-17-FoldSwitch-dbg.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
2003-08-17-FoldSwitch.ll regenerate checks 2016-03-28 22:12:21 +00:00
2004-12-10-SimplifyCFGCrash.ll
2005-06-16-PHICrash.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2005-08-01-PHIUpdateFail.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
2005-10-02-InvokeSimplify.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
2005-12-03-IncorrectPHIFold.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2006-02-17-InfiniteUnroll.ll
2006-06-12-InfLoop.ll
2006-08-03-Crash.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2006-10-19-UncondDiv.ll
2006-12-08-Ptr-ICmp-Branch.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2007-11-22-InvokeNoUnwind.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
2007-12-21-Crash.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2008-01-02-hoist-fp-add.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2008-05-16-PHIBlockMerge.ll [SimlifyCFG] Prevent passes from destroying canonical loop structure, especially for nested loops 2016-03-29 04:08:57 +00:00
2008-07-13-InfLoopMiscompile.ll remove the metadata added with r267827 2016-04-30 00:02:36 +00:00
2008-09-08-MultiplePred.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2008-09-17-SpeculativeHoist.ll
2008-10-03-SpeculativelyExecuteBeforePHI.ll
2008-12-06-SingleEntryPhi.ll
2008-12-16-DCECond.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2009-01-18-PHIPropCrash.ll
2009-05-12-externweak.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2010-03-30-InvokeCrash.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
2011-03-08-UnreachableUse.ll
2011-09-05-TrivialLPad.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
assume.ll
attr-convergent.ll [SimplifyCFG] Don't fold conditional branches that contain calls to convergent functions. 2016-02-12 21:01:36 +00:00
attr-noduplicate.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
basictest.ll [Verifier] Add verification for TBAA metadata 2016-12-11 20:07:15 +00:00
branch-cond-merge.ll
branch-cond-prop.ll
branch-fold-dbg.ll [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
branch-fold-test.ll
branch-fold-threshold.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
branch-fold.ll
branch-phi-thread.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
BrUnwind.ll
bug-25299.ll [SimplifyCFG] Extend SimplifyResume to handle phi of trivial landing pad. 2016-01-10 05:48:01 +00:00
clamp.ll [SimplifyCFG] Add test for r229099 2015-02-13 11:08:40 +00:00
combine-parallel-mem-md.ll [SimplifyCFG] Preserve !llvm.mem.parallel_loop_access when merging 2016-04-26 02:06:06 +00:00
common-dest-folding.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
ConditionalTrappingConstantExpr.ll [Constant] remove fdiv and frem from canTrap() 2016-08-29 15:27:17 +00:00
CoveredLookupTable.ll
dbginfo.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
dce-cond-after-folding-terminator.ll
DeadSetCC.ll
duplicate-landingpad.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
duplicate-phis.ll
empty-catchpad.ll [WinEH] Simplify unreachable catchpads 2016-01-05 02:37:41 +00:00
empty-cleanuppad.ll [SimplifyCFG] Don't kill empty cleanuppads with multiple uses 2016-06-04 23:50:03 +00:00
EmptyBlockMerge.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
EqualPHIEdgeBlockMerge.ll [SimlifyCFG] Prevent passes from destroying canonical loop structure, especially for nested loops 2016-03-29 04:08:57 +00:00
extract-cost.ll
ForwardSwitchConditionToPHI.ll
guards.ll [SimplifyCFG] Fold llvm.guard(false) to unreachable 2016-04-21 05:09:12 +00:00
hoist-common-code.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
hoist-dbgvalue.ll [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
hoist-with-range.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
HoistCode.ll
implied-cond-matching-false-dest.ll [ValueTracking] Improve isImpliedCondition when the dominating cond is false. 2016-04-25 17:23:36 +00:00
implied-cond-matching-imm.ll [ValueTracking] Improve isImpliedCondition for matching LHS and Imm RHSs. 2016-05-05 15:39:18 +00:00
implied-cond-matching.ll Fix typo from r267432. 2016-04-25 18:20:27 +00:00
implied-cond.ll [SimplifyCFG] Constant fold a branch implied by it's incoming edge 2015-10-29 03:11:49 +00:00
indirectbr.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
InfLoop.ll [SimplifyCFG] Fix for "endless" loop after dead code removal (Alternative to 2016-02-03 23:54:25 +00:00
inline-asm-sink.ll [SimplifyCFG] Be even more conservative in SinkThenElseCodeToEnd 2016-09-11 09:00:03 +00:00
invoke_unwind.ll [SimplifyCFG] Extend SimplifyResume to handle phi of trivial landing pad. 2016-01-10 05:48:01 +00:00
invoke.ll Revert "[SimplifyCFG] Stop inserting calls to llvm.trap for UB" 2016-06-25 08:19:55 +00:00
iterative-simplify.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
lifetime.ll Revert "[SimplifyCFG] Extend TryToSimplifyUncondBranchFromEmptyBlock for empty block including lifetime intrinsics" 2016-05-02 19:43:22 +00:00
MagicPointer.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
merge-cleanuppads.ll [SimplifyCFG] Merge together cleanuppads 2016-02-20 01:07:45 +00:00
merge-cond-stores-2.ll Tweak unnamed label syntax in textual IR for easier matching in tests. 2016-01-27 21:53:08 +00:00
merge-cond-stores.ll Revert "Don't create unnecessary PHIs" 2015-12-14 22:36:57 +00:00
multiple-phis.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
no_speculative_loads_with_asan.ll [asan] Disabling speculative loads under asan. Patch by Mike Aizatsky 2015-10-14 00:21:05 +00:00
no_speculative_loads_with_tsan.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
no-md-sink.ll [SimplifyCFG] Don't try to create metadata-valued PHIs 2016-09-07 21:38:22 +00:00
noreturn-call.ll
phi-undef-loadstore.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
PhiBlockMerge2.ll
PhiBlockMerge.ll regenerate checks 2016-03-28 22:12:21 +00:00
PhiEliminate2.ll propagate 'unpredictable' metadata on select instructions 2016-03-17 15:30:52 +00:00
PhiEliminate3.ll
PhiEliminate.ll
PHINode.ll
PhiNoEliminate.ll
PR9946.ll
PR16069.ll regenerate checks 2016-03-28 22:12:21 +00:00
PR17073.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
PR25267.ll [SimplifyCFG] Don't use-after-free an SSA value 2015-10-21 18:22:24 +00:00
PR27615-simplify-cond-br.ll DebugInfo: New metadata representation for global variables. 2016-09-13 01:12:59 +00:00
PR29163.ll [SimplifyCFG] Hoisting invalidates metadata 2016-08-29 17:14:08 +00:00
PR30210.ll Add a test for r280191 2016-09-16 02:43:36 +00:00
preserve-branchweights-partial.ll
preserve-branchweights-switch-create.ll
preserve-branchweights.ll Follow-up patch of http://reviews.llvm.org/D19948 to handle missing profiles when simplifying CFG. 2016-05-18 22:41:03 +00:00
preserve-llvm-loop-metadata.ll [simplifycfg][loop-simplify] Preserve loop metadata in 2 transformations. 2016-11-18 13:12:07 +00:00
preserve-load-metadata-2.ll Preserve load alignment and dereferenceable metadata during some transformations 2015-11-02 17:53:51 +00:00
preserve-load-metadata-3.ll Preserve load alignment and dereferenceable metadata during some transformations 2015-11-02 17:53:51 +00:00
preserve-load-metadata.ll Preserve load alignment and dereferenceable metadata during some transformations 2015-11-02 17:53:51 +00:00
preserve-make-implicit-on-switch-to-br.ll [ConstantFoldTerminator] Preserve make.implicit metadata when converting SwitchInst to BranchInst 2015-08-07 19:30:12 +00:00
rangereduce.ll Actually, r277337 was fine. Just kill the DAGs that made the test allow nondeterminism. 2016-08-05 14:58:34 +00:00
remove-debug.ll Remove debug info when hoisting instruction from then/else branch. 2016-09-08 21:53:33 +00:00
return-merge.ll
seh-nounwind.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
select-gep.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
sink-common-code.ll Ignore debug info when making optimization decisions in SimplifyCFG. 2016-10-17 19:28:44 +00:00
speculate-math.ll Revert "Revert "[SimplifyCFG] allow speculation of exactly one expensive instruction (PR24818)"" 2016-01-27 02:59:41 +00:00
speculate-store.ll [SimplifyCFG] propagate branch metadata when creating select (PR26636) 2016-03-26 23:30:50 +00:00
speculate-vector-ops.ll
speculate-with-offset.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
SpeculativeExec.ll Revert "Revert "Strip metadata when speculatively hoisting instructions (r252604)" 2015-11-18 14:50:18 +00:00
statepoint-invoke-unwind.ll [gc.statepoint] Change gc.statepoint intrinsic's return type to token type instead of i32 type 2015-12-26 07:54:32 +00:00
switch_create.ll Teaching SimplifyCFG to recognize the Or-Mask trick that InstCombine uses to 2016-06-24 01:59:00 +00:00
switch_switch_fold.ll use FileCheck for tighter checking 2016-03-16 23:39:37 +00:00
switch_thread.ll reduce check strings; no need to check IR comments 2016-03-16 23:22:01 +00:00
switch-dead-default.ll Make processing @llvm.assume more efficient by using operand bundles 2016-12-15 02:53:42 +00:00
switch-masked-bits.ll [SimplifyCFG] eliminate switch cases based on known range of switch condition 2016-05-20 14:53:09 +00:00
switch-on-const-select.ll
switch-range-to-icmp.ll
switch-simplify-crash.ll
switch-to-br.ll
switch-to-icmp.ll
switch-to-select-multiple-edge-per-block-phi.ll [SimplifyCFG] auto-generate better checks; NFC 2016-11-25 21:12:39 +00:00
switch-to-select-two-case.ll [SimplifyCFG] auto-generate better checks; NFC 2016-11-25 21:12:39 +00:00
trap-debugloc.ll Revert "[SimplifyCFG] Stop inserting calls to llvm.trap for UB" 2016-06-25 08:19:55 +00:00
trapping-load-unreachable.ll Revert "[SimplifyCFG] Stop inserting calls to llvm.trap for UB" 2016-06-25 08:19:55 +00:00
two-entry-phi-return.ll [SimplifyCFG] propagate branch metadata when creating select (PR27344) 2016-04-15 15:32:12 +00:00
UncondBranchToReturn.ll
unreachable-blocks.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
unreachable-cleanuppad.ll [SimplifyCFG] Do not blindly remove unreachable blocks 2016-02-24 10:02:16 +00:00
UnreachableEliminate.ll [SimplifyCFG] Replace calls to null/undef with unreachable 2016-06-25 07:37:27 +00:00
volatile-phioper.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
wineh-unreachable.ll [SimplifyCFG] Further improve our ability to remove redundant catchpads 2016-01-05 07:42:17 +00:00