- Feb 27, 2014
-
-
Eric Christopher authored
and update everything accordingly. This can be used to conditionalize the amount of output in the backend based on the amount of debug requested/metadata emission scheme by a front end (e.g. clang). Paired with a commit to clang. llvm-svn: 202332
-
Eric Christopher authored
llvm-svn: 202316
-
- Feb 26, 2014
-
-
Rafael Espindola authored
llvm-svn: 202277
-
Rafael Espindola authored
This fixes spurious warnings in llvm-link about the datalayout not matching. Thanks to Zalman Stern for reporting the bug! llvm-svn: 202276
-
Rafael Espindola authored
We don't have any test with more than 6 address spaces, so a DenseMap is probably not the correct answer. An unsorted array would also be OK, but we have to sort it for printing anyway. llvm-svn: 202275
-
Rafael Espindola authored
llvm-svn: 202274
-
Nick Lewycky authored
llvm-svn: 202222
-
Paul Robinson authored
llvm-svn: 202213
-
Adrian Prantl authored
This will be used for testcases in CFE. llvm-svn: 202207
-
Rafael Espindola authored
Eventually DataLayoutPass should go away, but for now that is the only easy way to get a DataLayout in some APIs. This patch only changes the ones that have easy access to a Module. One interesting issue with sometimes using DataLayoutPass and sometimes fetching it from the Module is that we have to make sure they are equivalent. We can get most of the way there by always constructing the pass with a Module. In fact, the pass could be changed to point to an external DataLayout instead of owning one to make this stricter. Unfortunately, the C api passes a DataLayout, so it has to be up to the caller to make sure the pass and the module are in sync. llvm-svn: 202204
-
- Feb 25, 2014
-
-
Rafael Espindola authored
No tool does this currently, but as everything else in a module we should be able to change its DataLayout. Most of the fix is in DataLayout to make sure it can be reset properly. The test uses Module::setDataLayout since the fact that we mutate a DataLayout is an implementation detail. The module could hold a OwningPtr<DataLayout> and the DataLayout itself could be immutable. Thanks to Philip Reames for pushing me in the right direction. llvm-svn: 202198
-
Rafael Espindola authored
Now that DataLayout is not a pass, store one in Module. Since the C API expects to be able to get a char* to the datalayout description, we have to keep a std::string somewhere. This patch keeps it in Module and also uses it to represent modules without a DataLayout. Once DataLayout is mandatory, we should probably move the string to DataLayout itself since it won't be necessary anymore to represent the special case of a module without a DataLayout. llvm-svn: 202190
-
Rafael Espindola authored
Instead, have a DataLayoutPass that holds one. This will allow parts of LLVM don't don't handle passes to also use DataLayout. llvm-svn: 202168
-
- Feb 24, 2014
-
-
Rafael Espindola authored
After this I will set the default back to F_None. The advantage is that before this patch forgetting to set F_Binary would corrupt a file on windows. Forgetting to set F_Text produces one that cannot be read in notepad, which is a better failure mode :-) llvm-svn: 202052
-
Rafael Espindola authored
This will make it easier to switch the default to being binary files. llvm-svn: 202042
-
- Feb 22, 2014
-
-
Quentin Colombet authored
The LLVM diagnostic are now wired-up in clang (since r200931), thus the user experience will not be impacted by this change anymore. Related to <rdar://problem/15886697> llvm-svn: 201915
-
- Feb 19, 2014
-
-
Rafael Espindola authored
r201608 made llvm corretly handle private globals with MachO. r201622 fixed a bug in it and r201624 and r201625 were changes for using private linkage, assuming that llvm would do the right thing. They all got reverted because r201608 introduced a crash in LTO. This patch includes a fix for that. The issue was that TargetLoweringObjectFile now has to be initialized before we can mangle names of private globals. This is trivially true during the normal codegen pipeline (the asm printer does it), but LTO has to do it manually. llvm-svn: 201700
-
Daniel Jasper authored
This causes the LLVMgold plugin to segfault. More information on the replies to r201608. llvm-svn: 201669
-
- Feb 18, 2014
-
-
Rafael Espindola authored
The IR @foo = private constant i32 42 is valid, but before this patch we would produce an invalid MachO from it. It was invalid because it would use an L label in a section where the liker needs the labels in order to atomize it. One way of fixing it would be to just reject this IR in the backend, but that would not be very front end friendly. What this patch does is use an 'l' prefix in sections that we know the linker requires symbols for atomizing them. This allows frontends to just use private and not worry about which sections they go to or how the linker handles them. One small issue with this strategy is that now a symbol name depends on the section, which is not available before codegen. This is not a problem in practice. The reason is that it only happens with private linkage, which will be ignored by the non codegen users (llvm-nm and llvm-ar). llvm-svn: 201608
-
- Feb 16, 2014
-
-
Rafael Espindola authored
Thanks to Elena Demikhovsky for noticing. llvm-svn: 201494
-
- Feb 14, 2014
-
-
Rafael Espindola authored
This should be a small build time improvement in general and fixes the build on OS X with -DBUILD_SHARED_LIBS=ON. The issue is that not all users are including GenericDomTreeConstruction.h, causing undefined references when ld64 managed to hide the linkonce_odr symbols. llvm-svn: 201440
-
- Feb 13, 2014
-
-
Rafael Espindola authored
An alias is always in the section of its aliasee and has the same alignment (since it has the same address). llvm-svn: 201354
-
Rafael Espindola authored
llvm-svn: 201295
-
- Feb 10, 2014
-
-
Rafael Espindola authored
A const ObjectFile needs to be able to provide its name. For an IRObjectFile, that means being able to call the mangler. Since each IRObjectFile can have a different mangling, it is natural for them to contain a Mangler which is therefore also const. llvm-svn: 201113
-
Hans Wennborg authored
This fixes the oversight from r159077. llvm-svn: 201098
-
- Feb 06, 2014
-
-
Paul Robinson authored
Ideally only those transform passes that run at -O0 remain enabled, in reality we get as close as we reasonably can. Passes are responsible for disabling themselves, it's not the job of the pass manager to do it for them. llvm-svn: 200892
-
- Feb 05, 2014
-
-
Chandler Carruth authored
I think this was just over-eagerness on my part. The analysis results need to often be non-const because they need to (in some cases at least) be updated by the transformation pass in order to remain correct. It also makes lazy analyses (a common case) needlessly annoying to write in order to make their entire state mutable. llvm-svn: 200881
-
Alon Mishne authored
llvm-svn: 200843
-
Manman Ren authored
llvm-svn: 200806
-
- Feb 04, 2014
-
-
Justin Bogner authored
llvm-svn: 200796
-
Justin Bogner authored
Until now, when a path in a gcno file included a directory, we would emit our .gcov file in that directory, whereas gcov always emits the file in the current directory. In doing so, this implements gcov's strange name-mangling -p flag, which is needed to avoid clobbering files when two with the same name exist in different directories. The path mangling is a bit ugly and only handles unix-like paths, but it's simple, and it doesn't make any guesses as to how it should behave outside of what gcov documents. If we decide this should be cross platform later, we can consider the compatibility implications then. llvm-svn: 200754
-
David Blaikie authored
For some anachronistic reason we were producing {i32 0} for zero-length debug info arrays. (this change is paired with a Clang change and may cause temporary buildbot noise) Let's not. llvm-svn: 200721
-
- Feb 01, 2014
-
-
Reid Kleckner authored
Calls with inalloca are lowered by skipping all stores for arguments passed in memory and the initial stack adjustment to allocate argument memory. Now the frontend is responsible for the memory layout, and the backend doesn't have to do any work. As a result these changes are pretty minimal. Reviewers: echristo Differential Revision: http://llvm-reviews.chandlerc.com/D2637 llvm-svn: 200596
-
- Jan 31, 2014
-
-
Reid Kleckner authored
MSVC always places the 'this' parameter for a method first. The implicit 'sret' pointer for methods always comes second. We already implement this for __thiscall by putting sret parameters on the stack, but __cdecl methods require putting both parameters on the stack in opposite order. Using a special calling convention allows frontends to keep the sret parameter first, which avoids breaking lots of assumptions in LLVM and Clang. Fixes PR15768 with the corresponding change in Clang. Reviewers: ributzka, majnemer Differential Revision: http://llvm-reviews.chandlerc.com/D2663 llvm-svn: 200561
-
- Jan 30, 2014
-
-
Timur Iskhodzhanov authored
This incorporates a couple of fixes reviewed at http://llvm-reviews.chandlerc.com/D2651 llvm-svn: 200440
-
- Jan 29, 2014
-
-
NAKAMURA Takumi authored
It was incompatible with --target=i686-win32. llvm-svn: 200375
-
Rafael Espindola authored
This is a bit more convenient for some callers, but more importantly, it is easier to implement correctly. Doing this removes the patching of already printed data that was used for fastcall, fixing a crash with private fastcall symbols. llvm-svn: 200367
-
- Jan 28, 2014
-
-
Timur Iskhodzhanov authored
Reviewed at http://llvm-reviews.chandlerc.com/D2232 llvm-svn: 200340
-
Rafael Espindola authored
When simplifycfg moves an instruction, it must drop metadata it doesn't know is still valid with the preconditions changes. In particular, it must drop the range and tbaa metadata. The patch implements this with an utility function to drop all metadata not in a white list. llvm-svn: 200322
-
- Jan 25, 2014
-
-
Reid Kleckner authored
llvm-svn: 200059
-