summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
...
* Represent symbols with a SymbolIndex,SectionIndex pair.Rafael Espindola2013-06-05
| | | | | | | | | | | With this patch we use the SectionIndex directly, instead of counting the number of symbol tables. This saves a DenseMap lookup every time we want to find which symbol a relocation refers to. Also simplify based on the fact that there is at most one SHT_SYMTAB and one SHT_DYNSYM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183326 91177308-0d34-0410-b5e6-96231b3b80d8
* The GNU/HURD is also using the libc. Therefor, endian.h should be included, ↵Sylvestre Ledru2013-06-05
| | | | | | not machine/endian.h. See full build log https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-3.3&arch=hurd-i386&ver=1%3A3.3~%2Brc3-1~exp1&stamp=1370358869 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183303 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't print default values for NumberOfAuxSymbols and AuxiliaryData.Rafael Espindola2013-06-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183293 91177308-0d34-0410-b5e6-96231b3b80d8
* Move BinaryRef to a new include/llvm/Object/YAML.h file.Rafael Espindola2013-06-05
| | | | | | It will be used for ELF dumping too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183287 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle relocations that don't point to symbols.Rafael Espindola2013-06-05
| | | | | | | | In ELF (as in MachO), not all relocations point to symbols. Represent this properly by using a symbol_iterator instead of a SymbolRef. Update llvm-readobj ELF's dumper to handle relocatios without symbols. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183284 91177308-0d34-0410-b5e6-96231b3b80d8
* IEEE-754R 5.7.2 General Operations is* operations (except for isCanonical).Michael Gottesman2013-06-04
| | | | | | | | | | | | | | | Specifically the following work was done: 1. If the operation was not implemented, I implemented it. 2. If the operation was already implemented, I just moved its location in the APFloat header into the IEEE-754R 5.7.2 section. If the name was incorrect, I put in a comment giving the true IEEE-754R name. Also unittests have been added for all of the functions which did not already have a unittest. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183179 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce needsCleanup() for APFloat and APInt.Manuel Klimek2013-06-03
| | | | | | | | | This is needed in clang so one can check if the object needs the destructor called after its memory was freed. This is useful when creating many APInt/APFloat objects with placement new, where the overhead of tracking the pointers for cleanup is significant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183100 91177308-0d34-0410-b5e6-96231b3b80d8
* [Object/COFF] Add dos_header, pe32{,plus}_header and data_directory.Rui Ueyama2013-06-02
| | | | | | | | | | Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D905 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183087 91177308-0d34-0410-b5e6-96231b3b80d8
* Whitespace.Jim Grosbach2013-06-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183086 91177308-0d34-0410-b5e6-96231b3b80d8
* Move getRealLinkageName to a common place and remove all the duplicates of it.Benjamin Kramer2013-06-01
| | | | | | Also simplify code a bit while there. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183076 91177308-0d34-0410-b5e6-96231b3b80d8
* DenseMap: Move the key into place when we use the move version of operator[].Benjamin Kramer2013-06-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183074 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed a comment above an include which is unnecessary and added a missing ↵Michael Gottesman2013-06-01
| | | | | | closing @} for a doxygen comment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183065 91177308-0d34-0410-b5e6-96231b3b80d8
* Added method comments for getZero,getInf.Michael Gottesman2013-06-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183064 91177308-0d34-0410-b5e6-96231b3b80d8
* Updated APFloat's comments to fit the LLVM style guide.Michael Gottesman2013-06-01
| | | | | | Also added a few more method comments and performed some copy editing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183063 91177308-0d34-0410-b5e6-96231b3b80d8
* Make SubRegIndex size mandatory, following r183020.Ahmed Bougacha2013-05-31
| | | | | | | | This also makes TableGen able to compute sizes/offsets of synthesized indices representing tuples. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183061 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for adding the contents of a StringRef to the MD5 hash.Eric Christopher2013-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183054 91177308-0d34-0410-b5e6-96231b3b80d8
* Move "unsigned char" -> "uint8_t".Eric Christopher2013-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183051 91177308-0d34-0410-b5e6-96231b3b80d8
* Loop Strength Reduce: Scaling factor cost.Quentin Colombet2013-05-31
| | | | | | | | | | | | | Account for the cost of scaling factor in Loop Strength Reduce when rating the formulae. This uses a target hook. The default implementation of the hook is: if the addressing mode is legal, the scaling factor is free. <rdar://problem/13806271> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183045 91177308-0d34-0410-b5e6-96231b3b80d8
* Use just a ArrayRef<uint8_t> to store both hex string and binary data.Rafael Espindola2013-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183043 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename COFFYaml.h to COFFYAML.h for consistency.Rafael Espindola2013-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183042 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove union to fix build in c++03.Rafael Espindola2013-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183041 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't allocate temporary string for section data.Rafael Espindola2013-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183040 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a way to define the bit range covered by a SubRegIndex.Ahmed Bougacha2013-05-31
| | | | | | | | | | | | | | | NOTE: If this broke your out-of-tree backend, in *RegisterInfo.td, change the instances of SubRegIndex that have a comps template arg to use the ComposedSubRegIndex class instead. In TableGen land, this adds Size and Offset attributes to SubRegIndex, and the ComposedSubRegIndex class, for which the Size and Offset are computed by TableGen. This also adds an accessor in MCRegisterInfo, and Size/Offsets for the X86 and ARM subreg indices. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183020 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix ScalarEvolution::ComputeExitLimitFromCond for 'or' conditions.Andrew Trick2013-05-31
| | | | | | | | | | | | | | | | Fixes PR16130 - clang produces incorrect code with loop/expression at -O2. This is a 2+ year old bug that's now holding up the release. It's a case where we knowingly made aggressive assumptions about undefined behavior. These assumptions are wrong when SCEV is computing a subexpression that does not directly control the branch. With this fix, we avoid making assumptions in those cases but still optimize the common case. SCEV's trip count computation for exits controlled by 'or' expressions is now analagous to the trip count computation for loops with multiple exits. I had already fixed the multiple exit case to be conservative. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182989 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix wrong comment. Null is not acceptable.Matt Arsenault2013-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182979 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a couple of typos and 80-col.Eric Christopher2013-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182954 91177308-0d34-0410-b5e6-96231b3b80d8
* MCObjectSymbolizer: Switch from IntervalMap to sorted vector, following r182625.Ahmed Bougacha2013-05-30
| | | | | | | | This removes the need for the missing SectionRef operator< workaround, and fixes an IntervalMap assert about alignment on MSVC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182949 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement IEEE-754R 2008 nextUp/nextDown functions in the guise of the ↵Michael Gottesman2013-05-30
| | | | | | | | function APFloat::next(bool nextDown). rdar://13852078 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182945 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix warning on varialbe unused in opt builds.Daniel Jasper2013-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182914 91177308-0d34-0410-b5e6-96231b3b80d8
* Change how we iterate over relocations on ELF.Rafael Espindola2013-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | For COFF and MachO, sections semantically have relocations that apply to them. That is not the case on ELF. In relocatable objects (.o), a section with relocations in ELF has offsets to another section where the relocations should be applied. In dynamic objects and executables, relocations don't have an offset, they have a virtual address. The section sh_info may or may not point to another section, but that is not actually used for resolving the relocations. This patch exposes that in the ObjectFile API. It has the following advantages: * Most (all?) clients can handle this more efficiently. They will normally walk all relocations, so doing an effort to iterate in a particular order doesn't save time. * llvm-readobj now prints relocations in the same way the native readelf does. * probably most important, relocations that don't point to any section are now visible. This is the case of relocations in the rela.dyn section. See the updated relocation-executable.test for example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182908 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead return.Rafael Espindola2013-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182898 91177308-0d34-0410-b5e6-96231b3b80d8
* Order CALLSEQ_START and CALLSEQ_END nodes.Andrew Trick2013-05-29
| | | | | | | | | | | | Fixes PR16146: gdb.base__call-ar-st.exp fails after pre-RA-sched=source fixes. Patch by Xiaoyi Guo! This also fixes an unsupported dbg.value test case. Codegen was previously incorrect but the test was passing by luck. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182885 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't reach into the middle of TargetMachine and cache one of its ivars.Bill Wendling2013-05-29
| | | | | | | Not only does this break encapsulation, it's gross. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182876 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify logic by using the appropriate functions.Adrian Prantl2013-05-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182869 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: Reorder accessor to match field order.David Blaikie2013-05-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182816 91177308-0d34-0410-b5e6-96231b3b80d8
* [Mips] Add Mips specific dynamic table entry tags.Simon Atanasyan2013-05-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182803 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for llvm.vectorizer metadataPaul Redmond2013-05-28
| | | | | | | | | | | | | | | | | | | | - llvm.loop.parallel metadata has been renamed to llvm.loop to be more generic by making the root of additional loop metadata. - Loop::isAnnotatedParallel now looks for llvm.loop and associated llvm.mem.parallel_loop_access - document llvm.loop and update llvm.mem.parallel_loop_access - add support for llvm.vectorizer.width and llvm.vectorizer.unroll - document llvm.vectorizer.* metadata - add utility class LoopVectorizerHints for getting/setting loop metadata - use llvm.vectorizer.width=1 to indicate already vectorized instead of already_vectorized - update existing tests that used llvm.loop.parallel and llvm.vectorizer.already_vectorized Reviewed by: Nadav Rotem git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182802 91177308-0d34-0410-b5e6-96231b3b80d8
* [APInt] Implement tcDecrement as a counterpart to tcIncrement. This is for ↵Michael Gottesman2013-05-28
| | | | | | | | use in APFloat IEEE-754R 2008 nextUp/nextDown function. rdar://13852078 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182801 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the MCRegAliasIterator tables and compute the aliases dynamically.Chad Rosier2013-05-28
| | | | | | | | | | | | | | | | | | | | | The size reduction in the RegDiffLists are rather dramatic. Here are a few size differences for MCTargetDesc.o files (before and after) in bytes: R600 - 36160B - 11184B - 69% reduction ARM - 28480B - 8368B - 71% reduction Mips - 816B - 576B - 29% reduction One side effect of dynamically computing the aliases is that the iterator does not guarantee that the entries are ordered or that duplicates have been removed. The documentation implies this is a safe assumption and I found no clients that requires these attributes (i.e., strict ordering and uniqueness). My local LNT tester results showed no execution-time failures or significant compile-time regressions (i.e., beyond what I would consider noise) for -O0g, -O2 and -O3 runs on x86_64 and i386 configurations. rdar://12906217 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182783 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend RemapInstruction and friends to take an optional new parameter, a ↵James Molloy2013-05-28
| | | | | | | | ValueMaterializer. Extend LinkModules to pass a ValueMaterializer to RemapInstruction and friends to lazily create Functions for lazily linked globals. This is a big win when linking small modules with large (mostly unused) library modules. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182776 91177308-0d34-0410-b5e6-96231b3b80d8
* Make BasicAliasAnalysis recognize the fact a noalias argument cannot alias ↵Michael Kuperstein2013-05-28
| | | | | | another argument, even if the other argument is not itself marked noalias. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182755 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert sqrt functions into sqrt instructions when -ffast-math is in effect.Preston Gurd2013-05-27
| | | | | | | | | | | | | | | | When -ffast-math is in effect (on Linux, at least), clang defines __FINITE_MATH_ONLY__ > 0 when including <math.h>. This causes the preprocessor to include <bits/math-finite.h>, which renames the sqrt functions. For instance, "sqrt" is renamed as "__sqrt_finite". This patch adds the 3 new names in such a way that they will be treated as equivalent to their respective original names. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182739 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable the StringMapEntry copy constructor, to make sure weChris Lattner2013-05-25
| | | | | | | | | reject things like: "for (auto Entry : SomeStringMap)". Previously this would copy the value but not the tail allocated string data (the key). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182713 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some comments to the stringify function.Eric Christopher2013-05-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182710 91177308-0d34-0410-b5e6-96231b3b80d8
* Track IR ordering of SelectionDAG nodes 3/4.Andrew Trick2013-05-25
| | | | | | | Remove the old IR ordering mechanism and switch to new one. Fix unit test failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182704 91177308-0d34-0410-b5e6-96231b3b80d8
* Track IR ordering of SelectionDAG nodes 2/4.Andrew Trick2013-05-25
| | | | | | | Change SelectionDAG::getXXXNode() interfaces as well as call sites of these functions to pass in SDLoc instead of DebugLoc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182703 91177308-0d34-0410-b5e6-96231b3b80d8
* Track IR ordering of SelectionDAG nodes 1/4.Andrew Trick2013-05-25
| | | | | | | | Use a field in the SelectionDAGNode object to track its IR ordering. This adds fields and utility classes without changing existing interfaces or functionality. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182701 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix RecyclingAllocator::PrintStats to print the underlying allocator's stats.Andrew Trick2013-05-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182700 91177308-0d34-0410-b5e6-96231b3b80d8
* ArrayRef-ize MD5 and clean up a few variable names.Eric Christopher2013-05-24
| | | | | | | Add a stringize method to make dumping a bit easier, and add a testcase exercising a few different paths. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182692 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support] Remove Count{Leading,Trailing}Zeros_{32,64}.Michael J. Spencer2013-05-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182690 91177308-0d34-0410-b5e6-96231b3b80d8