summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineModuleInfoImpls.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [MinGW] [X86] Add stubs for references to data variables that might end up ↵Martin Storsjo2018-08-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | imported from a dll Variables declared with the dllimport attribute are accessed via a stub variable named __imp_<var>. In MinGW configurations, variables that aren't declared with a dllimport attribute might still end up imported from another DLL with runtime pseudo relocs. For x86_64, this avoids the risk that the target is out of range for a 32 bit PC relative reference, in case the target DLL is loaded further than 4 GB from the reference. It also avoids having to make the text section writable at runtime when doing the runtime fixups, which makes it worthwhile to do for i386 as well. Add stub variables for all dso local data references where a definition of the variable isn't visible within the module, since the DLL data autoimporting might make them imported even though they are marked as dso local within LLVM. Don't do this for variables that actually are defined within the same module, since we then know for sure that it actually is dso local. Don't do this for references to functions, since there's no need for runtime pseudo relocations for autoimporting them; if a function from a different DLL is called without the appropriate dllimport attribute, the call just gets routed via a thunk instead. GCC does something similar since 4.9 (when compiling with -mcmodel=medium or large; from that version, medium is the default code model for x86_64 mingw), but only for x86_64. Differential Revision: https://reviews.llvm.org/D51288 llvm-svn: 340942
* [MachineModuleInfoImpls] Replace qsort with array_pod_sortMandeep Singh Grang2017-10-261-10/+4
| | | | | | | | | | | | | | | | Summary: This seems to be the only place in llvm we directly call qsort. We can replace this with a call to array_pod_sort. Also minor cleanup of the sorting function. Reviewers: bkramer, Eugene.Zelenko, rafael Reviewed By: bkramer Subscribers: efriedma, llvm-commits Differential Revision: https://reviews.llvm.org/D39214 llvm-svn: 316671
* [CodeGen] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2017-10-101-3/+7
| | | | | | other minor fixes (NFC). llvm-svn: 315380
* [WebAssembly] Use __stack_pointer global when writing wasm binarySam Clegg2017-06-161-1/+0
| | | | | | | | | | | | | | | | | | This ensures that symbolic relocations are generated for stack pointer manipulations. These relocations are of type R_WEBASSEMBLY_GLOBAL_INDEX_LEB. This change also adds support for reading relocations of this type in WasmObjectFile.cpp. Since its a globally imported symbol this does mean that the get_global/set_global instruction won't be valid until the objects are linked that global used in no longer an imported global. Differential Revision: https://reviews.llvm.org/D34172 llvm-svn: 305616
* [WebAssembly] Add support for using a wasm global for the stack pointer.Dan Gohman2017-02-241-0/+1
| | | | | | | This replaces the __stack_pointer variable which was allocated in linear memory. llvm-svn: 296201
* Clear the stub map in getSortedStubs.Rafael Espindola2015-04-071-5/+4
| | | | | | This makes sure they are only output once (and frees a bit of memory). llvm-svn: 234313
* Rename virtual table anchors from Anchor() to anchor() for consistency with ↵Craig Topper2012-09-261-2/+2
| | | | | | the rest of the tree. llvm-svn: 164666
* Add a bit along with the MCSymbols stored in the MachineModuleInfo maps thatBill Wendling2010-03-101-5/+4
| | | | | | | | indicates that an MCSymbol is external or not. (It's true if it's external.) This will be used to specify the correct information to add to non-lazy pointers. That will be explained further when this bit is used. llvm-svn: 98199
* Preliminary patch to improve dwarf EH generation - Hooks to return ↵Anton Korobeynikov2010-02-151-5/+6
| | | | | | Personality / FDE / LSDA / TType encoding depending on target / options (e.g. code model / relocation model) - MCIzation of Dwarf EH printer to use encoding information - Stub generation for ELF target (needed for indirect references) - Some other small changes here and there llvm-svn: 96285
* make MachineModuleInfoMachO hold non-const MCSymbol*'s insteadChris Lattner2010-02-031-4/+4
| | | | | | | of const ones. non-const ones aren't very useful, because you can't even, say, emit them. llvm-svn: 95205
* Don't sort the vector when it is empty. This should fix some expensive checkingBenjamin Kramer2009-09-161-1/+2
| | | | | | failures. llvm-svn: 82040
* add a new MachineModuleInfoMachO class, which is the per-moduleChris Lattner2009-09-161-0/+44
stuff common across all macho targets. llvm-svn: 82018
OpenPOWER on IntegriCloud