summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in comment.Dawn Perchik2015-07-011-1/+1
| | | | llvm-svn: 241173
* LivePhysRegs: Add support to add pristine registers when populating with ↵Matthias Braun2015-07-012-13/+50
| | | | | | | | live-in/live-out registers. Differential Revision: http://reviews.llvm.org/D10139 llvm-svn: 241172
* [SEH] Add 32-bit lowering for SEH __tryReid Kleckner2015-07-019-237/+447
| | | | | | | | | | | | | | | | | | | This re-lands r236052 and adds support for __exception_code(). In 32-bit SEH, the exception code is not available in eax. It is only available in the filter function, and now we arrange to load it and store it into an escaped variable in the parent frame. As a consequence, we have to disable the "catch i8* null" optimization on 32-bit and always generate a filter function. We can re-enable the optimization if we detect an __except block that doesn't use the exception code, but this probably isn't worth optimizing. Reviewers: majnemer Differential Revision: http://reviews.llvm.org/D10852 llvm-svn: 241171
* [SEH] Don't assert if the parent function lacks a personalityReid Kleckner2015-07-012-0/+39
| | | | | | | | The EH code might have been deleted as unreachable and the personality pruned while the filter is still present. Currently I'm hitting this at -O0 due to the clang bug PR24009. llvm-svn: 241170
* [AsmPrinter] Hide implementation detailsBenjamin Kramer2015-07-014-6/+6
| | | | | | NFC. llvm-svn: 241169
* Fix OMPT event_barrer_endJonathan Peyton2015-07-011-1/+1
| | | | | | | | | | | | The OMPT status is never equal to ompt_status_track. ompt_status_track = 0x2 and ompt_status_track_callback = 0x6 just share a bit, so that we can check for traceing and callbacks with the same status. Patch by Tim Cramer Differential Revision: http://reviews.llvm.org/D10863 llvm-svn: 241167
* [AArch64] Implement add/adds/sub/subs/cmp/cmn with negative immediate aliasesArnaud A. de Grandmaison2015-07-015-15/+177
| | | | | | | | | | | | | | | | | | | | | | | This patch teaches the AsmParser to accept add/adds/sub/subs/cmp/cmn with a negative immediate operand and convert them as shown: add Rd, Rn, -imm -> sub Rd, Rn, imm sub Rd, Rn, -imm -> add Rd, Rn, imm adds Rd, Rn, -imm -> subs Rd, Rn, imm subs Rd, Rn, -imm -> adds Rd, Rn, imm cmp Rn, -imm -> cmn Rn, imm cmn Rn, -imm -> cmp Rn, imm Those instructions are an alternate syntax available to assembly coders, and are needed in order to support code already compiling with some other assemblers (gas). They are documented in the "ARMv8 Instruction Set Overview", in the "Arithmetic (immediate)" section. This makes llvm-mc a programmer-friendly assembler ! This also fixes PR20978: "Assembly handling of adding negative numbers not as smart as gas". llvm-svn: 241166
* [SDAG] Give InstrEmitter hidden visibilityBenjamin Kramer2015-07-011-1/+1
| | | | | | NFC. llvm-svn: 241165
* [CodeGen] Reduce visibility of implementation detailsBenjamin Kramer2015-07-018-11/+11
| | | | | | NFC. llvm-svn: 241164
* [Sparc] Rearrange SparcInstrInfo, no change.James Y Knight2015-07-011-68/+80
| | | | | | | | | Move some instructions into order of sections in the spec, as the rest already were. Differential Revision: http://reviews.llvm.org/D9102 llvm-svn: 241163
* Test committed in r241153 is more target-specific than I thought.Michael Kuperstein2015-07-011-1/+1
| | | | | | Moving the (original, x86-only) test to the X86 directory. llvm-svn: 241162
* Expand Phabricator docs slightlyScott Douglass2015-07-011-7/+9
| | | | llvm-svn: 241161
* [clang-tidy] minor coding style tweak. make functions static.Daniel Marjamaki2015-07-011-5/+5
| | | | llvm-svn: 241160
* AVX-512: Implemented missing encoding for FMA scalar instructionsIgor Breger2015-07-013-35/+1374
| | | | | | | | Added tests for encoding Differential Revision: http://reviews.llvm.org/D10865 llvm-svn: 241159
* Fix non-target-specific test not to use the x86 triple.Michael Kuperstein2015-07-011-1/+1
| | | | llvm-svn: 241158
* Update for llvm api change.Rafael Espindola2015-07-011-12/+27
| | | | llvm-svn: 241157
* Return ErrorOr from getSection.Rafael Espindola2015-07-019-75/+144
| | | | | | | | | | | | | | 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
* [clang-tidy] Enhance clang-tidy readability-simplify-boolean-expr...Alexander Kornienko2015-07-014-42/+630
| | | | | | | | | | | | | | | | | | | | Enhance clang-tidy readability-simplify-boolean-expr to handle 'if (e) return true; return false;' and improve replacement expressions. This changeset extends the simplify boolean expression check in clang-tidy to simplify if (e) return true; return false; to return e; (note the lack of an else clause on the if statement.) By default, chained conditional assignment is left unchanged, unless a configuration parameter is set to non-zero to override this behavior. It also improves the handling of replacement expressions to apply static_cast<bool>(expr) when expr is not of type bool. http://reviews.llvm.org/D9810 Patch by Richard Thomson! llvm-svn: 241155
* [DebugInfo] Fix debug info generation for function static variables, ↵Michael Kuperstein2015-07-017-7/+122
| | | | | | | | | | | | | | | typedefs, 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/D9760 llvm-svn: 241154
* [DWARF] Fix debug info generation for function static variables, typedefs, ↵Michael Kuperstein2015-07-018-35/+194
| | | | | | | | | | | | | | | 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
* [X86] Avoid over-relaxation of 8-bit immediates in integer arithmetic ↵Michael Kuperstein2015-07-013-24/+200
| | | | | | | | | | | | | | | | | | instructions. Only consider an instruction a candidate for relaxation if the last operand of the instruction is an expression. We previously checked whether any operand is an expression, which is useless, since for all instructions concerned, the only operand that may be affected by relaxation is the last one. In addition, this removes the check for having RIP as an argument, since it was plain wrong - even when one of the arguments is RIP, relaxation may still be needed. This fixes PR9807. Patch by: david.l.kreitzer@intel.com Differential Revision: http://reviews.llvm.org/D10766 llvm-svn: 241152
* Revert part of r241149, "Fix PR23872: Integrated assembler error message ↵NAKAMURA Takumi2015-07-011-28/+0
| | | | | | | | when using .type directive with @ in AArch32 assembly." The test should be split among targets. llvm/test/MC/ELF/ is assumed as X86. llvm-svn: 241151
* [mips][microMIPS] Implement SLL and NOP instructionsZoran Jovanovic2015-07-015-0/+27
| | | | | | http://reviews.llvm.org/D10474 llvm-svn: 241150
* Fix PR23872: Integrated assembler error message when using .type directive ↵Gabor Ballabas2015-07-012-4/+38
| | | | | | | | | | | with @ in AArch32 assembly. The AArch32 assembler parses the '@' as a comment symbol, so the error message shouldn't suggest that '@<type>' is a valid replacement when assembling for AArch32 target. Differential Revision: http://reviews.llvm.org/D10651 llvm-svn: 241149
* [modules] Don't require the 'inline' specifier when merging an inline function;Richard Smith2015-07-012-1/+7
| | | | | | any source of the inline nature is sufficient. llvm-svn: 241146
* [OPENMP 4.0] Initial support for 'omp cancellation point' construct.Alexey Bataev2015-07-0126-32/+446
| | | | | | Add parsing and sema analysis for 'omp cancellation point' directive. llvm-svn: 241145
* Fix a couple of unused variables in no-assertsJustin Bogner2015-07-011-0/+2
| | | | llvm-svn: 241144
* [LoopUnroll] Use undef for phis with no value liveDavid Majnemer2015-07-012-1/+25
| | | | | | | | We would create a phi node with a zero initialized operand instead of undef in the case where no value was originally available. This was problematic for x86_mmx which has no null value. llvm-svn: 241143
* [SCCP] Turn loads of null into undef instead of zero initialized valuesDavid Majnemer2015-07-012-1/+6
| | | | | | | | | | Surprisingly, this is a correctness issue: the mmx type exists for calling convention purposes, LLVM doesn't have a zero representation for them. This partially fixes PR23999. llvm-svn: 241142
* -frewrite-includes: Prefer insert to emplaceJustin Bogner2015-07-011-3/+4
| | | | | | Some bots didn't like r241140. llvm-svn: 241141
* -frewrite-includes: Rework how includes and modules are differentiatedJustin Bogner2015-07-011-39/+50
| | | | | | | | | | | | | | | | | | | | The map of FileChange structs here was storing two disjoint types of information: 1. A pointer to the Module that an #include directive implicitly imported 2. A FileID and FileType for an included file. These would be left uninitialized in the Module case. This change splits these two kinds of information into their own maps, which both simplifies how we access either and avoids the undefined behaviour we were hitting due to the uninitialized fields in the included file case. Mostly NFC, but fixes some errors found by self-host with ubsan. llvm-svn: 241140
* [NaryReassociate] enhances nsw by leveraging @llvm.assumeJingyue Wu2015-07-012-14/+91
| | | | | | | | | | | | | | | | | | | | | Summary: nsw are flaky and can often be removed by optimizations. This patch enhances nsw by leveraging @llvm.assume in the IR. Specifically, NaryReassociate now understands that assume(a + b >= 0) && assume(a >= 0) ==> a +nsw b As a result, it can split more sext(a + b) into sext(a) + sext(b) for CSE. Test Plan: nary-gep.ll Reviewers: broune, meheff Subscribers: jholewinski, llvm-commits Differential Revision: http://reviews.llvm.org/D10822 llvm-svn: 241139
* Getting started docs: https, and check signatureJF Bastien2015-07-011-1/+5
| | | | | | | | | | | | | | Summary: Download should be over https, not insecure ftp at least for the signature and key files. The signature should also get verified. Test Plan: None Reviewers: chandlerc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10845 llvm-svn: 241138
* [modules] Before checking whether the controlling macro of a header is defined,Richard Smith2015-07-0111-27/+36
| | | | | | | | | | | update the identifier in case we've imported a definition of the macro (and thus the contents of the header) from a module. Also fold ExternalIdentifierLookup into ExternalPreprocessorSource; it no longer makes sense to keep these separate now that the only user of the former also needs the latter. llvm-svn: 241137
* CodeGen: Do not give local-linkage functions externally available linkage, ↵Peter Collingbourne2015-07-012-1/+2
| | | | | | | | | | | | | | | | even temporarily. When an internal-linkage thunk is code gen'd, CodeGenVTables::emitThunk will first be called with ForVTable=true (which incorrectly set the thunk's linkage to available_externally under the Itanium ABI) and later with ForVTable=false (which reset it to internal). Because we will always see a call with ForVTable=false, this incorrect linkage never ended up in the final IR. However, the temporary presence of this linkage caused us to give such functions a comdat as a result of code introduced in r241102. To avoid this, check that the thunk is externally visible before giving it available_externally linkage. llvm-svn: 241136
* [modules] Make the include guard optimization fire a bit more when consideringRichard Smith2015-07-013-4/+9
| | | | | | | | | | | re-entering a modular header. When we do the include guard check, we're in the visibility state for the file with the #include; the include guard may not be visible there, but we don't actually need it to be: if we've already parsed the submodule we're considering entering, it's always safe to skip it. llvm-svn: 241135
* Use a stable sort to guarantee target feature ordering in the IREric Christopher2015-07-014-7/+8
| | | | | | | in order to make testing somewhat more feasible. Has the advantage of making it easier to find target features as well. llvm-svn: 241134
* CodeGen: Resize LifetimeExtendedCleanupHeader to avoid alignment issuesJustin Bogner2015-07-011-4/+6
| | | | | | | | | | | | | The LifetimeExtendedCleanupHeader is carefully fit into 32 bytes, meaning that cleanups on the LifetimeExtendedCleanupStack are *always* allocated at a misaligned address and cause undefined behaviour. There are two ways to solve this - add padding after the header when we allocated our cleanups, or just simplify the header and let it use 64 bits in the first place. I've opted for the latter, and added a static assert to avoid the issue in the future. llvm-svn: 241133
* Rename ClangUserExpression members to avoid confusion with language.Dawn Perchik2015-07-012-21/+21
| | | | | | | | The new names clarify that the members have to do with the execution context and not the language. For example, m_cplusplus was renamed to m_in_cplusplus_method. llvm-svn: 241132
* [Sema] Don't crash when deduction fails for decltype(auto)David Majnemer2015-07-012-0/+6
| | | | | | | | | We didn't check the return result of BuildDecltypeType, resulting in us crashing when we tried to grab the canonical version of the type. This fixes PR23995. llvm-svn: 241131
* Fix sse4 for target attribute feature additions.Eric Christopher2015-07-012-1/+17
| | | | | | | | | | This reinstates part of the hack removed in r233223, by special casing sse4 as part of the feature additions. The notable change here is that we consider it only as part of setting the SSE level and not as part of the actual target features set which handles setting the rest of the masks. llvm-svn: 241130
* Fix a TODO dealing with canonicalizing attributes on functions byEric Christopher2015-07-013-12/+24
| | | | | | | | using a string map to canonicalize. Fix up a couple of testcases that needed changing since we are no longer simply appending features to the list, but all of their mask dependencies as well. llvm-svn: 241129
* COFF: Simplify SymbolTable::findLazy. NFC.Rui Ueyama2015-06-303-16/+5
| | | | llvm-svn: 241128
* [SanitizerCoverage] Don't add instrumentation to unreachable blocks.Alexey Samsonov2015-06-302-0/+16
| | | | llvm-svn: 241127
* Fix several typos in LangRef.rst related to loop unrolling metadata.Mark Heffernan2015-06-301-4/+4
| | | | llvm-svn: 241126
* [SEH] Add new intrinsics for recovering and restoring parent framesReid Kleckner2015-06-307-82/+169
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix memory leak in unittest added in r241101.Alexey Samsonov2015-06-301-1/+5
| | | | llvm-svn: 241123
* [Cloning] Teach CloneModule about personality functionsDavid Majnemer2015-06-302-0/+39
| | | | | | | | | CloneModule didn't take into account that it needed to remap the value using values in the module. This fixes PR23992. llvm-svn: 241122
* Fix use-after-free.Peter Collingbourne2015-06-302-5/+9
| | | | llvm-svn: 241121
OpenPOWER on IntegriCloud