summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Push DwarfDebug::constructScopeDIE down into DwarfCompileUnitDavid Blaikie2014-10-083-18/+90
| | | | | | | | | | One of many steps to generalize subprogram emission to both the DWO and non-DWO sections (to emit -gmlt-like data under fission). Once the functions are pushed down into DwarfCompileUnit some of the data structures will be pushed at least into DwarfFile so that they can be unique per-file, allowing emission to both files independently. llvm-svn: 219345
* Remove a bunch of getSubtargetImpl calls since we already haveEric Christopher2014-10-081-35/+6
| | | | | | a cached TLI instance. llvm-svn: 219342
* [X86] Avoid generating inc/dec when slow for x.atomic_store(1 + x.atomic_load())Robin Morisset2014-10-081-2/+2
| | | | | | | | | | | | | | | | | Summary: I had forgotten to check for NotSlowIncDec in the patterns that can generate inc/dec for the above pattern (added in D4796). This currently applies to Atom Silvermont, KNL and SKX. Test Plan: New checks on atomic_mi.ll Reviewers: jfb, nadav Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5677 llvm-svn: 219336
* Inliner: Non-local functions in COMDATs shouldn't be droppedDavid Majnemer2014-10-081-0/+7
| | | | | | | | | | A function with discardable linkage cannot be discarded if its a member of a COMDAT group without considering all the other COMDAT members as well. This sort of thing is already handled by GlobalOpt/GlobalDCE. This fixes PR21206. llvm-svn: 219335
* Fix COFF section index relocation should be 16 bits, not 32Timur Iskhodzhanov2014-10-082-1/+3
| | | | | | | Original patch by Andrey Guskov! http://reviews.llvm.org/D5651 llvm-svn: 219327
* Correctly compute the size of common symbols in COFF.Rafael Espindola2014-10-081-4/+9
| | | | llvm-svn: 219324
* Revert "[InstCombine] re-commit r218721 with fix for pr21199"Justin Bogner2014-10-083-147/+8
| | | | | | | | | | | | | This seems to cause a miscompile when building clang, which causes a bootstrapped clang to fail or crash in several of its tests. See: http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-RA/builds/1184 http://bb.pgr.jp/builders/clang-3stage-x86_64-linux/builds/7813 This reverts commit r219282. llvm-svn: 219317
* [AVX512] Added intrinsics for 128-, 256- and 512-bit versions of ↵Robert Khasanov2014-10-082-6/+38
| | | | | | | | | | | VPCMP/VPCMPU{BWDQ} Added CMP_MASK_CC intrinsic type. Added tests for intrinsics. Patch by Sergey Lisitsyn <sergey.lisitsyn@intel.com> llvm-svn: 219316
* Remove bogus std::error_code returns form SectionRef.Rafael Espindola2014-10-0810-208/+102
| | | | | | | | | | | | | | There are two methods in SectionRef that can fail: * getName: The index into the string table can be invalid. * getContents: The section might point to invalid contents. Every other method will always succeed and returning and std::error_code just complicates the code. For example, a section can have an invalid alignment, but if we are able to get to the section structure at all and create a SectionRef, we will always be able to read that invalid alignment. llvm-svn: 219314
* Fix indentation.Rafael Espindola2014-10-081-4/+4
| | | | llvm-svn: 219312
* [AVX512] Refactoring of avx512_binop_rm multiclass through AVX512_masking.Robert Khasanov2014-10-082-133/+60
| | | | | | | Added new argrument for AVX512_masking: InstrItinClass and bit isCommutable. No functional change. llvm-svn: 219310
* Emit unaligned access build attribute for ARMRenato Golin2014-10-081-0/+7
| | | | | | Patch by Charlie Turner. llvm-svn: 219301
* Refactor isThumb1Only() && isMClass() into a predicate called isV6M()Renato Golin2014-10-082-5/+8
| | | | | | | | | This must be enforced for all v6M cores, not just the cortex-m0, irregardless of the user-specified alignment. Patch by Charlie Turner. llvm-svn: 219300
* Simplify switch statement in ARM subtarget align accessRenato Golin2014-10-081-30/+24
| | | | | | | | This switch can be reduced to a simpler if/else statement. Patch by Charlie Turner. llvm-svn: 219299
* Use the TargetLowering information we already have on theEric Christopher2014-10-081-305/+256
| | | | | | | SelectionDAG in SelectionDAGBuilder rather than going through the TargetMachine for lookup. llvm-svn: 219292
* Grab the TargetRegisterInfo off of the subtarget from theEric Christopher2014-10-081-1/+1
| | | | | | | MachineFunction rather than a lookup on the TargetMachine to avoid unnecessary lookups. llvm-svn: 219291
* Unix/Process: Don't use pthread_sigmask if we aren't built with threadsDavid Majnemer2014-10-081-1/+12
| | | | | | | | We won't link in pthreads if we weren't built with LLVM_ENABLE_THREADS which means we won't get access to pthread_sigmask. Use sigprocmask instead. llvm-svn: 219288
* Replace calls to get the subtarget and TargetFrameLowering withEric Christopher2014-10-081-28/+18
| | | | | | cached variables and a single call in the constructor. llvm-svn: 219287
* Format spacing and remove extra lines to comply with standards. NFC.Suyog Sarda2014-10-081-5/+6
| | | | | | | Differential Revision: http://reviews.llvm.org/D5649 llvm-svn: 219286
* Use cached subtarget rather than looking it up on theEric Christopher2014-10-081-6/+4
| | | | | | TargetMachine again. llvm-svn: 219285
* Cache TargetLowering on SelectionDAGISel and update previousEric Christopher2014-10-087-75/+55
| | | | | | calls to getTargetLowering() with the cached variable. llvm-svn: 219284
* GlobalOpt: Don't drop unused memberes of a ComdatDavid Majnemer2014-10-081-8/+20
| | | | | | | | | A linkonce_odr member of a COMDAT shouldn't be dropped if we need to keep the entire COMDAT group. This fixes PR21191. llvm-svn: 219283
* [InstCombine] re-commit r218721 with fix for pr21199Gerolf Hoflehner2014-10-083-8/+147
| | | | | | | | The icmp-select-icmp optimization targets select-icmp.eq only. This is now ensured by testing the branch predicate explictly. This commit also includes the test case for pr21199. llvm-svn: 219282
* COFF: Don't oversize COMMON symbols when targeting BFD ldDavid Majnemer2014-10-081-5/+4
| | | | | | | | | | | | | | COFF normally doesn't allow us to describe the alignment of COMMON symbols. It turns out that most linkers use the symbol size as a hint as to how aligned the symbol should be. However the BFD folks have added a .drectve command, which we now support as of r219229, that allows us to specify the alignment precisely. With this in mind, stop rounding sizes up. llvm-svn: 219281
* llvm-dwarfdump: Add support for some COFF relocationsDavid Majnemer2014-10-081-6/+3
| | | | | | | DWARF in COFF utilizes several relocations. Implement support for them in RelocVisitor to support llvm-dwarfdump. llvm-svn: 219280
* [AArch64] Generate vector signed/unsigned mul and mla/mls long.Chad Rosier2014-10-083-0/+248
| | | | | | | Phabricator Revision: http://reviews.llvm.org/D5589 Patch by Balaram Makam <bmakam@codeaurora.org>!! llvm-svn: 219276
* Cache SelectionDAGISel TargetInstrInfo lookups on the class andEric Christopher2014-10-081-13/+9
| | | | | | | propagate. Also use the TargetSubtargetInfo and the MachineFunction and move TargetRegisterInfo query closer to uses. llvm-svn: 219273
* Reset the target options and optimization level as the firstEric Christopher2014-10-081-8/+13
| | | | | | | | | thing we do inside selection dag. This code needs to be migrated to queries on the function rather than global data, but this organizes things before we start grabbing the subtarget. llvm-svn: 219271
* Have the selection dag grab TargetLowering off of the subtargetEric Christopher2014-10-082-4/+3
| | | | | | inside init rather than have it passed in as an argument. llvm-svn: 219270
* Revert r219175 - [InstCombine] re-commit r218721 icmp-select-icmp optimizationHans Wennborg2014-10-083-151/+8
| | | | | | This seems to have caused PR21199. llvm-svn: 219264
* Have SelectionDAG's subtarget TargetSelectionDAGInfo be setEric Christopher2014-10-081-2/+2
| | | | | | during init rather than construction time. llvm-svn: 219262
* [DebugInfo] Pass DWARFSection down to DWARFUnit constructor (NFC).Alexey Samsonov2014-10-084-25/+25
| | | | | | Keep the actual section contents and the relocation map together. llvm-svn: 219261
* [Support] Add MemoryBuffer::getFileSlice()Nick Kledzik2014-10-081-8/+15
| | | | | | | | | | mach-o supports "fat" files which are a header/table-of-contents followed by a concatenation of mach-o files built for different architectures. Currently, MemoryBuffer has no easy way to map a subrange (slice) of a file which lld will need to select a mach-o slice of a fat file. The new function provides an easy way to map a slice of a file into a MemoryBuffer. Test case included. llvm-svn: 219260
* [DebugInfo] Pass DWARFSection into DWARFUnitSection constructor (NFC).Alexey Samsonov2014-10-083-27/+25
| | | | llvm-svn: 219259
* [X86] Fix a bug with fetch_add(INT32_MIN)Robin Morisset2014-10-071-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fix pr21099 The pseudocode of what we were doing (spread through two functions) was: if (operand.doesNotFitIn32Bits()) Opc.initializeWithFoo(); if (operand < 0) operand = -operand; if (operand.doesFitIn8Bits()) Opc.initializeWithBar(); else if (operand.doesFitIn32Bits()) Opc.initializeWithBlah(); doStuff(Opc); So for operand == INT32_MIN, Opc was never initialized because the operand changes from fitting in 32 bits to not fitting, causing the various bugs/error messages noted by pr21099. This patch adds an extra test at the beginning for this case, and an llvm_unreachable to have better error message if the operand ends up not fitting in 32-bits at the end. Test Plan: new test + make check Reviewers: jfb Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5655 llvm-svn: 219257
* R600/SI: Refactor VOP3 instruction defsTom Stellard2014-10-072-61/+64
| | | | llvm-svn: 219256
* R600/SI: Refactor VOPC instruction defsTom Stellard2014-10-072-213/+217
| | | | llvm-svn: 219255
* R600/SI: Refactor VOP2 instruction defsTom Stellard2014-10-072-42/+46
| | | | llvm-svn: 219254
* R600/SI: Refactor VOP1 instruction defsTom Stellard2014-10-073-72/+96
| | | | llvm-svn: 219253
* [DebugInfo] Turn DWARFContext::Section into DWARFSection (NFC).Alexey Samsonov2014-10-072-25/+45
| | | | | | | | It would be more convenient to pass DWARFSection into DWARFUnitSection constructor, instead of passing its components (Data and RelocAddrMap) as a separate arguments. llvm-svn: 219252
* DebugInfo+DFSan: Ensure that debug info references to llvm::Functions remain ↵David Blaikie2014-10-071-0/+10
| | | | | | | | | | | | | | | | | | | | | | pointing to the underlying function when wrappers are created This is somewhat the inverse of how similar bugs in DAE and ArgPromo manifested and were addressed. In those passes, individual call sites were visited explicitly, and then the old function was deleted. This left the debug info with a null llvm::Function* that needed to be updated to point to the new function. In the case of DFSan, it RAUWs the old function with the wrapper, which includes debug info. So now the debug info refers to the wrapper, which doesn't actually have any instructions with debug info in it, so it is ignored entirely - resulting in a DW_TAG_subprogram with no high/low pc, etc. Instead, fix up the debug info to refer to the original function after the RAUW messed it up. Reviewed/discussed with Peter Collingbourne on the llvm-dev mailing list. llvm-svn: 219249
* R600: Remove dead codeMatt Arsenault2014-10-072-18/+1
| | | | llvm-svn: 219242
* LoopUnroll: Create sub-loops in LoopInfoDuncan P. N. Exon Smith2014-10-071-1/+29
| | | | | | | | | | | | | `LoopUnrollPass` says that it preserves `LoopInfo` -- make it so. In particular, tell `LoopInfo` about copies of inner loops when unrolling the outer loop. Conservatively, also tell `ScalarEvolution` to forget about the original versions of these loops, since their inputs may have changed. Fixes PR20987. llvm-svn: 219241
* LoopUnroll: Only check for ScalarEvolution analysis once, NFCDuncan P. N. Exon Smith2014-10-071-7/+4
| | | | | | | A follow-up commit will add use to a tight loop. We might as well just find it once anyway. llvm-svn: 219239
* R600: Remove some redundant initializations from AMDGPUMCAsmInfoTom Stellard2014-10-071-10/+0
| | | | llvm-svn: 219238
* R600: Use MCAsmInfoELF as AMDGPUMCAsmInfo base classTom Stellard2014-10-072-3/+8
| | | | | | | | | | | | | The main reason for this is that the MCAsmInfo class, which we were previously using as the base class, sets PrivateGlobalPrefix to "L", which causes all global functions that start with L to be treated as local symbols. MCAsmInfoELF sets PrivateGlobalPrefix to ".L", which is what we want, and it is probably a good idea to use this as the base class anyway, since we are emitting ELF binaries. llvm-svn: 219237
* R600/SI: Remove assertion in SIInstrInfo::areLoadsFromSameBasePtr()Tom Stellard2014-10-071-1/+4
| | | | | | | Added a FIXME coment instead, we need to handle the case where the two DS instructions being compared have different numbers of operands. llvm-svn: 219236
* Don't check for null after calling COFFObjectFile::toSec.Rafael Espindola2014-10-071-2/+0
| | | | | | | | | | | It can only return null if passed a corrupted reference with a null Ref.p. Checking for null is then an issue for asserts to check for internal consistency, not control flow to check for invalid input. I didn't add an assert(sec != nullptr) because toSec itself has a far more complete assert. llvm-svn: 219235
* Optimize COFFObjectFile::sectionContainsSymbol a bit.Rafael Espindola2014-10-071-7/+2
| | | | | | | | | There is no need to compute the coff_section of the symbol just to compare the pointer. Inspired by the ELF implementation. llvm-svn: 219233
* MC: add support for -aligncomm GNU extensionSaleem Abdulrasool2014-10-071-8/+18
| | | | | | | The GNU linker supports an -aligncomm directive that allows for power-of-2 alignment of common data. Add support to emit this directive. llvm-svn: 219229
OpenPOWER on IntegriCloud