LLVM

why do people say it sucks but then everyone uses it anyway?

CRIME Shirt $21.68

Black Rifle Cuck Company, Conservative Humor Shirt $21.68

CRIME Shirt $21.68

  1. 1 month ago
    Anonymous

    Because reimplementing everything LLVM does would take a very long time and a lot of manpower.

  2. 1 month ago
    Anonymous

    because it doesn't, a big amount of languages use LLVM, including Rust
    >Rust = troony Black person homosexual monkey bad

    • 1 month ago
      Anonymous

      Rust using LLVM just proves that they don't actually care about memory safety.
      1. LLVM is written in unsafe C++
      2. The LLVM IR has UB
      3. LLVM performs most of the optimizations that make Rust fast
      4. LLVM makes really moronic optimizations in the name of speed (like GCC).

      • 1 month ago
        Anonymous

        Ahem. moron alert!!
        x + 1 < x
        is always false.
        1. Unsafe != incorrect
        2. Representing UB is useful
        3. That's great. It means less stack space used => more memory safe!!1!1!1!!
        4. You're really, really, moronic. Optimization of x + 1 < x enables subsequent optimizations, you moronic monkey gorilla.

        • 1 month ago
          Anonymous

          >x + 1 < x
          >is always false.
          Only if it's signed

          Not the same code, it doesn't return -1 if it overflows.

          Rust's default configuration wraps in release builds and traps in debug builds. You can configure it to trap in release builds as well. There's no configuration where it makes overflow UB (unless you use the unstable unsafe unchecked_* methods).
          You can achieve the same in GCC and clang by passing -fwrapv or -ftrapv. There are still other optimizations to reckon with of course, but you get some of those in MSVC as well. Run this with /O2:
          #include <stdio.h>
          #include <stdint.h>

          int main() {
          uintptr_t a;
          uintptr_t b;
          {
          int v[2] = {0, 0};
          a = (uintptr_t) &v[0];
          }
          {
          int v[2] = {0, 0};
          b = (uintptr_t) &v[0];
          }
          printf(
          "%lld == %lld -> %s",
          a,
          b,
          a == b ? "true" : "false"
          );
          }
          Though this one is a bug, not an intended optimization, which may or may not make it better

        • 1 month ago
          Anonymous

          >x + 1 < x
          >is always false.
          Group theory sees your bullshit and has a good laugh in your ignorant face.

      • 1 month ago
        bruce3434

        Nice fanfic but Rust doesn't have this problem.

        • 1 month ago
          Anonymous

          Not the same code, it doesn't return -1 if it overflows.

          • 1 month ago
            Anonymous

            Im better than you

          • 1 month ago
            bruce3434

            No problem. Rust still doesn't have this problem.

          • 1 month ago
            Anonymous

            Nice fanfic but Rust doesn't have this problem.

            >rust is le hecking immun- ack!

          • 1 month ago
            Anonymous

            >cnile filtered by godbolt
            KEKW

          • 1 month ago
            Anonymous

            >Compiler returned: 0
            this is what rust looks like without any optimizations

          • 1 month ago
            Anonymous

            Compiler retuned zero because your brainlet ass can’t generate asm in godbolt

          • 1 month ago
            Anonymous

            No.
            rustc optimizes everything out when the function has no argument.

          • 1 month ago
            Anonymous

            [...]
            [...]
            I hate Rust like every cnile on IQfy but, bro you're just showing how noob you are with godbolt

            Nothing to do with "noob with godbolt"
            Neither the C program nor Rust program has a main function.
            rustc and llvm are optimizing everything out.

            My findings are that rustc fails to produce asm in godbolt's environment when:
            >the functions are not pub
            >opt-level=2
            >the state variable is not an argument to the function, but rather declared in scope
            I can also force rustc to produce output by making the internal state i32::MAX

            This is not a godbolt issue, this is a rustc/llvm optimization issue.

          • 1 month ago
            Anonymous

            So THIS is the power of a cnile

          • 1 month ago
            Anonymous

            Not an argument.

          • 1 month ago
            Anonymous

            >filtered by inline never

          • 1 month ago
            Anonymous

            sorry llvm shill, but your shit is broken

          • 1 month ago
            Anonymous

            [...]
            oops forgot to add one
            doesn't matter though, llvm shills will still defend their garbage

            >7 posts in
            >still getting brainlet filtered
            Cniles can’t stop posting their Ls

          • 1 month ago
            Anonymous

            Where is the L exactly?

          • 1 month ago
            Anonymous

            The fact that you still can’t figure out how to generate assembly for zero arg function. morons like you shouldn’t be allowed in the internet.

          • 1 month ago
            Anonymous

            You're moronic
            Godbolt still generates assembly, it's just optimized away so all that's left is headers (that get filtered in the output)
            Your argument actually makes no sense. You can force C to actually produce assembly instead of optimizing out as well with a simple "volatile" keyword.
            That doesn't mean its the programmer's fault, or Goldbolt's fault for excluding the assembly, but rather the compiler (GCC or LLVM).
            Same thing with Rust. Just somewhat different semantics to fight the optimizer.

          • 1 month ago
            Anonymous

            sorry llvm shill, but your shit is broken

            oops forgot to add one
            doesn't matter though, llvm shills will still defend their garbage

          • 1 month ago
            Anonymous

            [...]
            [...]
            [...]
            LLVM is totally okay guys

            >Compiler returned: 0
            this is what rust looks like without any optimizations

            Why did you omit wrapping_add?

          • 1 month ago
            Anonymous

            [...]
            [...]
            [...]
            LLVM is totally okay guys

            >Compiler returned: 0
            this is what rust looks like without any optimizations

            I hate Rust like every cnile on IQfy but, bro you're just showing how noob you are with godbolt

          • 1 month ago
            Anonymous

            >hurr godbolt only generates asm when the function takes an argument

          • 1 month ago
            Anonymous

            [...]
            [...]
            [...]
            LLVM is totally okay guys

            >Compiler returned: 0
            this is what rust looks like without any optimizations

            [...]
            Nothing to do with "noob with godbolt"
            Neither the C program nor Rust program has a main function.
            rustc and llvm are optimizing everything out.

            My findings are that rustc fails to produce asm in godbolt's environment when:
            >the functions are not pub
            >opt-level=2
            >the state variable is not an argument to the function, but rather declared in scope
            I can also force rustc to produce output by making the internal state i32::MAX

            This is not a godbolt issue, this is a rustc/llvm optimization issue.

            sorry llvm shill, but your shit is broken

            [...]
            oops forgot to add one
            doesn't matter though, llvm shills will still defend their garbage

            cnile tear is fricking delicious. Stick to fizzbuzz and shitnux ricing, brainlet homosexual. Find a different hobby.

          • 1 month ago
            Anonymous

            [...]
            Nothing to do with "noob with godbolt"
            Neither the C program nor Rust program has a main function.
            rustc and llvm are optimizing everything out.

            My findings are that rustc fails to produce asm in godbolt's environment when:
            >the functions are not pub
            >opt-level=2
            >the state variable is not an argument to the function, but rather declared in scope
            I can also force rustc to produce output by making the internal state i32::MAX

            This is not a godbolt issue, this is a rustc/llvm optimization issue.

            You have to add #[no_mangle] or #[inline(never)], this is a result of cross-crate inlining of small functions. The default Rust godbolt code template warns you about this.
            This is completely unrelated to integer overflow.

          • 1 month ago
            Anonymous

            Nice fanfic but Rust doesn't have this problem.

            [...]
            [...]
            Based rustchads dabbing on cniles

            [...]
            >rust is le hecking immun- ack!

            LLVM is totally okay guys

        • 1 month ago
          Anonymous

          WOMM. Does this mean GCC and Clang can't into handling arithmatic overflow?

          No problem. Rust still doesn't have this problem.

          Based rustchads dabbing on cniles

      • 1 month ago
        Anonymous

        >Will integer overflow
        return x == 0x7fffffff;

        in rust this is just
        x == i32::MAX

        no `return` keyword needed!

      • 1 month ago
        Anonymous

        WOMM. Does this mean GCC and Clang can't into handling arithmatic overflow?

      • 1 month ago
        Anonymous

        x+1<x results in undefined behavior when x+1 overflows. In other words, the compilers are allowed to do whatever the frick they want.
        In this case GCC and Clang make an optimization which results in your code doing something that you didn't expect. They assume the statement will always be false because behavior for signed overflow doesn't exist.

        Compile it with -fwrapv if you want GCC to assume signed integers wrap when they overflow.

        WOMM. Does this mean GCC and Clang can't into handling arithmatic overflow?

        It's non-standard code and the default behavior is to apparently perform an optimization instead.

      • 1 month ago
        Anonymous

        You've convinced me to learn Rust. Its critics are so moronic that they think the memory safety of the language the compiler is implemented in effects the memory safety of the language itself, and I will do the opposite of what morons say.

      • 1 month ago
        Anonymous

        Actually, you can disable pretty much every UB from LLVM IR besides hardware ones (like division by 0). Compilers just want to intentionally exploit it for some reason.

  3. 1 month ago
    Anonymous

    >why do people say it sucks
    Well, it's written in C++
    >everyone uses it anyway
    Well, it's written in C++

  4. 1 month ago
    Anonymous

    There are two kinds of toolchains: those that people complain about, and those that nobody uses.

  5. 1 month ago
    Anonymous

    It being popular doesn't mean everyone will like it, you're using C++ you create a language that will be better than C++, compilers' backends aren't hard to build but good compiler's optimizations are hard to achieve

  6. 1 month ago
    Anonymous

    Because it's lot easier compared to writing your your own or hacking GCC's backend

  7. 1 month ago
    Anonymous

    >why do people say it suck
    It is slow and bloated af

    >but then everyone uses
    It is the easiest way to write a compiler (And then port it to a lot of platforms)

  8. 1 month ago
    Anonymous

    gcc works just fine, thanks

  9. 1 month ago
    Anonymous

    >why do people use it anyway
    Because if you target LLVM you get all the architectures it supports for free. Even if you implement your own solution for some of them having it to fallback on helps. That doesn't mean people have to like it.

  10. 1 month ago
    Anonymous

    everybody uses gcc
    nobody cares about troony tech like llvm

    • 1 month ago
      Anonymous

      gcc support rust now
      Go cry to tinycc mailing list

    • 1 month ago
      Anonymous

      Mesa uses LLVM, nice try

  11. 1 month ago
    Anonymous

    llvm has an api

  12. 1 month ago
    Anonymous

    The only thing I use from it is lldb. The rest of it is handled by gcc.

  13. 1 month ago
    Anonymous

    Writing your own optimizing compiler from scratch sucks a lot because of the sheer amount of work. LLVM mostly doesn't suck as much as that.

  14. 1 month ago
    Anonymous

    >(you) don't like it
    >(you) post about it on 4chins
    >(you) haven't written an alternative
    >(you) decide to write an alternative
    >(you) investigate how to write an alternative
    >(you) realize that it has some design flaws
    >(you) realize that it would be hard to re-write
    >(you) lose interest and forget about it for a couple of months
    >(you) have a problem with it
    >(you) start the process all over

  15. 1 month ago
    Anonymous

    >cniles self-BRFOing themselves
    TOTAL CNILE DEATH

  16. 1 month ago
    Anonymous

    stupid homosexuals mostly
    gcc can't compile HIP code so it's useless to me
    i think it can barely even do AMDGPU asm, i think most targets aren't supported

Your email address will not be published. Required fields are marked *