#
af1eeaf3 |
| 30-Jun-2020 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
BranchFolding: Use Register
|
#
80e107cc |
| 29-May-2020 |
Zequan Wu <zequanwu@google.com> |
Add NoMerge MIFlag to avoid MIR branch folding
Let the codegen recognized the nomerge attribute and disable branch folding when the attribute is given
Differential Revision: https://reviews.llvm.or
Add NoMerge MIFlag to avoid MIR branch folding
Let the codegen recognized the nomerge attribute and disable branch folding when the attribute is given
Differential Revision: https://reviews.llvm.org/D79537
show more ...
|
#
fc937806 |
| 13-May-2020 |
Arthur Eubanks <aeubanks@google.com> |
Don't jump to landing pads in Control Flow Optimizer
Summary: Likely fixes https://bugs.llvm.org/show_bug.cgi?id=45858.
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: htt
Don't jump to landing pads in Control Flow Optimizer
Summary: Likely fixes https://bugs.llvm.org/show_bug.cgi?id=45858.
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80047
show more ...
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3 |
|
#
7af9d386 |
| 20-Feb-2020 |
James Y Knight <jyknight@google.com> |
Correctly modify the CFG in IfConverter, and then remove the CorrectExtraCFGEdges function.
The latter was a workaround for "Various pieces of code" leaving bogus extra CFG edges in place. Where by
Correctly modify the CFG in IfConverter, and then remove the CorrectExtraCFGEdges function.
The latter was a workaround for "Various pieces of code" leaving bogus extra CFG edges in place. Where by "various" it meant only IfConverter::MergeBlocks, which failed to clear all of the successors of dead blocks it emptied out. This wouldn't matter a whole lot, except that the dead blocks remained listed as predecessors of still-useful blocks, inhibiting optimizations.
This fix slightly changed two thumb tests, because the correct CFG successors allowed for the "diamond" if-conversion pattern to be detected, when it could only use "simple" before.
Additionally, the removal of a now-redundant call to analyzeBranch (with AllowModify=true) in BranchFolder::OptimizeFunction caused a later check for an empty block in BranchFolder::OptimizeBlock to fail. Correct this by moving the call to analyzeBranch in OptimizeBlock higher.
Differential Revision: https://reviews.llvm.org/D79527
show more ...
|
#
10ce1bc8 |
| 16-Apr-2020 |
Vedant Kumar <vsk@apple.com> |
[MachineBasicBlock] Add helpers for skipping debug instructions [1/14]
Summary: These helpers are exercised by follow-up commits in this patch series, which is all about removing CodeGen differences
[MachineBasicBlock] Add helpers for skipping debug instructions [1/14]
Summary: These helpers are exercised by follow-up commits in this patch series, which is all about removing CodeGen differences with vs. without debug info in the AArch64 backend.
Reviewers: fhahn, aprantl, jpaquette, paquette
Subscribers: kristof.beyls, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78260
show more ...
|
#
6cb204eb |
| 20-Apr-2020 |
Simon Pilgrim <llvm-dev@redking.me.uk> |
BranchFolding.h - cleanup includes and forward declarations. NFC. Push MBFIWrapper.h include down to BranchFolding.cpp/IfConversion.cpp
|
#
016d91cc |
| 27-Feb-2020 |
Djordje Todorovic <djordje.todorovic@rt-rk.com> |
[CallSiteInfo] Handle bundles when updating call site info
This will address the issue: P8198 and P8199 (from D73534).
The methods was not handle bundles properly.
Differential Revision: https://r
[CallSiteInfo] Handle bundles when updating call site info
This will address the issue: P8198 and P8199 (from D73534).
The methods was not handle bundles properly.
Differential Revision: https://reviews.llvm.org/D74904
show more ...
|
Revision tags: llvmorg-10.0.0-rc2 |
|
#
68908993 |
| 10-Feb-2020 |
Djordje Todorovic <djordje.todorovic@rt-rk.com> |
[CSInfo] Use isCandidateForCallSiteEntry() when updating the CSInfo
Use the isCandidateForCallSiteEntry(). This should mostly be an NFC, but there are some parts ensuring the moveCallSiteInfo() and
[CSInfo] Use isCandidateForCallSiteEntry() when updating the CSInfo
Use the isCandidateForCallSiteEntry(). This should mostly be an NFC, but there are some parts ensuring the moveCallSiteInfo() and copyCallSiteInfo() operate with call site entry candidates (both Src and Dest should be the call site entry candidates).
Differential Revision: https://reviews.llvm.org/D74122
show more ...
|
Revision tags: llvmorg-10.0.0-rc1 |
|
#
ac8da31a |
| 29-Jan-2020 |
Hiroshi Yamauchi <yamauchi@google.com> |
[PGO][PGSO] Handle MBFIWrapper
Some code gen passes use MBFIWrapper to keep track of the frequency of new blocks. This was not taken into account and could lead to incorrect frequencies as MBFI sile
[PGO][PGSO] Handle MBFIWrapper
Some code gen passes use MBFIWrapper to keep track of the frequency of new blocks. This was not taken into account and could lead to incorrect frequencies as MBFI silently returns zero frequency for unknown/new blocks.
Add a variant for MBFIWrapper in the PGSO query interface.
Depends on D73494.
show more ...
|
#
2c03c899 |
| 27-Jan-2020 |
Hiroshi Yamauchi <yamauchi@google.com> |
[MBFI] Move BranchFolding::MBFIWrapper to its own files. NFC.
Summary: To avoid header file circular dependency issues in passing updated MBFI (in MBFIWrapper) to the interface of profile guided siz
[MBFI] Move BranchFolding::MBFIWrapper to its own files. NFC.
Summary: To avoid header file circular dependency issues in passing updated MBFI (in MBFIWrapper) to the interface of profile guided size optimizations.
A prep step for (and split off of) D73381.
Reviewers: davidxl
Subscribers: mgorny, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73494
show more ...
|
#
020041d9 |
| 21-Jan-2020 |
Krzysztof Parzyszek <kparzysz@quicinc.com> |
Update spelling of {analyze,insert,remove}Branch in strings and comments
These names have been changed from CamelCase to camelCase, but there were many places (comments mostly) that still used the o
Update spelling of {analyze,insert,remove}Branch in strings and comments
These names have been changed from CamelCase to camelCase, but there were many places (comments mostly) that still used the old names.
This change is NFC.
show more ...
|
Revision tags: llvmorg-11-init |
|
#
c5c935ab |
| 19-Dec-2019 |
Jay Foad <jay.foad@amd.com> |
Make more use of MachineInstr::mayLoadOrStore.
|
Revision tags: llvmorg-9.0.1, llvmorg-9.0.1-rc3 |
|
#
d9ae4939 |
| 05-Dec-2019 |
Hiroshi Yamauchi <yamauchi@google.com> |
[PGO][PGSO] Instrument the code gen / target passes.
Summary: Split off of D67120.
Add the profile guided size optimization instrumentation / queries in the code gen or target passes. This doesn't
[PGO][PGSO] Instrument the code gen / target passes.
Summary: Split off of D67120.
Add the profile guided size optimization instrumentation / queries in the code gen or target passes. This doesn't enable the size optimizations in those passes yet as they are currently disabled in shouldOptimizeForSize (for non-IR pass queries).
A second try after reverted D71072.
Reviewers: davidxl
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71149
show more ...
|
#
2eb30faf |
| 06-Dec-2019 |
Hiroshi Yamauchi <yamauchi@google.com> |
Revert "[PGO][PGSO] Instrument the code gen / target passes."
This reverts commit 9a0b5e14075a1f42a72eedb66fd4fde7985d37ac.
This seems to break buildbots.
|
#
9a0b5e14 |
| 05-Dec-2019 |
Hiroshi Yamauchi <yamauchi@google.com> |
[PGO][PGSO] Instrument the code gen / target passes.
Summary: Split off of D67120.
Add the profile guided size optimization instrumentation / queries in the code gen or target passes. This doesn't
[PGO][PGSO] Instrument the code gen / target passes.
Summary: Split off of D67120.
Add the profile guided size optimization instrumentation / queries in the code gen or target passes. This doesn't enable the size optimizations in those passes yet as they are currently disabled in shouldOptimizeForSize (for non-IR pass queries).
Reviewers: davidxl
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71072
show more ...
|
Revision tags: llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
#
898de302 |
| 11-Nov-2019 |
Bjorn Pettersson <bjorn.a.pettersson@ericsson.com> |
[BranchFolding] Fix PR43964 about branch folder not being debug invariant
Summary: The fix in BranchFolder related to non debug invariant problems done in commit ec32dff0b075055 actually introduced
[BranchFolding] Fix PR43964 about branch folder not being debug invariant
Summary: The fix in BranchFolder related to non debug invariant problems done in commit ec32dff0b075055 actually introduced some new problems with debug invariance.
Before that patch ComputeCommonTailLength would move iterators back, past debug instructions, in order to make ProfitableToMerge make consistent answers "when one block differs from the other only by whether debugging pseudos are present at the beginning". But the changes in ec32dff0b075055 undid that by moving the iterators forward again.
This patch refactors ComputeCommonTailLength. The function was really complex, considering that the SkipTopCFIAndReturn part always moved the iterators forward to the first "real" instruction in the found tail after ec32dff0b075055.
The patch also restores the logic to "back past possible debugging pseudos at beginning of block" to make sure ProfitableToMerge gives consistent answers independent of DBG_VALUE instructions before the tail. That is now done by ProfitableToMerge instead of being hidden as a side-effect in ComputeCommonTailLength.
Reviewers: probinson, yechunliang, jmorse
Reviewed By: jmorse
Subscribers: Orlando, mehdi_amini, dexonsmith, aprantl, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70091
show more ...
|
#
05da2fe5 |
| 13-Nov-2019 |
Reid Kleckner <rnk@google.com> |
Sink all InitializePasses.h includes
This file lists every pass in LLVM, and is included by Pass.h, which is very popular. Every time we add, remove, or rename a pass in LLVM, it caused lots of reco
Sink all InitializePasses.h includes
This file lists every pass in LLVM, and is included by Pass.h, which is very popular. Every time we add, remove, or rename a pass in LLVM, it caused lots of recompilation.
I found this fact by looking at this table, which is sorted by the number of times a file was changed over the last 100,000 git commits multiplied by the number of object files that depend on it in the current checkout: recompiles touches affected_files header 342380 95 3604 llvm/include/llvm/ADT/STLExtras.h 314730 234 1345 llvm/include/llvm/InitializePasses.h 307036 118 2602 llvm/include/llvm/ADT/APInt.h 213049 59 3611 llvm/include/llvm/Support/MathExtras.h 170422 47 3626 llvm/include/llvm/Support/Compiler.h 162225 45 3605 llvm/include/llvm/ADT/Optional.h 158319 63 2513 llvm/include/llvm/ADT/Triple.h 140322 39 3598 llvm/include/llvm/ADT/StringRef.h 137647 59 2333 llvm/include/llvm/Support/Error.h 131619 73 1803 llvm/include/llvm/Support/FileSystem.h
Before this change, touching InitializePasses.h would cause 1345 files to recompile. After this change, touching it only causes 550 compiles in an incremental rebuild.
Reviewers: bkramer, asbirlea, bollu, jdoerfert
Differential Revision: https://reviews.llvm.org/D70211
show more ...
|
#
ec32dff0 |
| 29-Oct-2019 |
Jeremy Morse <jeremy.morse@sony.com> |
[BranchFolding] skip debug instr to avoid code change
Use the existing helper function in BranchFolding, "countsAsInstruction", to skip over non-instructions. Otherwise debug instructions can be ide
[BranchFolding] skip debug instr to avoid code change
Use the existing helper function in BranchFolding, "countsAsInstruction", to skip over non-instructions. Otherwise debug instructions can be identified as the last real instruction in a block, leading to different codegen decisions when debug is enabled as demonstrated by the test case.
Patch by: yechunliang (Chris Ye)!
Differential Revision: https://reviews.llvm.org/D66467
show more ...
|
#
98603a81 |
| 08-Oct-2019 |
Nikola Prica <nikola.prica@rt-rk.com> |
[DebugInfo][If-Converter] Update call site info during the optimization
During the If-Converter optimization pay attention when copying or deleting call instructions in order to keep call site infor
[DebugInfo][If-Converter] Update call site info during the optimization
During the If-Converter optimization pay attention when copying or deleting call instructions in order to keep call site information in valid state.
Reviewers: aprantl, vsk, efriedma
Reviewed By: vsk, efriedma
Differential Revision: https://reviews.llvm.org/D66955
llvm-svn: 374068
show more ...
|
#
f609c0a3 |
| 05-Oct-2019 |
Simon Pilgrim <llvm-dev@redking.me.uk> |
BranchFolding - IsBetterFallthrough - assert non-null pointers. NFCI.
Silences static analyzer null dereference warnings.
llvm-svn: 373823
|
#
cc382cf7 |
| 30-Sep-2019 |
Yuanfang Chen <yuanfang.chen@sony.com> |
[NewPM] Port MachineModuleInfo to the new pass manager.
Existing clients are converted to use MachineModuleInfoWrapperPass. The new interface is for defining a new pass manager API in CodeGen.
Revi
[NewPM] Port MachineModuleInfo to the new pass manager.
Existing clients are converted to use MachineModuleInfoWrapperPass. The new interface is for defining a new pass manager API in CodeGen.
Reviewers: fedor.sergeev, philip.pfaffe, chandlerc, arsenm
Reviewed By: arsenm, fedor.sergeev
Differential Revision: https://reviews.llvm.org/D64183
llvm-svn: 373240
show more ...
|
Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3 |
|
#
0c476111 |
| 15-Aug-2019 |
Daniel Sanders <daniel_l_sanders@apple.com> |
Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM
Summary: This clang-tidy check is looking for unsigned integer variables whose initializer starts with an implicit cast from llvm::Re
Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM
Summary: This clang-tidy check is looking for unsigned integer variables whose initializer starts with an implicit cast from llvm::Register and changes the type of the variable to llvm::Register (dropping the llvm:: where possible).
Partial reverts in: X86FrameLowering.cpp - Some functions return unsigned and arguably should be MCRegister X86FixupLEAs.cpp - Some functions return unsigned and arguably should be MCRegister X86FrameLowering.cpp - Some functions return unsigned and arguably should be MCRegister HexagonBitSimplify.cpp - Function takes BitTracker::RegisterRef which appears to be unsigned& MachineVerifier.cpp - Ambiguous operator==() given MCRegister and const Register PPCFastISel.cpp - No Register::operator-=() PeepholeOptimizer.cpp - TargetInstrInfo::optimizeLoadInstr() takes an unsigned& MachineTraceMetrics.cpp - MachineTraceMetrics lacks a suitable constructor
Manual fixups in: ARMFastISel.cpp - ARMEmitLoad() now takes a Register& instead of unsigned& HexagonSplitDouble.cpp - Ternary operator was ambiguous between unsigned/Register HexagonConstExtenders.cpp - Has a local class named Register, used llvm::Register instead of Register. PPCFastISel.cpp - PPCEmitLoad() now takes a Register& instead of unsigned&
Depends on D65919
Reviewers: arsenm, bogner, craig.topper, RKSimon
Reviewed By: arsenm
Subscribers: RKSimon, craig.topper, lenary, aemerson, wuzish, jholewinski, MatzeB, qcolombet, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, wdng, nhaehnle, sbc100, jgravelle-google, kristof.beyls, hiraditya, aheejin, kbarton, fedor.sergeev, javed.absar, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, tpr, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, Jim, s.egerton, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65962
llvm-svn: 369041
show more ...
|
Revision tags: llvmorg-9.0.0-rc2 |
|
#
2bea69bf |
| 01-Aug-2019 |
Daniel Sanders <daniel_l_sanders@apple.com> |
Finish moving TargetRegisterInfo::isVirtualRegister() and friends to llvm::Register as started by r367614. NFC
llvm-svn: 367633
|
Revision tags: llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3 |
|
#
896ece41 |
| 13-Jun-2019 |
David Bolvansky <david.bolvansky@gmail.com> |
[Codegen] Merge tail blocks with no successors after block placement
Summary: I found the following case having tail blocks with no successors merging opportunities after block placement.
Before bl
[Codegen] Merge tail blocks with no successors after block placement
Summary: I found the following case having tail blocks with no successors merging opportunities after block placement.
Before block placement:
bb0: ... bne a0, 0, bb2:
bb1: mv a0, 1 ret
bb2: ...
bb3: mv a0, 1 ret
bb4: mv a0, -1 ret
The conditional branch bne in bb0 is opposite to beq.
After block placement:
bb0: ... beq a0, 0, bb1
bb2: ...
bb4: mv a0, -1 ret
bb1: mv a0, 1 ret
bb3: mv a0, 1 ret
After block placement, that appears new tail merging opportunity, bb1 and bb3 can be merged as one block. So the conditional constraint for merging tail blocks with no successors should be removed. In my experiment for RISC-V, it decreases code size.
Author of original patch: Jim Lin
Reviewers: haicheng, aheejin, craig.topper, rnk, RKSimon, Jim, dmgreen
Reviewed By: Jim, dmgreen
Subscribers: xbolva00, dschuff, javed.absar, sbc100, jgravelle-google, aheejin, kito-cheng, dmgreen, PkmX, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D54411
llvm-svn: 363284
show more ...
|
Revision tags: llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1 |
|
#
85bd3978 |
| 04-Apr-2019 |
Evandro Menezes <e.menezes@samsung.com> |
[IR] Refactor attribute methods in Function class (NFC)
Rename the functions that query the optimization kind attributes.
Differential revision: https://reviews.llvm.org/D60287
llvm-svn: 357731
|