Shishir V Jessu via llvm-dev
2019-Dec-03 19:02 UTC
[llvm-dev] Using different opt with clang
Hi, I have made some changes in the LowerTypeTests Pass of opt, and would like to use these changes with the clang version I have downloaded. I compiled clang and llvm from scratch, made my changes in LowerTypeTests.cpp, and recompiled clang and opt. When I run clang with the appropriate flags to invoke the pass, it invokes the pass as originally written, but when I run opt on the relevant bitcode, it invokes the pass as I have written it. How can I modify clang to make it use my version of opt to run the pass I've changed? Thanks! Regards, Shishir Jessu -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191203/24601ad0/attachment.html>
David Blaikie via llvm-dev
2019-Dec-03 19:06 UTC
[llvm-dev] Using different opt with clang
are you sure you're running the recompiled clang & not some existing clang you had on your system? Try putting something more blatant in your optimization pass, like an assert(false) or other ridiculous thing that'll make it obvious if the pass is/isn't running, perhaps? On Tue, Dec 3, 2019 at 2:03 PM Shishir V Jessu via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi, > > I have made some changes in the LowerTypeTests Pass of opt, and would like > to use these changes with the clang version I have downloaded. > > I compiled clang and llvm from scratch, made my changes in > LowerTypeTests.cpp, and recompiled clang and opt. When I run clang with the > appropriate flags to invoke the pass, it invokes the pass as originally > written, but when I run opt on the relevant bitcode, it invokes the pass as > I have written it. > > How can I modify clang to make it use my version of opt to run the pass > I've changed? Thanks! > > Regards, > Shishir Jessu > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191203/82008a7f/attachment.html>
Peter Collingbourne via llvm-dev
2019-Dec-03 19:25 UTC
[llvm-dev] Using different opt with clang
The LowerTypeTests pass normally runs during LTO (i.e. in the linker). I would make sure that you've rebuilt lld or the gold plugin (whichever one you are using) with your pass changes. Peter On Tue, Dec 3, 2019 at 11:07 AM David Blaikie via llvm-dev < llvm-dev at lists.llvm.org> wrote:> are you sure you're running the recompiled clang & not some existing clang > you had on your system? Try putting something more blatant in your > optimization pass, like an assert(false) or other ridiculous thing that'll > make it obvious if the pass is/isn't running, perhaps? > > On Tue, Dec 3, 2019 at 2:03 PM Shishir V Jessu via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hi, >> >> I have made some changes in the LowerTypeTests Pass of opt, and would >> like to use these changes with the clang version I have downloaded. >> >> I compiled clang and llvm from scratch, made my changes in >> LowerTypeTests.cpp, and recompiled clang and opt. When I run clang with the >> appropriate flags to invoke the pass, it invokes the pass as originally >> written, but when I run opt on the relevant bitcode, it invokes the pass as >> I have written it. >> >> How can I modify clang to make it use my version of opt to run the pass >> I've changed? Thanks! >> >> Regards, >> Shishir Jessu >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-- -- Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191203/00e5e7ed/attachment.html>
Apparently Analagous Threads
- Debugging LowerTypeTests in LLVM Using GDB
- Discrepancy between Debug and Release+Asserts versions of Clang/LLVM
- Passing arguments to LLVM pass through Clang
- Discrepancy between Debug and Release+Asserts versions of Clang/LLVM
- Preventing function call from being optimized out in LTO