hanchenye-llvm-project/llvm/test/Analysis
James Y Knight c0e6b8ac3a IR: Support parsing numeric block ids, and emit them in textual output.
Just as as llvm IR supports explicitly specifying numeric value ids
for instructions, and emits them by default in textual output, now do
the same for blocks.

This is a slightly incompatible change in the textual IR format.

Previously, llvm would parse numeric labels as string names. E.g.
  define void @f() {
    br label %"55"
  55:
    ret void
  }
defined a label *named* "55", even without needing to be quoted, while
the reference required quoting. Now, if you intend a block label which
looks like a value number to be a name, you must quote it in the
definition too (e.g. `"55":`).

Previously, llvm would print nameless blocks only as a comment, and
would omit it if there was no predecessor. This could cause confusion
for readers of the IR, just as unnamed instructions did prior to the
addition of "%5 = " syntax, back in 2008 (PR2480).

Now, it will always print a label for an unnamed block, with the
exception of the entry block. (IMO it may be better to print it for
the entry-block as well. However, that requires updating many more
tests.)

Thus, the following is supported, and is the canonical printing:
  define i32 @f(i32, i32) {
    %3 = add i32 %0, %1
    br label %4

  4:
    ret i32 %3
  }

New test cases covering this behavior are added, and other tests
updated as required.

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

llvm-svn: 356789
2019-03-22 18:27:13 +00:00
..
AliasSet [Analysis] Make LocationSize pretty-printing more descriptive 2018-10-10 01:35:22 +00:00
AssumptionCache
BasicAA [BasicAA] Support arbitrary pointer sizes (and fix an overflow bug) 2019-01-02 16:28:09 +00:00
BlockFrequencyInfo [BFI] Use rounding while computing profile counts. 2018-08-16 00:26:59 +00:00
BranchProbabilityInfo [BPI] Look through bitcasts in calcZeroHeuristic 2019-02-15 11:50:21 +00:00
CFLAliasAnalysis Revert r332657: "[AA] cfl-anders-aa with field sensitivity" 2018-05-17 21:56:39 +00:00
CallGraph
ConstantFolding [ConstantFolding] Fold undef for integer intrinsics 2019-01-11 21:18:00 +00:00
CostModel [TTI] getMemcpyCost 2019-03-20 14:15:46 +00:00
Delinearization Re-apply "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)." 2018-07-13 23:58:46 +00:00
DemandedBits Reapply "[DemandedBits][BDCE] Support vectors of integers" 2018-12-07 15:38:13 +00:00
DependenceAnalysis [DA][NewPM] Handle transitive dependencies in the new-pm version of DA 2019-02-03 12:25:41 +00:00
DivergenceAnalysis [AMDGPU] Add support for 64 bit buffer atomic artihmetic instructions 2019-03-06 17:02:06 +00:00
DominanceFrontier IR: Support parsing numeric block ids, and emit them in textual output. 2019-03-22 18:27:13 +00:00
Dominators
GlobalsModRef [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
IVUsers Re-apply "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)." 2018-07-13 23:58:46 +00:00
LazyCallGraph
LazyValueAnalysis [LVI] run transfer function for binary operator even when the RHS isn't a constant 2018-11-21 05:24:12 +00:00
LegacyDivergenceAnalysis [AMDGPU] Add support for 64 bit buffer atomic artihmetic instructions 2019-03-06 17:02:06 +00:00
Lint
LoopAccessAnalysis [LV] Avoid vectorizing unsafe dependencies in uniform address 2018-11-19 15:39:59 +00:00
LoopInfo Introduce llvm.loop.parallel_accesses and llvm.access.group metadata. 2018-12-20 04:58:07 +00:00
MemoryDependenceAnalysis [MemDep] Fixed handling of invariant.group 2018-05-18 22:40:34 +00:00
MemorySSA [MemorySSA] Make insertDef insert corresponding phi nodes. 2019-02-27 22:20:22 +00:00
MustExecute [MustExecute] Fix algorithmic bug in isGuaranteedToExecute. PR38514 2018-08-17 06:19:17 +00:00
PhiValues Add a PhiValuesAnalysis pass to calculate the underlying values of phis 2018-06-28 14:13:06 +00:00
PostDominators
ProfileSummary [ProfileSummary] Add options to override hot and cold count thresholds. 2018-11-02 17:39:31 +00:00
RegionInfo IR: Support parsing numeric block ids, and emit them in textual output. 2019-03-22 18:27:13 +00:00
ScalarEvolution [SCEV] Use depth limit for trunc analysis 2019-03-12 18:28:05 +00:00
ScopedNoAliasAA
StackSafetyAnalysis [stack-safety] Inter-Procedural Analysis implementation 2018-11-26 23:05:58 +00:00
TypeBasedAliasAnalysis [FunctionAttrs] Infer WriteOnly Function Attribute 2018-08-23 15:05:22 +00:00
ValueTracking [ValueTracking] Adjust comment in test 2019-01-07 21:02:22 +00:00
alias-analysis-uses.ll