1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
llvm-mirror/include/llvm/Transforms
Jakub Kuderski 35a72076cf [InstCombine] Allow to limit the max number of iterations
Summary:
This patch teaches InstCombine to accept a new parameter: maximum number of iterations over functions.

InstCombine tries to simplify instructions by iterating over the whole function until the function stops changing. As a consequence, the last iteration before reaching a fixpoint visits all instructions in the worklist and never performs any rewrites.

Bounding the number of iterations can have 2 benefits:
* In case the users of the pass can make a good guess about the number of required iterations, we can save the time normally spent on the last iteration that doesn't change anything.
* When the wants to use InstCombine as a cleanup pass, it may be enough to run just a few iterations and stop even before reaching a fixpoint. This can be also useful for implementing a lightweight pass pipeline (think `-O1`).

This patch does not change the behavior of opt or Clang -- limiting the number of iterations is entirely opt-in.

Reviewers: fhahn, davide, spatel, foad, nlopes, grosser, lebedev.ri, nikic, xbolva00

Reviewed By: spatel

Subscribers: craig.topper, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71145
2019-12-18 13:48:54 -05:00
..
AggressiveInstCombine Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstCombine [InstCombine] Allow to limit the max number of iterations 2019-12-18 13:48:54 -05:00
Instrumentation Insert module constructors in a module pass 2019-10-11 08:47:03 +00:00
IPO [Attributor][FIX] Do treat byval arguments special 2019-12-12 16:04:21 -06:00
Scalar [Matrix] Add first set of matrix intrinsics and initial lowering pass. 2019-12-12 15:42:18 +00:00
Utils [LoopFusion] Move instructions from FC0.Latch to FC1.Latch. 2019-12-17 22:10:23 +00:00
Vectorize Temporarily Revert "[SLP] allow forming 2-way reduction patterns" and update testcases. 2019-11-20 16:00:53 -08:00
CFGuard.h Add Windows Control Flow Guard checks (/guard:cf). 2019-10-28 15:19:39 +00:00
Coroutines.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Instrumentation.h Reland the "[NewPM] Port Sancov" patch from rL365838. No functional 2019-07-25 20:53:15 +00:00
IPO.h [BlockExtractor] Expose a constructor for the group extraction 2019-04-29 16:14:02 +00:00
ObjCARC.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Scalar.h [BasicBlockUtils] Add utility to remove redundant dbg.value instrs 2019-12-16 11:41:21 +01:00
Utils.h [SVFS] Inject TLI Mappings in VFABI attribute. 2019-11-15 18:42:56 +00:00
Vectorize.h [LegacyPassManager] Delete BasicBlockPass/Manager. 2019-10-30 11:40:16 -07:00