summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
* [msan] Origin tracking with history.Evgeniy Stepanov2014-03-18
| | | | | | | | | LLVM part of MSan implementation of advanced origin tracking, when we record not only creation point, but all locations where an uninitialized value was stored to memory, too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204151 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r203962 and two revisions depending on it: r204028 and r204059.Alexander Kornienko2014-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The revision I'm reverting breaks handling of transitive aliases. This blocks us and breaks sanitizer bootstrap: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/2651 (and checked locally by Alexey). This revision is the result of: svn merge -r204059:204058 -r204028:204027 -r203962:203961 . + the regression test added to test/MC/ELF/alias.s Another way to reproduce the regression with clang: $ cat q.c void a1(); void a2() __attribute__((alias("a1"))); void a3() __attribute__((alias("a2"))); void a1() {} $ ~/work/llvm-build/bin/clang-3.5-good -c q.c && mv q.o good.o && \ ~/work/llvm-build/bin/clang-3.5-bad -c q.c && mv q.o bad.o && \ objdump -t good.o bad.o good.o: file format elf64-x86-64 SYMBOL TABLE: 0000000000000000 l df *ABS* 0000000000000000 q.c 0000000000000000 l d .text 0000000000000000 .text 0000000000000000 l d .data 0000000000000000 .data 0000000000000000 l d .bss 0000000000000000 .bss 0000000000000000 l d .comment 0000000000000000 .comment 0000000000000000 l d .note.GNU-stack 0000000000000000 .note.GNU-stack 0000000000000000 l d .eh_frame 0000000000000000 .eh_frame 0000000000000000 g F .text 0000000000000006 a1 0000000000000000 g F .text 0000000000000006 a2 0000000000000000 g F .text 0000000000000006 a3 bad.o: file format elf64-x86-64 SYMBOL TABLE: 0000000000000000 l df *ABS* 0000000000000000 q.c 0000000000000000 l d .text 0000000000000000 .text 0000000000000000 l d .data 0000000000000000 .data 0000000000000000 l d .bss 0000000000000000 .bss 0000000000000000 l d .comment 0000000000000000 .comment 0000000000000000 l d .note.GNU-stack 0000000000000000 .note.GNU-stack 0000000000000000 l d .eh_frame 0000000000000000 .eh_frame 0000000000000000 g F .text 0000000000000006 a1 0000000000000000 g F .text 0000000000000006 a2 0000000000000000 g .text 0000000000000000 a3 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204137 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Change DebugInfoFinder to use range-based loopsAlon Mishne2014-03-18
| | | | | | Also changes the iterators to return actual DI type over MDNode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204130 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Change the interface of getCOFF{Section,Relocation,Symbol} to make ↵Alexey Samsonov2014-03-18
| | | | | | | | | | | | | | it work with range-based for loops. Reviewers: ruiu Reviewed By: ruiu CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3097 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204120 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch the type field in DIVariable and DIGlobalVariable over to DITypeRefs.Adrian Prantl2014-03-18
| | | | | | | | | This allows us to catch more opportunities for ODR-based type uniquing during LTO. Paired commit with CFE which updates some testcases to verify the new DIBuilder behavior. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204106 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Avoid emitting standard opcode lengths in debug_line.dwo headers ↵David Blaikie2014-03-18
| | | | | | | | | where opcodes are never used anyway Introduce a slightly tighter wrapper around the header structure that handles this use case. (MCDwarfDwoLineTable) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204101 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Move line table zero-directory-index (compilation dir) handling ↵David Blaikie2014-03-17
| | | | | | | | | | | | into MCDwarf Our handling of compilation directory in DwarfDebug was broken (incorrectly using the 'last' compilation directory (that of the last CU in the metadata list) for all function emission in any CU). By moving this handling down into MCDwarf the issue is fixed as the compilation dir is tracked correctly per line table. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204089 91177308-0d34-0410-b5e6-96231b3b80d8
* Really REALLY finish adding const to the MachineRegisterInfo iterator range ↵Owen Anderson2014-03-17
| | | | | | methods. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204074 91177308-0d34-0410-b5e6-96231b3b80d8
* Make DAGCombiner work on vector bitshifts with constant splat vectors.Matt Arsenault2014-03-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204071 91177308-0d34-0410-b5e6-96231b3b80d8
* Add one more const marker that I missed.Owen Anderson2014-03-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204070 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Use MC line table file entry uniquing for non-asm input as well.David Blaikie2014-03-17
| | | | | | | | | | | | | See r204027 for the precursor to this that applied to asm debug info. This required some non-obvious API changes to handle the case of asm output (we never go asm->asm so this didn't come up in r204027): the modification of the file/directory name by MCDwarfLineTableHeader needed to be reflected in the MCAsmStreamer caller so it could print the appropriate .file directive, so those StringRef parameters are now non-const ref (in/out) parameters rather than just const. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204069 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark MachineRegisterInfo's iterator range methods as const.Owen Anderson2014-03-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204067 91177308-0d34-0410-b5e6-96231b3b80d8
* Add iterator range definitions for the MachineRegisterInfo iterators.Owen Anderson2014-03-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204066 91177308-0d34-0410-b5e6-96231b3b80d8
* [VectorLegalizer/X86] Don't unvectorize fp_to_uint for v8f32->v8i16Adam Nemet2014-03-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than LegalizeAction::Expand, this needs LegalizeAction::Promote to get promoted to fp_to_sint v8f32->v8i32. This is a legal operation on AVX. For that to work properly, we also need to teach the legalizer about the specific promotion required here. The default vector promotion uses bitcasting to a vector type of the same total size. We want to promote the vector element type, effectively widening the operation and then truncating the result. This is analogous to the current logic of how int_to_fp is promoted. The change also factors out some code from the int_to_fp promotion code to ValueType::widenIntegerVectorElementType. This is now shared between int_to_fp and fp_to_int. There is no longer need for the custom lowering of fp_to_sint f32->v8i16 in X86. It can now go through the new target-independent fp_to_*int promotion logic. I also checked that no other target uses Promote for these ops yet, so there shouldn't be any unexpected change in behavior. Fixes <rdar://problem/16202247> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204058 91177308-0d34-0410-b5e6-96231b3b80d8
* Consistent use of the noduplicate attribute.Eli Bendersky2014-03-17
| | | | | | | | | | The "noduplicate" attribute of call instructions is sometimes queried directly and sometimes through the cannotDuplicate() predicate. This patch streamlines all queries to use the cannotDuplicate() predicate. It also adds this predicate to InvokeInst, to mirror what CallInst has. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204049 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Introduce ObjectFile::symbols() to use range-based loops.Alexey Samsonov2014-03-17
| | | | | | | | | | | | Reviewers: rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3081 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204031 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Improve reuse of file table entries in asm debug infoDavid Blaikie2014-03-17
| | | | | | | | | | | | | | | | | The previous deduping strategy was woefully inadequate - it only considered the most recent file used and avoided emitting a duplicate in that case - never considering the a/b/a scenario. It was also lacking when it came to directory paths as the previous filename would never match the current if the filename had been split into file and directory components. This change builds caching functionality into the line table at the lowest level in an optional form (a file number of 0 indicates that one should be chosen and returned) and will eventually be reused by the normal source level debugging DWARF emission. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204027 91177308-0d34-0410-b5e6-96231b3b80d8
* Deleted copy-constructor/copy-assignment broke a buildbot. Removing while ILang Hames2014-03-17
| | | | | | | investigate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204025 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename PBQP RegAllocSolver local variables to conform to LLVM coding style.Lang Hames2014-03-17
| | | | | | | | No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204022 91177308-0d34-0410-b5e6-96231b3b80d8
* Untabify.NAKAMURA Takumi2014-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204020 91177308-0d34-0410-b5e6-96231b3b80d8
* Add FIXMEs to use DIScopeRef instead of DIScope for LTO type uniqueing.Manman Ren2014-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204019 91177308-0d34-0410-b5e6-96231b3b80d8
* Make some assertions on constant expressions static.Benjamin Kramer2014-03-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204011 91177308-0d34-0410-b5e6-96231b3b80d8
* PointerIntPair: Avoid an (academic) case of undefined behavior in the ↵Benjamin Kramer2014-03-15
| | | | | | | | | | | DenseMapInfo specialization. If we use a pair with an enum type this could create values outside of the enum range. Avoid it by creating the bit pattern directly. While there turn a dynamic assert into a static one. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204010 91177308-0d34-0410-b5e6-96231b3b80d8
* Support: Make error_category's constructor publicJustin Bogner2014-03-15
| | | | | | | | Since our error_category is based on the std one, we should have the same visibility for the constructor. This also allows us to avoid using the _do_message implementation detail in our own categories. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203998 91177308-0d34-0410-b5e6-96231b3b80d8
* Object/COFF: change data type of SymbolNumber from int16 to uint16.Rui Ueyama2014-03-15
| | | | | | | | | | | | Microsoft PE/COFF Spec clearly states that the field is of signed interger type. However, in reality, it's unsigned. If cl.exe needs to create a large number of sections for COMDAT sections, it will just create more than 32768 sections. Handling large section number as negative number is not correct. I think this is a spec bug. Differential Revision: http://llvm-reviews.chandlerc.com/D3088 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203986 91177308-0d34-0410-b5e6-96231b3b80d8
* Use DiagnosticInfo facility.Diego Novillo2014-03-14
| | | | | | | | | | | | | | | | | | Summary: The sample profiler pass emits several error messages. Instead of just aborting the compiler with report_fatal_error, we can emit better messages using DiagnosticInfo. This adds a new sub-class of DiagnosticInfo to handle the sample profiler. Reviewers: chandlerc, qcolombet CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3086 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203976 91177308-0d34-0410-b5e6-96231b3b80d8
* MCDwarf: Initialize MCLineTableHeader::LabelDavid Blaikie2014-03-14
| | | | | | | | | | | | This sometimes remains null into MCLineTableHeader::Emit where we conditionally construct a label if one isn't provided for us. We need it to remain null (rather than just always constructing the label) so we can identify unused line tables... which is a bit weird and maybe we can do away with that logic one day (& on that day we can always construct the label up-front and just have compilation units query the line table for its label, etc) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203967 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly handle an ELF symbol defined with "a = b + expr".Rafael Espindola2014-03-14
| | | | | | | | | We were marking the symbol as absolute instead of computing b's offset + the expression value. This fixes pr19126. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203962 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unnecessary StringRef::str() call where an implicit conversion works ↵David Blaikie2014-03-14
| | | | | | just fine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203960 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete unused ObjectFile::{begin,end}_symbols()Alexey Samsonov2014-03-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203928 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Introduce SectionRef::relocations() to use range-based loopsAlexey Samsonov2014-03-14
| | | | | | | | | | | | Reviewers: rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3077 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203927 91177308-0d34-0410-b5e6-96231b3b80d8
* Separate out MVT in a separate header file: MachineValueType.hPatrik Hagglund2014-03-14
| | | | | | | | | | The idea behind this split of ValueTypes.h, is to make it easier to ensure that stuff after type legalization only use MVT (rather than EVT), by watching include dependencies. Reviewed By: Tim Northover git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203926 91177308-0d34-0410-b5e6-96231b3b80d8
* [Mips] Add one more MIPS relocation type constant.Simon Atanasyan2014-03-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203896 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r203883 (which was more of a bandaid) and fix the real underlyingOwen Anderson2014-03-14
| | | | | | | | | issue in that the new MachineRegisterInfo bundle iterators didn't dereference to the START of the bundle, while the old skipBundle() method did. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203890 91177308-0d34-0410-b5e6-96231b3b80d8
* static link polly into toolsSebastian Pop2014-03-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203886 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the linker_private and linker_private_weak linkages.Rafael Espindola2014-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These linkages were introduced some time ago, but it was never very clear what exactly their semantics were or what they should be used for. Some investigation found these uses: * utf-16 strings in clang. * non-unnamed_addr strings produced by the sanitizers. It turns out they were just working around a more fundamental problem. For some sections a MachO linker needs a symbol in order to split the section into atoms, and llvm had no idea that was the case. I fixed that in r201700 and it is now safe to use the private linkage. When the object ends up in a section that requires symbols, llvm will use a 'l' prefix instead of a 'L' prefix and things just work. With that, these linkages were already dead, but there was a potential future user in the objc metadata information. I am still looking at CGObjcMac.cpp, but at this point I am convinced that linker_private and linker_private_weak are not what they need. The objc uses are currently split in * Regular symbols (no '\01' prefix). LLVM already directly provides whatever semantics they need. * Uses of a private name (start with "\01L" or "\01l") and private linkage. We can drop the "\01L" and "\01l" prefixes as soon as llvm agrees with clang on L being ok or not for a given section. I have two patches in code review for this. * Uses of private name and weak linkage. The last case is the one that one could think would fit one of these linkages. That is not the case. The semantics are * the linker will merge these symbol by *name*. * the linker will hide them in the final DSO. Given that the merging is done by name, any of the private (or internal) linkages would be a bad match. They allow llvm to rename the symbols, and that is really not what we want. From the llvm point of view, these objects should really be (linkonce|weak)(_odr)?. For now, just keeping the "\01l" prefix is probably the best for these symbols. If we one day want to have a more direct support in llvm, IMHO what we should add is not a linkage, it is just a hidden_symbol attribute. It would be applicable to multiple linkages. For example, on weak it would produce the current behavior we have for objc metadata. On internal, it would be equivalent to private (and we should then remove private). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203866 91177308-0d34-0410-b5e6-96231b3b80d8
* Phase 2 of the great MachineRegisterInfo cleanup. This time, we're changingOwen Anderson2014-03-13
| | | | | | | | | | | operator* on the by-operand iterators to return a MachineOperand& rather than a MachineInstr&. At this point they almost behave like normal iterators! Again, this requires making some existing loops more verbose, but should pave the way for the big range-based for-loop cleanups in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203865 91177308-0d34-0410-b5e6-96231b3b80d8
* MCDwarf: Rename MCDwarfFileTable to MCDwarfLineTableDavid Blaikie2014-03-13
| | | | | | | This type now represents all the data for the DWARF line table: directory names, file names, and the line table proper. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203858 91177308-0d34-0410-b5e6-96231b3b80d8
* MCDwarf: Extract the DWARF line table header handling into its own typeDavid Blaikie2014-03-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203856 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a subtle issue introduced my my recent changes to MachineRegisterInfo ↵Owen Anderson2014-03-13
| | | | | | | | | | | | | | | | iterators. When initializing an iterator, we may have to step forward to find the first operand that passes the current filter set. When doing that stepping, we should always step one operand at a time, even if this is by-instr or by-bundle iterator, as we're stepping between invalid values, so the stride doesn't make sense there. Fixes a miscompilation of YASM on Win32 reported by Hans Wennborg. I have not yet figured out how to reduce it to something testcase-able, because it's sensitive to the details of how the registers get spilled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203852 91177308-0d34-0410-b5e6-96231b3b80d8
* MCDwarf: Sink file/directory creation down into MCDwarfFileTable form MCContextDavid Blaikie2014-03-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203836 91177308-0d34-0410-b5e6-96231b3b80d8
* MCDwarf: Oh, and move the directory string over to std::string as wellDavid Blaikie2014-03-13
| | | | | | (see r203831 for similar stuff) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203833 91177308-0d34-0410-b5e6-96231b3b80d8
* MCDwarf: Simplify MCDwarfFile to just use std::string instead of cunning use ↵David Blaikie2014-03-13
| | | | | | | | | | | | | of MCContext's allocator. There aren't /that/ many files, and we are already using various maps and other standard containers that don't use MCContext's allocator to store these values, so this doesn't seem to be critical and simplifies the design (I'll be moving construction out of MCContext shortly so it'd be annoying to have to pass the allocator around to allocate these things... and we'll have non-MCContext users (debug_line.dwo) shortly) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203831 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for http://llvm.org/bugs/show_bug.cgi?id=18590Ekaterina Romanova2014-03-13
| | | | | | | | | This patch fixes the bug in peephole optimization that folds a load which defines one vreg into the one and only use of that vreg. With debug info, a DBG_VALUE that referenced the vreg considered to be a use, preventing the optimization. The fix is to ignore DBG_VALUE's during the optimization, and undef a DBG_VALUE that references a vreg that gets removed. Patch by Trevor Smigiel! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203829 91177308-0d34-0410-b5e6-96231b3b80d8
* MCDwarf: Simply MCDwarfFile since it really is just a StringRef and unsigned.David Blaikie2014-03-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203827 91177308-0d34-0410-b5e6-96231b3b80d8
* Use printable names to implement directional labels.Rafael Espindola2014-03-13
| | | | | | | | | | | | | | This changes the implementation of local directional labels to use a dedicated map. With that it can then just use CreateTempSymbol, which is what the rest of MC uses. CreateTempSymbol doesn't do a great job at making sure the names are unique (or being efficient when the names are not needed), but that should probably be fixed in a followup patch. This fixes pr18928. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203826 91177308-0d34-0410-b5e6-96231b3b80d8
* MCDwarf: Refactor line table handling into a single data structureDavid Blaikie2014-03-13
| | | | | | | | | | | | | | | | | This replaces several "compile unit ID -> thing" mappings in favor of one mapping from CUID to the whole line table structure (files, directories, and lines). This is another step along the way to refactoring out reusable components of line table handling for use when generating debug_line.dwo for fission type units. Also, might be a good basis to fold some of this handling down into MCStreamers to avoid the special case of "One line table when doing asm printing, line table per CU otherwise" by building it into the different MCStreamer implementations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203821 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARM] Use symbolic register names in .cfi directives only with IAS (PR19110)Hans Wennborg2014-03-13
| | | | | | | | | | This is a follow-up to r203635. Saleem pointed out that since symbolic register names are much easier to read, it would be good if we could turn them off only when we really need to because we're using an external assembler. Differential Revision: http://llvm-reviews.chandlerc.com/D3056 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203806 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Introduce ObjectFile::sections().Alexey Samsonov2014-03-13
| | | | | | | | | | | | | | | | | | Summary: This adds ObjectFile::section_iterator_range, that allows to write range-based for-loops running over all sections of a given file. Several files from lib/ are converted to the new interface. Similar fixes should be applied to a variety of llvm-* tools. Reviewers: rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3069 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203799 91177308-0d34-0410-b5e6-96231b3b80d8
* AVX-512: masked load/store + intrinsics for them.Elena Demikhovsky2014-03-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203790 91177308-0d34-0410-b5e6-96231b3b80d8