- User Since
- Nov 23 2012, 10:16 AM (351 w, 4 d)
Wed, Aug 7
Thanks, this looks good enough within the limitations of the framework.
Mon, Aug 5
Looking a bit more into the details. Chandler, you've originally suggested going with the LowerAtomic route and that actually does create code that fails the SDAG lowering if the pass is skipped, e.g. on ARM.
The second part is currently overlapping with the CodeGenPrepare pass. I can cleanup the implementation somewhat by reusing the same functionality as that pass is using OR I could factor out a minimal branch for doing the constant folding optimization from CodeGenPrepare as a general branch that is included in the pass chain for -O0, e.g. instead of the more general CodeGenPrepare pass. The main difference is that the non-optimized build would not get any recursive folding from PHI-simplification, but I think that's fine for the original use case. It would also not get the block merging, but again, that seems to be fine for the constraints.
Sun, Aug 4
For the first part, I was actually asked to do that. I don't mind either way.
Sat, Aug 3
Generalize slightly to also cover llvm.objectsize which has very similar constraints.
Fri, Aug 2
Thu, Aug 1
Update PHI nodes in disconnected block.
Tue, Jul 30
Replace boolean argument to replaceAndRecursivelySimplify with optional vector of un-modified instructions. This simplifies the API change significantly and allows other potential use cases. Redo the restart handling. After a successful simplification step, restart the current BB only, but always do another full pass of the function.
Mon, Jul 29
Sat, Jul 27
Avoid goto. Create new BranchInst instead of modifying in-place. Update tests to reflect changes. Move most of the x86 is-constant test to generic.
With the exception of the small improvements outlined, this looks good to me.
I understand, but the current version just doesn't work anyway to delay it.
Fri, Jul 26
Thu, Jul 25
Wed, Jul 24
You lost the changes to lib/Sema/SemaStmtAsm.cpp to actually do the delaying for immediate operands?
Jul 19 2019
Jun 7 2019
Jun 5 2019
I think MMX code is obscure enough at this point that it doesn't matter much either way. Even less across DSO boundaries. That's why I don't really care either way.
The patch still needs to be generalized to handle all ICE constraints, but it is not blocked by the review for handling the is.constant intrinsic.
May 30 2019
May 16 2019
May 13 2019
On the frontend side:
- __builtin_constant_p is not expanded correctly in EvalConstant.cpp when used as part of codegen for -O0. This means that trivially unreachable branches are emitted (e.g. with a BR with a literal false as condition),
- The constant evaluator has a general problem with overly pessimistic analysis when it comes to possible side effects. Still have to discuss the correct handling with Richard for this.
Apr 24 2019
It does not fix the issues on our side, but pushes them to a different place. It is still an improvement, but the problem is not solved yet.
Apr 23 2019
Apr 22 2019
I'm in the process of testing this, but feedback will take a bit.
Mar 27 2019
Mar 26 2019
I'd recomment copying the version from libarchive (https://github.com/libarchive/libarchive/blob/master/libarchive/archive_crc32.h):
- don't bother with the 1KB table in both binary and source, just recompute it on the first use.
- at least in the past unrolling the inner loop somewhat helped a lot
Mar 11 2019
LGTM from my perspective at least.
For it to be really useful for the majority of bugs, it would be nice to figure out automatically how to get the preprocessing step done and filter out the # lines afterwards. That part alone significantly cuts down the creduce time.
Why do you exclude clang? I would expect LLVM at this point to not support visibility attributes on XCOFF either?
Mar 5 2019
Well, that was a sample to illustrate the point. A full working (and now failing) example is:
Mar 4 2019
The other problem is that we don't use the CFG machinery to prune dead branches. Consider the x86 in/out instructions: one variant takes an immediate, the other a register. The classic way to deal with that is something like
Mar 2 2019
Can you include a patch for something like (int *)0xdeadbeeeeeef on amd64? That's a valid value for "n", but clearly too large for int. Thanks for looking at this, it is one of the two large remaining show stoppers for the asm constraint check.
Placing .bss.rel.ro before .data doesn't make sense. It forces the content of .bss.rel.ro to embedded into the binary. I also don't really understand the motivation here. Memory mappins on the kernel side are quite cheap.
Feb 28 2019
Feb 27 2019
Feb 26 2019
Feb 25 2019
Feb 24 2019
I'm not in favor of this. It adds overhead for the system compiler and generally makes the logic more complicated. This seems to be another hack around the fact that the driver has no clear notion of "use system runtime" vs "use custom runtime".
Feb 19 2019
Actually, since it used to be part of XSI, I would include it unconditionally and only conditionalize it if a system starts to actually drop it.
Feb 5 2019
The description is certainly not right. IE can be used from dlopen'd objects without problems as long as there is still reserved space around and the data is not initialized non-trivially or the dynamic linker is willing to fix up all threads. The point of the flag is to allow the dynamic linker to make a quick decision without having to scan the relocation table first. A classic user of this was libGL. It also applies to many platforms, not just i386. As such, please update the description before any commit.
Jan 30 2019
Neither GNU ld nor gold implement really useful behavior here. Ideally, every library would be linked with -z defs, but that normally doesn't work because on many systems certain symbols are imported from the main program by default. A good example are the entry points of the dynamic linker. A bad example historically speaking is libwrap. From a user perspective it would be desirable to have a way to say "This symbol will be supplied by someone else" when linking a shared library or potentially even the main binary. That would allow whitelisting intentionally undefined symbols and allow avoiding any symbol resolution dance for shared libraries. A single pass over the symbol tables is still necessary for the sake of knowing the defined symbols and for potential copy relocations, but no further work should be needed.
Jan 25 2019
This seems to imply hard-float support though? Accessing floating point registers when using soft-float is not going to get very far.
Jan 21 2019
I'd really prefer to keep the argv code as is. I'm not sure what that test case is supposed to do, but it seems quite questionable as "check" is not a valid language frontend nor a version suffix. It should not work.
Jan 15 2019
For the clang side, I don't understand why Driver::GetFilePath is not good enough. This shouldn't need all toolchain changes at all.
As discussed with dankm on IRC, I still would like to see the correct behavior going into 8.0, i.e. not change it later. Since this also matters for potential faster implementations later, it seems like a good idea to do it now. The changes are well-localized.
Jan 14 2019
As first step, it goes into the right direction. I would explicitly set --as-needed for all those indirectly loaded objects. If people want to retain the questionable behavior of newer GNU tools, it could be a separate flag so that a final round can warn if an indirectly pulled library is necessary, but that behavior doesn't IMO make much sense. Full version has to look at DT_RUNPATH/DT_RPATH and also --rpath-link.
Jan 11 2019
Right, I'm not aware of anyone but FreeBSD really using the OSABI field. For FreeBSD it was a long standing hack around limitations in the ELF kernel loader. I'm not even sure if FreeBSD use(d) to set the OSABI field for the intermediate object files.
That's the other reason why I find the GCC specification as string prefix confusing. I still say we should just go with mapping of path names and then the order question mostly goes away.
Jan 8 2019
@ruiu: No, it is exactly what you want, since it allows you to point lld into the normal sysroot. Cross-compiling is the default case for the NetBSD toolchain.
Thanks, this looks like a good starting point.
Jan 4 2019
It can certainly make it worse, e.g. if you have one input section with half page size and page alignment followed by another input section with half page size. Depending on the precise size and order, it will fit into one page or two. It's a bit constructured, but gives the general idea.
I think this should factor in any larger-than-normal alignment, otherwise it could easily result in a significant increase in size?
Jan 3 2019
Talking from the perspective of having had to deal with thousands of packages in pkgsrc over the years: it is naive to believe that there isn't a lot of software that calls the linker directly for various reasons. As such, it is very important to have a useful configuration in the linker by default. Such a configuration is by its very nature target specific. This doesn't mean it can't be done in a cross-compiler friendly way, on the contrary. Over the years NetBSD has been pushing its toolchain to be as similar for the native build and a cross-target as reasonable possible. Modulo the build time choices in the config.h sense, the only difference between the native and cross tools is the built-in default of the former.
Jan 2 2019
This doesn't seem a reasonable approach at all:
Dec 27 2018
I foundamentally don't understand what you are trying to do. You can either look at the executable from a segment perspective or from a section perspective. But trying to mix the views is bound to give bogus results.
Dec 24 2018
Dec 11 2018
This header is used on systems without glibc. So please don't argue about behavior based only on that. Granted, most other libc implementation are less annoying when it comes to free and malloc, but still.
Dec 10 2018
Dec 9 2018
I don't see why this interceptor needs to know about the internals of struct cdbr or struct cdbw at all. They are fully opaque. All memory accessed by users is explicitly sized as argument to the functions or returned with the size.
Dec 3 2018
I'd recomment another pass to reduce the now fully redundant () pairs around % string substitutions, but in principle LGTM.
Dec 2 2018
Can you split off the pure modernisation changes like new exception or print ? Those are completely non-contentious changes after all. I generally do not like the range and list related changes as many instances are clear regressions for the 2.x case. filter to list comprehension should IMO be a separate change as well, but those are much less problematic and often an improvement in terms of both performance and readability.