19 Commits

Author SHA1 Message Date
Arthur Eubanks
6b8a1425ea [docs][NewPM] Add comment about declaring analysis managers in the correct order
Otherwise you will likely get crashes.
2023-10-19 10:22:08 -07:00
Arthur Eubanks
c1b4240322 [opt] Rename -enable-new-pm -> -bugpoint-enable-legacy-pm
-enable-new-pm is no longer necessary except for bugpoint. Make the name more clunky so it hopefully won't be used.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D146103
2023-03-16 09:51:44 -07:00
Alex MacLean
8a5d4eb775 [docs][NewPM] fix typos in new pass manager docs
Fix some minor errors in the code-block sections of the new pass manager documentation

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D145325
2023-03-06 09:17:56 -08:00
Arthur Eubanks
3806d885ae [docs][NewPM] Clarify more status of legacy PM + optimization pipeline
Reviewed By: asbirlea, nikic

Differential Revision: https://reviews.llvm.org/D141443
2023-01-16 17:42:08 -08:00
Bjorn Pettersson
99c47d9e31 Remove TargetMachine::adjustPassManager
Since opt no longer supports to run default (O0/O1/O2/O3/Os/Oz)
pipelines using the legacy PM, there are no in-tree uses of
TargetMachine::adjustPassManager remaining. This patch removes the
no longer used adjustPassManager functions.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D137796
2022-11-28 10:24:16 +01:00
Arthur Eubanks
76b04c2beb [docs][NewPM] Move pass plugin documentation into existing new PM docs
Reviewed By: awarzynski, asbirlea

Differential Revision: https://reviews.llvm.org/D136626
2022-11-02 10:47:17 -07:00
Arthur Eubanks
5b30fc2369 [opt] Add -p alias for -passes
See [1] for background.

Some people have complained that `opt -passes=instcombine` is a lot more typing than `opt -instcombine`.
As a compromise that nobody has objected to in [1], allow `opt -p instcombine`.

[1] https://discourse.llvm.org/t/rfc-legacy-opt-pass-syntax-with-new-pass-manager/65863

Reviewed By: bjope, asbirlea

Differential Revision: https://reviews.llvm.org/D136616
2022-11-02 10:46:34 -07:00
Arthur Eubanks
865812c3af [docs][NewPM] Add more info on why accessing mutable outer analyses is disallowed
Reviewed By: asbirlea, rnk

Differential Revision: https://reviews.llvm.org/D128374
2022-06-23 10:05:37 -07:00
Arthur Eubanks
9faab435a3 [docs] Mention that we are in the process of removing the legacy PM for the optimization pipeline
And remove references to flags to turn it off.

Reviewed By: nikic, MaskRay

Differential Revision: https://reviews.llvm.org/D123547
2022-04-12 10:47:58 -07:00
Nikita Popov
ed4e6e0398 [cmake] Remove LLVM_ENABLE_NEW_PASS_MANAGER cmake option
Or rather, error out if it is set to something other than ON. This
removes the ability to enable the legacy pass manager by default,
but does not remove the ability to explicitly enable it through
various flags like -flegacy-pass-manager or -enable-new-pm=0.

I checked, and our test suite definitely doesn't pass with
LLVM_ENABLE_NEW_PASS_MANAGER=OFF anymore.

Differential Revision: https://reviews.llvm.org/D123126
2022-04-06 09:52:21 +02:00
Arthur Eubanks
bfdf28f963 [docs][NewPM] Remove buildDefaultAAPipeline() in example
With D113210 we're already using the default AA pipeline by default.
2022-02-18 10:43:26 -08:00
Shao-Ce SUN
0c660256eb [NFC] Trim trailing whitespace in *.rst 2021-11-15 09:17:08 +08:00
Miguel Raz Guzmán Macedo
03eddbc714 [doc] Typo fix in NewPassManager.rst
Simple typo fix.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D112780
2021-10-29 13:11:11 -07:00
Arthur Eubanks
ce304a452a [docs][NewPM] Add example C++ code on how to actually use the new PM
Differential Revision: https://reviews.llvm.org/D112477
2021-10-25 13:24:20 -07:00
Fangrui Song
a42bd1b560 [CMake] Change -DENABLE_EXPERIMENTAL_NEW_PASS_MANAGER=off to -DLLVM_ENABLE_NEW_PASS_MANAGER=off
LLVM_ENABLE_NEW_PASS_MANAGER is set to ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER, so
-DLLVM_ENABLE_NEW_PASS_MANAGER=off has no effect.

Change the cache variable to LLVM_ENABLE_NEW_PASS_MANAGER instead.
A user opting out the new PM needs to switch from
-DENABLE_EXPERIMENTAL_NEW_PASS_MANAGER=off to
-DLLVM_ENABLE_NEW_PASS_MANAGER=off.

Also give a warning that -DLLVM_ENABLE_NEW_PASS_MANAGER=off is deprecated.

Reviewed By: aeubanks, phosek

Differential Revision: https://reviews.llvm.org/D108775
2021-08-26 14:25:31 -07:00
Arthur Eubanks
e15673df27 [docs][NewPM] Add some instructions on how to invoke opt
Also add link to blog post.

Reviewed By: nickdesaulniers

Differential Revision: https://reviews.llvm.org/D104812
2021-06-23 19:49:35 -07:00
Arthur Eubanks
0172b1389e [docs] Fix some wording 2021-05-04 10:21:38 -07:00
Arthur Eubanks
9779b664b6 [docs][NewPM] Add section on analyses
Reviewed By: asbirlea, ychen

Differential Revision: https://reviews.llvm.org/D100912
2021-05-03 10:15:02 -07:00
Arthur Eubanks
016f0ee686 [docs] Add documentation on using the new pass manager
And clarify in the "writing a pass" docs that both the legacy and new
PMs are being used for the codegen/optimization pipelines.

Reviewed By: ychen, asbirlea

Differential Revision: https://reviews.llvm.org/D97515
2021-02-26 15:28:19 -08:00