Lines Matching refs:Clang
2 How To Build Clang and LLVM with Profile-Guided Optimizations
9 for how it actually runs. Users report that applying this to Clang and LLVM can
12 This guide walks you through how to build Clang with PGO, though it also applies
28 tested on a few Linux flavors, and requires a checkout of LLVM, Clang, and
29 compiler-rt. Despite the name, it performs four clean builds of Clang, so it
52 - runs all of Clang and LLVM's lit tests, and
53 - uses the instrumented Clang to build Clang, LLVM, and all of the other
64 Altogether, this should cover a diverse set of uses for Clang and LLVM. If you
70 Building Clang with PGO
74 how to build Clang/LLVM with PGO.
76 First, you should have at least LLVM, Clang, and compiler-rt checked out
81 1. Build a standard Release Clang and the relevant libclang_rt.profile library
82 2. Build Clang using the Clang you built above, but with instrumentation
83 3. Use the instrumented Clang to generate profiles, which consists of two steps:
85 - Running the instrumented Clang/LLVM/lld/etc. on tasks that represent how
90 4. Build a final release Clang (along with whatever other binaries you need)
95 1. Configure a Clang build as you normally would. It's highly recommended that
97 another Clang. Because you need Clang and supporting libraries, you'll want
100 2. Configure a Clang build as above, but add the following CMake args:
107 - ``-DCMAKE_C_COMPILER=/path/to/stage1/clang`` - Use the Clang we built in
117 a. Build your benchmark using the Clang generated in step 2. The 'standard'
119 instrumented Clang's build directory, and to do a full build of Clang/LLVM
120 using your instrumented Clang. So, create yet another build directory,
123 - ``-DCMAKE_C_COMPILER=/path/to/stage2/clang`` - Use the Clang we built in
133 It's recommended to build the ``all`` target with your instrumented Clang,
143 4. Now, build your final, PGO-optimized Clang. To do this, you'll want to pass
148 - ``-DCMAKE_C_COMPILER=/path/to/stage1/clang`` - Use the Clang we built in
161 Congrats! You now have a Clang built with profile-guided optimizations, and you
165 optimization that can be made: LLVM and Clang have a tool called tblgen that's