- User Since
- Jan 7 2013, 9:35 AM (323 w, 3 d)
Tue, Mar 19
Mon, Mar 18
to make the change even clearer, you could just say in the commit message that it just adds the missing non-equality opcodes.
LGTM; I wonder if it makes sense to have predefined macro for the C++ tag (or perhaps just a regular macro for use in libcxxabi?)
Fri, Mar 15
wow that's a very large meme.
Thu, Mar 14
LGTM assuming that comment is right. Assuming it's correct, I don't really understand what exactly ExternalSymbol actually means though.
Tue, Mar 12
So by "correctly" you mean that the TRY goes before the EH_LABEL rather than between the label and the call, and the CATCH goes after the label rather than at the top of the BB?
Thu, Mar 7
Tue, Mar 5
LGTM with the comment suggestion.
Tue, Feb 26
Mon, Feb 25
LGTM, this is a nice improvement.
Fri, Feb 22
Makes sense. I think the thing that has changed compared to when we started is that symbol types like function, global, and event are more first-class in the wasm object format. Anyway, this change seems fine. I assume the asm parser already isn't using these annotations and we still round-trip?
Is EHPadUnwindMap analogous to any of the similarly-named data structures for WinEH? If so, that would seem to make it even less likely to accidentally break, since any change that breaks it would also break WinEH.
You mention that this is a bugfix. what's the bug that is fixed? An optimization not keeping the map up to date?
IIRC this code goes back to when we were piggybacking on ELF, and is more-or-less there to match how those variants are used on ELF. I don't see any asm parser changes in this CL, but I could imagine that they would exist so that the assembler could know what kind of reloc to use even without any context or special knowledge of symbol types; does this change affect how asm is parsed? Maybe we've already added enough extra intelligence to the assembler that we don't need them.
Thu, Feb 21
Feb 15 2019
By "pick one at random" you mean we are rewriting one of the calls to drop or add parameters, right? And the one we pick is just the first one we happen to encounter?
Feb 12 2019
Without the context of MC here there's no indication what kind of flags the .init_flags directive refers to. Maybe call it init_segment_flags?
Feb 7 2019
@quinripa IIUC this patch was committed a year ago, so these symbols should be working?
Yeah, based on our conversations (e.g. in D57874) we should go ahead with this.
Oh I guess another option would just be to pin all 3 flags together here, but since -pthread sets a preprocessor define and may also affect linker behavior, I think it's fine to allow atomic codegen without setting -pthread.
So this CL has the effect that setting -pthreads will also set -matomics.
Currently as you mentioned we have the problem that we can't make our current logic of "do we lower away the atomics" be controlled by the target features because it's done at pass config time and not codegen time (where there's no access to the per-function subtarget).
Also IIUC on ARM, it's -mthread-model that controls generation of atomic instructions, so it makes sense that -mthread-model does the same thing for Wasm. But it's also true that for wasm we use -m<feature> to enable codegen for a particular wasm feature, so it would be good to make -matomics do the same for consistency.
So, can we just pin those 2 flags together here? i.e. setting one will just cause the other to be set?
(I guess we'd also need consistency check so that if someone does something like -mthread-model=posix -mno-atomics we either throw an error or make it so that one of those always overrides the other).
Feb 6 2019
Does this affect llvm-objdump or just llvm-readobj, or both (I don't see any tests here with llvm-objdump but the CL description mentions it)
I think we should change the logic in the backend to use the atomics target feature rather than the thread model to determine whether to run the LowerAtomics pass. Then this won't be necessary since the functions will have the appropriate attribute.
Feb 4 2019
Feb 1 2019
otherwise LGTM too
It's always been possible because clang and LLVM have always just been in different trunks in the same SVN repo. AFAIK it's never been disallowed but people rarely do it.
Jan 31 2019
LGTM. Can you put a little more detail in the commit message (e.g. something like what you wrote in the comment) to make it easier to see in a log (without having to look at the code or the PR)?
Jan 30 2019
Just noticed, but the discussion should maybe have gone into a comment on Phab rather than the commit message itself...
yeah, seems fine. we can always change our mind in the future even in the absence of a TODO :)
Jan 29 2019
Jan 28 2019
Jan 25 2019
overall it looks good; it's nice that this version is simpler.
Jan 24 2019
haven't quite gotten through it but here's what I have so far. Looking pretty good overall though.
LGTM; don't forget to include all the context in the future
Jan 17 2019
Jan 16 2019
Jan 15 2019
This code LGTM modulo whatever version number we settle on in the tool-conventions issue.
As a follow-on, I guess we could get ambitious and add the "language" field as well. I think the only way to do that would be to sniff the language field of the DICompileUnit metadata node (it would of course only exist if there's debug info, but doing anything else seems a bit crazytown).
Yeah, thinking about this a little more, I think it makes sense. IIRC the "address" (or value of a symbol, which I think is equivalent?) in the object file/linking/executable context refers to the section offset rather than memory-mapped address even for ELF, which would make our objdump consistent with other targets too. For the purposes of LLVM internals, I think you are right that having that consistency seems best; for the users, it's possible we'll want to put some more info in the final displayed output, but we can figure out how to get that once the guts are hooked up.
Jan 14 2019
Oh I had actually forgotten that the PC offset is the offset in the module, not the offset within the function. So for objdump either way would be ok, since you could easily find what function a particular instruction is in. I guess my point is not that the formats have to match, (since e.g. you probably wouldn't be using the same code to parse both browser output and tool output?) but if you are debugging and looking at a stack trace, you should easily be able to find the same location in an objdump-produced assembly dump.... Without a calculator (annoyance of mismatched hex/dec address formats was what originally led me to add that section to the spec :) )
Is this actually what we want?
If I'm debugging a crash in a browser, the browser shows stack traces by function index rather than file offset, in this format
So it might be better for objdump to match that format.
One difference between the multilib style and multi-arch style is whether any headers can be shared between the 2 arches. Historically at least, with bitness-flavored variants of the same architecture there were common headers used by both, and it was just the library directories that needed to be different. I've heard anecdotally that this is not the case for ARM though.
Jan 11 2019
LGTM but is there really no test for this? I'd expect to see this on linker command lines or something, right? If not we should add one.
Could this CL be the cause of the newly-passing test in https://ci.chromium.org/p/wasm/builders/luci.wasm.ci/linux/2560 ?
Jan 9 2019
Just ran across this again. @jgravelle-google is this still relevant?
Jan 8 2019
Jan 7 2019
This patch looks fine with the comment nit. I'm a little unclear because get_global and set_global are still marked as mayLoad and mayStore. Is it a problem with both the explicit modeling of the stack pointer and treating them as reads and writes for this purpose?
Dec 19 2018
Come to think of it, might we actually want the possibility of constant offset in addition to the "kind" and index field, e.g. for cases where the value is actually a pointer?
I think there will eventually be more consumers, including traditional-style debuggers (even if just for non-web use cases).
I had initially hoped that we could get away with just using DWARF registers more-or-less directly for locals, but as Yury pointed out, there are a lot of places that assume a fixed number of architectural registers. And of course wasm globals and the wasm value stack don't really have analogs on most architectures. I still hope we'll be able to use DWARF's CFA and other stack stuff for the stack in linear memory. (Although in our case the stack pointer will be a global rather than a register. Hopefully we can make that work.)
Dec 18 2018
@aprantl Is the advantage of your suggested approach just that we don't have to define a new expression type? Obviously the interpretation is not the same as DW_OP_breg on other targets so as you say, either way there would have to be special logic in all the tools that consume it. Is this kind of repurposing of builtin primitives common?
Dec 17 2018
Dec 10 2018
At a high level (i.e. across all the LLVM targets) the intention is that binary and asm streamers have the same interface. That's sort of enforced by the fact that they both have the same base class, but I guess in actuality the "interface" also includes the data on the symbol object. I think I agree that it makes more sense to think of the symbols as owned outside the streamer and have them be a way to pass info into the streamer (the current code is more like having them be state that is only needed by the binary streamer but which lives outside the streamer). I guess that's also another way of saying that symbol type and module name are properties of a symbol even if those properties are only needed by one of the streamers. I guess it might also be useful for debugging or future modifications to have the contents of the symbols be the same regardless of which output type is in use.
I don't 100% understand the distinction but if you've tested with LLVM_LINK_LLVM_DYLIB and BUILD_SHARED_LIBS and the static build then LGTM :)
Dec 7 2018
Dec 3 2018
Nov 28 2018
Nov 27 2018
Nov 19 2018
Yeah I think for PIC code all globals need to be relative.
LLVM doesn't actually have an IWYU guideline though: https://llvm.org/docs/CodingStandards.html#include-as-little-as-possible ... but also not a "dont IWYU".
Not sure I am parsing your commit message right. So we fold if DSO local, and not otherwise?
Nov 16 2018