OSDN Git Service

[MCA] Add support for nested and overlapping region markers
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Thu, 9 May 2019 15:18:09 +0000 (15:18 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Thu, 9 May 2019 15:18:09 +0000 (15:18 +0000)
commit9d3a058db3e6127fd9019898c51c299d9837b312
tree69cebb28d29c0fb8a14e98d8759e1fa3776a893c
parent81cce9567de6a109d319ca0e4be9901f9e3360a8
[MCA] Add support for nested and overlapping region markers

This patch fixes PR41523
https://bugs.llvm.org/show_bug.cgi?id=41523

Regions can now nest/overlap provided that they have different names.
Anonymous regions cannot overlap.

Region end markers must specify the region name. The only exception is for when
there is only one user-defined region; in that particular case, the region end
marker doesn't need to specify a name.

Incorrect region end markers are no longer ignored. Instead, the tool reports an
error and we exit with an error code.

Added test cases to verify the new diagnostic error messages.

Updated the llvm-mca docs to reflect this feature change.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360351 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
docs/CommandGuide/llvm-mca.rst
test/tools/llvm-mca/X86/llvm-mca-markers-10.s [new file with mode: 0644]
test/tools/llvm-mca/X86/llvm-mca-markers-11.s [new file with mode: 0644]
test/tools/llvm-mca/X86/llvm-mca-markers-12.s [new file with mode: 0644]
test/tools/llvm-mca/X86/llvm-mca-markers-6.s
test/tools/llvm-mca/X86/llvm-mca-markers-7.s
test/tools/llvm-mca/X86/llvm-mca-markers-8.s [new file with mode: 0644]
test/tools/llvm-mca/X86/llvm-mca-markers-9.s [new file with mode: 0644]
tools/llvm-mca/CodeRegion.cpp
tools/llvm-mca/CodeRegion.h
tools/llvm-mca/CodeRegionGenerator.cpp
tools/llvm-mca/llvm-mca.cpp