summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
* Update comment. This should have been part of r210062.Rafael Espindola2014-06-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210119 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64] Fix typo in load/store optimizer.Tilmann Scheller2014-06-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210114 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Fix coverage instrumentation with -asan-globals=0.Evgeniy Stepanov2014-06-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210103 91177308-0d34-0410-b5e6-96231b3b80d8
* AArch64: mark small types (i1, i8, i16) as promotedTim Northover2014-06-03
| | | | | | | | | This means the output of LowerFormalArguments returns a lowered SDValue with the correct type (expected in SelectionDAGBuilder). Without this, an assertion under a DEBUG macro triggers when those types are passed on the stack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210102 91177308-0d34-0410-b5e6-96231b3b80d8
* Use an enum class.Rafael Espindola2014-06-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210078 91177308-0d34-0410-b5e6-96231b3b80d8
* Use an enum class.Rafael Espindola2014-06-03
| | | | | | Might also fix the windows build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210077 91177308-0d34-0410-b5e6-96231b3b80d8
* Ignore line numbers on debug intrinsics. Add an assert to ensure that we ↵Nick Lewycky2014-06-03
| | | | | | aren't emitting line number zero, the .gcno format uses this to indicate that the next field is a filename. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210068 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64] Correctly deal with VPR stack parameter passing.Jiangning Liu2014-06-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210067 91177308-0d34-0410-b5e6-96231b3b80d8
* Process::GetRandomNumber(): fix insecure RNGAlp Toker2014-06-03
| | | | | | | This could have generated non-random output under error conditions in release builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210065 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow alias to point to an arbitrary ConstantExpr.Rafael Espindola2014-06-03
| | | | | | | | | | | | | | | | | | | | | This patch changes GlobalAlias to point to an arbitrary ConstantExpr and it is up to MC (or the system assembler) to decide if that expression is valid or not. This reduces our ability to diagnose invalid uses and how early we can spot them, but it also lets us do things like @test5 = alias inttoptr(i32 sub (i32 ptrtoint (i32* @test2 to i32), i32 ptrtoint (i32* @bar to i32)) to i32*) An important implication of this patch is that the notion of aliased global doesn't exist any more. The alias has to encode the information needed to access it in its metadata (linkage, visibility, type, etc). Another consequence to notice is that getSection has to return a "const char *". It could return a NullTerminatedStringRef if there was such a thing, but when that was proposed the decision was to just uses "const char*" for that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210062 91177308-0d34-0410-b5e6-96231b3b80d8
* Add back commit r210029.Rafael Espindola2014-06-02
| | | | | | | | The code was actually correct. Sorry for the confusion. I have expanded the comment saying why the analysis is valid to avoid me misunderstaning it again in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210052 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Add the nsw flag when we detect that an add will not signed overflow."Rafael Espindola2014-06-02
| | | | | | | | | This reverts commit r210029. It was not correctly handling cases where LHS and RHS had multiple but different sign bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210048 91177308-0d34-0410-b5e6-96231b3b80d8
* InitLibcallNames can take a Triple instead of a TargetMachine.Eric Christopher2014-06-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210045 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support to optimize comparisons with "lshr exact" of a constant.Rafael Espindola2014-06-02
| | | | | | Patch by Rahul Jain. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210040 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove sanitizer blacklist from ASan/TSan/MSan function passes.Alexey Samsonov2014-06-02
| | | | | | | | | | | | | | | | | | | Instrumentation passes now use attributes address_safety/thread_safety/memory_safety which are added by Clang frontend. Clang parses the blacklist file and adds the attributes accordingly. Currently blacklist is still used in ASan module pass to disable instrumentation for certain global variables. We should fix this as well by collecting the set of globals we're going to instrument in Clang and passing it to ASan in metadata (as we already do for dynamically-initialized globals and init-order checking). This change also removes -tsan-blacklist and -msan-blacklist LLVM commandline flags in favor of -fsanitize-blacklist= Clang flag. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210038 91177308-0d34-0410-b5e6-96231b3b80d8
* Omit else branch after return.Eric Christopher2014-06-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210034 91177308-0d34-0410-b5e6-96231b3b80d8
* [X86] Fix checked arithmetic for i8 on X86.Andrea Di Biagio2014-06-02
| | | | | | | | | | | | | When lowering a ISD::BRCOND into a test+branch, make sure that we always use the correct condition code to emit the test operation. This fixes PR19858: "i8 checked mul is wrong on x86". Patch by Keno Fisher! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210032 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the nsw flag when we detect that an add will not signed overflow.Rafael Espindola2014-06-02
| | | | | | | We already had a function for checking this, we were just using it only in specialized cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210029 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Remove an out-of-date comment.Evgeniy Stepanov2014-06-02
| | | | | | | MSan is no longer an "early prototype". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210023 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Handle x86 vector pack intrinsics.Evgeniy Stepanov2014-06-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210020 91177308-0d34-0410-b5e6-96231b3b80d8
* Added inst combine tarnsform for (1 << X) & C pattrens where C is (some ↵Dinesh Dwivedi2014-06-02
| | | | | | | | | | | | | | PowerOf2 - 1) This patch can handles following cases from http://nondot.org/sabre/LLVMNotes/InstCombine.txt "((1 << X) & 7) == 0" ==> "X > 2" "((1 << X) & 7) != 0" ==> "X < 3". Differential Revision: http://reviews.llvm.org/D3678 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210007 91177308-0d34-0410-b5e6-96231b3b80d8
* Added inst combine transforms for single bit tests from Chris's noteDinesh Dwivedi2014-06-02
| | | | | | | | | | | | | | if ((x & C) == 0) x |= C becomes x |= C if ((x & C) != 0) x ^= C becomes x &= ~C if ((x & C) == 0) x ^= C becomes x |= C if ((x & C) != 0) x &= ~C becomes x &= ~C if ((x & C) == 0) x &= ~C becomes nothing Differential Revision: http://reviews.llvm.org/D3777 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210006 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence -Wreturn-type warningAlp Toker2014-06-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210005 91177308-0d34-0410-b5e6-96231b3b80d8
* GraphWriter: tweak the program fallback orderAlp Toker2014-06-02
| | | | | | | Amend r210001 to use the classic fallback order behaviour if the requested graphing program isn't found. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210003 91177308-0d34-0410-b5e6-96231b3b80d8
* GraphWriter: detect graph viewer programs at runtimeAlp Toker2014-06-02
| | | | | | | | | | | | | | | | | | | | | | Replace the crufty build-time configure checks for program paths with equivalent runtime logic. This lets users install graphing tools as needed without having to reconfigure and rebuild LLVM, while eliminating a long chain of inappropriate compile dependencies that included GUI programs and the windowing system. Additional features: * Support the OS X 'open' command to view graphs generated by any of the Graphviz utilities. This is an alternative to the Graphviz OS X UI which is no longer available on Mountain Lion. * Produce informative log output upon failure to indicate which programs can be installed to view graphs. Ping me if this doesn't work for your particular environment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210001 91177308-0d34-0410-b5e6-96231b3b80d8
* Instruction::isIdenticalToWhenDefined(): Check getNumOperands() in advance ↵NAKAMURA Takumi2014-06-02
| | | | | | | | of std::equal(op) to appease MSVC Debug build. MSVC Debug build is confused with (possibly invalid) op_begin(), if op_begin() == op_end(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210000 91177308-0d34-0410-b5e6-96231b3b80d8
* Support: add Windows ARM EH data structuresSaleem Abdulrasool2014-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce the support structures necessary to deal with the Windows ARM EH data. These definitions are extremely aggressive about assertions to aid future use for generation of the entries and subsequent decoding. The names for the various fields are meant to reflect the names used by the Visual Studio toolchain to aid communication. Due to the complexity in reading a few of the values, there are a couple of additional utility functions to decode the information. In general, there are two ways to encode the unwinding information: - packed, which places the data inline into the _IMAGE_ARM_RUNTIME_FUNCTION_ENTRY structure. - unpacked, which places the data into auxiliary structures placed into the .xdata section. The set of structures allow reading of data in either encoding, with the minor caveat that epilogue scopes need to be decoded manually by constructing the structure from the data returned by the RuntimeFunction structure. These definitions are meant for read-only access at the current point as the first use of them will be to decode the exception information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209998 91177308-0d34-0410-b5e6-96231b3b80d8
* ARMEB: Fix function return type f64Christian Pirker2014-06-01
| | | | | | | | Reviewed at http://reviews.llvm.org/D3968 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209990 91177308-0d34-0410-b5e6-96231b3b80d8
* Updates in IntelJITEventListener.cpp - by Arch Robison.Elena Demikhovsky2014-06-01
| | | | | | | | This patch updates IntelJITEventListener.cpp to account for revision 206654, which removed some methods from DILineInfo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209989 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Set all float vector expands in the same placeMatt Arsenault2014-06-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209988 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Assert that DbgVariables have associated DIEsDavid Blaikie2014-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was previously committed in r209680 and reverted in r209683 after it caused sanitizer builds to crash. The issue seems to be that the DebugLoc associated with dbg.value IR intrinsics isn't necessarily accurate. Instead, we duplicate the DIVariables and add an InlinedAt field to them to record their location. We were using this InlinedAt field to compute the LexicalScope for the variable, but not using it in the abstract DbgVariable construction and mapping. This resulted in a formal parameter to the current concrete function, correctly having no InlinedAt information, but incorrectly having a DebugLoc that described an inlined location within the function... thus an abstract DbgVariable was created for the variable, but its DIE was never constructed (since the LexicalScope had no such variable). This DbgVariable was silently ignored (by testing for a non-null DIE on the abstract DbgVariable). So, fix this by using the right scoping information when constructing abstract DbgVariables. In the long run, I suspect we want to undo the work that added this second kind of location tracking and fix the places where the DebugLoc propagation on the dbg.value intrinsic fails. This will shrink debug info (by not duplicating DIVariables), make it more efficient (by not having to construct new DIVariable metadata nodes to try to map back to a single variable), and benefit all instructions. But perhaps there are insurmountable issues with DebugLoc quality that I'm unaware of... I just don't know how we can't /just keep the DebugLoc from the dbg.declare to the dbg.values and never get this wrong/. Some history context: http://llvm.org/viewvc/llvm-project?view=revision&revision=135629 http://llvm.org/viewvc/llvm-project?view=revision&revision=137253 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209984 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typosAlp Toker2014-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209982 91177308-0d34-0410-b5e6-96231b3b80d8
* ExecutionEngine: avoid NDEBUG in headersAlp Toker2014-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209981 91177308-0d34-0410-b5e6-96231b3b80d8
* Update a couple of header inclusion guardsAlp Toker2014-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209980 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Remove redundant patternsMatt Arsenault2014-05-31
| | | | | | These patterns are already handled in the instruction definition. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209979 91177308-0d34-0410-b5e6-96231b3b80d8
* [SelectionDAG] Force cycle detection in AssignTopologicalOrder before abortingAdam Nemet2014-05-31
| | | | | | | | | | | | | | | DAG cycle detection is only enabled with ENABLE_EXPENSIVE_CHECKS. However we can run it just before we would crash in order to provide more informative diagnostics. Now in addition to the "Overran sorted position" message we also get the Node printed if a cycle was detected. Tested by building several configs: Debug+Assert, Debug+Assert+Check (this is ENABLE_EXPENSIVE_CHECKS), Release+Assert and Release. Also tried that the AssignTopologicalOrder assert produces the expected results. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209977 91177308-0d34-0410-b5e6-96231b3b80d8
* [SelectionDAG] Pass DAG to checkForCyclesAdam Nemet2014-05-31
| | | | | | | | | Pass the DAG down to checkForCycles from all callers where we have it. This allows target-specific nodes to be printed properly. Also print some missing newlines. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209976 91177308-0d34-0410-b5e6-96231b3b80d8
* [Reassociate] Similar to "X + -X" -> "0", added code to handle "X + ~X" -> "-1".Benjamin Kramer2014-05-31
| | | | | | | | | | | | Handle "X + ~X" -> "-1" in the function Value *Reassociate::OptimizeAdd(Instruction *I, SmallVectorImpl<ValueEntry> &Ops); This patch implements: TODO: We could handle "X + ~X" -> "-1" if we wanted, since "-X = ~X+1". Patch by Rahul Jain! Differential Revision: http://reviews.llvm.org/D3835 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209973 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Fix [s|u]int_to_fp for i1Matt Arsenault2014-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209971 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typos in tablegen error messagesMatt Arsenault2014-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209968 91177308-0d34-0410-b5e6-96231b3b80d8
* [yaml2obj] Add new command line option `-docnum`.Simon Atanasyan2014-05-31
| | | | | | | | | | Input YAML file might contain multiple object file definitions. New option `-docnum` allows to specify an ordinal number (starting from 1) of definition used for an object file generation. Patch reviewed by Sean Silva. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209967 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix windows build.Rafael Espindola2014-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209961 91177308-0d34-0410-b5e6-96231b3b80d8
* There is no std::errc::success, remove the llvm one.Rafael Espindola2014-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209960 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn errc and windows_error into enum classes.Rafael Espindola2014-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209957 91177308-0d34-0410-b5e6-96231b3b80d8
* Use error_code() instead of error_code::succes()Rafael Espindola2014-05-31
| | | | | | | There is no std::error_code::success, so this removes much of the noise in transitioning to std::error_code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209952 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the behavior of ExecuteAndWait with a non-zero timeout.Peter Collingbourne2014-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209951 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Behave the same for functions w/o sanitize_address attribute and ↵Alexey Samsonov2014-05-31
| | | | | | blacklisted functions git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209946 91177308-0d34-0410-b5e6-96231b3b80d8
* [TSan] Behave the same for functions w/o sanitize_thread attribute and ↵Alexey Samsonov2014-05-31
| | | | | | blacklisted functions git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209939 91177308-0d34-0410-b5e6-96231b3b80d8
* delete dead code.Rafael Espindola2014-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209938 91177308-0d34-0410-b5e6-96231b3b80d8
* Have the TLOF creation take a Triple rather than needing a subtarget.Eric Christopher2014-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209937 91177308-0d34-0410-b5e6-96231b3b80d8