summaryrefslogtreecommitdiffstats
path: root/llvm/include
Commit message (Collapse)AuthorAgeFilesLines
* [ELFYAML] Fix handling SHT_NOBITS sections by obj2yaml/yaml2obj toolsSimon Atanasyan2015-07-031-1/+15
| | | | | | | | | | SHT_NOBITS sections do not have content in an object file. Now the yaml2obj tool does not accept `Content` field for such sections, and the obj2yaml tool does not attempt to read the section content from a file. Restore r241350 and r241352. llvm-svn: 241377
* Delete dead code. NFC.Benjamin Kramer2015-07-031-5/+0
| | | | llvm-svn: 241367
* Return ErrorOr from getSymbolAddress.Rafael Espindola2015-07-034-16/+12
| | | | | | | It can fail trying to get the section on ELF and COFF. This makes sure the error is handled. llvm-svn: 241366
* This reverts commit r241350 and r241352.Rafael Espindola2015-07-031-15/+1
| | | | | | | | | | | r241350 broke lld tests. r241352 depends on r241350. Original messages: "[ELFYAML] Fix handling SHT_NOBITS sections by obj2yaml/yaml2obj tools" "[ELFYAML] Make the Size field for .bss section optional" llvm-svn: 241354
* Delete dead code.Rafael Espindola2015-07-031-13/+0
| | | | llvm-svn: 241353
* [ELFYAML] Fix handling SHT_NOBITS sections by obj2yaml/yaml2obj toolsSimon Atanasyan2015-07-031-1/+15
| | | | | | | | SHT_NOBITS sections do not have content in an object file. Now yaml2obj tool does not accept `Content` field for such sections, and obj2yaml tool does not attempt to read the section content from a file. llvm-svn: 241350
* Avoid warning about unused variable when building without assertions.Rafael Espindola2015-07-031-2/+2
| | | | llvm-svn: 241348
* Continue to remove the notion that ELF has dynamic and static symbols.Rafael Espindola2015-07-032-16/+37
| | | | | | | The ELFObjectFile now just reasons about a section/index pair, removing one of the users that force ELF.h to maintain the difference. llvm-svn: 241344
* DIBuilder: Now that DICompileUnit is distinct, stop using temporary nodesAdrian Prantl2015-07-022-8/+12
| | | | | | for the arrays. llvm-svn: 241308
* Use function attribute "trap-func-name" and remove TargetOptions::TrapFuncName.Akira Hatanaka2015-07-022-9/+13
| | | | | | | | | | | | | | | | | | This commit changes normal isel and fast isel to read the user-defined trap function name from function attribute "trap-func-name" attached to llvm.trap or llvm.debugtrap instead of from TargetOptions::TrapFuncName. This is needed to use clang's command line option "-ftrap-function" for LTO and enable changing the trap function name on a per-call-site basis. Out-of-tree projects currently using TargetOptions::TrapFuncName to specify the trap function name should attach attribute "trap-func-name" to the call sites of llvm.trap and llvm.debugtrap instead. rdar://problem/21225723 Differential Revision: http://reviews.llvm.org/D10832 llvm-svn: 241305
* Add functions for adding and testing string attributes to CallInst. NFC.Akira Hatanaka2015-07-021-1/+17
| | | | | | | This change is needed later when I make changes to attach string function attributes to llvm.trap and llvm.debugtrap. llvm-svn: 241304
* Return ErrorOr from SymbolRef::getName.Rafael Espindola2015-07-024-18/+9
| | | | | | | | | | | | This function can really fail since the string table offset can be out of bounds. Using ErrorOr makes sure the error is checked. Hopefully a lot of the boilerplate code in tools/* can go away once we have a diagnostic manager in Object. llvm-svn: 241297
* [Statepoints] Make operator bool() explicit.Sanjoy Das2015-07-021-1/+1
| | | | | | (Addressing post-commit review.) llvm-svn: 241288
* Remove a report_fatal_error that should be unreachable.Rafael Espindola2015-07-021-4/+1
| | | | | | If we created a relocation iterator, we have a valid relocation section. llvm-svn: 241286
* Handle .dynsym a bit more like we handle .symtab.Rafael Espindola2015-07-021-25/+25
| | | | | | | They have the same format and we find them in the same way, no reason to handle them differently. llvm-svn: 241280
* Use default member initializes. NFC.Rafael Espindola2015-07-021-13/+10
| | | | llvm-svn: 241277
* [Support] Lazy load of dbghlp.dll on WindowsLeny Kholodov2015-07-022-6/+0
| | | | | | | | | | | | | This patch changes linkage with dbghlp.dll for clang from static (at load time) to on demand (at the first use of required functions). Clang uses dbghlp.dll only in minor use-cases. First of all in case of crash and in case of plugin load. The dbghlp.dll library can be absent on system. In this case clang will fail to load. With lazy load of dbghlp.dll clang can work even if dbghlp.dll is not available. Differential Revision: http://reviews.llvm.org/D10737 llvm-svn: 241271
* Move error checking from once per relocation to once per relocation section.Rafael Espindola2015-07-021-25/+27
| | | | llvm-svn: 241269
* Expose getRel and getRela to reduce code duplication.Rafael Espindola2015-07-021-3/+3
| | | | llvm-svn: 241266
* Improve error message.Rafael Espindola2015-07-021-1/+2
| | | | | | Thanks to Sean Silva for the suggestion. llvm-svn: 241255
* [GraphWriter] Don't wait on xdg-open when not on Apple.Charlie Turner2015-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | By default, the GraphWriter code assumes that the generic file open program (`open` on Apple, `xdg-open` on other systems) can wait on the forked proces to complete. When the fork ends, the code would delete the temporary dot files created, and return. On GNU/Linux, the xdg-open program does not have a "wait for your fork to complete before dying" option. So the behaviour was that xdg-open would launch a process, quickly die itself, and then the GraphWriter code would think its OK to quickly delete all the temporary files. Once the temporary files were deleted, the dot viewers would get very upset, and often give you weird errors. This change only waits on the generic open program on Apple platforms. Elsewhere, we don't wait on the process, and hence we don't try and clean up the temporary files. llvm-svn: 241250
* [NFC] Make the Statepoint class more like CallSiteSanjoy Das2015-07-021-23/+61
| | | | | | | | | | Summary: Rename some methods to make Statepoint look more like CallSite. Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10756 llvm-svn: 241235
* [Statepoints][NFC] Constify accessors on Statepoint.Sanjoy Das2015-07-021-22/+24
| | | | | | | | Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10755 llvm-svn: 241234
* [Statepoints][NFC] Rename variables to llvm style.Sanjoy Das2015-07-021-4/+4
| | | | | | | | | | Summary: (I don't think this change needs review, this was uploaded to phabricator to provide context for later dependent changes.) Differential Revision: http://reviews.llvm.org/D10630 llvm-svn: 241233
* [Statepoints][NFC] Add Statepoint::operator bool()Sanjoy Das2015-07-021-20/+30
| | | | | | | | | | | | Summary: This allows the "if (Statepoint SP = Statepoint(I))" idiom. (I don't think this change needs review, this was uploaded to phabricator to provide context for later dependent changes.) Differential Revision: http://reviews.llvm.org/D10629 llvm-svn: 241232
* [Statepoints][NFC] Add Statepoint::getGCResult.Sanjoy Das2015-07-021-0/+11
| | | | | | | | | | | | | Summary: Introduce a simple accessor to get the gc_result hanging off of a statepoint. (I don't think this change needs review, this was uploaded to phabricator to provide context for later dependent changes.) Differential Revision: http://reviews.llvm.org/D10627 llvm-svn: 241231
* Add a routine to TargetTransformInfo that will allow targets to lookEric Christopher2015-07-022-0/+19
| | | | | | | at the attributes on a function to determine whether or not to allow inlining. llvm-svn: 241220
* Change APInt comparison with uint64_t.Pawel Bylica2015-07-011-5/+13
| | | | | | | | | | | | | | | | | Summary: This patch changes the way APInt is compared with a value of type uint64_t. Before the uint64_t value was truncated to the size of APInt before comparison. Now the comparison takes into account full 64-bit precision. Test Plan: Unit tests added. No regressions. Self-hosted check-all done as well. Reviewers: chandlerc, dexonsmith Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10655 llvm-svn: 241204
* Pack MCSymbol::Flags in to the bitfield with other members. NFC.Pete Cooper2015-07-011-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All file formats only needed 16-bits right now which is enough to fit in to the padding with other fields. This reduces the size of MCSymbol to 24-bytes on a 64-bit system. The layout is now 0 | class llvm::MCSymbol 0 | class llvm::PointerIntPair SectionOrFragmentAndHasName 0 | intptr_t Value | [sizeof=8, dsize=8, align=8 | nvsize=8, nvalign=8] 8 | unsigned int IsTemporary 8 | unsigned int IsRedefinable 8 | unsigned int IsUsed 8 | _Bool IsRegistered 8 | unsigned int IsExternal 8 | unsigned int IsPrivateExtern 8 | unsigned int Kind 9 | unsigned int IsUsedInReloc 9 | unsigned int SymbolContents 9 | unsigned int CommonAlignLog2 10 | uint32_t Flags 12 | uint32_t Index 16 | union 16 | uint64_t Offset 16 | uint64_t CommonSize 16 | const class llvm::MCExpr * Value | [sizeof=8, dsize=8, align=8 | nvsize=8, nvalign=8] | [sizeof=24, dsize=24, align=8 | nvsize=24, nvalign=8] llvm-svn: 241196
* Encode MCSymbol alignment as log2(align).Pete Cooper2015-07-011-9/+19
| | | | | | | | | | | | | Given that alignments are always powers of 2, just encode it this way. This matches how we encode alignment on IR GlobalValue's for example. This compresses the CommonAlign member down to 5 bits which allows it to pack better with the surrounding fields. Reviewed by Duncan Exon Smith. llvm-svn: 241189
* add a cl::opt override for TargetLoweringBase's JumpIsExpensiveSanjay Patel2015-07-011-5/+4
| | | | | | | | | | | | | This patch is not intended to change existing codegen behavior for any target. It just exposes the JumpIsExpensive setting on the command-line to allow for easier testing and emergency overrides. Also, change the existing regression test to use FileCheck, explicitly specify the jump-is-expensive option, and use more precise checks. Differential Revision: http://reviews.llvm.org/D10846 llvm-svn: 241179
* Revert "[DWARF] Fix debug info generation for function static variables, ↵David Blaikie2015-07-011-3/+0
| | | | | | | | | | typedefs, and records" Caused PR24008 This reverts commit 37cb5f1c2db9f42d29f26b215585f56bb64ae4f5. llvm-svn: 241176
* LivePhysRegs: Add support to add pristine registers when populating with ↵Matthias Braun2015-07-011-13/+9
| | | | | | | | live-in/live-out registers. Differential Revision: http://reviews.llvm.org/D10139 llvm-svn: 241172
* Return ErrorOr from getSection.Rafael Espindola2015-07-013-34/+66
| | | | | | | | | | | | | | This also improves the logic of what is an error: * getSection(uint_32): only return an error if the index is out of bounds. The index 0 corresponds to a perfectly valid entry. * getSection(Elf_Sym): Returns null for symbols that normally don't have sections and error for out of bound indexes. In many places this just moves the report_fatal_error up the stack, but those can then be fixed in smaller patches. llvm-svn: 241156
* [DWARF] Fix debug info generation for function static variables, typedefs, ↵Michael Kuperstein2015-07-011-0/+3
| | | | | | | | | | | | | | | and records Function static variables, typedefs and records (class, struct or union) declared inside a lexical scope were associated with the function as their parent scope, rather than the lexical scope they are defined or declared in. This fixes PR19238 Patch by: amjad.aboud@intel.com Differential Revision: http://reviews.llvm.org/D9758 llvm-svn: 241153
* [SEH] Add new intrinsics for recovering and restoring parent framesReid Kleckner2015-06-301-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | The incoming EBP value established by the runtime is actually a pointer to the end of the EH registration object, and not the true parent function frame pointer. Clang doesn't need llvm.x86.seh.exceptioninfo anymore because we know that the exception info pointer is at a fixed offset from this incoming EBP. The llvm.x86.seh.recoverfp intrinsic takes an EBP value provided by the EH runtime and returns a pointer that is usable with llvm.framerecover. The llvm.x86.seh.restoreframe intrinsic is inserted by the 32-bit specific preparation pass in blocks targetted by the EH runtime. It re-establishes any physical registers used by the parent function to address the stack, such as the frame, base, and stack pointers. Neither of these intrinsics correctly handle stack realignment prologues yet, but it's possible to add that later. Reviewers: majnemer Differential Revision: http://reviews.llvm.org/D10848 llvm-svn: 241125
* [IRBuilder] Delete unused constructor and SetInsertPoint overload.Alexey Samsonov2015-06-301-18/+0
| | | | llvm-svn: 241124
* Pack MCSymbol::HasName in to a spare bit in the section/fragment union.Pete Cooper2015-06-301-18/+22
| | | | | | | | | | | | This is part of an effort to pack the average MCSymbol down to 24 bytes. The HasName bit was pushing the size of the bitfield over to another word, so this change uses a PointerIntPair to fit in it to unused bits of a PointerUnion. Reviewed by Rafael Espíndola llvm-svn: 241115
* Use ErrorOr in getRelocationAdress.Rafael Espindola2015-06-304-19/+11
| | | | | | | We can probably do better in this method, but this is an improvement and enables further ErrorOr cleanups. llvm-svn: 241114
* Implement containsSymbol with other lower level methods.Rafael Espindola2015-06-304-21/+0
| | | | llvm-svn: 241112
* Remove Elf_Shdr_Iter. Diagnose files with invalid section header sizes.Rafael Espindola2015-06-302-28/+19
| | | | llvm-svn: 241109
* [DebugInfo] Let IRBuilder::SetInsertPoint(BB::iterator) update current debug ↵Alexey Samsonov2015-06-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | location. IRBuilder::SetInsertPoint(BB, BB::iterator) is an older version of IRBuilder::SetInsertPoint(Instruction). However, the latter updates the current debug location of emitted instruction, while the former doesn't, which is confusing. Unify the behavior of these methods: now they both set current debug location to the debug location of instruction at insertion point. The callers of IRBuilder::SetInsertPoint(BB, BB::iterator) doesn't seem to depend on the old behavior (keeping the original debug info location). On the contrary, sometimes they (e.g. SCEV) *should* be updating debug info location, but don't. I'll look at gdb bots after the commit to check that we don't regress on debug info somewhere. This change may make line table more fine-grained, thus increasing debug info size. I haven't observed significant increase, though: it varies from negligible to 0.3% on several binaries and self-hosted Clang. This is yet another change targeted at resolving PR23837. llvm-svn: 241101
* MIR Serialization: Serialize MBB successors.Alex Lorenz2015-06-301-1/+21
| | | | | | | | | | | | | This commit implements serialization of the machine basic block successors. It uses a YAML flow sequence that contains strings that have the MBB references. The MBB references in those strings use the same syntax as the MBB machine operands in the machine instruction strings. Reviewers: Duncan P. N. Exon Smith Differential Revision: http://reviews.llvm.org/D10699 llvm-svn: 241093
* Fix the name of the iterator functions to match the coding standards.Rafael Espindola2015-06-302-48/+48
| | | | llvm-svn: 241074
* Report an error on invalid sh_entsize.Rafael Espindola2015-06-301-8/+11
| | | | llvm-svn: 241070
* Reverting r241058 because it's causing buildbot failures.Ranjeet Singh2015-06-301-5/+3
| | | | llvm-svn: 241061
* There are a few places where subtarget features are stillRanjeet Singh2015-06-301-3/+5
| | | | | | | | | represented by uint64_t, this patch replaces these usages with the FeatureBitset (std::bitset) type. Differential Revision: http://reviews.llvm.org/D10542 llvm-svn: 241058
* [X86] Add FXSR intrinsicsMichael Kuperstein2015-06-301-0/+13
| | | | | | Add intrinsics for the FXSR instructions (FXSAVE/FXSAVE64/FXRSTOR/FXRSTOR64) llvm-svn: 241049
* ELF.h: Prune obsolete comments removed in r240996. [-Wdocumentation]NAKAMURA Takumi2015-06-301-6/+0
| | | | | FIXME: Should they be moved onto Elf_Sym_Impl::getNmae()? llvm-svn: 241044
* Don't return error_code from a function that doesn't fail.Rafael Espindola2015-06-304-25/+13
| | | | llvm-svn: 241042
OpenPOWER on IntegriCloud