llvm/test/Transforms
Davide Italiano 1e0b73ce8b [GlobalOpt] Remove unreachable blocks before optimizing a function.
LLVM's definition of dominance allows instructions that are cyclic
in unreachable blocks, e.g.:

  %pat = select i1 %condition, @global, i16* %pat

because any instruction dominates an instruction in a block that's
not reachable from entry.
So, remove unreachable blocks from the function, because a) there's
no point in analyzing them and b) GlobalOpt should otherwise grow
some more complicated logic to break these cycles.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307215 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-05 22:28:28 +00:00
..
ADCE Fix a test to check assembly output instead of bitcode. 2017-03-31 23:22:19 +00:00
AddDiscriminators [AddDiscriminators] Assign discriminators to MemIntrinsic calls. 2017-04-11 19:07:30 +00:00
AlignmentFromAssumptions
ArgumentPromotion [ArgPromotion] Add a testcase for PR32917 2017-05-05 08:40:24 +00:00
AtomicExpand Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
BDCE [Analysis] Support bitreverse in -demanded-bits pass 2017-04-13 16:44:25 +00:00
BranchFolding
CodeExtractor Clean up a test case 2017-06-27 21:35:49 +00:00
CodeGenPrepare [CodeGenPrepare] Don't create inttoptr for ni ptrs 2017-06-29 20:28:59 +00:00
ConstantHoisting [ConstantHoisting] Avoid hoisting constants in GEPs that index into a struct type. 2017-06-29 17:03:34 +00:00
ConstantMerge
ConstProp [X86] Replace 'REQUIRES: x86' in tests with 'REQUIRES: x86-registered-target' which seems to be the correct way to make them run on an x86 build. 2017-06-04 08:21:58 +00:00
Coroutines [coroutines] PR33271: Remove stray coro.save intrinsics during CoroSplit 2017-06-02 02:18:36 +00:00
CorrelatedValuePropagation [LVI] Teach LVI to reason about ORs of icmps similar to how it reasons about ANDs of icmps 2017-06-23 01:08:16 +00:00
CountingFunctionInserter
CrossDSOCFI [cfi] CFI-ICall for ThinLTO. 2017-06-16 00:18:29 +00:00
DCE [InstSimplify] Don't constant fold or DCE calls that are marked nobuiltin 2017-06-09 23:18:11 +00:00
DeadArgElim Replace hardcoded intrinsic list with speculatable attribute. 2017-05-03 02:26:10 +00:00
DeadStoreElimination Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
EarlyCSE [EarlyCSE] Make PhiToCheck in removeMSSA() a set. 2017-06-14 19:29:53 +00:00
EliminateAvailableExternally
Float2Int
ForcedFunctionAttrs
FunctionAttrs Support arbitrary address space pointers in masked gather/scatter intrinsics. 2017-05-03 12:28:54 +00:00
FunctionImport Revert r295861, "[ModuleSummaryAnalysis] Don't crash when referencing unnamed globals." 2017-05-03 00:18:48 +00:00
GCOVProfiling
GlobalDCE [PM] Teach the PGO instrumentation pasess to run GlobalDCE before 2017-05-25 07:15:09 +00:00
GlobalMerge Align definition of DW_OP_plus with DWARF spec [3/3] 2017-06-14 13:14:38 +00:00
GlobalOpt [GlobalOpt] Remove unreachable blocks before optimizing a function. 2017-07-05 22:28:28 +00:00
GlobalSplit
GuardWidening
GVN Revert "[GVN] Recommit the patch "Add phi-translate support in scalarpre"." 2017-07-03 12:23:10 +00:00
GVNHoist Disable GVN Hoist due to still more bugs being found in it. There is 2017-04-27 00:28:03 +00:00
GVNSink Changed a comparison operator for std::stable_sort to implement strict weak ordering. 2017-06-08 17:27:40 +00:00
IndVarSimplify [IndVarSimplify] Add AShr exact flags using induction variables ranges. 2017-07-05 13:25:58 +00:00
InferAddressSpaces InferAddressSpaces: Avoid assertion failure with replacing identical 2017-06-08 13:20:55 +00:00
InferFunctionAttrs Add argmononly attribute to strlen and wcslen, i.e. they only read memory (string) passed to them. 2017-06-18 03:10:26 +00:00
Inline [Cloner] Re-map simplfied cloned instructions. 2017-07-01 03:29:33 +00:00
InstCombine Recommit r307064, "[InstCombine] Add test cases demonstrating creation of extra bswap instrinsic calls when when optimizing bswap and bitwise ops when the bswaps have additional uses. NFC" 2017-07-04 20:15:24 +00:00
InstMerge
InstNamer Add basic test case for -instnamer 2017-05-08 23:18:46 +00:00
InstSimplify [InstSimplify] Constant fold the new GEP in SimplifyGEPInst. 2017-06-06 10:17:14 +00:00
InterleavedAccess Fix the bug when handling shufflevector for aarch64. 2017-06-26 21:33:51 +00:00
Internalize
IPConstantProp
IRCE [IRCE] Canonicalize pre/post loops after the blocks are added into parent loop 2017-06-06 14:54:01 +00:00
JumpThreading [JumpThreading] Add test case that was supposed to go with r306085. 2017-06-27 15:26:47 +00:00
LCSSA
LICM [AliasSetTracker] Don't drop AA MD so eagerly 2017-06-29 19:13:11 +00:00
LoadStoreVectorizer Skip bitcasts while looking for GEP in LoadStoreVectorizer 2017-04-25 18:00:08 +00:00
LoopDataPrefetch
LoopDeletion [LoopDeletion] Update exits correctly when multiple duplicate edges from an exiting block 2017-06-22 20:20:56 +00:00
LoopDistribute
LoopIdiom [Atomics] Rename and change prototype for atomic memcpy intrinsic 2017-06-16 14:43:59 +00:00
LoopInterchange
LoopLoadElim
LoopPredication
LoopReroll
LoopRotate Restrict the definition of loop preheader to avoid EH blocks 2017-06-22 23:27:16 +00:00
LoopSimplify [LoopSimplify] Re-instate r306081 with a bug fix w.r.t. indirectbr. 2017-06-25 22:45:31 +00:00
LoopSimplifyCFG
LoopStrengthReduce Revert r304824 "Fix PR23384 (part 3 of 3)" 2017-06-19 17:57:15 +00:00
LoopUnroll [RuntimeUnrolling] Add logic for loops with multiple exit blocks 2017-06-30 17:57:07 +00:00
LoopUnswitch [LoopSimplify] Re-instate r306081 with a bug fix w.r.t. indirectbr. 2017-06-25 22:45:31 +00:00
LoopVectorize llvm/test/Transforms/LoopVectorize/X86/slm-no-vectorize.ll: -debug is available in +Asserts. 2017-07-02 14:25:27 +00:00
LoopVersioning [LAA] Correctly return a half-open range in expandBounds 2017-04-05 09:24:26 +00:00
LoopVersioningLICM [LAA] Correctly return a half-open range in expandBounds 2017-04-05 09:24:26 +00:00
LowerAtomic
LowerExpectIntrinsic Fix builin_expect lowering bug 2017-06-07 18:32:24 +00:00
LowerGuardIntrinsic
LowerInvoke
LowerSwitch LowerSwitch: Fix producing invalid IR on unreachable code 2017-04-21 23:54:12 +00:00
LowerTypeTests Fix ODR violations due to abuse of LLVM_YAML_IS_(FLOW_)?SEQUENCE_VECTOR 2017-06-30 20:56:57 +00:00
Mem2Reg Add test coverage for mem2reg dbg.declare lowering. 2017-04-21 22:13:55 +00:00
MemCpyOpt Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
MergeFunc
MetaRenamer [MetaRenamer] Don't rename library functions. 2017-03-23 23:21:07 +00:00
NameAnonGlobals
NaryReassociate
NewGVN NewGVN: Fix PR 33461, caused by slightly overzealous verification. 2017-06-19 00:24:00 +00:00
ObjCARC Replace hardcoded intrinsic list with speculatable attribute. 2017-05-03 02:26:10 +00:00
PartiallyInlineLibCalls
PGOProfile [PGO] Implementate profile counter regiser promotion 2017-06-25 00:26:43 +00:00
PhaseOrdering Make globalaa-retained.ll test catching more cases. 2017-04-18 13:29:26 +00:00
PlaceSafepoints
PreISelIntrinsicLowering
PruneEH
Reassociate [Reassociate] Make sure EraseInst sets MadeChange 2017-06-27 05:32:13 +00:00
Reg2Mem
RewriteStatepointsForGC [RS4GC] Drop invalid metadata after pointers are relocated 2017-06-12 21:26:53 +00:00
SafeStack Align definition of DW_OP_plus with DWARF spec [3/3] 2017-06-14 13:14:38 +00:00
SampleProfile Do not inline recursive direct calls in sample loader pass. 2017-06-21 17:57:43 +00:00
Scalarizer [Scalarizer] Handle scalar arguments in vector GEP 2017-03-31 06:29:49 +00:00
SCCP [SCCP] Resolve indirect branch target when possible. 2017-04-10 00:33:25 +00:00
SeparateConstOffsetFromGEP
SimpleLoopUnswitch [PM/Unswitch] Fix a bug in the domtree update logic for the new unswitch 2017-05-25 06:33:36 +00:00
SimplifyCFG [Hexagon] Guard the generation of lookup table 2017-06-30 20:54:24 +00:00
Sink [Sink] Fix predicate in legality check 2017-06-09 19:31:10 +00:00
SLPVectorizer [SLP] A test for limiting vectorization of instructions, NFC. 2017-06-30 14:37:32 +00:00
SpeculativeExecution Revert r301950: SpeculativeExecution: Stop using whitelist for costs 2017-05-10 12:30:07 +00:00
SROA [SROA] Fix APInt size when alloca address space is not 0 2017-06-27 18:26:06 +00:00
StraightLineStrengthReduce
StripDeadPrototypes
StripSymbols [StripDeadDebug/DIFinder] Track inlined SPs 2017-04-11 13:32:11 +00:00
StructurizeCFG Revert "StructurizeCFG: Directly invert cmp instructions" 2017-04-24 20:25:01 +00:00
TailCallElim [TRE] Improve code motion in TRE, use AA to tell whether a load can be moved before a call that writes to memory. 2017-06-19 15:21:18 +00:00
ThinLTOBitcodeWriter Write summaries for merged modules when splitting modules for ThinLTO. 2017-06-08 23:01:49 +00:00
Util PredicateInfo: Don't insert conditional info when a conditional branch jumps to the same target regardless of condition 2017-06-14 21:19:52 +00:00
WholeProgramDevirt Skip CFI for dead functions. 2017-06-02 18:24:23 +00:00