Page MenuHomePhabricator

Add initial infra to convert annotations to MD and display summary remarks (WIP)
AbandonedPublic

Authored by fhahn on Oct 12 2020, 7:52 AM.

Details

Reviewers
None

Diff Detail

Unit TestsFailed

TimeTest
450 mslinux > Clang.CodeGen::2007-06-15-AnnotateAttribute.c
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/llvm-project/build/bin/clang -cc1 -internal-isystem /mnt/disks/ssd0/agent/llvm-project/build/lib/clang/12.0.0/include -nostdsysteminc -emit-llvm /mnt/disks/ssd0/agent/llvm-project/clang/test/CodeGen/2007-06-15-AnnotateAttribute.c -o - | grep llvm.global.annotations
440 mslinux > Clang.CodeGen::annotations-global.c
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/llvm-project/build/bin/clang -cc1 -internal-isystem /mnt/disks/ssd0/agent/llvm-project/build/lib/clang/12.0.0/include -nostdsysteminc /mnt/disks/ssd0/agent/llvm-project/clang/test/CodeGen/annotations-global.c -emit-llvm -o /mnt/disks/ssd0/agent/llvm-project/build/tools/clang/test/CodeGen/Output/annotations-global.c.tmp1
40 mslinux > LLVM.CodeGen/AMDGPU::opt-pipeline.ll
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/llvm-project/build/bin/opt -O0 -mtriple=amdgcn--amdhsa -disable-output -disable-verify -debug-pass=Structure /mnt/disks/ssd0/agent/llvm-project/llvm/test/CodeGen/AMDGPU/opt-pipeline.ll 2>&1 | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck -check-prefix=GCN-O0 /mnt/disks/ssd0/agent/llvm-project/llvm/test/CodeGen/AMDGPU/opt-pipeline.ll
30 mslinux > LLVM.Other::opt-O0-pipeline.ll
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/llvm-project/build/bin/opt -enable-new-pm=0 -mtriple=x86_64-- -O0 -debug-pass=Structure < /mnt/disks/ssd0/agent/llvm-project/llvm/test/Other/opt-O0-pipeline.ll -o /dev/null 2>&1 | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck /mnt/disks/ssd0/agent/llvm-project/llvm/test/Other/opt-O0-pipeline.ll --check-prefixes=CHECK,CHECK-NOEXT
50 mslinux > LLVM.Other::opt-O2-pipeline.ll
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/llvm-project/build/bin/opt -enable-new-pm=0 -mtriple=x86_64-- -O2 -debug-pass=Structure < /mnt/disks/ssd0/agent/llvm-project/llvm/test/Other/opt-O2-pipeline.ll -o /dev/null 2>&1 | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck --check-prefixes=CHECK,CHECK-NOEXT /mnt/disks/ssd0/agent/llvm-project/llvm/test/Other/opt-O2-pipeline.ll
View Full Test Results (17 Failed)

Event Timeline

fhahn created this revision.Oct 12 2020, 7:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 12 2020, 7:52 AM
fhahn requested review of this revision.Oct 12 2020, 7:52 AM
thegameg added inline comments.
llvm/lib/IR/Instruction.cpp
130
llvm/lib/Transforms/Scalar/AnnotationRemarks.cpp
41
thegameg added inline comments.Nov 6 2020, 12:07 PM
llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
905

How does this get scheduled for LTO? This should probably run after IR linking and all that (when prototyping, I put it in TargetPassConfig for better results, but that doesn't sound like the right place to schedule passes like this in general)

llvm/lib/Transforms/Scalar/AnnotationRemarks.cpp
38

One other way would be to walk back the uses of the metadata, but it might not be worth it since it would require a ModulePass.

fhahn updated this revision to Diff 303918.Nov 9 2020, 10:13 AM

Address most of Francis' comments, thanks!

fhahn marked an inline comment as done.Nov 9 2020, 10:15 AM
fhahn added inline comments.
llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
905

I also added it to the end of the LTO pipeline. Still need to add this for the new PM.

llvm/lib/Transforms/Scalar/AnnotationRemarks.cpp
38

Yeah that would probably be better. I'll try to update the code.

fhahn abandoned this revision.Nov 10 2020, 11:40 AM

I split up the patch into 2 separate ones: D91195 and D91188