summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* R600/SI: Use ELF64 format instead of ELF32Tom Stellard2015-06-223-9/+16
| | | | | | | | | | Reviewers: arsenm, rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10392 llvm-svn: 240331
* R600: Use EM_AMDGPU for the ELF Machine typeTom Stellard2015-06-221-1/+1
| | | | | | | | | | Reviewers: arsenm, rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10390 llvm-svn: 240330
* [X86] Teach load folding to accept scalar _Int users of MOVSS/MOVSD.Ahmed Bougacha2015-06-221-10/+46
| | | | | | | | | | | | | | | | | | | The _Int instructions are special, in that they operate on the full VR128 instead of FR32. The load folding then looks at MOVSS, at the user, and bails out when it sees a size mismatch. What we really know is that the rm_Int instructions don't load the higher lanes, so folding is fine. This happens for the straightforward intrinsic code, e.g.: _mm_add_ss(a, _mm_load_ss(p)); Fixes PR23349. Differential Revision: http://reviews.llvm.org/D10554 llvm-svn: 240326
* MIR Serialization: Introduce a lexer for machine instructions.Alex Lorenz2015-06-224-11/+193
| | | | | | | | | | | | This commit adds a function that tokenizes the string containing the machine instruction. This commit also adds a struct called 'MIToken' which is used to represent the lexer's tokens. Reviewers: Sean Silva Differential Revision: http://reviews.llvm.org/D10521 llvm-svn: 240323
* SafeStack: Create the unsafe stack pointer on demand.Peter Collingbourne2015-06-221-3/+4
| | | | | | | This avoids creating an unnecessary undefined reference on targets such as NVPTX that require such references to be declared in asm output. llvm-svn: 240321
* Move MCSymbol Value in to the union of Offset and CommonSize.Pete Cooper2015-06-221-0/+4
| | | | | | | | | | | | | | | | This is a reapplication of r239440 which was reverted in r239441. There are no changes to this patch from then, but this had instead exposed a bug in .thumb_set which was fixed in r240318. Having fixed that bug, it is now safe to re-apply this code. Original commit message below: It wasn't possible to have a variable Symbol with offset or 'isCommon' so this just enables better packing of the MCSymbol class. Reviewed by Rafael Espindola. llvm-svn: 240320
* Change .thumb_set to have the same error checks as .set.Pete Cooper2015-06-222-84/+112
| | | | | | | | | | | | | | According to the documentation, .thumb_set is 'the equivalent of a .set directive'. We didn't have equivalent behaviour in terms of all the errors we could throw, for example, when a symbol is redefined. This change refactors parseAssignment so that it can be used by .set and .thumb_set and implements tests for .thumb_set for all the errors thrown by that method. Reviewed by Rafael Espíndola. llvm-svn: 240318
* [x86] set default reciprocal (division and square root) codegen to match GCCSanjay Patel2015-06-221-6/+9
| | | | | | | | | | | | | | | | D8982 ( checked in at http://reviews.llvm.org/rL239001 ) added command-line options to allow reciprocal estimate instructions to be used in place of divisions and square roots. This patch changes the default settings for x86 targets to allow that recip codegen (except for scalar division because that breaks too much code) when using -ffast-math or its equivalent. This matches GCC behavior for this kind of codegen. Differential Revision: http://reviews.llvm.org/D10396 llvm-svn: 240310
* Fix MSVC build.Sanjoy Das2015-06-221-4/+3
| | | | | | | | I had some unnecessary `typename`s left in after addressing review. This compiled successfully with clang++ but MSVC reported an error. Fix the build error by removing the redundant `typename`s. llvm-svn: 240307
* Remove the IsStreamed member variable.Rafael Espindola2015-06-221-15/+9
| | | | | | | | | | | | | | | | | | Having different code paths for streamed and regular bitcode reading was a source of bugs in the past and this defines them away. It has a small but noticeable impact on performance. I timed running "opt -disable-output -disable-verify" on a ltoed clang. It goes from 14.752845231 seconds time elapsed ( +- 0.16% ) to 15.012463721 seconds time elapsed ( +- 0.11% ) Extracted from a patch by Karl Schimpf. llvm-svn: 240305
* [FaultMaps] Add a parser for the __llvm__faultmaps section.Sanjoy Das2015-06-221-0/+37
| | | | | | | | | | | | | | | Summary: The parser is exercised by llvm-objdump using -print-fault-maps. As is probably obvious, the code itself was "heavily inspired" by http://reviews.llvm.org/D10434. Reviewers: reames, atrick, JosephTremoulet Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10491 llvm-svn: 240304
* Bring r240130 back.Rafael Espindola2015-06-223-19/+25
| | | | | | | | | | | | | | | | | | | | | | Now that pr23900 is fixed, we can bring it back with no changes. Original message: Make all temporary symbols unnamed. What this does is make all symbols that would otherwise start with a .L (or L on MachO) unnamed. Some of these symbols still show up in the symbol table, but we can just make them unnamed. In order to make sure we produce identical results when going thought assembly, all .L (not just the compiler produced ones), are now unnamed. Running llc on llvm-as.opt.bc, the peak memory usage goes from 208.24MB to 205.57MB. llvm-svn: 240302
* Avoid a Symbol -> Name -> Symbol conversion.Rafael Espindola2015-06-2211-39/+71
| | | | | | | | | | | | | | Before this we were producing a TargetExternalSymbol from a MCSymbol. That meant extracting the symbol name and fetching the symbol again down the pipeline. This patch adds a DAG.getMCSymbol that lets the MCSymbol pass unchanged on the DAG. Doing so removes the need for MO_NOPREFIX and fixes the root cause of pr23900, allowing r240130 to be committed again. llvm-svn: 240300
* MIR Serialization: Serialize machine instruction names.Alex Lorenz2015-06-225-3/+185
| | | | | | | | | | | | | | | | This commit implements initial machine instruction serialization. It serializes machine instruction names. The instructions are represented using a YAML sequence of string literals and are a part of machine basic block YAML mapping. This commit introduces a class called 'MIParser' which will be used to parse the machine instructions and operands. Reviewers: Duncan P. N. Exon Smith Differential Revision: http://reviews.llvm.org/D10481 llvm-svn: 240295
* Fix shl folding in DAG combiner.Pawel Bylica2015-06-221-1/+1
| | | | | | | | | | | | | | | | Summary: The code responsible for shl folding in the DAGCombiner was assuming incorrectly that all constants are less than 64 bits. This patch simply changes the way values are compared. Test Plan: A regression test included. Reviewers: andreadb Reviewed By: andreadb Subscribers: andreadb, test, llvm-commits Differential Revision: http://reviews.llvm.org/D10602 llvm-svn: 240291
* [ORC] Add NullResolverJoseph Tremoulet2015-06-222-12/+40
| | | | | | | | | | | | | | | | | Summary: This is an implementation of RuntimeDyld::SymbolResolver that simply rejects all resolution requests; useful for clients that do not have any cross-object symbol references. Reviewers: lhames Reviewed By: lhames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10455 llvm-svn: 240288
* [mips] [IAS] Add support for LAReg with identical source and destination ↵Toma Tabacu2015-06-221-15/+25
| | | | | | | | | | | | | | | | register operands. Summary: In this case, we're supposed to load the immediate in AT and then ADDu it with the source register and put it in the destination register. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9367 llvm-svn: 240278
* AVX-512: added VPSHUFB instruction - all SKX formsElena Demikhovsky2015-06-222-0/+19
| | | | | | Added intrinsics and encoding tests. llvm-svn: 240277
* [mips] [IAS] Add support for LASym with identical source and destination ↵Toma Tabacu2015-06-221-8/+20
| | | | | | | | | | | | | | | | | | register operands. Summary: In this case, we're supposed to load the address of the symbol in AT and then ADDu it with the source register and put it in the destination register. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9366 llvm-svn: 240273
* AVX-512: All forms of VCOPMRESS VEXPAND instructions,Elena Demikhovsky2015-06-223-79/+32
| | | | | | encoding tests. llvm-svn: 240272
* Reverted AVX-512 vector shuffleElena Demikhovsky2015-06-221-180/+64
| | | | llvm-svn: 240258
* [X86] Allow more call sequences to use push instructions for argument passingMichael Kuperstein2015-06-221-26/+91
| | | | | | | | | This allows more call sequences to use pushes instead of movs when optimizing for size. In particular, calling conventions that pass some parameters in registers (e.g. thiscall) are now supported. Differential Revision: http://reviews.llvm.org/D10500 llvm-svn: 240257
* AVX-512: Added intrinsics for VPERMT2W/D/Q/PS/PD andElena Demikhovsky2015-06-222-3/+123
| | | | | | | VPERMI2W/D/Q/PS/PD instructions. Added tests. llvm-svn: 240256
* [PM/AA] Hoist the AliasResult enum out of the AliasAnalysis class.Chandler Carruth2015-06-2218-119/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | This will allow classes to implement the AA interface without deriving from the class or referencing an internal enum of some other class as their return types. Also, to a pretty fundamental extent, concepts such as 'NoAlias', 'MayAlias', and 'MustAlias' are first class concepts in LLVM and we aren't saving anything by scoping them heavily. My mild preference would have been to use a scoped enum, but that feature is essentially completely broken AFAICT. I'm extremely disappointed. For example, we cannot through any reasonable[1] means construct an enum class (or analog) which has scoped names but converts to a boolean in order to test for the possibility of aliasing. [1]: Richard Smith came up with a "solution", but it requires class templates, and lots of boilerplate setting up the enumeration multiple times. Something like Boost.PP could potentially bundle this up, but even that would be quite painful and it doesn't seem realistically worth it. The enum class solution would probably work without the need for a bool conversion. Differential Revision: http://reviews.llvm.org/D10495 llvm-svn: 240255
* [PM/AA] Rework the names and comments in AliasSetTracker to moreChandler Carruth2015-06-221-24/+24
| | | | | | | | | | | | | | | | | | | | accurately describe what is being tracked. While these two enums do track mod/ref information and aliasing information, they don't represent the exact same things as either the mod/ref enums or the alias result enum in AA. They're definitions are dominated by the structure of their lattice and the bit's various semantics. This patch just calls them what they are and tries to spell out usefully distinct names for these things. This will clear the path for using a raw unscoped enum to represent some of these concepts across LLVM's analysis library. No functionality changed here. Differential Revision: http://reviews.llvm.org/D10494 llvm-svn: 240254
* [X86] Code tidyup - Use SDValue bool operator. NFC.Simon Pilgrim2015-06-211-47/+25
| | | | llvm-svn: 240249
* AsmPrinter: Don't emit empty .debug_loc entriesDuncan P. N. Exon Smith2015-06-215-14/+122
| | | | | | | | | | | If we don't know how to represent a .debug_loc entry, skip the entry entirely rather than emitting an empty one. Similarly, if a .debug_loc list has no entries, don't create the list. We still want to create the variables, just in an optimized-out form that doesn't have a DW_AT_location. llvm-svn: 240244
* AsmPrinter: Rewrite initialization of DbgVariable, NFCDuncan P. N. Exon Smith2015-06-213-64/+85
| | | | | | | | | | | | | | | | | | | | | | | There are three types of `DbgVariable`: - alloca variables, created based on the MMI table, - register variables, created based on DBG_VALUE instructions, and - optimized-out variables. This commit reconfigures `DbgVariable` to make it easier to tell which kind we have, and make initialization a little clearer. For MMI/alloca variables, `FrameIndex.size()` must always equal `Expr.size()`, and there shouldn't be an `MInsn`. For register variables (with a `MInsn`), `FrameIndex` must be empty, and `Expr` should have 0 or 1 element depending on whether it has a complex expression (registers with multiple locations use `DebugLocListIndex`). Optimized-out variables shouldn't have any of these fields. Moreover, this separates DBG_VALUE initialization until after the variable is created, simplifying logic in a future commit that changes `collectVariableInfo()` to stop creating empty .debug_loc entries/lists. llvm-svn: 240243
* Devirtualize ArgList's dtor now that -Wvirtual-dtor and C++11 allow a better ↵David Blaikie2015-06-211-5/+0
| | | | | | way to describe this situation llvm-svn: 240238
* ArrayRef-ify libDriverMainDavid Blaikie2015-06-211-8/+7
| | | | llvm-svn: 240234
* ArrayRef-ify ParseArgsDavid Blaikie2015-06-212-6/+5
| | | | llvm-svn: 240233
* Switch lowering: add heuristic for filling leaf nodes in the weight-balanced ↵Hans Wennborg2015-06-202-0/+59
| | | | | | | | | | | | | | | | | | binary search tree Sparse switches with profile info are lowered as weight-balanced BSTs. For example, if the node weights are {1,1,1,1,1,1000}, the right-most node would end up in a tree by itself, bringing it closer to the top. However, a leaf in this BST can contain up to 3 cases, and having a single case in a leaf node as in the example means the tree might become unnecessarily high. This patch adds a heauristic to the pivot selection algorithm that moves more cases into leaf nodes unless that would lower their rank. It still doesn't yield the optimal tree in every case, but I believe it's conservatibely correct. llvm-svn: 240224
* [X86][SSE] Fix PerformSExtCombine bug that accessed the wrong return value ↵Simon Pilgrim2015-06-201-3/+3
| | | | | | | | of an aggregate type. Fix to rL237885 to ensure that it accesses the correct return value of an aggregate type. llvm-svn: 240223
* [PPC] Factor vector removal into a function and remove O(n^2) behavior.Benjamin Kramer2015-06-201-25/+17
| | | | | | No functionality change intended. llvm-svn: 240222
* [SwitchLowering] Remove quadratic vector removal.Benjamin Kramer2015-06-201-12/+12
| | | | | | | This can be triggered with giant switches. No functionality change intended. llvm-svn: 240221
* Update ELFObjectWriter::reset() following r238073.Yaron Keren2015-06-201-0/+1
| | | | llvm-svn: 240218
* Rangify for loops in Inliner::runOnSCC(), NFC.Yaron Keren2015-06-201-11/+9
| | | | llvm-svn: 240215
* IndVarSimplify: Avoid UB from binding a reference to a null pointerJustin Bogner2015-06-201-3/+4
| | | | | | | | | | Calling operator* on a WeakVH whose Value is null hits undefined behaviour, since we bind the value to a reference. Instead, go through `operator Value*` so that we work with the pointer itself. Found by ubsan. llvm-svn: 240214
* Reformat.NAKAMURA Takumi2015-06-201-7/+12
| | | | llvm-svn: 240213
* Revert r240040, "[BranchFolding] Replace custom MachineInstr with ↵NAKAMURA Takumi2015-06-201-6/+46
| | | | | | | | MachineInstrExpressionTrait" It caused different emission between stage2 and stage3. Investigating. llvm-svn: 240212
* Revert "InstrProf: When reading, copy the data instead of taking a ↵Justin Bogner2015-06-201-65/+47
| | | | | | | | | | | | reference. NFC" Seems like MSVC doesn't like this: InstrProf.h(49) : error C2614: 'llvm::InstrProfRecord' : illegal member initialization: 'Hash' is not a base or member This reverts r240206. llvm-svn: 240208
* InstrProf: When reading, copy the data instead of taking a reference. NFCJustin Bogner2015-06-201-47/+65
| | | | | | | | | | | This consolidates the logic to read instrprof records into the on disk hash table's lookup trait and makes us copy the counter data instead of taking references to it as we read. This will simplify further changes to the format. Patch by Betul Buyukkurt. llvm-svn: 240206
* LibDriver: implement /libpath and $LIB; ignore /ignore and /machine.Peter Collingbourne2015-06-202-2/+51
| | | | llvm-svn: 240203
* [MCJIT] Add a FindGlobalVariableNamed utilityKeno Fischer2015-06-203-2/+45
| | | | | | | | | | | | | | | | Summary: This adds FindGlobalVariableNamed to ExecutionEngine (plus implementation in MCJIT), which is an analog of FindFunctionNamed for GlobalVariables. Reviewers: lhames Reviewed By: lhames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10421 llvm-svn: 240202
* LowerSwitch: Avoid some undefined behaviourJustin Bogner2015-06-201-1/+2
| | | | | | | | | | | | When a case of INT64_MIN was followed by a case that was greater than zero, we were overflowing a signed integer here. Since we've sorted the cases here anyway (and thus currentValue must be greater than nextValue) it's simple enough to avoid this by using addition rather than subtraction. Found by UBSAN on existing tests. llvm-svn: 240201
* [Statepoint] Remove unnecessary argument from Statepoint::getRelocatesSanjoy Das2015-06-201-4/+2
| | | | | | NFC. llvm-svn: 240198
* Revert 240130, it caused crashes (repro in PR23900).Nico Weber2015-06-194-27/+23
| | | | llvm-svn: 240193
* name change: hasPattern() -> getMachineCombinerPatterns() ; NFCSanjay Patel2015-06-195-36/+34
| | | | | | | This was suggested as part of D10460, but it's independent of any functional change. llvm-svn: 240192
* [CallGraph] Given -print-callgraph a stable printing order.Sanjoy Das2015-06-191-2/+20
| | | | | | | | | | | | | | | | Summary: Since FunctionMap has llvm::Function pointers as keys, the order in which the traversal happens can differ from run to run, causing spurious FileCheck failures. Have CallGraph::print sort the CallGraphNodes by name before printing them. Reviewers: bogner, chandlerc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10575 llvm-svn: 240191
* Try to fix generation of LLVMExports.cmake under Visual Studio.Dan Liew2015-06-191-1/+1
| | | | | | | | | | If LLVMDebugInfoPDB links against the DIA SDK then the exports file would contain an INTERFACE_LINK_LIBRARIES property that contained an absolute path to ``diaguids.lib`` which used a native windows path (interpreted as escape sequences when LLVMExports.cmake is imported causing ``find_package(LLVM)`` to fail) rather than the correct CMake style path. llvm-svn: 240181
OpenPOWER on IntegriCloud