[ELF] Optimize some non-constant alignTo with alignToPowerOf2. NFC
authorFangrui Song <i@maskray.me>
Sun, 24 Jul 2022 18:20:49 +0000 (11:20 -0700)
committerFangrui Song <i@maskray.me>
Sun, 24 Jul 2022 18:20:49 +0000 (11:20 -0700)
commit85cfd917231c14757f01f4be66c1bbd10fb933d0
treee345630e9094621a87b66579f4644ee01c792126
parent81f0f5a0e57c99c77dcf7e005cb38fcf807bada0
[ELF] Optimize some non-constant alignTo with alignToPowerOf2. NFC

My x86-64 lld executable is 2KiB smaller. .eh_frame writing gets faster as there
were lots of divisions.
lld/ELF/Driver.cpp
lld/ELF/LinkerScript.cpp
lld/ELF/ScriptParser.cpp
lld/ELF/SyntheticSections.cpp
lld/ELF/Writer.cpp
lld/test/ELF/linkerscript/operators.test
llvm/include/llvm/Support/MathExtras.h