Better HN
topnewbestaskshowjobs
Log inSign up

cokernel_hacker

1,316 karma · joined Mar 25, 2012 (14y ago) · 181 submissions

Submissions

91.

Compiling large, real-world codebases with clang on Windows(docs.google.com ↗)

1 points · by cokernel_hacker · 11y ago · discuss

comment 11y ago · link · parent

A high-level IR implements the semantics that the programming language provides. You can only share it if the semantics are reasonably compatible.

This would be akin to asking why do we need a C++-specific AST and a Swift-specific AST.

93.

Exception handling in LLVM, from Itanium to MSVC: LLVM conference slides [pdf](llvm.org ↗)

1 points · by cokernel_hacker · 11y ago · discuss

94.

Microsoft Promises Clang for Windows in November Visual C++ Update(theregister.co.uk ↗)

14 points · by cokernel_hacker · 11y ago · discuss

95.

2015 LLVM Developers' Meeting(2015llvmdevelopersmeeting.sched.org ↗)

2 points · by cokernel_hacker · 11y ago · discuss

comment 11y ago · link · parent

LLD has been redesigned. LLD as released in 3.7 can link itself faster than MSVC's LINK.exe at a factor of around 2x. It can correctly link some large projects like Google Chrome and LLVM itself but I'd still call it rather experimental.

Work is ongoing to support features like COMDAT folding.

97.

LLVM 3.7 Release(lists.llvm.org ↗)

117 points · by cokernel_hacker · 11y ago · 19 comments

comment 11y ago · link · parent

Without making any sort of judgement on his claim (in any direction), I think he is referring to gpsd:

https://en.wikipedia.org/wiki/Gpsd

http://git.savannah.gnu.org/cgit/gpsd.git

comment 11y ago · link · parent

Darwin (iOS and Mac OS) have it too: https://developer.apple.com/library/mac/documentation/Darwin...

comment 11y ago · link · parent

What if you have a load command in your mach-o which asks for an address below the 32-bit boundary? Will loading the image fail?

comment 11y ago · link · parent

There are many reasons why it's unlikely to live at opensource.apple.com, here are some of them:

First off, some frontend features are only feasible by changing LLVM itself. This is uncommon but ultimately not rare at all, this is where IR features like musttail, inalloca, safestack and segmented stacks originated. It is unlikely that swift will never need such a change.

Secondly, it would directly contradict what Chris Lattner announced at WWDC: They are going to accept contributions (both ideas and code) from others.

Finally, a frontend which generates LLVM IR has a very tight dependency on LLVM itself. LLVM IR is allowed to freely evolve which, in turn, causes APIs to change or disappear. It is much easier to deal with this if your code lives on llvm.org because the community is obliged to make sure your code continues to work. People fix polly, lldb, clang, etc. if their change to LLVM broke them.

comment 11y ago · link · parent

He writes:

> Apple's announcement remained completely silent on patents, and we should expect the chosen non-copyleft license will not contain a patent grant.

comment 11y ago · link · parent

I don't believe Mr. Kuhn is especially aware of how LLVM is developed. I am a regular contributor to the project (> 1000+ commits) and it is simply not the case that one can contribute code in this way.

The LLVM project makes it's stance on patents quite clear [1].

[1] http://llvm.org/docs/DeveloperPolicy.html#patents

comment 11y ago · link · parent

I disagree with you on bit9. It heavily degrades performance on my work machine. I have nothing against the idea of bit9 but everything against its implementation.

comment 11y ago · link · parent

To be clearer, "Here is their implementation of ..." should read as "Here is clang's implementation of ...".

AFAIK, Microsoft hasn't contributed to any of these ends. I, for one, hope that they do.

comment 11y ago · link · parent

That document is out of date. SEH works OK for 64-bit X86, 32-bit X86 is ongoing. Catching C++ exceptions has been implemented for 64-bit X86 but isn't ready for prime time.

comment 11y ago · link · parent

Clang has, for some time now, supported the MSVC ABI.

Here is their implementation of name mangling: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Micros...

Here is their implementation of record layout: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Record...

Here is their implementation of vtable generation: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/VTable...

Here is their implementation of RTTI: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mi...

Here is their implementation of C++ throw metadata: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mi...

comment 11y ago · link · parent

complex.h seems very incomplete.

109.

Clang (r233767) can catch MSVC-compatible C++ exceptions in some simple cases(llvm.org ↗)

1 points · by cokernel_hacker · 11y ago · discuss

comment 11y ago · link · parent

I think that's a bit of an over generalization. I find many of its buildings quite breathtaking: - http://en.wikipedia.org/wiki/Lincoln_Center_for_the_Performi... - http://en.wikipedia.org/wiki/240_Centre_Street - http://en.wikipedia.org/wiki/James_Farley_Post_Office - http://en.wikipedia.org/wiki/Alwyn_Court - http://en.wikipedia.org/wiki/Alexander_Hamilton_U.S._Custom_...

Yeah, I might have to agree that American art and beauty might not best be showcased at liquor stores but lets not use that brush to paint the rest of the country.

comment 11y ago · link · parent

Those docs refer to Intel Composer XE 2013. The PDF I linked to is with regards to Intel Composer XE 2015.

comment 11y ago · link · parent

By being standardized, it is opening itself up to being the defacto file-system API of-choice for C++ programmers.

This wouldn't be a bad thing if the API wasn't broken by design. It is opening itself up to 'time of check to time of use' bugs because it is completely oriented around paths.

I can't believe that this was approved.

I was a professional file-system hacker until quite recently and this API seems like exactly the wrong thing.

comment 11y ago · link · parent

No, that was probably 2014.

Intel ships a compiler based on Clang: http://llvm.org/devmtg/2014-04/PDFs/Posters/ClangIntel.pdf

This means they get clang's ridiculously conforming implementation with icc's performance.

comment 11y ago · link · parent

I can't help but link to a classic fight between two algorithmic book bots: http://www.michaeleisen.org/blog/?p=358

comment 12y ago · link · parent

Illinois owed UIUC somewhere around a half-billion dollars while I was a student (circa 2011). I remember my professors having to go on furlough because of this.

It's amazing how good of a school UIUC is in spite of the awful mismanagement of the state.

Out of curiosity, how familiar are you with CPS? I remember the dropout rate being ~ 50%. Apparently it is now closer to 70%.

I don't think Illinois stands up to the likes of London or New York.

comment 12y ago · link · parent

Arguably the most versatile compiler in the world is EDG's.

One of its features is: "a C-generating back end, which can be used to generate C code for C++ programs"

source: https://www.edg.com/index.php?location=c_frontend

In fact, the Itanium C++ ABI (which has no relation to the architecture) specifically uses valid C identifiers to mangle C++ names to support products like EDG.

source: http://mentorembedded.github.io/cxx-abi/abi.html#mangling-ty...

comment 12y ago · link · parent

Actually, Clang supports most MSVC extensions. Here are links to two of Clang's test for __uuidof: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCX... http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCX...

118.

Does Swift have performance issues?(swiftopinions.wordpress.com ↗)

2 points · by cokernel_hacker · 12y ago · discuss

comment 12y ago · link · parent

The seem to have a workable solution for Youtube: they support both HTML5 and flash.

comment 12y ago · link · parent

This is definitely possible, I'll give an example using LLVM's IR

input:

  declare void @g()

  define void @f() {
    br i1 undef, label %if.end, label %if.else

  if.else:
    call void @g()
    br label %if.end

  if.end:
    ret void
  }

  
after optimizations:

  declare void @g()

  define void @f() {
  if.else:
    tail call void @g()
    ret void
  }
1234567