summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Objective-C SDK modernizer. Modernize to use Fariborz Jahanian2014-12-093-6/+56
| | | | | | | property-dot-syntax when receiver is 'super'. rdar://19140267 llvm-svn: 223846
* [Hexagon] [NFC] Cleaning up unused classes.Colin LeMahieu2014-12-091-30/+0
| | | | llvm-svn: 223845
* Fix compilation failures resulting from the llvm Metadata refactor.Zachary Turner2014-12-091-11/+12
| | | | | | Patch by Duncan P. N. Exon Smith llvm-svn: 223844
* Add a new 'eRegisterInLiveRegisterContext' RegisterLocation to trackJason Molenda2014-12-093-9/+44
| | | | | | | | | | | | | | a register value that is live in the stack frame 0 register context. Fixes a problem where retrieving a register value on stack frame #n would involved O(n!) stack frame checks. This could be very slow on a deep stack when retrieving register values that had not been modified/saved by any of the stack frames. Not common, but annoying when it was hit. <rdar://problem/19010211> llvm-svn: 223843
* DebugInfo: Correct location of initialization of auto __complexDavid Blaikie2014-12-092-1/+9
| | | | llvm-svn: 223842
* [ARM] Make testcase more explicit. NFC.Ahmed Bougacha2014-12-091-30/+49
| | | | llvm-svn: 223841
* profile: Add low level versions of profile buffer functionsJustin Bogner2014-12-093-7/+79
| | | | | | | | | | | | On Darwin, compiler_rt uses magic linker symbols to find the profile counters in the __DATA segment. This is a reasonable method for normal, hosted, userspace programs. However programs with custom memory layouts, such as the kernel, will need to tell compiler_rt explicitly where to find these sections. Patch by Lawrence D'Anna. Thanks! llvm-svn: 223840
* DebugInfo: Correct the location of initializations of auto.David Blaikie2014-12-094-4/+14
| | | | llvm-svn: 223839
* Unbreak after LLVM's metadata split in r223802Tobias Grosser2014-12-091-4/+4
| | | | llvm-svn: 223838
* Extend ValueObject::GetExpressionPath() to do something reasonable for ↵Enrico Granata2014-12-093-0/+63
| | | | | | | | | | | | | | | | | | | synthetic children Because of the way they are created, synthetic children cannot (in general) have a sane expression path A solution to this would be letting the parent front-end generate expression paths for its children Doing so requires a significant amount of refactoring, and might not always lead to better results (esp. w.r.t. C++ templates) This commit takes a simpler approach: - if a synthetic child is of pointer type and it's a target pointer, then emit *((T)value) - if a synthetic child is a non-pointer, but its location is in the target, then emit *((T*)loadAddr) - if a synthetic child has a value, emit ((T)value) - else, don't emit anything Fixes rdar://18442386 llvm-svn: 223836
* DebugInfo: Correct location for compound complex assignmentDavid Blaikie2014-12-092-4/+14
| | | | llvm-svn: 223835
* [ARM] Factor out base-updating VLD/VST combiner function. NFC.Ahmed Bougacha2014-12-091-6/+15
| | | | | | | | | Move the combiner-state check into another function, add a few small comments, and use a more general type in a cast<>. In preparation for a future patch. llvm-svn: 223834
* [ARM] Move the store combiner function down. NFC.Ahmed Bougacha2014-12-091-141/+143
| | | | | | | And flip its final condition. In preparation for a future patch. llvm-svn: 223833
* [ARM] Also support v2f64 vld1/vst1.Ahmed Bougacha2014-12-093-0/+21
| | | | | | | | | It was missing from the VLD1/VST1 handling logic, even though the corresponding instructions exist (same form as v2i64). In preparation for a future patch. llvm-svn: 223832
* Removed an unnecessary variaable.Sean Callanan2014-12-091-5/+0
| | | | llvm-svn: 223831
* Fixed ValueObject::UpdateValueIfNeeded to keepSean Callanan2014-12-094-19/+89
| | | | | | | | | | track of the checksum of the object so we can track if it is modified. This fixes a testcase (test/expression_command/issue_11588) on OS X. Patch by Enrico Granata. llvm-svn: 223830
* IR: Metadata/Value split: RAUW in a deterministic orderDuncan P. N. Exon Smith2014-12-092-22/+41
| | | | | | | | | | | RAUW in a deterministic order to try to recover the hexagon bot [1], whose tests started failing once my GCC fixes were in for r223802. Otherwise, I'm not sure why tests would fail there and not here. [1]: http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/13426 llvm-svn: 223829
* DebugInfo: Accurate location information for complex assignmentDavid Blaikie2014-12-092-20/+27
| | | | llvm-svn: 223828
* Return ErrorOr<std::unique_ptr<Archive>> form getAsArchive.Rafael Espindola2014-12-095-33/+36
| | | | | | This is the same return type of Archive::create. llvm-svn: 223827
* Change AddressSanitzierRuntime to print its info message viaJason Molenda2014-12-091-14/+28
| | | | | | | | the Debugger's output stream instead of logging to the module. http://reviews.llvm.org/D6577 llvm-svn: 223826
* DebugInfo: Emit the correct location for initialization of a complex variableDavid Blaikie2014-12-094-15/+30
| | | | | | Especially useful for sanitizer reports. llvm-svn: 223825
* Try fixing MSVC build after r223802Hans Wennborg2014-12-093-4/+1
| | | | | | | | | | | LLVM_EXPLICIT is only supported by recent version of MSVC, and it seems the not-so-recent versions get confused about the operator bool() when tryint to resolve operator== calls. This removed the operator bool()'s since they don't seem to be used anyway. llvm-svn: 223824
* [Hexagon] Fixing broken tests.Colin LeMahieu2014-12-093-14/+15
| | | | llvm-svn: 223823
* Rename createIRObjectFile to just create.Rafael Espindola2014-12-094-8/+8
| | | | | | | It is a static method of IRObjectFile, so having to use IRObjectFile::createIRObjectFile was redundant. llvm-svn: 223822
* [Hexagon] Updating rr/ri 32/64 transfer encodings and adding tests.Colin LeMahieu2014-12-0911-178/+216
| | | | llvm-svn: 223821
* Fix an MSVC failure from r223802Duncan P. N. Exon Smith2014-12-091-0/+6
| | | | llvm-svn: 223820
* This patch does a few things:Enrico Granata2014-12-0914-27/+110
| | | | | | | | | | - adds a new flag to mark ValueObjects as "synthetic children generated" - vends new Create functions as part of the SyntheticChildrenFrontEnd that set the flag automatically - moves synthetic child providers over to using these new functions No visible feature change, but preparatory work for feature change llvm-svn: 223819
* [FastISel][AArch64] Fix a missing nullptr check in 'computeAddress'.Juergen Ributzka2014-12-092-1/+16
| | | | | | | | | The load/store value type is currently not available when lowering the memcpy intrinsic. Add the missing nullptr check to support this in 'computeAddress'. Fixes rdar://problem/19178947. llvm-svn: 223818
* ELF: Add AArch64 test case missing from previous commitWill Newton2014-12-091-0/+44
| | | | llvm-svn: 223817
* XFAIL all of TestInferiorAssert.py tests on Windows.Zachary Turner2014-12-092-0/+9
| | | | | | | | | | | | | | Getting this working correctly is a significant amount of work. Assertions on Windows show up as error code 0xC0000409, which is STATUS_STACK_BUFFER_OVERRUN. In order to accurately determine that this is not just any stack buffer overrun, but one triggered by a call to abort, we would need to analyze the call stack. This in turn requires better symbol support for Windows executables, and work on LLDB to make stack frames better on Windows. For now, these are XFAIL'ed and tracked in http://llvm.org/pr21793. llvm-svn: 223816
* [Hexagon] Adding word combine dot-new form and replacing old combine opcode.Colin LeMahieu2014-12-096-80/+57
| | | | llvm-svn: 223815
* Fix a GCC error from r223803Duncan P. N. Exon Smith2014-12-091-3/+5
| | | | llvm-svn: 223814
* Revert r223764 which taught instcombine about integer-based elment extractionChandler Carruth2014-12-092-559/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patterns. This is causing Clang to miscompile itself for 32-bit x86 somehow, and likely also on ARM and PPC. I really don't know how, but reverting now that I've confirmed this is actually the culprit. I have a reproduction as well and so should be able to restore this shortly. This reverts commit r223764. Original commit log follows: Teach instcombine to canonicalize "element extraction" from a load of an integer and "element insertion" into a store of an integer into actual element extraction, element insertion, and vector loads and stores. Previously various parts of LLVM (including instcombine itself) would introduce integer loads and stores into the code as a way of opaquely loading and storing "bits". In some cases (such as a memcpy of std::complex<float> object) we will eventually end up using those bits in non-integer types. In order for SROA to effectively promote the allocas involved, it splits these "store a bag of bits" integer loads and stores up into the constituent parts. However, for non-alloca loads and tsores which remain, it uses integer math to recombine the values into a large integer to load or store. All of this would be "fine", except that it forces LLVM to go through integer math to combine and split up values. While this makes perfect sense for integers (and in fact is critical for bitfields to end up lowering efficiently) it is *terrible* for non-integer types, especially floating point types. We have a much more canonical way of representing the act of concatenating the bits of two SSA values in LLVM: a vector and insertelement. This patch teaching InstCombine to use this representation. With this patch applied, LLVM will no longer introduce integer math into the critical path of every loop over std::complex<float> operations such as those that make up the hot path of ... oh, most HPC code, Eigen, and any other heavy linear algebra library. For the record, I looked *extensively* at fixing this in other parts of the compiler, but it just doesn't work: - We really do want to canonicalize memcpy and other bit-motion to integer loads and stores. SSA values are tremendously more powerful than "copy" intrinsics. Not doing this regresses massive amounts of LLVM's scalar optimizer. - We really do need to split up integer loads and stores of this form in SROA or every memcpy of a trivially copyable struct will prevent SSA formation of the members of that struct. It essentially turns off SROA. - The closest alternative is to actually split the loads and stores when partitioning with SROA, but this has all of the downsides historically discussed of splitting up loads and stores -- the wide-store information is fundamentally lost. We would also see performance regressions for bitfield-heavy code and other places where the integers aren't really intended to be split without seemingly arbitrary logic to treat integers totally differently. - We *can* effectively fix this in instcombine, so it isn't that hard of a choice to make IMO. llvm-svn: 223813
* Create a valid stop info for all non-breakpoint exceptions.Zachary Turner2014-12-091-2/+12
| | | | llvm-svn: 223812
* AsmParser: Don't crash on short hex constants for fp128 typesDavid Majnemer2014-12-092-5/+11
| | | | | | | If we see 0xL01, treat it like 0xL00000000000000000000000000000001 instead of crashing. llvm-svn: 223811
* Fix another GCC build failure from r223802Duncan P. N. Exon Smith2014-12-091-0/+1
| | | | llvm-svn: 223810
* Remove unneeded curly braces.Frederic Riss2014-12-091-4/+2
| | | | llvm-svn: 223809
* Reorder the code to avoid inserting at the beginning of a vector.Frederic Riss2014-12-091-1/+1
| | | | | | As per dblaikie suggestion, thanks\! llvm-svn: 223808
* Cleanup PatternMatch. NFC.Juergen Ributzka2014-12-091-395/+330
| | | | | | | Tidy up the code a little by using 'auto' when the type is obvious, doxify the comments, and clang-format the file. llvm-svn: 223807
* Fix a GCC build failure from r223802Duncan P. N. Exon Smith2014-12-091-1/+2
| | | | llvm-svn: 223806
* Adding a new option to CMake to disable C++ atexit on llvm-shlib.Chris Bieneman2014-12-093-0/+14
| | | | | | | | | | | | | | | | | Summary: This is desirable for WebKit and other clients of the llvm-shlib because C++ exit time destructors have a tendency to crash when invoked from multi-threaded applications. Ideally this option will be temporary, because the ideal fix is to just not have exit time destructors. Reviewers: chapuni, ributzka Reviewed By: ributzka Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6572 llvm-svn: 223805
* [AVX512] Added lowering for VBROADCASTSS/SD instructions.Robert Khasanov2014-12-093-1/+176
| | | | | | | Lowering patterns were written through avx512_broadcast_pat multiclass as pattern generates VBROADCAST and COPY_TO_REGCLASS nodes. Added lowering tests. llvm-svn: 223804
* IR: Update clang for Metadata/Value split in r223802Duncan P. N. Exon Smith2014-12-0914-274/+266
| | | | | | Match LLVM API changes from r223802. llvm-svn: 223803
* IR: Split Metadata from ValueDuncan P. N. Exon Smith2014-12-0988-1958/+3358
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split `Metadata` away from the `Value` class hierarchy, as part of PR21532. Assembly and bitcode changes are in the wings, but this is the bulk of the change for the IR C++ API. I have a follow-up patch prepared for `clang`. If this breaks other sub-projects, I apologize in advance :(. Help me compile it on Darwin I'll try to fix it. FWIW, the errors should be easy to fix, so it may be simpler to just fix it yourself. This breaks the build for all metadata-related code that's out-of-tree. Rest assured the transition is mechanical and the compiler should catch almost all of the problems. Here's a quick guide for updating your code: - `Metadata` is the root of a class hierarchy with three main classes: `MDNode`, `MDString`, and `ValueAsMetadata`. It is distinct from the `Value` class hierarchy. It is typeless -- i.e., instances do *not* have a `Type`. - `MDNode`'s operands are all `Metadata *` (instead of `Value *`). - `TrackingVH<MDNode>` and `WeakVH` referring to metadata can be replaced with `TrackingMDNodeRef` and `TrackingMDRef`, respectively. If you're referring solely to resolved `MDNode`s -- post graph construction -- just use `MDNode*`. - `MDNode` (and the rest of `Metadata`) have only limited support for `replaceAllUsesWith()`. As long as an `MDNode` is pointing at a forward declaration -- the result of `MDNode::getTemporary()` -- it maintains a side map of its uses and can RAUW itself. Once the forward declarations are fully resolved RAUW support is dropped on the ground. This means that uniquing collisions on changing operands cause nodes to become "distinct". (This already happened fairly commonly, whenever an operand went to null.) If you're constructing complex (non self-reference) `MDNode` cycles, you need to call `MDNode::resolveCycles()` on each node (or on a top-level node that somehow references all of the nodes). Also, don't do that. Metadata cycles (and the RAUW machinery needed to construct them) are expensive. - An `MDNode` can only refer to a `Constant` through a bridge called `ConstantAsMetadata` (one of the subclasses of `ValueAsMetadata`). As a side effect, accessing an operand of an `MDNode` that is known to be, e.g., `ConstantInt`, takes three steps: first, cast from `Metadata` to `ConstantAsMetadata`; second, extract the `Constant`; third, cast down to `ConstantInt`. The eventual goal is to introduce `MDInt`/`MDFloat`/etc. and have metadata schema owners transition away from using `Constant`s when the type isn't important (and they don't care about referring to `GlobalValue`s). In the meantime, I've added transitional API to the `mdconst` namespace that matches semantics with the old code, in order to avoid adding the error-prone three-step equivalent to every call site. If your old code was: MDNode *N = foo(); bar(isa <ConstantInt>(N->getOperand(0))); baz(cast <ConstantInt>(N->getOperand(1))); bak(cast_or_null <ConstantInt>(N->getOperand(2))); bat(dyn_cast <ConstantInt>(N->getOperand(3))); bay(dyn_cast_or_null<ConstantInt>(N->getOperand(4))); you can trivially match its semantics with: MDNode *N = foo(); bar(mdconst::hasa <ConstantInt>(N->getOperand(0))); baz(mdconst::extract <ConstantInt>(N->getOperand(1))); bak(mdconst::extract_or_null <ConstantInt>(N->getOperand(2))); bat(mdconst::dyn_extract <ConstantInt>(N->getOperand(3))); bay(mdconst::dyn_extract_or_null<ConstantInt>(N->getOperand(4))); and when you transition your metadata schema to `MDInt`: MDNode *N = foo(); bar(isa <MDInt>(N->getOperand(0))); baz(cast <MDInt>(N->getOperand(1))); bak(cast_or_null <MDInt>(N->getOperand(2))); bat(dyn_cast <MDInt>(N->getOperand(3))); bay(dyn_cast_or_null<MDInt>(N->getOperand(4))); - A `CallInst` -- specifically, intrinsic instructions -- can refer to metadata through a bridge called `MetadataAsValue`. This is a subclass of `Value` where `getType()->isMetadataTy()`. `MetadataAsValue` is the *only* class that can legally refer to a `LocalAsMetadata`, which is a bridged form of non-`Constant` values like `Argument` and `Instruction`. It can also refer to any other `Metadata` subclass. (I'll break all your testcases in a follow-up commit, when I propagate this change to assembly.) llvm-svn: 223802
* AsmParser: Don't crash on malformed attribute groupsDavid Majnemer2014-12-092-1/+7
| | | | | | This fixes PR21785. llvm-svn: 223801
* [Hexagon] Updating predicate register transfers and adding tstbit to allow ↵Colin LeMahieu2014-12-0915-36/+87
| | | | | | select selection. Updating ll tests with predicate transfers that previously had nop encodings. llvm-svn: 223800
* Correctly handle complex locations expressions in replaceDbgDeclareForAlloca()Frederic Riss2014-12-092-2/+89
| | | | | | | | | | | | | | | | replaceDbgDeclareForAlloca() replaces an alloca by a value storing the address of what was the alloca. If there is a dbg.declare corresponding to that alloca, we need to lower it to a dbg.value describing the additional dereference operation to be performed to get to the underlying variable. This is done by adding a DW_OP_deref to the complex location part of the location description. This deref was added to the end of the operation list, which is wrong. The expression applies to what is described by the dbg.{declare,value}, and as we are changing this, we need to apply the DW_OP_deref as the first operation in the list. Part of the fix for rdar://19162268. llvm-svn: 223799
* Deleting empty directories left over from r223794.Frederic Riss2014-12-090-0/+0
| | | | llvm-svn: 223798
* [CGP] Rewrite pattern match for splitBranchCondition to work with Values ↵Juergen Ributzka2014-12-092-14/+10
| | | | | | | | | instead. Rewrite the pattern match code to work also with Values instead with Instructions only. Also remove the no longer need matcher (m_Instruction). llvm-svn: 223797
* Fix the MSVC buildHans Wennborg2014-12-092-2/+4
| | | | llvm-svn: 223796
OpenPOWER on IntegriCloud