- Nov 29, 2016
-
-
Rafael Espindola authored
Right now we just remember a SymbolBody for each got entry and duplicate a bit of logic to decide what value, if any, should be written for that SymbolBody. With ARM there will be more complicated values, and it seems better to just use the relocation code to fill the got entries. This makes it clear that each entry is filled by the dynamic linker or by the static linker. llvm-svn: 288107
-
Rafael Espindola authored
llvm-svn: 288102
-
Rafael Espindola authored
It would have found a missing case in another patch. llvm-svn: 288101
-
Warren Ristow authored
llvm-svn: 288100
-
Saleem Abdulrasool authored
This fixes an incorrect standard usage of GNU99 when the compiler check was for the ISO standard C99. Furthermore, bump the dependency up to C11. The motivation for this change is ARM EHABI compatibility with clang 3.8. We rely on a type definition redefinition which causes an error with -Werror builds. This is problematic for FreeBSD builds. Switching to C11 allows the compatibility without the unnecessary pedantic warning. The alternative would be to clutter the support header with a `pragma clang diagnostic ignore`. GCC 4.8+ and the supported clang revisions along with MSVC support enough of C11 to allow building the builtins in C11 mode. No functional change intended. llvm-svn: 288099
-
Peter Collingbourne authored
We now expect each module's identification block to appear immediately before the module block. Any module block that appears without an identification block immediately before it is interpreted as if it does not have a module block. Also change the interpretation of VST and function offsets in bitcode. The offset is always taken as relative to the start of the identification (or module if not present) block, minus one word. This corresponds to the historical interpretation of offsets, i.e. relative to the start of the file. These changes allow for bitcode modules to be concatenated by copying bytes. Differential Revision: https://reviews.llvm.org/D27184 llvm-svn: 288098
-
Richard Smith authored
Patch by Joshua Hurwitz! llvm-svn: 288097
-
Reid Kleckner authored
This way, when the linker adds padding between globals, we can skip over the zero padding bytes and reliably find the start of the next metadata global. llvm-svn: 288096
-
Tom Stellard authored
Reviewers: arsenm Subscribers: arsenm, llvm-commits, kzhuravl Differential Revision: https://reviews.llvm.org/D23417 llvm-svn: 288095
-
Alexander Shaposhnikov authored
This diff adds missing semicolon in SymbolFileDWARF.cpp Differential revision: https://reviews.llvm.org/D27177 llvm-svn: 288094
-
Reid Kleckner authored
llvm-svn: 288093
-
Reid Kleckner authored
It looks like this logic was duplicated long ago and the GCC side of things has grown additional functionality. We need ${:uid} at least to generate unique MS inline asm labels (PR23715), so expose these. llvm-svn: 288092
-
Evgeniy Stepanov authored
Summary: In order to avoid starting a separate thread to return unused memory to the system (the thread interferes with process startup on Android, Zygota waits for all threads to exit before fork, but this thread never exits), try to return it right after free. Reviewers: eugenis Subscribers: cryptoad, filcab, danalbert, kubabrecka, llvm-commits Patch by Aleksey Shlyapnikov. Differential Revision: https://reviews.llvm.org/D27003 llvm-svn: 288091
-
Adam Nemet authored
This includes the intervening store and the load/store that we're trying to forward from in the optimization remark for the missed load elimination. This is hooked up under a new mode in ORE that allows for compile-time budget for a bit more analysis to print more insightful messages. This mode is currently enabled for -fsave-optimization-record (-Rpass is trickier since it is controlled in the front-end). With this we can now print the red remark in http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/SingleSource/Benchmarks/Dhrystone/CMakeFiles/dry.dir/html/_org_test-suite_SingleSource_Benchmarks_Dhrystone_dry.c.html#L446 Differential Revision: https://reviews.llvm.org/D26490 llvm-svn: 288090
-
Reid Kleckner authored
On Windows, Clang is mangling lambdas in default member initializers incorrectly. See PR31197. This is causing redness on the self-host bots. Work around the problem locally so we aren't blind to further issues. llvm-svn: 288089
-
Sanjay Patel authored
llvm-svn: 288088
-
- Nov 28, 2016
-
-
Mehdi Amini authored
This macro is supposed to be the one controlling the compatibility of ABI breaks induced when enabling or disabling assertions in LLVM. The macro is enabled by default in assertions build, so this commit won't disable the tests. Differential Revision: https://reviews.llvm.org/D26700 llvm-svn: 288087
-
Kevin Enderby authored
Add the checking for both the MachO::fat_header and the MachO::fat_arch struct values in the constructor for MachOUniversalBinary. Such that when the constructor for ObjectForArch is called it can assume the values in the MachO::fat_arch for the offset and size are contained in the file after the MachOUniversalBinary constructor is called for the Parent. llvm-svn: 288084
-
Peter Collingbourne authored
Differential Revision: https://reviews.llvm.org/D27157 llvm-svn: 288083
-
Mehdi Amini authored
The macro LLVM_ENABLE_ABI_BREAKING_CHECKS is moved to a new header abi-breaking.h, from llvm-config.h. Only headers that are using the macro are including this new header. LLVM will define a symbol, either EnableABIBreakingChecks or DisableABIBreakingChecks depending on the configuration setting for LLVM_ABI_BREAKING_CHECKS. The abi-breaking.h header will add weak references to these symbols in every clients that includes this header. This should ensure that a mismatch triggers a link failure (or a load time failure for DSO). On MSVC, the pragma "detect_mismatch" is used instead. Differential Revision: https://reviews.llvm.org/D26876 llvm-svn: 288082
-
John McCall authored
llvm-svn: 288081
-
John McCall authored
llvm-svn: 288080
-
John McCall authored
move the member classes up to top level to allow forward declarations to name them. NFC. llvm-svn: 288079
-
Chandler Carruth authored
accept an Invalidator that allows them to invalidate themselves if their dependencies are in turn invalidated. Rather than recording the dependency graph ahead of time when analysis get results from other analyses, this simply lets each result trigger the immediate invalidation of any analyses they actually depend on. They do this in a way that has three nice properties: 1) They don't have to handle transitive dependencies because the infrastructure will recurse for them. 2) The invalidate methods are still called only once. We just dynamically discover the necessary topological ordering, everything is memoized nicely. 3) The infrastructure still provides a default implementation and can access it so that only analyses which have dependencies need to do anything custom. To make this work at all, the invalidation logic also has to defer the deletion of the result objects themselves so that they can remain alive until we have collected the complete set of results to invalidate. A unittest is added here that has exactly the dependency pattern we are concerned with. It hit the use-after-free described by Sean in much detail in the long thread about analysis invalidation before this change, and even in an intermediate form of this change where we failed to defer the deletion of the result objects. There is an important problem with doing dependency invalidation that *isn't* solved here: we don't *enforce* that results correctly invalidate all the analyses whose results they depend on. I actually looked at what it would take to do that, and it isn't as hard as I had thought but the complexity it introduces seems very likely to outweigh the benefit. The technique would be to provide a base class for an analysis result that would be populated with other results, and automatically provide the invalidate method which immediately does the correct thing. This approach has some nice pros IMO: - Handles the case we care about and nothing else: only *results* that depend on other analyses trigger extra invalidation. - Localized to the result rather than centralized in the analysis manager. - Ties the storage of the reference to another result to the triggering of the invalidation of that analysis. - Still supports extending invalidation in customized ways. But the down sides here are: - Very heavy-weight meta-programming is needed to provide this base class. - Requires a pretty awful API for accessing the dependencies. Ultimately, I fear it will not pull its weight. But we can re-evaluate this at any point if we start discovering consistent problems where the invalidation and dependencies get out of sync. It will fit as a clean layer on top of the facilities in this patch that we can add if and when we need it. Note that I'm not really thrilled with the names for these APIs... The name "Invalidator" seems ok but not great. The method name "invalidate" also. In review some improvements were suggested, but they really need *other* uses of these terms to be updated as well so I'm going to do that in a follow-up commit. I'm working on the actual fixes to various analyses that need to use these, but I want to try to get tests for each of them so we don't regress. And those changes are seperable and obvious so once this goes in I should be able to roll them out throughout LLVM. Many thanks to Sean, Justin, and others for help reviewing here. Differential Revision: https://reviews.llvm.org/D23738 llvm-svn: 288077
-
Peter Collingbourne authored
This fixes a regression introduced by r285714: we weren't setting the rpath on LLVMgold.so correctly. Spotted by mark@chromium.org! Differential Revision: https://reviews.llvm.org/D27176 llvm-svn: 288076
-
Eli Friedman authored
Preserving lifetime markers isn't as important as allowing promotion, so just drop the lifetime markers if necessary. This also fixes an assertion failure where other parts of SROA assumed that lifetime markers never block promotion. Fixes https://llvm.org/bugs/show_bug.cgi?id=29139. Differential Revision: https://reviews.llvm.org/D24854 llvm-svn: 288074
-
Sanjay Patel authored
llvm-svn: 288073
-
Kuba Mracek authored
Differential Revision: https://reviews.llvm.org/D27137 llvm-svn: 288072
-
Mehdi Amini authored
Some scanner errors were not checked and reported by the parser. Fix PR30934. Recommit r288014 after fixing unittest. Patch by: Serge Guelton <serge.guelton@telecom-bretagne.eu> Differential Revision: https://reviews.llvm.org/D26419 llvm-svn: 288071
-
David Blaikie authored
Patch by Tom Tromey! (for use with Rust) llvm-svn: 288068
-
Kuba Mracek authored
llvm-svn: 288067
-
Kuba Mracek authored
Differential Revision: https://reviews.llvm.org/D27012 llvm-svn: 288065
-
Marcin Koscielnicki authored
See D19555 for rationale. As it turns out, this treatment is also necessary for scanf/printf. Differential Revision: https://reviews.llvm.org/D27118 llvm-svn: 288064
-
Michal Gorny authored
Add a set of unit tests for the distro detection code. The tests use an in-memory virtual filesystems resembling release files for various distributions supported. All release files are provided (not only the ones directly used) in order to guarantee that one of the rules will not mistakenly recognize the distribution incorrectly due to the additional files (e.g. Ubuntu as Debian). Differential Revision: https://reviews.llvm.org/D25869 llvm-svn: 288062
-
Michal Gorny authored
Fix recognizing newer OpenSUSE versions that combine the two version components into 'VERSION = x.y'. The check was written against an older version that kept those two split as VERSION and PATCHLEVEL. Differential Revision: https://reviews.llvm.org/D26850 llvm-svn: 288061
-
Michal Gorny authored
Refactor the Distro enum along with helper functions into a full-fledged Distro class, inspired by llvm::Triple, and make it a public API. The new class wraps the enum with necessary comparison operators, adding the convenience Is*() methods and a constructor performing the detection. The public API is needed to run the unit tests (D25869). Differential Revision: https://reviews.llvm.org/D25949 llvm-svn: 288060
-
Reid Kleckner authored
This solves PR23715 in a way that is compatible with LTO. MSVC supports jumping to source-level labels and between inline asm blocks, but we don't. Also revert the old solution, r255201, which was to mark these calls as noduplicate. llvm-svn: 288059
-
Matthias Braun authored
This makes the createGenericSchedLive() function that constructs the default scheduler available for the public API. This should help when you want to get a scheduler and the default list of DAG mutations. This also shrinks the list of default DAG mutations: {Load|Store}ClusterDAGMutation and MacroFusionDAGMutation are no longer added by default. Targets can easily add them if they need them. It also makes it easier for targets to add alternative/custom macrofusion or clustering mutations while staying with the default createGenericSchedLive(). It also saves the callback back and forth in TargetInstrInfo::enableClusterLoads()/enableClusterStores(). Differential Revision: https://reviews.llvm.org/D26986 llvm-svn: 288057
-
Jonathan Peyton authored
Patch by Victor Campos Differential Revision: https://reviews.llvm.org/D27172 llvm-svn: 288056
-
Artem Belevich authored
-cgp-freq-ratio-to-skip-merge option was removed by rollback in r288052. llvm-svn: 288055
-