summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* [OCaml] Impement Llvm_irreader, bindings to LLVM assembly parserPeter Zotov2013-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194138 91177308-0d34-0410-b5e6-96231b3b80d8
* [llvm-c] Expose IRReader interfacePeter Zotov2013-11-06
| | | | | | Original patch by Chris Wailes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194137 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] Implement Llvm.string_of_llvaluePeter Zotov2013-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194136 91177308-0d34-0410-b5e6-96231b3b80d8
* [llvm-c] Implement LLVMPrintValueToStringPeter Zotov2013-11-06
| | | | | | Original patch by Chris Wailes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194135 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix definition for Mips16 pc relative load word instructions.Reed Kotler2013-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194126 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement AArch64 Neon instruction set Perm.Jiangning Liu2013-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194123 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement AArch64 Neon instruction set Bitwise Extract.Jiangning Liu2013-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194118 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite SCEV's backedge taken count computation.Andrew Trick2013-11-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch by Michele Scandale! Rewrite of the functions used to compute the backedge taken count of a loop on LT and GT comparisons. I decided to split the handling of LT and GT cases becasue the trick "a > b == -a < -b" in some cases prevents the trip count computation due to the multiplication by -1 on the two operands of the comparison. This issue comes from the conservative computation of value range of SCEVs: taking the negative SCEV of an expression that have a small positive range (e.g. [0,31]), we would have a SCEV with a fullset as value range. Indeed, in the new rewritten function I tried to better handle the maximum backedge taken count computation when MAX/MIN expression are used to handle the cases where no entry guard is found. Some test have been modified in order to check the new value correctly (I manually check them and reasoning on possible overflow the new values seem correct). I finally added a new test case related to the multiplication by -1 issue on GT comparisons. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194116 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove another unused, and IMHO, not very desirable feature of ErrorOr.Rafael Espindola2013-11-05
| | | | | | | | | | | | | | | | | | One of the uses of the IsValid flag is to support default constructing a ErrorOr that is not a Error or a Value. There is not much value in doing that IMHO. If ErrorOr was to have a default constructor, it should be implemented by default constructing the value, but even that looks unnecessary. The other use is to avoid calling destructors on moved objects. This looks wrong. If the data being moved has non trivial treatment of moves (an std::vector for example), it is its destructor that should handle it, not ~ErrorOr. With this change ErrorOr becomes a fairly simple wrapper and should always be better than using an error_code + value in an API. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194109 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of current calculation function and adjustment schemeReed Kotler2013-11-05
| | | | | | | | from MipsConstantIslands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194108 91177308-0d34-0410-b5e6-96231b3b80d8
* Slightly change the way stackmap and patchpoint intrinsics are lowered.Andrew Trick2013-11-05
| | | | | | | | | | | | | | MorphNodeTo is not safe to call during DAG building. It eagerly deletes dependent DAG nodes which invalidates the NodeMap. We could expose a safe interface for morphing nodes, but I don't think it's worth it. Just create a new MachineNode and replaceAllUsesWith. My understaning of the SD design has been that we want to support early target opcode selection. That isn't very well supported, but generally works. It seems reasonable to rely on this feature even if it isn't widely used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194102 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of all references to soimm in MipsConstantIslands pass becauseReed Kotler2013-11-05
| | | | | | | | | | | | | we don't have such an operand. Suprisingly enough, this is never actually accounted for in the ARM version when determining offset ranges. In both places there is the comment: - // FIXME: Make use full range of soimm values. (soimm = shift operand immediate). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194101 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup getUserOffset. Issues related to inline assembler length andReed Kotler2013-11-05
| | | | | | | | alignment will be handled differently than in ARM constant islands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194096 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: permit bare dmb/dsb/isb aliases on Cortex-M0Tim Northover2013-11-05
| | | | | | | | Cortex-M0 supports these 32-bit instructions despite being Thumb1 only (mostly). We knew about that but not that the aliases without the default "sy" operand were also permitted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194094 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert comments to documentation comments (// -> ///)Dmitri Gribenko2013-11-05
| | | | | | | Patch by MathOnNapkins git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194093 91177308-0d34-0410-b5e6-96231b3b80d8
* Use error_code in GVMaterializer.Rafael Espindola2013-11-05
| | | | | | They just propagate out the bitcode reader error, so we don't need a new enum. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194091 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement AArch64 Neon Crypto instruction classes AES, SHA, and 3 SHA.Jiangning Liu2013-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194085 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert FindFunctionInStream to return an error_code.Rafael Espindola2013-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194084 91177308-0d34-0410-b5e6-96231b3b80d8
* [objc-arc] Convert the one directional retain/release relation assert to a ↵Michael Gottesman2013-11-05
| | | | | | | | | | | | | | | | | conditional check + fail. Due to the previously added overflow checks, we can have a retain/release relation that is one directional. This occurs specifically when we run into an additive overflow causing us to drop state in only one direction. If that occurs, we should bail and not optimize that retain/release instead of asserting. Apologies for the size of the testcase. It is necessary to cause the additive cfg overflow to trigger. rdar://15377890 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194083 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide a test input for optAlp Toker2013-11-05
| | | | | | | This was only working previously due to a quirk in the way lit concatenates script commands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194078 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence GCC warning about dropping off a fully covered switch.Benjamin Kramer2013-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194077 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] (PR16190) Add ValueKinds for ConstantDataSequential and subclassesPeter Zotov2013-11-05
| | | | | | Original patch by David Monniaux git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194075 91177308-0d34-0410-b5e6-96231b3b80d8
* [llvm-c] (PR16190) Add LLVMIsA* functions for ConstantDataSequential and ↵Peter Zotov2013-11-05
| | | | | | | | subclasses Original patch by David Monniaux git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194074 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] (PR10016) Add a few missing line in OCamlLangImpl2.rstPeter Zotov2013-11-05
| | | | | | Original patch by Damien Schoof git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194067 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the word "thumb" from comments. Remove also an incorrectReed Kotler2013-11-05
| | | | | | | | command regarding the porting from the ARM version (was an old comment). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194066 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] (PR16318) Add missing argument to Llvm.const_intcastPeter Zotov2013-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194065 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] (PR11717) Make declare_qualified_global respect address argumentPeter Zotov2013-11-05
| | | | | | Original patch by Jonathan Ragan-Kelley git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194064 91177308-0d34-0410-b5e6-96231b3b80d8
* X86 Disassembler: remove unused bool typedef-nameDavid Majnemer2013-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194062 91177308-0d34-0410-b5e6-96231b3b80d8
* Suppress OS crash dialog in llvm-rtdyldAlp Toker2013-11-05
| | | | | | | All other tools have this -- it's needed to avoid hanging lit on Windows in case of a crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194060 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] Properly tag the custom operations of Llvm.llbuilderPeter Zotov2013-11-05
| | | | | | All other custom operations tags have LLVM prefix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194058 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] Llvm_linker: do not use external in module interfacePeter Zotov2013-11-05
| | | | | | | Workaround for an OCaml bug: http://caml.inria.fr/mantis/view.php?id=4166 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194057 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix r194019 as requested by Eric Christopher.Reed Kotler2013-11-05
| | | | | | | | | | | | | | | | | | | | | | | Submit the basic port of the rest of ARM constant islands code to Mips. Two test cases are added which reflect the next level of functionality: constants getting moved to water areas that are out of range from the initial placement at the end of the function and basic blocks being split to create water when none exists that can be used. There is a bunch of this code that is not complete and has been marked with IN_PROGRESS. I will finish cleaning this all up during the next week or two and submit the rest of the test cases. I have elminated some code for dealing with inline assembly because to me it unecessarily complicates things and some of the newer features of llvm like function attributies and builtin assembler give me better tools to solve the alignment issues created there. Also, for Mips16 I even have the option of not doing constant islands in the present of inline assembler if I chose. When everything has been completed I will summarize the port and notify people that are knowledgable regarding the ARM Constant Islands code so they can review it in it's entirety if they wish. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194053 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix symbol defines in config.h.cmakeAlp Toker2013-11-05
| | | | | | | | | These were incorrectly pointing to HAVE_LOG despite being checked for correctly in config-ix.cmake. Patch by James Lyon! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194051 91177308-0d34-0410-b5e6-96231b3b80d8
* Lift alignment restrictions on load folding for a significant portion of AVX ↵Craig Topper2013-11-05
| | | | | | instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194048 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement AArch64 post-index vector load/store multiple N-element structure ↵Hao Liu2013-11-05
| | | | | | | | | | | | | class SIMD(lselem-post). Including following 14 instructions: 4 ld1 insts: post-index load multiple 1-element structure to sequential 1/2/3/4 registers. ld2/ld3/ld4: post-index load multiple N-element structure to sequential N registers (N=2,3,4). 4 st1 insts: post-index store multiple 1-element structure from sequential 1/2/3/4 registers. st2/st3/st4: post-index store multiple N-element structure from sequential N registers (N = 2,3,4). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194043 91177308-0d34-0410-b5e6-96231b3b80d8
* Implemented aarch64 neon intrinsic vcopy_lane with float type.Kevin Qin2013-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194041 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "llvm-cov: Added command-line option to change dir."Yuchen Wu2013-11-05
| | | | | | This reverts commit d8acf0078cf363252727acff00f85ae8074f95b3. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194040 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Added basic unit test for llvm-cov."Yuchen Wu2013-11-05
| | | | | | This reverts commit 9cacd131c22b888303cb88e9a3235b2d7b2f19a1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194039 91177308-0d34-0410-b5e6-96231b3b80d8
* Added basic unit test for llvm-cov.Yuchen Wu2013-11-05
| | | | | | | This test compares the output of llvm-cov against a coverage file generated by gcov. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194038 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-cov: Added command-line option to change dir.Yuchen Wu2013-11-05
| | | | | | | This will allow for much easier testing when the input files are in a different folder from the test script. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194034 91177308-0d34-0410-b5e6-96231b3b80d8
* Support for reading run counts in llvm-cov.Yuchen Wu2013-11-05
| | | | | | | | | | | | This patch enables llvm-cov to correctly output the run count stored in the GCDA file. GCOVProfiling currently does not generate this information, so the GCDA run data had to be hacked on from a GCDA file generated by gcc. This is corrected by a subsequent patch. With the run and program data included, both llvm-cov and gcov produced the same output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194033 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix MSVC build by not putting an error_code directly in a union.Rafael Espindola2013-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194032 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify ErrorOr.Rafael Espindola2013-11-05
| | | | | | | | | | | | | | | | ErrorOr had quiet a bit of complexity and indirection to be able to hold a user type with the error. That feature is not used anymore. This patch removes it, it will live in svn history if we ever need it again. If we do need it again, IMHO there is one thing that should be done differently: Holding extra info in the error is not a property a function also returning a value or not. The ability to hold extra info should be in the error type and ErrorOr templated over it so that we don't need the funny looking ErrorOr<void>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194030 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a runtime unrolling parameter to the LoopUnroll pass constructorHal Finkel2013-11-05
| | | | | | | | | | | As with the other loop unrolling parameters (the unrolling threshold, partial unrolling, etc.) runtime unrolling can now also be controlled via the constructor. This will be necessary for moving non-trivial unrolling late in the pass manager (after loop vectorization). No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194027 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r194019 to r194021, "Submit the basic port of the rest of ARM ↵NAKAMURA Takumi2013-11-04
| | | | | | | | constant islands code to Mips." It broke -Asserts build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194026 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: remove unnecessary state-tracking during frame lowering.Tim Northover2013-11-04
| | | | | | | | | | | | | | | | | | | | | ResolveFrameIndex had what appeared to be a very nasty hack for when the frame-index referred to a callee-saved register. In this case it "adjusted" the offset so that the address was correct if (and only if) the MachineInstr immediately followed the respective push. This "worked" for all forms of GPR & DPR but was only ever used to set the frame pointer itself, and once this was put in a more sensible location the entire state-tracking machinery it relied on became redundant. So I stripped it. The only wrinkle is that "add r7, sp, #0" might theoretically be slower (need an actual ALU slot) compared to "mov r7, sp" so I added a micro-optimisation that also makes emitARMRegUpdate and emitT2RegUpdate also work when NumBytes == 0. No test changes since there shouldn't be any functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194025 91177308-0d34-0410-b5e6-96231b3b80d8
* AArch64: use default asm operand printing when modifier inapplicableTim Northover2013-11-04
| | | | | | | | | | | | If an inline assembly operand has multiple constraints (e.g. "Ir" for immediate or register) and an operand modifier (E.g. "w" for "print register as wN") then we need to decide behaviour when the modifier doesn't apply to the constraint. Previousely produced some combination of an assertion failure and a fatal error. GCC's behaviour appears to be to ignore the modifier and print the operand in the default way. This patch should implement that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194024 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure we don't get a warning from this variable that is only usedReed Kotler2013-11-04
| | | | | | | | when compiling with DEBUG. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194021 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the test case that goes with the previous submission for constant Reed Kotler2013-11-04
| | | | | | | | islands. I forgot to add it to svn on that patch. Ooops. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194020 91177308-0d34-0410-b5e6-96231b3b80d8
* Submit the basic port of the rest of ARM constant islands code to Mips. Reed Kotler2013-11-04
| | | | | | | | | | | | | | | | | | | Two test cases are added which reflect the next level of functionality: constants getting moved to water areas that are out of range from the initial placement at the end of the function and basic blocks being split to create water when none exists that can be used. There is a bunch of this code that is not complete and has been marked with IN_PROGRESS. I will finish cleaning this all up during the next week or two and submit the rest of the test cases. I have elminated some code for dealing with inline assembly because to me it unecessarily complicates things and some of the newer features of llvm like function attributies and builtin assembler give me better tools to solve the alignment issues created there. Also, for Mips16 I even have the option of not doing constant islands in the present of inline assembler if I chose. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194019 91177308-0d34-0410-b5e6-96231b3b80d8