summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
* Merge branch 'master' into embtk-support-masterembtk-support-masterAbdoulaye Walsimou Gaye2013-05-15
|\
| * Cleanup relocation sorting for ELF.Rafael Espindola2013-05-15
| | | | | | | | | | | | | | | | | | | | We want the order to be deterministic on all platforms. NAKAMURA Takumi fixed that in r181864. This patch is just two small cleanups: * Move the function to the cpp file. It is only passed to array_pod_sort. * Remove the ppc implementation which is now redundant git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181910 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add missing #includeDouglas Gregor2013-05-15
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181900 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove MCELFObjectTargetWriter::adjustFixupOffset hackUlrich Weigand2013-05-15
| | | | | | | | | | | | | | | | | | | | Now that PowerPC no longer uses adjustFixupOffset, and no other back-end (ever?) did, we can remove the infrastructure itself (incidentally addressing a FIXME to that effect). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181895 91177308-0d34-0410-b5e6-96231b3b80d8
| * Use only explicit bool conversion operatorsDavid Blaikie2013-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BitVector/SmallBitVector::reference::operator bool remain implicit since they model more exactly a bool, rather than something else that can be boolean tested. The most common (non-buggy) case are where such objects are used as return expressions in bool-returning functions or as boolean function arguments. In those cases I've used (& added if necessary) a named function to provide the equivalent (or sometimes negative, depending on convenient wording) test. One behavior change (YAMLParser) was made, though no test case is included as I'm not sure how to reach that code path. Essentially any comparison of llvm::yaml::document_iterators would be invalid if neither iterator was at the end. This helped uncover a couple of bugs in Clang - test cases provided for those in a separate commit along with similar changes to `operator bool` instances in Clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181868 91177308-0d34-0410-b5e6-96231b3b80d8
| * ELFRelocationEntry::operator<(): Try to stabilize the order. r_offset was ↵NAKAMURA Takumi2013-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | insufficient to sort Relocs. It should fix llvm/test/CodeGen/ARM/ehabi-mc-compact-pr*.ll on some hosts. RELOCATION RECORDS FOR [.ARM.exidx]: 0 R_ARM_PREL31 .text 0 R_ARM_NONE __aeabi_unwind_cpp_pr0 FIXME: I am not sure of the directions of extra comparators, in Type and Index. For now, they are different from the direction in r_offset. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181864 91177308-0d34-0410-b5e6-96231b3b80d8
| * SectionMemoryManager shouldn't be a JITMemoryManager. Previously, the Filip Pizlo2013-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EngineBuilder interface required a JITMemoryManager even if it was being used to construct an MCJIT. But the MCJIT actually wants a RTDyldMemoryManager. Consequently, the SectionMemoryManager, which is meant for MCJIT, derived from the JITMemoryManager and then stubbed out a bunch of JITMemoryManager methods that weren't relevant to the MCJIT. This patch fixes the situation: it teaches the EngineBuilder that RTDyldMemoryManager is a supertype of JITMemoryManager, and that it's appropriate to pass a RTDyldMemoryManager instead of a JITMemoryManager if we're using the MCJIT. This allows us to remove the stub methods from SectionMemoryManager, and make SectionMemoryManager a direct subtype of RTDyldMemoryManager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181820 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove the MachineMove class.Rafael Espindola2013-05-13
| | | | | | | | | | | | | | | | | | | | | | | | It was just a less powerful and more confusing version of MCCFIInstruction. A side effect is that, since MCCFIInstruction uses dwarf register numbers, calls to getDwarfRegNum are pushed out, which should allow further simplifications. I left the MachineModuleInfo::addFrameMove interface unchanged since this patch was already fairly big. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181680 91177308-0d34-0410-b5e6-96231b3b80d8
* | Merge branch 'master' into embtk-support-masterAbdoulaye Walsimou Gaye2013-05-12
|\|
| * Correct parameter name in doc comment to match declaration.David Blaikie2013-05-11
| | | | | | | | | | | | (review feedback on r181632 from Dmitri) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181664 91177308-0d34-0410-b5e6-96231b3b80d8
| * Change getFrameMoves to return a const reference.Rafael Espindola2013-05-11
| | | | | | | | | | | | | | To add a frame now there is a dedicated addFrameMove which also takes care of constructing the move itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181657 91177308-0d34-0410-b5e6-96231b3b80d8
| * PR14492: Debug Info: Support for values of non-integer non-type template ↵David Blaikie2013-05-10
| | | | | | | | | | | | | | | | | | | | parameters. This is only tested for global variables at the moment (& includes tests for the unnamed parameter case, since apparently this entire function was completely untested previously) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181632 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove unused argument.Rafael Espindola2013-05-10
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181618 91177308-0d34-0410-b5e6-96231b3b80d8
* | Merge branch 'master' into embtk-support-masterAbdoulaye Walsimou Gaye2013-05-10
|\|
| * Documentation warning: \param, not \parmDmitri Gribenko2013-05-09
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181549 91177308-0d34-0410-b5e6-96231b3b80d8
| * Rewrite assert to avoid warning when the record element type is byte-sized.Jordan Rose2013-05-09
| | | | | | | | | | | | | | | | | | | | BitstreamWriter asserts that when blob data is written from the record element vector, each element fits in a byte. However, if the record elements are specified as a SmallVector of 'char', this causes a warning from -Wtautological-constant-out-of-range-compare. Fix this by using llvm::isUInt<8> instead of a plain comparison against 256. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181545 91177308-0d34-0410-b5e6-96231b3b80d8
| * Avoid runtime type checks.Rafael Espindola2013-05-09
| | | | | | | | | | | | | | In most cases the relocation type implies the object word size and endianness. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181515 91177308-0d34-0410-b5e6-96231b3b80d8
| * Introduce convenience typedefs for the 4 ELF object types.Rafael Espindola2013-05-09
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181509 91177308-0d34-0410-b5e6-96231b3b80d8
| * Change getRelocationAdditionalInfo to be ELF only.Rafael Espindola2013-05-09
| | | | | | | | | | | | | | It was only implemented for ELF where it collected the Addend, so this patch also renames it to getRelocationAddend. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181502 91177308-0d34-0410-b5e6-96231b3b80d8
| * Use correct parameter names in comments [-Wdocumentation]Dmitri Gribenko2013-05-08
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181478 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add DebugIR pass -- emits IR file and replace source lines with IR lines in MDDaniel Malea2013-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | - requires existing debug information to be present - fixes up file name and line number information in metadata - emits a "<orig_filename>-debug.ll" succinct IR file (without !dbg metadata or debug intrinsics) that can be read by a debugger - initialize pass in opt tool to enable the "-debug-ir" flag - lit tests to follow git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181467 91177308-0d34-0410-b5e6-96231b3b80d8
| * Pull up AssemblyWriter interface into header to allow subclassingDaniel Malea2013-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | - made all functions virtual so that subclasses can specialize them - add printInstructionLine so that subclasses can choose whether or not to print the newline character (without having to implement printBasicBlock() - added a second constructor to AssemblyWriter that does not require a SlotTracker, as required in order to keep the SlotTracker helper class outside AsmWriter.h and buried in the implementation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181466 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add line tracking support to FormattedStream Daniel Malea2013-05-08
| | | | | | | | | | | | | | | | | | | | - previously formatted_raw_ostream tracked columns, now it tracks lines too - used by (upcoming) DebugIR pass to know the line number to connect to each IR instruction git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181463 91177308-0d34-0410-b5e6-96231b3b80d8
| * [PowerPC] Add some missing PPC64 relocsUlrich Weigand2013-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All R_PPC_... relocs should also be present (using the same number) under the corresponding R_PPC64_... name. The latter were missing for a couple of cases, which this patch adds. This is not a big problem when emitting the reloc, because we can just use the R_PPC_... define instead. But it is a problem when *dumping* relocations e.g. using llvm-readobj, because this will expect only R_PPC64_... values when inspecting a ppc64 ELF file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181451 91177308-0d34-0410-b5e6-96231b3b80d8
| * Rename DIImportedModule to DIImportedEntity and allow imported declarationsDavid Blaikie2013-05-07
| | | | | | | | | | | | | | | | | | DIBuilder::createImportedDeclaration isn't fully plumbed through (note, lacking in AsmPrinter/DwarfDebug support) but this seemed like a sufficiently useful division of code to make the subsequent patch(es) easier to follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181364 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove exception handling support from the old JIT.Rafael Espindola2013-05-07
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181354 91177308-0d34-0410-b5e6-96231b3b80d8
| * Implemented public interface for modifying registered (not positional or ↵Andrew Trick2013-05-06
| | | | | | | | | | | | | | | | sink options) command line options at runtime. Patch by Dan Liew! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181254 91177308-0d34-0410-b5e6-96231b3b80d8
| * Support command line option categories.Andrew Trick2013-05-06
| | | | | | | | | | | | Patch by Dan Liew! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181253 91177308-0d34-0410-b5e6-96231b3b80d8
| * Provide InstCombines for the following 3 cases:Jean-Luc Duprat2013-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A * (1 - (uitofp i1 C)) -> select C, 0, A B * (uitofp i1 C) -> select C, B, 0 select C, 0, A + select C, B, 0 -> select C, B, A These come up in code that has been hand-optimized from a select to a linear blend, on platforms where that may have mattered. We want to undo such changes with the following transform: A*(1 - uitofp i1 C) + B*(uitofp i1 C) -> select C, A, B git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181216 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix formatting. Patch by o11c.Duncan Sands2013-05-06
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181189 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix const merging when an alias of a const is llvm.used.Rafael Espindola2013-05-06
| | | | | | | | | | | | | | We used to disable constant merging not only if a constant is llvm.used, but also if an alias of a constant is llvm.used. This change fixes that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181175 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add EH support to the MCJIT.Rafael Espindola2013-05-05
| | | | | | | | | | | | | | | | | | This gets exception handling working on ELF and Macho (x86-64 at least). Other than the EH frame registration, this patch also implements support for GOT relocations which are used to locate the personality function on MachO. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181167 91177308-0d34-0410-b5e6-96231b3b80d8
| * For ARM backend, fixed "byval" attribute support.Stepan Dyatkovskiy2013-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now even the small structures could be passed within byval (small enough to be stored in GPRs). In regression tests next function prototypes are checked: PR15293: %artz = type { i32 } define void @foo(%artz* byval %s) define void @foo2(%artz* byval %s, i32 %p, %artz* byval %s2) foo: "s" stored in R0 foo2: "s" stored in R0, "s2" stored in R2. Next AAPCS rules are checked: 5.5 Parameters Passing, C.4 and C.5, "ParamSize" is parameter size in 32bit words: -- NSAA != 0, NCRN < R4 and NCRN+ParamSize > R4. Parameter should be sent to the stack; NCRN := R4. -- NSAA != 0, and NCRN < R4, NCRN+ParamSize < R4. Parameter stored in GPRs; NCRN += ParamSize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181148 91177308-0d34-0410-b5e6-96231b3b80d8
| * PatternMatch: Fix documentation - 'function' not 'attribute'Arnold Schwaighofer2013-05-05
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181146 91177308-0d34-0410-b5e6-96231b3b80d8
| * PatternMatch: Matcher for (un)ordered floating point min/maxArnold Schwaighofer2013-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for matching 'ordered' and 'unordered' floating point min/max constructs. In LLVM we can express min/max functions as a combination of compare and select. We have support for matching such constructs for integers but not for floating point. In floating point math there is no total order because of the presence of 'NaN'. Therefore, we have to be careful to preserve the original fcmp semantics when interpreting floating point compare select combinations as a minimum or maximum function. The resulting 'ordered/unordered' floating point maximum function has to select the same value as the select/fcmp combination it is based on. ordered_max(x,y) = max(x,y) iff x and y are not NaN, y otherwise unordered_max(x,y) = max(x,y) iff x and y are not NaN, x otherwise ordered_min(x,y) = min(x,y) iff x and y are not NaN, y otherwise unordered_min(x,y) = min(x,y) iff x and y are not NaN, x otherwise This matches the behavior of the underlying select(fcmp(olt/ult/.., L, R), L, R) construct. Any code using this predicate has to preserve this semantics. A follow-up patch will use this to implement floating point min/max reductions in the vectorizer. radar://13723044 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181143 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add ArrayRef constructor from None, and do the cleanups that this ↵Dmitri Gribenko2013-05-05
| | | | | | | | | | | | | | | | | | constructor enables Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181138 91177308-0d34-0410-b5e6-96231b3b80d8
| * Allow host triple to be correctly overridden in CMake buildsTim Northover2013-05-04
| | | | | | | | | | | | | | | | | | | | | | The intended semantics mirror autoconf, where the user is able to specify a host triple, but if it's left to the build system then "config.guess" is invoked for the default. This also renames the LLVM_HOSTTRIPLE define to LLVM_HOST_TRIPLE to fit in with the style of the surrounding defines. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181112 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix a performance bug in the Linker.Rafael Espindola2013-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | Now that we hava a convinient place to keep it, remeber the set of identified structs as we merge modules. This speeds up the linking of all the bitcode files in clang with the gold plugin and -plugin-opt=emit-llvm (i.e., link only, no codegen) from 5:25 minutes to 13.6 seconds! Patch by Xiaofei Wan! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181104 91177308-0d34-0410-b5e6-96231b3b80d8
| * Last batch of cleanups to Linker.h.Rafael Espindola2013-05-04
| | | | | | | | | | | | | | | | Update comments, fix * placement, fix method names that are not used in clang, add a linkInModule that takes a Mode and put it in Linker.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181099 91177308-0d34-0410-b5e6-96231b3b80d8
| * Don't construct or delete a module on the Linker.Rafael Espindola2013-05-04
| | | | | | | | | | | | | | The linker is now responsible only for actually linking the modules, it is up to the clients to create and destroy them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181098 91177308-0d34-0410-b5e6-96231b3b80d8
| * Don't store the context in the Linker.Rafael Espindola2013-05-04
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181097 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove unused members and constructor arguments.Rafael Espindola2013-05-04
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181096 91177308-0d34-0410-b5e6-96231b3b80d8
| * Delete dead code from the linker.Rafael Espindola2013-05-04
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181094 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert r181009.Amara Emerson2013-05-03
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181079 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add support for reading ARM ELF build attributes.Amara Emerson2013-05-03
| | | | | | | | | | | | | | | | | | | | | | | | Build attribute sections can now be read if they exist via ELFObjectFile, and the llvm-readobj tool has been extended with an option to dump this information if requested. Regression tests are also included which exercise these features. Also update the docs with a fixed ARM ABI link and a new link to the Addenda which provides the build attributes specification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181009 91177308-0d34-0410-b5e6-96231b3b80d8
| * [SystemZ] Add ELF relocation supportRichard Sandiford2013-05-03
| | | | | | | | | | | | | | | | Another step towards reinstating the SystemZ backend. Tests will be included in the main backend patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181008 91177308-0d34-0410-b5e6-96231b3b80d8
| * [SystemZ] Add llvm::Triple::systemzRichard Sandiford2013-05-03
| | | | | | | | | | | | | | | | First step towards reinstating the SystemZ backend. Tests will be included in the main backend patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181007 91177308-0d34-0410-b5e6-96231b3b80d8
* | [Embtk]: Give ability to specify default target ABI at configure timeAbdoulaye Walsimou Gaye2013-05-07
| | | | | | | | Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
* | [Embtk] Give ability to specify default linker hash-style at configure timeAbdoulaye Walsimou Gaye2013-05-05
| | | | | | | | Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
* | [Embtk] give ability to specify default FPU to use at configure timeAbdoulaye Walsimou Gaye2013-05-05
| | | | | | | | Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>