diff options
author | Hal Finkel <hfinkel@anl.gov> | 2016-10-06 11:58:52 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2016-10-06 11:58:52 +0000 |
commit | 4d6f3088c328c19e6ed122cc02f92f23fbe5e52d (patch) | |
tree | 66116aeaace3a4044bc0dd49c30ecb03954ecdc6 /llvm/tools/llvm-opt-report/OptReport.cpp | |
parent | 6341e46cd1a0383a4511f541b2ae62949aaf5c31 (diff) | |
download | bcm5719-llvm-4d6f3088c328c19e6ed122cc02f92f23fbe5e52d.tar.gz bcm5719-llvm-4d6f3088c328c19e6ed122cc02f92f23fbe5e52d.zip |
[llvm-opt-report] Record VF, etc. correctly for multiple opts on one line
When there are multiple optimizations on one line, record the vectorization
factors, etc. correctly (instead of incorrectly substituting default values).
llvm-svn: 283443
Diffstat (limited to 'llvm/tools/llvm-opt-report/OptReport.cpp')
-rw-r--r-- | llvm/tools/llvm-opt-report/OptReport.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/llvm/tools/llvm-opt-report/OptReport.cpp b/llvm/tools/llvm-opt-report/OptReport.cpp index 49fbbd17bec..e9ab3fa2984 100644 --- a/llvm/tools/llvm-opt-report/OptReport.cpp +++ b/llvm/tools/llvm-opt-report/OptReport.cpp @@ -248,29 +248,24 @@ static void collectLocationInfo(yaml::Stream &Stream, // We track information on both actual and potential transformations. This // way, if there are multiple possible things on a line that are, or could // have been transformed, we can indicate that explicitly in the output. - auto UpdateLLII = [Transformed, VectorizationFactor, - InterleaveCount, - UnrollCount](OptReportLocationInfo &LI, - OptReportLocationItemInfo &LLII) { + auto UpdateLLII = [Transformed](OptReportLocationItemInfo &LLII) { LLII.Analyzed = true; - if (Transformed) { + if (Transformed) LLII.Transformed = true; - - LI.VectorizationFactor = VectorizationFactor; - LI.InterleaveCount = InterleaveCount; - LI.UnrollCount = UnrollCount; - } }; if (Pass == "inline") { auto &LI = LocationInfo[File][Line][Function][Column]; - UpdateLLII(LI, LI.Inlined); + UpdateLLII(LI.Inlined); } else if (Pass == "loop-unroll") { auto &LI = LocationInfo[File][Line][Function][Column]; - UpdateLLII(LI, LI.Unrolled); + LI.UnrollCount = UnrollCount; + UpdateLLII(LI.Unrolled); } else if (Pass == "loop-vectorize") { auto &LI = LocationInfo[File][Line][Function][Column]; - UpdateLLII(LI, LI.Vectorized); + LI.VectorizationFactor = VectorizationFactor; + LI.InterleaveCount = InterleaveCount; + UpdateLLII(LI.Vectorized); } } } |