summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
* Fix typo. Thanks to Roman Divacky for noticing it.Rafael Espindola2014-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202277 91177308-0d34-0410-b5e6-96231b3b80d8
* Compare DataLayout by Value, not by pointer.Rafael Espindola2014-02-26
| | | | | | | | This fixes spurious warnings in llvm-link about the datalayout not matching. Thanks to Zalman Stern for reporting the bug! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202276 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a sorted array to store the information about a few address spaces.Rafael Espindola2014-02-26
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202275 91177308-0d34-0410-b5e6-96231b3b80d8
* Move these functions out of line. A DenseMap lookup is not a simple operation.Rafael Espindola2014-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202274 91177308-0d34-0410-b5e6-96231b3b80d8
* Move getELFDynamicSymbolIterators to a public header.Alexey Samsonov2014-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202264 91177308-0d34-0410-b5e6-96231b3b80d8
* AArch64: simplify tbl/tbx polymorphismTim Northover2014-02-26
| | | | | | | | | The table argument is always 128-bit (and interpreted as <16 x i8>) so the extra specifier for it is just clutter. No user-visible behaviour change, so no tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202258 91177308-0d34-0410-b5e6-96231b3b80d8
* Add two helpers to IRBuilder to flesh the interface out to N-widthChandler Carruth2014-02-26
| | | | | | integers. Complements the interfaces it is wrapping. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202251 91177308-0d34-0410-b5e6-96231b3b80d8
* Use StringRef in raw_fd_ostream constructorBen Langmuir2014-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202225 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete two declared overloads of CallInst::CallInst that are never defined ↵Nick Lewycky2014-02-26
| | | | | | or used. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202218 91177308-0d34-0410-b5e6-96231b3b80d8
* Constify the Optnone checks in IR passes.Paul Robinson2014-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202213 91177308-0d34-0410-b5e6-96231b3b80d8
* Add DIUnspecifiedParameter, so we can pretty-print it.Adrian Prantl2014-02-25
| | | | | | This will be used for testcases in CFE. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202207 91177308-0d34-0410-b5e6-96231b3b80d8
* fix crash in SmallDenseMap copy constructorDuncan P. N. Exon Smith2014-02-25
| | | | | | | | | Prevent a crash in the SmallDenseMap copy constructor whenever the other map is not in small mode. <rdar://problem/14292693> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202206 91177308-0d34-0410-b5e6-96231b3b80d8
* Use DataLayout from the module when easily available.Rafael Espindola2014-02-25
| | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202204 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix resetting the DataLayout in a Module.Rafael Espindola2014-02-25
| | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202198 91177308-0d34-0410-b5e6-96231b3b80d8
* Store a DataLayout in Module.Rafael Espindola2014-02-25
| | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202190 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug info: Support variadic functions.Adrian Prantl2014-02-25
| | | | | | | | | | | | | | Variadic functions have an unspecified parameter tag after the last argument. In IR this is represented as an unspecified parameter in the subroutine type. Paired commit with CFE r202185. rdar://problem/13690847 This re-applies r202184 + a bugfix in DwarfDebug's argument handling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202188 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Debug info: Support variadic functions."Adrian Prantl2014-02-25
| | | | | | This reverts commit r202184 because of buildbot breakage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202187 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug info: Support variadic functions.Adrian Prantl2014-02-25
| | | | | | | | | | | | Variadic functions have an unspecified parameter tag after the last argument. In IR this is represented as an unspecified parameter in the subroutine type. Paired commit with CFE. rdar://problem/13690847 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202184 91177308-0d34-0410-b5e6-96231b3b80d8
* [XCore] Add intrinsic for CLRPT (clear port time) instruction.Richard Osborne2014-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202172 91177308-0d34-0410-b5e6-96231b3b80d8
* [XCore] Add intrinsic for EDU (event disable unconditional) instruction.Richard Osborne2014-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202171 91177308-0d34-0410-b5e6-96231b3b80d8
* Make DataLayout a plain object, not a pass.Rafael Espindola2014-02-25
| | | | | | | Instead, have a DataLayoutPass that holds one. This will allow parts of LLVM don't don't handle passes to also use DataLayout. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202168 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some convenience accessors for the underlying Use of an operand.Chandler Carruth2014-02-25
| | | | | | | | | These complement many of the existing accessors and make it significantly easier to write code which needs to poke at the underlying Use without hard coding the operand number at which it resides for a particular instruction. No functionality changed of course. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202102 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-dwarfdump: Support for debug_line.dwo section for file names for type ↵David Blaikie2014-02-24
| | | | | | units under fission. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202091 91177308-0d34-0410-b5e6-96231b3b80d8
* Make some DataLayout pointers const.Rafael Espindola2014-02-24
| | | | | | No functionality change. Just reduces the noise of an upcoming patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202087 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing constMatt Arsenault2014-02-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202074 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace the F_Binary flag with a F_Text one.Rafael Espindola2014-02-24
| | | | | | | | | 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 :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202052 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't make F_None the default.Rafael Espindola2014-02-24
| | | | | | This will make it easier to switch the default to being binary files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202042 91177308-0d34-0410-b5e6-96231b3b80d8
* Add AArch64 big endian Target (aarch64_be)Christian Pirker2014-02-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202024 91177308-0d34-0410-b5e6-96231b3b80d8
* Share a createUniqueEntity implementation between unix and windows.Rafael Espindola2014-02-24
| | | | | | | The only extra bit of functionality that had to be exposed for this be be implemented in Path.cpp is opening a file in rw mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202005 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete dead code.Rafael Espindola2014-02-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202001 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify remove, create_directory and create_directories.Rafael Espindola2014-02-23
| | | | | | | | | | | | | | | Before this patch they would take an boolean argument to say if the path already existed. This was redundant with the returned error_code which is able to represent that. This allowed for callers to incorrectly check only the existed flag instead of first checking the error code. Instead, pass in a boolean flag to say if the previous (non-)existence should be an error or not. Callers of the of the old simple versions are not affected. They still ignore the previous (non-)existence as they did before. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201979 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't inline get[S|U]LEB128Size() until they are proved to be hot.Logan Chien2014-02-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201939 91177308-0d34-0410-b5e6-96231b3b80d8
* Move get[S|U]LEB128Size() to LEB128.h.Logan Chien2014-02-22
| | | | | | | | | | | This commit moves getSLEB128Size() and getULEB128Size() from MCAsmInfo to LEB128.h and removes some copy-and-paste code. Besides, this commit also adds some unit tests for the LEB128 functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201937 91177308-0d34-0410-b5e6-96231b3b80d8
* Add const to some member functions of SuccIterator.Logan Chien2014-02-22
| | | | | | | | | The operator+() and operator-() do not change the member variables of SuccIterator. This CL will qualify the *this* pointer with const. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201933 91177308-0d34-0410-b5e6-96231b3b80d8
* [CodeGenPrepare] Move CodeGenPrepare into lib/CodeGen.Quentin Colombet2014-02-22
| | | | | | | | | | | | | CodeGenPrepare uses extensively TargetLowering which is part of libLLVMCodeGen. This is a layer violation which would introduce eventually a dependence on CodeGen in ScalarOpts. Move CodeGenPrepare into libLLVMCodeGen to avoid that. Follow-up of <rdar://problem/15519855> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201912 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a SymbolicFile interface between Binary and ObjectFile.Rafael Espindola2014-02-21
| | | | | | | | | | | This interface allows IRObjectFile to be implemented without having dummy methods for all section and segment related methods. Both llvm-ar and llvm-nm are changed to use it. Unfortunately the mangler is still not plugged in since it requires some refactoring to make a Module hold a DataLayout. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201881 91177308-0d34-0410-b5e6-96231b3b80d8
* Make DisableIntegratedAS a TargetOption.Rafael Espindola2014-02-21
| | | | | | | This replaces the old NoIntegratedAssembler with at TargetOption. This is more flexible and will be used to forward clang's -no-integrated-as option. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201836 91177308-0d34-0410-b5e6-96231b3b80d8
* Stackmaps are used for OSR exits, which is a custom kind of unwinding. ↵Filip Pizlo2014-02-20
| | | | | | | | | | | | | | | | | | | Hence, they should not be marked nounwind. Marking them nounwind caused crashes in the WebKit FTL JIT, because if we enable sufficient optimizations, LLVM starts eliding compact_unwind sections (or any unwind data for that matter), making deoptimization via stackmaps impossible. This changes the stackmap intrinsic to be may-throw, adds a test for exactly the sympton that WebKit saw, and fixes TableGen to handle un-attributed intrinsics. Thanks to atrick and philipreames for reviewing this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201826 91177308-0d34-0410-b5e6-96231b3b80d8
* Set the SuppressWarnings option on tool level and propagate to the library.Eli Bendersky2014-02-20
| | | | | | | | | | | | | | | The SuppressWarnings flag, unfortunately, isn't very useful for custom tools that want to use the LLVM module linker. So I'm changing it to a parameter of the Linker, and the flag itself moves to the llvm-link tool. For the time being as SuppressWarnings is pretty much the only "option" it seems reasonable to propagate it to Linker objects. If we end up with more options in the future, some sort of "struct collecting options" may be a better idea. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201819 91177308-0d34-0410-b5e6-96231b3b80d8
* Object/COFF: Fix possible truncation bug.Rui Ueyama2014-02-20
| | | | | | | VA can be 64 bit, as the image base can be larger than 4GB, so we need to handle 64 bit VAs properly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201803 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] intrinsics_gen: Use add_public_tablegen_target().NAKAMURA Takumi2014-02-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201786 91177308-0d34-0410-b5e6-96231b3b80d8
* Unconditionally include msan_interface.h when building with MSan.Evgeniy Stepanov2014-02-20
| | | | | | | | Any version of Clang that does not provide this header is way too old to bootstrap with MSan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201776 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-objdump/COFF: Print SEH table addresses.Rui Ueyama2014-02-20
| | | | | | | SEH table addresses are VA in COFF file. In this patch we convert VA to RVA before printing it, because dumpbin prints them as RVAs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201760 91177308-0d34-0410-b5e6-96231b3b80d8
* Object/COFF: Fix padding between CSDVersion and EditList.Rui Ueyama2014-02-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201756 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid collisions with Objective-C++ keywordsTobias Grosser2014-02-19
| | | | | | | | | Change parameter names exposed in headers to avoid collisions with Objective-C++ keywords. Contributed-by: Graham Lee <graham@iamleeg.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201727 91177308-0d34-0410-b5e6-96231b3b80d8
* move getNameWithPrefix and getSymbol to TargetMachine.Rafael Espindola2014-02-19
| | | | | | | | | | TargetLoweringBase is implemented in CodeGen, so before this patch we had a dependency fom Target to CodeGen. This would show up as a link failure of llvm-stress when building with -DBUILD_SHARED_LIBS=ON. This fixes pr18900. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201711 91177308-0d34-0410-b5e6-96231b3b80d8
* Add back r201608, r201622, r201624 and r201625Rafael Espindola2014-02-19
| | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201700 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor TargetOptions initialization into a single place.Eli Bendersky2014-02-19
| | | | | | | | | | | | | | The same code (~20 lines) for initializing a TargetOptions object from CodeGen cmdline flags is duplicated 4 times in 4 different tools. This patch moves it into a utility function. Since the CodeGen/CommandFlags.h file defines cl::opt flags in a header, it's a bit of a touchy situation because we should only link them into tools. So this patch puts the init function in the header. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201699 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable override and final C++ keyword in gcc 4.6.Logan Chien2014-02-19
| | | | | | | | | | According to http://gcc.gnu.org/projects/cxx0x.html, override and final keyword was added in gcc 4.7. Thus, we should not use these keywords in gcc 4.6 even when __GXX_EXPERIMENTAL_CXX0X__ is available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201679 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r201622 and r201608.Daniel Jasper2014-02-19
| | | | | | | This causes the LLVMgold plugin to segfault. More information on the replies to r201608. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201669 91177308-0d34-0410-b5e6-96231b3b80d8