hanchenye-llvm-project/llvm/test/Transforms
Andrea Di Biagio 8e26936bfd [AddDiscriminators] Assign discriminators to MemIntrinsic calls.
Before this patch, pass AddDiscriminators always avoided to assign
discriminators to intrinsic calls. This was done mainly for two reasons:
 1) We wanted to minimize the number of based discriminators used.
 2) We wanted to avoid non-deterministic discriminator assignment for
    different debug levels.

Unfortunately, that approach was problematic for MemIntrinsic calls.
MemIntrinsic calls can be split by SROA into loads and stores, and each new
load/store instruction would obtain the debug location from the original
intrinsic call.
If we don't assign a discriminator to MemIntrinsic calls, then we cannot
correctly set the discriminator for the newly created loads and stores.
This may have a negative impact on the basic block weight computation
performed by the SampleLoader.

This patch fixes the issue by letting MemIntrinsic calls have a discriminator.

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

llvm-svn: 299972
2017-04-11 19:07:30 +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 Verifier: Disallow a line number without a file in DISubprogram 2017-02-17 23:57:42 +00:00
AtomicExpand Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
BBVectorize Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
BDCE
BranchFolding
CodeExtractor
CodeGenPrepare Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
ConstProp opt: Rename -default-data-layout flag to -data-layout and make it always override the layout. 2017-02-17 17:36:52 +00:00
ConstantHoisting [Constant Hoisting] Avoid inserting instructions before EH pads 2017-03-01 22:41:12 +00:00
ConstantMerge Don't merge global constants with non-dbg metadata. 2017-03-09 00:03:37 +00:00
Coroutines Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
CorrelatedValuePropagation Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
CountingFunctionInserter
CrossDSOCFI
DCE
DeadArgElim Set the prof weight correctly for call instructions in DeadArgumentElimination. 2017-03-23 23:26:00 +00:00
DeadStoreElimination Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
EarlyCSE [EarlyCSE] Don't DSE across readnone functions that may throw 2017-01-17 20:15:47 +00:00
EliminateAvailableExternally
Float2Int
ForcedFunctionAttrs
FunctionAttrs [FunctionAttrs] try to extend nonnull-ness of arguments from a callsite back to its parent function 2017-02-13 23:10:51 +00:00
FunctionImport [ModuleSummaryAnalysis] Don't crash when referencing unnamed globals. 2017-02-22 18:53:38 +00:00
GCOVProfiling
GVN Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
GVNHoist [GVNHoist] Call isGuaranteedToTransferExecutionToSuccessor on each instruction 2017-04-10 20:45:17 +00:00
GlobalDCE [PH] Replace uses of AssertingVH from members of analysis results with 2017-01-24 12:55:57 +00:00
GlobalMerge
GlobalOpt Verifier: Disallow a line number without a file in DISubprogram 2017-02-17 23:57:42 +00:00
GlobalSplit Fix one-after-the-end type metadata handling in globalsplit. 2017-03-07 22:18:48 +00:00
GuardWidening
IPConstantProp [IPCP] Don't propagate return value for naked functions. 2017-02-04 19:44:14 +00:00
IRCE [IRCE] Add a missing invariant check 2017-02-07 23:59:07 +00:00
IndVarSimplify Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
InferAddressSpaces AMDGPU: Add all atomicrmw fields to atomic.inc/dec 2017-03-30 22:21:40 +00:00
InferFunctionAttrs
Inline Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
InstCombine [InstCombine] Add testcases for (B&A)^A -> ~B & A and (B|A)^A -> B & ~A 2017-04-11 18:50:48 +00:00
InstMerge Remove the load hoisting code of MLSM, it is completely subsumed by GVNHoist 2017-01-24 19:55:36 +00:00
InstSimplify [InstSimplify] Teach SimplifyMulInst to recognize vectors of i1 as And. Not just scalar i1. 2017-04-06 17:33:37 +00:00
InterleavedAccess [ARM/AArch64] Ensure valid vector element types for interleaved accesses 2017-04-10 18:34:37 +00:00
Internalize
JumpThreading [JumpThreading] Perform phi-translation in SimplifyPartiallyRedundantLoad. 2017-03-19 15:30:53 +00:00
LCSSA
LICM [LICM] Hoist fp division from the loops and replace by a reciprocal 2017-04-11 02:22:54 +00:00
LoadCombine [LoadCombine] Change test to not use instcombine. 2017-02-10 00:44:08 +00:00
LoadStoreVectorizer [X86 TTI] Implement LSV hook 2017-04-05 20:51:38 +00:00
LoopDataPrefetch
LoopDeletion [PM] Teach LoopDeletion to correctly update the LPM when loops are 2017-01-18 02:41:26 +00:00
LoopDistribute Move test of lazy BFI with ORE to a generic directory 2017-01-13 00:16:23 +00:00
LoopIdiom Fix some broken CHECK lines. 2017-01-22 20:28:56 +00:00
LoopInterchange
LoopLoadElim [PM] Port LoopLoadElimination to the new pass manager and wire it into 2017-01-27 01:32:26 +00:00
LoopPredication Loop predication expand both sides of the widened condition 2017-02-27 15:44:49 +00:00
LoopReroll
LoopRotate [LoopRotate] Propagate dbg.value intrinsics 2017-03-08 09:56:22 +00:00
LoopSimplify [BasicBlockUtils] Use getFirstNonPHIOrDbg to set debugloc for instructions created in SplitBlockPredecessors 2017-02-14 21:10:40 +00:00
LoopSimplifyCFG
LoopStrengthReduce Turn on -addr-sink-using-gep by default. 2017-04-06 22:42:18 +00:00
LoopUnroll [LoopUnroll] Remap references in peeled iteration 2017-03-26 16:46:53 +00:00
LoopUnswitch [LoopUnswitch] Fix a test case 2017-04-11 04:11:47 +00:00
LoopVectorize [LV] Move first order recurrence test to common folder. NFC 2017-04-11 18:31:42 +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
LowerGuardIntrinsic
LowerInvoke
LowerSwitch
LowerTypeTests Align all scalar numbers to LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR 2017-04-04 06:02:32 +00:00
Mem2Reg Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
MemCpyOpt Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
MergeFunc MergeFunctions: Preserve debug info in thunks, under option -mergefunc-preserve-debug-info 2017-01-21 02:02:56 +00:00
MetaRenamer [MetaRenamer] Don't rename library functions. 2017-03-23 23:21:07 +00:00
NameAnonGlobals
NaryReassociate
NewGVN Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
ObjCARC [ObjCArc] Do not dereference an invalidated iterator. 2017-04-05 03:44:09 +00:00
PGOProfile [PGO] Memory intrinsic calls optimization based on profiled size 2017-04-04 16:42:20 +00:00
PartiallyInlineLibCalls
PhaseOrdering
PlaceSafepoints
PreISelIntrinsicLowering
PruneEH
Reassociate [Reassociate] Add negated value of negative constant to the Duplicates list. 2017-02-23 18:49:03 +00:00
Reg2Mem
RewriteStatepointsForGC [RSForGC] Handle vector GEPs 2017-03-17 00:55:53 +00:00
SCCP [SCCP] Resolve indirect branch target when possible. 2017-04-10 00:33:25 +00:00
SLPVectorizer AMDGPU: Mark all unspecified CC functions in tests as amdgpu_kernel 2017-03-21 21:39:51 +00:00
SROA Allow DataLayout to specify addrspace for allocas. 2017-04-10 22:27:50 +00:00
SafeStack Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
SampleProfile Emit less compiler optimization remarks in samplepgo to reduce a call to findCalleeFunctionSamples which is going to be refactored. 2017-04-10 20:49:16 +00:00
Scalarizer [Scalarizer] Handle scalar arguments in vector GEP 2017-03-31 06:29:49 +00:00
SeparateConstOffsetFromGEP AMDGPU: Mark all unspecified CC functions in tests as amdgpu_kernel 2017-03-21 21:39:51 +00:00
SimplifyCFG Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
Sink
SpeculativeExecution
StraightLineStrengthReduce AMDGPU: Mark all unspecified CC functions in tests as amdgpu_kernel 2017-03-21 21:39:51 +00:00
StripDeadPrototypes
StripSymbols [StripDeadDebug/DIFinder] Track inlined SPs 2017-04-11 13:32:11 +00:00
StructurizeCFG AMDGPU: Remove llvm.SI.vs.load.input 2017-04-03 21:45:13 +00:00
TailCallElim
ThinLTOBitcodeWriter ThinLTOBitcodeWriter: handle aliases first in filterModule 2017-04-05 00:42:07 +00:00
Util Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
WholeProgramDevirt Align all scalar numbers to LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR 2017-04-04 06:02:32 +00:00