Adding LTO options#692
Conversation
2089409 to
9b83e52
Compare
0e3fe1c to
5f1c4cc
Compare
efde665 to
16da071
Compare
6511b66 to
c03a043
Compare
|
Overall it LGTM with some minor nits. Sorry for my late initial review. I have few comments to begin with before I start doing a thorough review
This is the most important for now, since we are at the 22.0 release point. Other comments can wait and can be done in a follow up.
Do we need to make any changes to LTO and linker script support related to these options ? Just trying to make sure. Any changes to LTO (plugin) infrastructure ? I will try to go over the code in detail and have comments. |
f995051 to
63fc705
Compare
63fc705 to
65d9a90
Compare
I disabled one test that uses /dev/null. I don;t see other linux assumptions. The windows builder for a branch is broken, unfortunately.
I don't think lld does any of that.
Options that take paths or numbers describe that in the help string.
Will be done separately.
No.
No.
|
65d9a90 to
dd0b896
Compare
quic-seaswara
left a comment
There was a problem hiding this comment.
$ ld.lld --lto-obj-path=/usr/bin/ 1.o
ld.lld: error: cannot create /usr/bin/: Is a directory
LLVM ERROR: IO failure on output stream: Bad file descriptor
With your patch, we get
"UNEXPECTED LINKER BEHAVIOR"
This happens due to
|
403ca69 to
ea7a0ce
Compare
ea7a0ce to
c692a44
Compare
ObjectLinker::doLto() had convoluted flow, duplicated pieces of code in different branches, etc. Simplify and clarify it. There is no functional change, except when both `lto-asm-file` and `lto-output-file` specified, on Hexagon only, a misleading message about using the asm file is not printed. When `lto-output-file`, the assembly inputs are ignored, this did not change, and the message was incorrect. Signed-off-by: Alexey Karyakin <akaryaki@qti.qualcomm.com>
Signed-off-by: Alexey Karyakin <akaryaki@qti.qualcomm.com>
Signed-off-by: Alexey Karyakin <akaryaki@qti.qualcomm.com>
These options have aliases: --plugin-opt=cs-profile-generate --plugin-opt=cs-profile-path= Signed-off-by: Alexey Karyakin <akaryaki@qti.qualcomm.com>
Signed-off-by: Alexey Karyakin <akaryaki@qti.qualcomm.com>
Signed-off-by: Alexey Karyakin <akaryaki@qti.qualcomm.com>
Signed-off-by: Alexey Karyakin <akaryaki@qti.qualcomm.com>
--lto-obj-path will work differently than in lld. In lld, it creates copies of LTO output files, which means with `-save-temps` each object file will be written twice. Instead, we will redirect output files to the location specified by `--lto-obj-path`, which means these files will not be written to the `-save-temps` location if it is specified. Signed-off-by: Alexey Karyakin <akaryaki@qti.qualcomm.com>
Signed-off-by: Alexey Karyakin <akaryaki@qti.qualcomm.com>
Add missing MetaVarName and group to --dwodir, --lto-O, and --lto-sample-profile. Fix MetaVarName for --save-temps=. Signed-off-by: Alexey Karyakin <akaryaki@qti.qualcomm.com>
5f99d2b to
beb7ae4
Compare
No description provided.