[llvm-dev] Fwd: exact usage of HotColdSplit pass and impact on ll files
crypto mad via llvm-dev
llvm-dev at lists.llvm.org
Sat Apr 4 19:28:25 PDT 2020
Hi there!
Recently I saw a presentation with title "*Hot Cold Splitting Optimization
Pass In LLVM*" on youtube about hotcoldsplit LLVM pass .
I want to use this built-in pass to optimize my IR but I don't know how it
can optimize my code, I didn't find any result and contacted to the
developer and he advised me to use test at LLVM for testing this pass .
I tried *opt.ll* from llvm/test/intstrumentation/BoundsChecking and :
*opt -S -hotcoldsplit opt.ll -o opt1.ll*
The result is not what I expect because I used a diffing tool and see just
some sorts of the following has been removed from the original source :
*; CHECK: mul i64 {{.*}}, 4; CHECK: sub i64 4000, %; CHECK-NEXT: icmp ult
i64 {{.*}}, 4; CHECK-NEXT: or i1; CHECK: trap*
*; CHECK: mul i64 {{.*}}, 8; CHECK: mul i64 {{.*}}, 4; CHECK: add i64;
CHECK: sub i64 16, %; CHECK-NEXT: icmp ult i64 16, %; CHECK-NEXT: icmp ult
i64 {{.*}}, 4; CHECK-NEXT: or i1; CHECK: trap*
Btw, I attached the source and output file as the result .
As in my own code, I do not use these "* ; CHECK : *" things, I see no
change on my own code after using hotcoldsplit and in fact I do expect this
built-in pass to have impact on the real code but I didn't find this .
Can someone please clarify how this hotcoldsplit pass , affect the real
code and how exactly does it working and how I can use this built-in pass
in the proper way to optimize my code?
Thanks
Azim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200405/fa752eac/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opt1.ll
Type: application/octet-stream
Size: 14222 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200405/fa752eac/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opt.ll
Type: application/octet-stream
Size: 15493 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200405/fa752eac/attachment-0001.obj>
More information about the llvm-dev
mailing list