summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* LegalizeDAG: make sure cast is unsigned before using FP_TO_UINT.Tim Northover2014-06-151-1/+4
| | | | | | | | | | | | It's valid to use FP_TO_SINT when asking for a smaller type (e.g. all "unsigned int16" values fit into a "signed int32"), but the reverse isn't true. Unfortunately, I'm not actually aware of any architecture with asymmetric FP_TO_SINT and FP_TO_UINT handling and the logic happens to work in the symmetric case, so I can't actually write a test for this. llvm-svn: 210986
* AArch64: improve handling & modelling of FP_TO_XINT nodes.Tim Northover2014-06-152-10/+25
| | | | | | | | There's probably no acatual change in behaviour here, just updating the LowerFP_TO_INT function to be more similar to the reverse implementation and updating costs to current CodeGen. llvm-svn: 210985
* AArch64: improve vector [su]itofp handling.Tim Northover2014-06-152-36/+46
| | | | | | | This somehow got missed in the AArch64 merge, so should fix a performance regression since 3.4. llvm-svn: 210984
* Replacing the private implementations of SwapValue with calls to ↵Artyom Skrobov2014-06-142-130/+120
| | | | | | sys::swapByteOrder() llvm-svn: 210980
* Using llvm::sys::swapByteOrder() for the common case of byte-swapping a ↵Artyom Skrobov2014-06-143-5/+5
| | | | | | value in place llvm-svn: 210978
* Renaming SwapByteOrder() to getSwappedBytes()Artyom Skrobov2014-06-146-8/+8
| | | | | | The next commit will add swapByteOrder(), acting in-place llvm-svn: 210973
* Fix typoMatt Arsenault2014-06-141-1/+1
| | | | llvm-svn: 210968
* R600: Fix asserts related to constant initializersMatt Arsenault2014-06-141-5/+20
| | | | | | | | | | | This would assert if a constant address space was extern and therefore didn't have an initializer. If the initializer was undef, it would hit the unreachable unhandled initializer case. An extern global should never really occur since we don't have machine linking, but bugpoint likes to remove initializers. llvm-svn: 210967
* R600: Use address space enum instead of valueMatt Arsenault2014-06-141-6/+7
| | | | llvm-svn: 210966
* Remove extra whitespace in function declaration. No functionality change.Nick Lewycky2014-06-141-2/+2
| | | | llvm-svn: 210965
* DebugInfo: Remove some extra handling of abstract variables and instead rely ↵David Blaikie2014-06-132-40/+34
| | | | | | | | | | | | | | | solely on the delayed handling introduced in r210946 Now that we handle finding abstract variables at the end of the module, remove the upfront handling and just ensure the abstract variable is built when necessary. In theory we could have a split implementation, where inlined variables are immediately constructed referencing the abstract definition, and concrete variables are delayed - but let's go with one solution for now unless there's a reason not to. llvm-svn: 210961
* Remove InstrItineraryData off of the TargetMachine - it's alreadyEric Christopher2014-06-132-6/+2
| | | | | | on the subtarget and just forward the accessor. llvm-svn: 210955
* Move ARMJITInfo off of the TargetMachine and down onto the subtarget.Eric Christopher2014-06-139-21/+25
| | | | | | This required untangling a mess of headers that included around. llvm-svn: 210953
* Move GlobalMerge from Transform to CodeGen.Jiangning Liu2014-06-134-2/+2
| | | | | | | | | | This patch is to move GlobalMerge pass from Transform/Scalar to CodeGen, because GlobalMerge depends on TargetMachine. In the mean time, the macro INITIALIZE_TM_PASS is also moved to CodeGen/Passes.h. With this fix we can avoid making libScalarOpts depend on libCodeGen. llvm-svn: 210951
* The hazard recognizer only needs a subtarget, not a target machineEric Christopher2014-06-137-16/+21
| | | | | | so make it take one. Fix up all users accordingly. llvm-svn: 210948
* Fix typo.Eric Christopher2014-06-131-1/+1
| | | | llvm-svn: 210947
* DebugInfo: Reference abstract definitions from variables in concrete ↵David Blaikie2014-06-132-1/+7
| | | | | | | | | | | | definitions that preceed their first inline definition. Rather than relying on abstract variables looked up at the time the concrete variable is created, look them up at the end of the module to ensure they're referenced even if they're created after the concrete definition. This completes/matches the work done in r209677 to handle this for the subprograms themselves. llvm-svn: 210946
* [DWARF parser] Use distinction between DW_AT_ranges_base and ↵Alexey Samsonov2014-06-133-8/+17
| | | | | | DW_AT_GNU_ranges_base instead of DWARF version llvm-svn: 210945
* DwarfDebug::getExistingAbstractVariable: constify an existing reference ↵David Blaikie2014-06-132-2/+2
| | | | | | parameter that didn't need to be mutated. llvm-svn: 210944
* DebugInfo: Following up to r209677, refactor local variable emission to ↵David Blaikie2014-06-134-25/+48
| | | | | | | | | | | | | | | | delay the choice between emitting the definition attributes or using DW_AT_abstract_definition This doesn't fix the abstract variable handling yet, but it introduces a similar delay mechanism as was added for subprograms, causing DW_AT_location to be reordered to the beginning of the attribute list for local variables, and fixes all the test fallout for that. A subsequent commit will remove the abstract variable handling in DbgVariable and just do the abstract variable lookup at module end to ensure that abstract variables introduced after their concrete counterparts are appropriately referenced by the concrete variable. llvm-svn: 210943
* Make the error-handling functions thread-safe.Zachary Turner2014-06-131-4/+19
| | | | | | | | | | | | | Prior to this change, error handling functions must be installed and removed only inside of an llvm_[start/stop]_multithreading pair. This change allows error handling functions to be installed any time, and from any thread. Reviewed by: chandlerc Differential Revision: http://reviews.llvm.org/D4140 llvm-svn: 210937
* Remove top-level Clang -fsanitize= flags for optional ASan features.Alexey Samsonov2014-06-131-33/+15
| | | | | | | | | | | | | Init-order and use-after-return modes can currently be enabled by runtime flags. use-after-scope mode is not really working at the moment. The only problem I see is that users won't be able to disable extra instrumentation for init-order and use-after-scope by a top-level Clang flag. But this instrumentation was implicitly enabled for quite a while and we didn't hear from users hurt by it. llvm-svn: 210924
* X86: lower ATOMIC_CMP_SWAP_WITH_SUCCESS directlyTim Northover2014-06-131-12/+31
| | | | | | | | | | | Lowering this new node allows us to fold the almost universal comparison for success before it's even formed. Instead we can create a copy from EFLAGS and an X86ISD::SETCC operation since all "cmpxchg" instructions set the zero-flag to the correct value. rdar://problem/13201607 llvm-svn: 210923
* R600: Cleanup some old AMDIL stuff.Matt Arsenault2014-06-132-95/+42
| | | | | | | | | | | | Move / delete some of the more obviously wrong setOperationAction calls. Most of these are setting Expand for types that aren't legal which is the default anyway. Leave stuff that might require more thought on whether it's junk or not as it is. No functionality change. llvm-svn: 210922
* Finishing touch for the std::error_code transition.Rafael Espindola2014-06-138-25/+30
| | | | | | | | | | | While std::error_code itself seems to work OK in all platforms, there are few annoying differences with regards to the std::errc enumeration. This patch adds a simple llvm enumeration, which will hopefully avoid build breakages in other platforms and surprises as we get more uses of std::error_code. llvm-svn: 210920
* Atomics: make use of the "cmpxchg weak" instruction.Tim Northover2014-06-131-12/+22
| | | | | | | | | This also simplifies the IR we create slightly: instead of working out where success & failure should go manually, it turns out we can just always jump to a success/failure block created for the purpose. Later phases will sort out the mess without much difficulty. llvm-svn: 210917
* Atomics: switch direction of cmpxchg comparisonTim Northover2014-06-131-2/+2
| | | | | | | | This has two benefits: it makes the result more suitable for direct insertaion into the struct to emulate the new cmpxchg, and it means the name we give the instruction matches its actual effect better. llvm-svn: 210916
* R600: Remove AMDIL instruction and register definitionsTom Stellard2014-06-1321-447/+104
| | | | | | Most of these are no longer used any more. llvm-svn: 210915
* Remove unused and odd code.Rafael Espindola2014-06-132-15/+0
| | | | | | | | This code was never being used and any use of it would look fairly strange. For example, it would try to map a object_error::parse_failed to std::errc::invalid_argument. llvm-svn: 210912
* SCCP: update for cmpxchg returning { iN, i1 } now.Tim Northover2014-06-131-1/+3
| | | | | | I accidentally missed this one since its use looked OK locally. llvm-svn: 210909
* [mips][mips64r6] Relocation R_MIPS_PC18_S3Zoran Jovanovic2014-06-135-5/+31
| | | | | | Differential Revision: http://reviews.llvm.org/D3890 llvm-svn: 210908
* IR: add "cmpxchg weak" variant to support permitted failure.Tim Northover2014-06-1321-117/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a weak variant of the cmpxchg operation, as described in C++11. A cmpxchg instruction with this modifier is permitted to fail to store, even if the comparison indicated it should. As a result, cmpxchg instructions must return a flag indicating success in addition to their original iN value loaded. Thus, for uniformity *all* cmpxchg instructions now return "{ iN, i1 }". The second flag is 1 when the store succeeded. At the DAG level, a new ATOMIC_CMP_SWAP_WITH_SUCCESS node has been added as the natural representation for the new cmpxchg instructions. It is a strong cmpxchg. By default this gets Expanded to the existing ATOMIC_CMP_SWAP during Legalization, so existing backends should see no change in behaviour. If they wish to deal with the enhanced node instead, they can call setOperationAction on it. Beware: as a node with 2 results, it cannot be selected from TableGen. Currently, no use is made of the extra information provided in this patch. Test updates are almost entirely adapting the input IR to the new scheme. Summary for out of tree users: ------------------------------ + Legacy Bitcode files are upgraded during read. + Legacy assembly IR files will be invalid. + Front-ends must adapt to different type for "cmpxchg". + Backends should be unaffected by default. llvm-svn: 210903
* [mips] Add cache and pref instructionsDaniel Sanders2014-06-136-13/+101
| | | | | | | | | | | | | | | | | | | Summary: cache and pref were added in MIPS-III, and MIPS32 but were re-encoded in MIPS32r6/MIPS64r6 to use a 9-bit offset rather than the 16-bit offset available to earlier cores. Resolved the decoding conflict between pref and lwc3. Depends on D4115 Reviewers: zoran.jovanovic, jkolek, vmedic Reviewed By: vmedic Differential Revision: http://reviews.llvm.org/D4116 llvm-svn: 210900
* [mips][mips64r6] bc1any[24] are not available on MIPS32r6/MIPS64r6Daniel Sanders2014-06-131-1/+0
| | | | | | | | | | | | | | Summary: These MIPS-3D instructions have never been implemented in LLVM so we only add testcases. Reviewers: zoran.jovanovic, jkolek, vmedic Reviewed By: vmedic Differential Revision: http://reviews.llvm.org/D4115 llvm-svn: 210899
* [mips][mips64r6] b(ge|lt)zal are not available on MIPS32r6/MIPS64r6 and bal ↵Daniel Sanders2014-06-135-13/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | is a normal instruction Summary: b(ge|lt)zal have been removed in MIPS32r6/MIPS64r6. However, bal (an alias for 'bgezal $zero, $offset') still remains with the same encoding it had prior to MIPS32r6/MIPS64r6. Updated the MipsNaCLELFStreamer, and MipsLongBranch to correctly handle the MIPS32r6/MIPS64r6 BAL instruction in addition to the existing BAL_BR pseudo. No changes were required to the CodeGen test that looks for BAL (test/CodeGen/Mips/longbranch.ll) since the new instruction has the same syntax. Depends on D4113 Reviewers: jkolek, zoran.jovanovic, vmedic Reviewed By: vmedic Differential Revision: http://reviews.llvm.org/D4114 llvm-svn: 210898
* [mips][mips64r6] daddi is not available on MIPS64r6Daniel Sanders2014-06-132-5/+16
| | | | | | | | | | | | | | | | | | Summary: It's not emitted by the code generator so we only need assembler tests. Also added missing daddi aliases from dsub mnemonics, and removed a couple duplicate dsub tests. Depends on D4112 Reviewers: zoran.jovanovic, jkolek, vmedic Reviewed By: vmedic Differential Revision: http://reviews.llvm.org/D4113 llvm-svn: 210897
* Add HasCDI predicate to AVX512 VPBROADCASTM*.Cameron McInally2014-06-131-0/+2
| | | | llvm-svn: 210892
* CPP backend: set volatile property on atomic instructions.Tim Northover2014-06-131-0/+4
| | | | llvm-svn: 210890
* ARM: Fix fastcc calling convention for Thumb1Oliver Stannard2014-06-131-3/+3
| | | | | | | | When targetting Thumb1 on a processor which has a VFP unit (which is not accessible from Thumb1), we were converting the fastcc calling convention to AAPCS-VFP, which is not possible. llvm-svn: 210889
* R600: Don't call setOperationAction with things that aren't opcodes.Matt Arsenault2014-06-131-8/+0
| | | | | | | | | CondCode actions are set with setCondCodeAction. This should have been a harmless bug since the values seem to only collide only with nodes that don't need to be handled, and these are already correctly setup elsewhere. llvm-svn: 210888
* R600/SI: Fix selection error on i64 rotl / rotr.Matt Arsenault2014-06-132-6/+7
| | | | | | Evergreen is still broken due to missing shl_parts. llvm-svn: 210885
* Fix build on windows.Rafael Espindola2014-06-132-85/+90
| | | | llvm-svn: 210873
* Remove 'using std::errro_code' from lib.Rafael Espindola2014-06-1342-580/+562
| | | | llvm-svn: 210871
* [FastISel][X86] Add support for cvttss2si/cvttsd2si intrinsics.Juergen Ributzka2014-06-131-0/+66
| | | | | | | | This adds support for the cvttss2si/cvttsd2si intrinsics. Preceding insertelement instructions are folded into the conversion instruction (if possible). llvm-svn: 210870
* R600: Move AMDGPUInstrInfo from AMDGPUTargetMachine into AMDGPUSubtargetTom Stellard2014-06-1323-43/+54
| | | | llvm-svn: 210869
* R600: Drop use of cached TargetMachine in R600InstrInfo.cppTom Stellard2014-06-131-1/+2
| | | | llvm-svn: 210868
* Remove all uses of 'using std::error_code' from headers.Rafael Espindola2014-06-135-32/+33
| | | | llvm-svn: 210866
* R600: Drop use of cached TargetMachine in AMDGPUInstrInfo.cppTom Stellard2014-06-131-1/+1
| | | | llvm-svn: 210865
* [FastISel][X86] - Add branch weightsJuergen Ributzka2014-06-132-5/+22
| | | | | | | Add branch weights to branch instructions, so that the following passes can optimize based on it (i.e. basic block ordering). llvm-svn: 210863
* Move ARMSelectionDAGInfo from the TargetMachine to the subtarget.Eric Christopher2014-06-134-7/+7
| | | | llvm-svn: 210862
OpenPOWER on IntegriCloud