Hello, I have a question about exit blocks : is it true that every loop's exit block will contain only those comparisons that will lead to exit or to continue execution in loop? I have tried many examples , after optimizations it seems to be true, but does it have to be so? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170730/f2f9e99c/attachment.html>
Yes, that’s right. Some LLVM terminology though: The blocks you mention, are called the “exiting blocks” of the loop, and the blocks outside the loop (that are the targets of these exiting blocks) are called the exit blocks. getExitingBlocks in LoopInfoImpl.h is the code you’re interested in. By definition: one of the successor’s of the exiting block is an exit block, and it should have another successor that’s a block within the loop (since we know that an exiting block is *inside* a loop). Anna> On Jul 30, 2017, at 11:47 AM, Anastasiya Ruzhanskaya via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hello, > I have a question about exit blocks : is it true that every loop's exit block will contain only those comparisons that will lead to exit or to continue execution in loop? I have tried many examples , after optimizations it seems to be true, but does it have to be so? > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Mackenzie Moore via llvm-dev
2017-Aug-05 05:28 UTC
[llvm-dev] Compile LLVM into LLVM IR with non-Xcode Clang
Hi everyone, I was able to compile LLVM to LLVM IR. However, when I read the results into my program, I got "warning: ignoring debug info with an invalid version (700000003)." I figured out it was because the Clang that comes with Xcode uses an LLVM that's older than the LLVM I compiled from source, and LLVM's IR isn't backwards compatible. I've tried using the following CMake flags: -DCMAKE_C_COMPILER=<path to clang built from source> -DCMAKE_CXX_COMPILER=<path to clang++ built from source> I also tried exporting the CC and CXX variables before invoking CMake. Both attempts lead to the following message: Scanning dependencies of target LLVMDemangle [ 0%] Building CXX object lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o [ 0%] Linking CXX static library ../libLLVMDemangle.a error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o is not an object file (not allowed in a library) make[2]: *** [lib/libLLVMDemangle.a] Error 1 make[1]: *** [lib/Demangle/CMakeFiles/LLVMDemangle.dir/all] Error 2 make: *** [all] Error 2 How do I get CMake to use the correct Clang binary? Thanks, Mackenzie