[PATCH] D17742: Perform InstructioinCombiningPass before SampleProfile pass.
Xinliang David Li via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 1 12:25:23 PST 2016
On Tue, Mar 1, 2016 at 12:03 PM, Diego Novillo <dnovillo at google.com> wrote:
>
>
> On Tue, Mar 1, 2016 at 2:39 PM, Dehao Chen <danielcdh at gmail.com> wrote:
>
>>
>> call void bitcast (void (%"class.llvm::SmallVectorImpl"*)*
>> @_ZN4llvm15SmallVectorImplIjED2Ev to void
>> (%"class.llvm::SmallVector"*)*)(%"class.llvm::SmallVector"* %3) #7, !dbg
>> !4175
>>
>> I just spent ~2 hours to generate a small C++ file to produce this "call
>> with bitcast" pattern, but whatever I tried, front end will not give me
>> exactly the same pattern. Shall I just keep the record in the commit log
>> about how to reproduce with FoldingSet.bc?
>>
>
> Not really. Just wanted a motivation for the change. Adding a pass as a
> pre-requisite for the sampler profiler means adding compile time. Do you
> think this will trigger a lot in general? I'm somewhat concerned about
> compile time inflation, but if it's useful in general for the sample
> profiling case, then I don't mind.
>
yeh -- as long as the compile time is spent to serve a good purpose for
SamplePGO :)
David
>
>
> ================
>> Comment at: test/Transforms/SampleProfile/cov-zero-samples.ll:3
>> @@ -2,3 +2,3 @@
>> ;
>> -; CHECK: remark: cov-zero-samples.cc:9:25: Applied 404065 samples from
>> profile (offset: 2.1)
>> +; CHECK: remark: cov-zero-samples.cc:9:29: Applied 404065 samples from
>> profile (offset: 2.1)
>> ; CHECK: remark: cov-zero-samples.cc:10:9: Applied 443089 samples from
>> profile (offset: 3)
>> ----------------
>> dnovillo wrote:
>> > Why did the discriminators change here? Was this because of
>> instcombine? What did it do?
>> This is not changing discriminator but column number.
>> inst-combine optimized the code to combine some instructions together and
>> used the LOC of one instruction as the new instruction's LOC.
>>
>
> Ah, thanks.
>
>
> Diego.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160301/937497ae/attachment.html>
More information about the llvm-commits
mailing list