Commit 93a4ea9
committed
Add the ability to customise the pre-link pipeline
This adds `--newpm-passes <pipeline>`.
For consistency, this has the same semantics as LLVM's extant
`--lto-newpm-passes` switch.
Note that by imitating `--lto-newpm-passes` we inherit a quirk: if you
pass the empty string for the pipeline, you get the default pipeline,
and not an empty pipeline as one might expect.
This is because the switches are backed by a string, and the existence
of the switches is decided by checking for an empty string.
When the string is non-empty, it goes through a parsing function which
annoying also has no way to specify an empty pipeline.
Ideally the switches would be backed by a `optional<string>` (or the
parser would have a way to specify the empty pipeline), but: a) that
would be a separate change, and b) it should probably go upstream too.
For now, if you want an empty pipeline, I suggest you add a pass which
is a no-op on the IR, e.g. `verify`.1 parent 29f8990 commit 93a4ea9
1 file changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
112 | 116 | | |
113 | 117 | | |
114 | 118 | | |
| |||
994 | 998 | | |
995 | 999 | | |
996 | 1000 | | |
997 | | - | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
998 | 1008 | | |
999 | 1009 | | |
1000 | 1010 | | |
| |||
0 commit comments