summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
* Make DataLayout a plain object, not a pass.Rafael Espindola2014-02-25
| | | | | | | Instead, have a DataLayoutPass that holds one. This will allow parts of LLVM don't don't handle passes to also use DataLayout. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202168 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep the link register for uwtable.Logan Chien2014-02-25
| | | | | | | | | | | | The function with uwtable attribute might be visited by the stack unwinder, thus the link register should be considered as clobbered after the execution of the branch and link instruction (i.e. the definition of the machine instruction can't be ignored) even when the callee function are marked with noreturn. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202165 91177308-0d34-0410-b5e6-96231b3b80d8
* [XCore] Prefer to word align functions.Richard Osborne2014-02-25
| | | | | | | | | | | | | | | | | | | The behaviour of the XCore's instruction buffer means that the performance of the same code sequence can differ depending on whether it starts at a 4 byte aligned address or not. Since we don't model the instruction buffer in the backend we have no way of knowing for sure if it is beneficial to word align a specific function. However, in the absence of precise modelling, it is better on balance to word align functions because: * It makes a fetch-nop while executing the prologue slightly less likely. * If we don't word align functions then a small perturbation in one function can have a dramatic knock on effect. If the size of the function changes it might change the alignment and therefore the performance of all the functions that happen to follow it in the binary. This butterfly effect makes it harder to reason about and measure the performance of code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202163 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out calls to AA.getDataLayout().Rafael Espindola2014-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202157 91177308-0d34-0410-b5e6-96231b3b80d8
* Make a few more DataLayout variables const.Rafael Espindola2014-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202155 91177308-0d34-0410-b5e6-96231b3b80d8
* [SROA] Use the original load name with the SROA-prefixed IRB rather thanChandler Carruth2014-02-25
| | | | | | | | just "load". This helps avoid pointless de-duping with order-sensitive numbers as we already have unique names from the original load. It also makes the resulting IR quite a bit easier to read. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202140 91177308-0d34-0410-b5e6-96231b3b80d8
* [SROA] Thread the ability to add a pointer-specific name prefix throughChandler Carruth2014-02-25
| | | | | | | | | | | | | | | | | | | | | | | | the pointer adjustment code. This is the primary code path that creates totally new instructions in SROA and being able to lump them based on the pointer value's name for which they were created causes *significantly* fewer name collisions and general noise in the debug output. This is particularly significant because it is making it much harder to track down instability in the output of SROA, as name de-duplication is a totally harmless form of instability that gets in the way of seeing real problems. The new fancy naming scheme tries to dig out the root "pre-SROA" name for pointer values and associate that all the way through the pointer formation instructions. Digging out the root is important to prevent the multiple iterative rounds of SROA from just layering too much cruft on top of cruft here. We already track the layers of SROAs iteration in the alloca name prefix. We don't need to duplicate it here. Should have no functionality change, and shouldn't have any really measurable impact on NDEBUG builds, as most of the complex logic is debug-only. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202139 91177308-0d34-0410-b5e6-96231b3b80d8
* [SROA] Rather than copying the logic for building a name prefix into theChandler Carruth2014-02-25
| | | | | | | PHI-pointer builder, just copy the builder and clobber the obvious fields. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202136 91177308-0d34-0410-b5e6-96231b3b80d8
* [SROA] Simplify some of the logic to dig out the old pointer value byChandler Carruth2014-02-25
| | | | | | | | | using OldPtr more heavily. Lots of this code was written before the rewriter had an OldPtr member setup ahead of time. There are already asserts in place that should ensure this doesn't change any functionality. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202135 91177308-0d34-0410-b5e6-96231b3b80d8
* [SROA] Adjust to new clang-format style.Chandler Carruth2014-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202134 91177308-0d34-0410-b5e6-96231b3b80d8
* Reuse constants for COFF string table entry offsetsNico Rieck2014-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202130 91177308-0d34-0410-b5e6-96231b3b80d8
* [SROA] Fix a *glaring* bug in r202091: you have to actually *write*Chandler Carruth2014-02-25
| | | | | | | | | | | | | | the break statement, not just think it to yourself.... No idea how this worked at all, much less survived most bots, my bootstrap, and some bot bootstraps! The Polly one didn't survive, and this was filed as PR18959. I don't have a reduced test case and honestly I'm not seeing the need. What we probably need here are better asserts / debug-build behavior in SmallPtrSet so that this madness doesn't make it so far. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202129 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence GCC warningAlexey Samsonov2014-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202119 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typosAlp Toker2014-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202107 91177308-0d34-0410-b5e6-96231b3b80d8
* [SROA] Add a debugging tool which shuffles the slices sequence prior toChandler Carruth2014-02-25
| | | | | | | | | | | | | sorting it. This helps uncover latent reliance on the original ordering which aren't guaranteed to be preserved by std::sort (but often are), and which are based on the use-def chain orderings which also aren't (technically) guaranteed. Only available in C++11 debug builds, and behind a flag to prevent noise at the moment, but this is generally useful so figured I'd put it in the tree rather than keeping it out-of-tree. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202106 91177308-0d34-0410-b5e6-96231b3b80d8
* [SROA] Use a more direct way of determining whether we are processingChandler Carruth2014-02-25
| | | | | | | | | | | | | | | | | | the destination operand or source operand of a memmove. It so happens that it was impossible for SROA to try to rewrite self-memmove where the operands are *identical*, because either such a think is volatile (and we don't rewrite) or it is non-volatile, and we don't even register it as a use of the alloca. However, making the 'IsDest' test *rely* on this subtle fact is... Very confusing for the reader. We should use the direct and readily available test of the Use* which gives us concrete information about which operand is being rewritten. No functionality changed, I hope! ;] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202103 91177308-0d34-0410-b5e6-96231b3b80d8
* Indent this continued line.Nick Lewycky2014-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202096 91177308-0d34-0410-b5e6-96231b3b80d8
* [SROA] Fix another instability in SROA with respect to the sliceChandler Carruth2014-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ordering. The fundamental problem that we're hitting here is that the use-def chain ordering is *itself* not a stable thing to be relying on in the rewriting for SROA. Further, we use a non-stable sort over the slices to arrange them based on the section of the alloca they're operating on. With a debugging STL implementation (or different implementations in stage2 and stage3) this can cause stage2 != stage3. The specific aspect of this problem fixed in this commit deals with the rewriting and load-speculation around PHIs and Selects. This, like many other aspects of the use-rewriting in SROA, is really part of the "strong SSA-formation" that is doen by SROA where it works very hard to canonicalize loads and stores in *just* the right way to satisfy the needs of mem2reg[1]. When we have a select (or a PHI) with 2 uses of the same alloca, we test that loads downstream of the select are speculatable around it twice. If only one of the operands to the select needs to be rewritten, then if we get lucky we rewrite that one first and the select is immediately speculatable. This can cause the order of operand visitation, and thus the order of slices to be rewritten, to change an alloca from promotable to non-promotable and vice versa. The fix is to defer all of the speculation until *after* the rewrite phase is done. Once we've rewritten everything, we can accurately test for whether speculation will work (once, instead of twice!) and the order ceases to matter. This also happens to simplify the other subtlety of speculation -- we need to *not* speculate anything unless the result of speculating will make the alloca fully promotable by mem2reg. I had a previous attempt at simplifying this, but it was still pretty horrible. There is actually already a *really* nice test case for this in basictest.ll, but on multiple STL implementations and inputs, we just got "lucky". Fortunately, the test case is very small and we can essentially build it in exactly the opposite way to get reasonable coverage in both directions even from normal STL implementations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202092 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-dwarfdump: Support for debug_line.dwo section for file names for type ↵David Blaikie2014-02-24
| | | | | | units under fission. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202091 91177308-0d34-0410-b5e6-96231b3b80d8
* Make some DataLayout pointers const.Rafael Espindola2014-02-24
| | | | | | No functionality change. Just reduces the noise of an upcoming patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202087 91177308-0d34-0410-b5e6-96231b3b80d8
* trivial test commitAlbrecht Kadlec2014-02-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202084 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix unused variableMatt Arsenault2014-02-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202080 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI - Add new CI arithmetic instructions.Matt Arsenault2014-02-24
| | | | | | | Does not yet include larger part required to match v_mad_i64_i32 / v_mad_u64_u32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202077 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Make check clearer.Matt Arsenault2014-02-24
| | | | | | | The check is clearer as southern islands or later, rather than checking for later than northern islands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202076 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix DOT4 missing from getTargetOpcodeNameMatt Arsenault2014-02-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202075 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing constMatt Arsenault2014-02-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202074 91177308-0d34-0410-b5e6-96231b3b80d8
* Trivial code simplificationMatt Arsenault2014-02-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202073 91177308-0d34-0410-b5e6-96231b3b80d8
* SLPVectorizer: Try vectorizing 'splat' storesArnold Schwaighofer2014-02-24
| | | | | | | | | Vectorize sequential stores of a broadcasted value. 5% on eon. radar://16124699 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202067 91177308-0d34-0410-b5e6-96231b3b80d8
* [X86][SchedModel] Add missing scheduling model for SSE related instructions.Quentin Colombet2014-02-24
| | | | | | | | | | | The patch defines new or refines existing generic scheduling classes to match the behavior of the SSE instructions. It also maps those scheduling classes on the related SSE instructions. <rdar://problem/15607571> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202065 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a dwarf number to the Y register.Roman Divacky2014-02-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202057 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace the F_Binary flag with a F_Text one.Rafael Espindola2014-02-24
| | | | | | | | | After this I will set the default back to F_None. The advantage is that before this patch forgetting to set F_Binary would corrupt a file on windows. Forgetting to set F_Text produces one that cannot be read in notepad, which is a better failure mode :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202052 91177308-0d34-0410-b5e6-96231b3b80d8
* LTO: Add the loop vectorizer to the LTO pipeline.Arnold Schwaighofer2014-02-24
| | | | | | | | | | | | | During the LTO phase LICM will move loop invariant global variables out of loops (informed by GlobalModRef). This makes more loops countable presenting opportunity for the loop vectorizer. Adding the loop vectorizer improves some TSVC benchmarks and twolf/ref dataset (5%) on x86-64. radar://15970632 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202051 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't make F_None the default.Rafael Espindola2014-02-24
| | | | | | This will make it easier to switch the default to being binary files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202042 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] simplify the code that compute the shadow offset; get rid of two ↵Kostya Serebryany2014-02-24
| | | | | | internal flags that allowed to override it. The tests pass, but still this change might break asan on some platform not covered by tests. If you see this, please submit a fix with a test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202033 91177308-0d34-0410-b5e6-96231b3b80d8
* Add AArch64 big endian Target (aarch64_be)Christian Pirker2014-02-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202024 91177308-0d34-0410-b5e6-96231b3b80d8
* AVX-512: Fixed encoding of VPCMPEQ and VPCMPGTElena Demikhovsky2014-02-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202015 91177308-0d34-0410-b5e6-96231b3b80d8
* Share a createUniqueEntity implementation between unix and windows.Rafael Espindola2014-02-24
| | | | | | | The only extra bit of functionality that had to be exposed for this be be implemented in Path.cpp is opening a file in rw mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202005 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete dead code.Rafael Espindola2014-02-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202001 91177308-0d34-0410-b5e6-96231b3b80d8
* Asm Parser: support .error directiveSaleem Abdulrasool2014-02-23
| | | | | | | | The .error directive is similar to .err in that it will halt assembly if it is evaluated for assembly. However, it permits a user supplied message to be rendered. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201999 91177308-0d34-0410-b5e6-96231b3b80d8
* AsmParser: support .ifeqs directiveSaleem Abdulrasool2014-02-23
| | | | | | | The .ifeqs directive assembles the following code if the quoted string parameters are equal. The strings must be quoted using double quotes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201998 91177308-0d34-0410-b5e6-96231b3b80d8
* SPARC: Implement TRAP lowering. Matches what GCC emits.Benjamin Kramer2014-02-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201994 91177308-0d34-0410-b5e6-96231b3b80d8
* ARMAsmParser: whitespaceSaleem Abdulrasool2014-02-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201989 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM IAS: support .align without parametersSaleem Abdulrasool2014-02-23
| | | | | | | | .align is handled specially on certain targets. .align without any parameters on ARM indicates a default alignment (4). Handle the special case in the target parser, but fall back to the generic parser for the normal version. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201988 91177308-0d34-0410-b5e6-96231b3b80d8
* MCAsmParser: support .ifneSaleem Abdulrasool2014-02-23
| | | | | | | The .ifne directive assembles the following section of code if the argument expression is non-zero. Effectively, it is equivalent to if. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201986 91177308-0d34-0410-b5e6-96231b3b80d8
* MCAsmParser: handle space properly for .ifc/.ifncSaleem Abdulrasool2014-02-23
| | | | | | | | If the strings are not quoted, the first string stops at the first comma, and the second string stops at the end of the line. Strings which contain whitespace should be quoted. Unquoted space is to be discarded. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201985 91177308-0d34-0410-b5e6-96231b3b80d8
* MCAsmParser: add support for .err directiveSaleem Abdulrasool2014-02-23
| | | | | | | The .err directive produces an error whenever it is assembled. This can be useful for preventing assembly when an unexpected condition occurs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201984 91177308-0d34-0410-b5e6-96231b3b80d8
* Use static instead of an anonymous namespace.Rafael Espindola2014-02-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201983 91177308-0d34-0410-b5e6-96231b3b80d8
* AVX-512: Fixed encoding of VPTESTMQElena Demikhovsky2014-02-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201980 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify remove, create_directory and create_directories.Rafael Espindola2014-02-23
| | | | | | | | | | | | | | | Before this patch they would take an boolean argument to say if the path already existed. This was redundant with the returned error_code which is able to represent that. This allowed for callers to incorrectly check only the existed flag instead of first checking the error code. Instead, pass in a boolean flag to say if the previous (non-)existence should be an error or not. Callers of the of the old simple versions are not affected. They still ignore the previous (non-)existence as they did before. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201979 91177308-0d34-0410-b5e6-96231b3b80d8
* Use simpler form of llvm::sys::fs::remove.Rafael Espindola2014-02-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201975 91177308-0d34-0410-b5e6-96231b3b80d8