summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Analysis: Canonicalize access to function attributes, NFCDuncan P. N. Exon Smith2015-02-142-10/+6
| | | | | | | | | | | | Canonicalize access to function attributes to use the simpler API. getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind) => getFnAttribute(Kind) getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind) => hasFnAttribute(Kind) llvm-svn: 229192
* Use the template method to grab the target specific subtarget.Eric Christopher2015-02-141-2/+1
| | | | llvm-svn: 229191
* [InstCombine] When canonicalizing gep indices, prefer zext when possiblePhilip Reames2015-02-141-0/+9
| | | | | | | | | | If we know that the sign bit of a value being sign extended is zero, we can use a zero extension instead. This is motivated by the fact that zero extensions are generally cheaper on x86 (and most other architectures?). We already apply a similar transform in DAGCombine, this just extends that to the IR level. This comes up when we eagerly canonicalize gep indices to the width of a machine register (i64 on x86_64). To do so, we insert sign extensions (sext) to promote smaller types. Differential Revision: http://reviews.llvm.org/D7255 llvm-svn: 229189
* Fixing broken bots.Chris Bieneman2015-02-131-1/+1
| | | | llvm-svn: 229176
* Minor tweak to MDAPhilip Reames2015-02-131-1/+3
| | | | | | | | | | Two minor tweaks I noticed when reading through the code: - No need to recompute begin() on every iteration. We're not modifying the instructions in this loop. - We can ignore PHINodes and Dbg intrinsics. The current code does this anyways, but it will spend slightly more time doing so and will count towards the limit of instructions in the block. It seems really silly to give up due the presence of PHIs... Differential Revision: http://reviews.llvm.org/D7624 llvm-svn: 229175
* NFC. Moving the RegisteredOptionCategories global into the CommandLineParser ↵Chris Bieneman2015-02-131-15/+18
| | | | | | class. llvm-svn: 229172
* NFC. clang-format wants to change this from two lines to one.Chris Bieneman2015-02-131-2/+1
| | | | llvm-svn: 229171
* NFC. More code cleanup making LookupOption a member of the CommandLineParser.Chris Bieneman2015-02-131-4/+6
| | | | llvm-svn: 229170
* The base pointer save offset can be computed at initialization time,Eric Christopher2015-02-132-23/+20
| | | | | | do so and fix up the calls. llvm-svn: 229169
* Move the target machine variable so that it's initialized earlyEric Christopher2015-02-132-4/+3
| | | | | | enough we can use it to initialize frame lowering. llvm-svn: 229168
* Stash the TargetMachine on the subtarget so we can access it later.Eric Christopher2015-02-133-6/+6
| | | | | | Clean up a subtarget function that has it passed in while we're at it. llvm-svn: 229164
* PPC LinkageSize can be computed at initialization time, do so.Eric Christopher2015-02-134-27/+20
| | | | llvm-svn: 229163
* Triple: Make setEnvironment not override the object formatReid Kleckner2015-02-131-1/+5
| | | | | | | | | | | | | | | Discovered by Halide users who had C++ code like this: Triple.setArch(Triple::x86); Triple.setOS(Triple::Windows); Triple.setObjectFormat(Triple::ELF); Triple.setEnvironment(Triple::MSVC); This would produce the stringified triple of x86-windows-msvc, instead of the x86-windows-msvc-elf string needed to run MCJIT. With this change, they retain the -elf suffix. llvm-svn: 229160
* [SSE/AVX] Use multiclasses to reduce the mass of scalar math patterns; NFCISanjay Patel2015-02-131-354/+161
| | | | | | | | | | | | | This takes the preposterous number of patterns in this section that were last added to in r219033 down to just plain obnoxious. With a little more work, we might get this down to just comical. I've added more test cases to the existing file that checks these patterns, but it seems that some of these patterns simply don't exist with today's shuffle lowering. llvm-svn: 229158
* fix typos; NFCSanjay Patel2015-02-131-5/+5
| | | | llvm-svn: 229155
* Clean up some inappropriate choices of type in the bitcode reader. None ofRichard Smith2015-02-131-1/+1
| | | | | | these are expected to fix any 64->32 bit real truncation issues. llvm-svn: 229153
* R600/SI: Refactor SOP1 classesTom Stellard2015-02-131-26/+19
| | | | llvm-svn: 229152
* R600/SI: Lowercase register namesTom Stellard2015-02-131-4/+4
| | | | llvm-svn: 229151
* R600/SI: Remove some unused TableGen classesTom Stellard2015-02-131-19/+0
| | | | llvm-svn: 229150
* [mips] Refactor and simplify MipsSEDAGToDAGISel::selectIntAddrLSL2MM(). NFC.Vasileios Kalintiris2015-02-131-9/+6
| | | | | | | | | | Reviewers: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7618 llvm-svn: 229140
* [mips] Use isa<> instead of dyn_cast<> with unused value. NFC.Vasileios Kalintiris2015-02-131-2/+2
| | | | | | | | | | Reviewers: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7615 llvm-svn: 229138
* R600/SI: Remove handling of fpimmMatt Arsenault2015-02-131-16/+6
| | | | llvm-svn: 229136
* R600/SI: Allow f64 inline immediates in i64 operandsMatt Arsenault2015-02-136-65/+155
| | | | | | | This requires considering the size of the operand when checking immediate legality. llvm-svn: 229135
* Fix -Wunused-variable warning.Zachary Turner2015-02-131-1/+0
| | | | llvm-svn: 229130
* llvm-pdbdump: Improve printing of functions and signatures.Zachary Turner2015-02-134-38/+147
| | | | | | | | | This correctly prints the function pointers, and also prints function signatures for symbols as opposed to just types. So actual functions in your program will now be printed with full name and signature, as opposed to just name as before. llvm-svn: 229129
* [mips][microMIPS] Delay slot filler: Replace the microMIPS JR with the JRCJozef Kolek2015-02-131-10/+43
| | | | | | | | | | | This patch adds functionality in MIPS delay slot filler such as if delay slot filler have to put NOP instruction into the delay slot of microMIPS JR instruction, then instead of emitting NOP this instruction is replaced by compact jump instruction JRC. Differential Revision: http://reviews.llvm.org/D7522 llvm-svn: 229128
* [InstCombine] Fix regression introduced at r227197.Andrea Di Biagio2015-02-131-10/+6
| | | | | | | | | | | | | | | | | | This patch fixes a problem I accidentally introduced in an instruction combine on select instructions added at r227197. That revision taught the instruction combiner how to fold a cttz/ctlz followed by a icmp plus select into a single cttz/ctlz with flag 'is_zero_undef' cleared. However, the new rule added at r227197 would have produced wrong results in the case where a cttz/ctlz with flag 'is_zero_undef' cleared was follwed by a zero-extend or truncate. In that case, the folded instruction would have been inserted in a wrong location thus leaving the CFG in an inconsistent state. This patch fixes the problem and add two reproducible test cases to existing test 'InstCombine/select-cmp-cttz-ctlz.ll'. llvm-svn: 229124
* [CodeGenPrepare] Removed duplicate logic. SimplifyCFG already knows how to ↵Andrea Di Biagio2015-02-131-170/+0
| | | | | | | | | | | | | | | | speculate calls to cttz/ctlz. SimplifyCFG now knows how to speculate calls to intrinsic cttz/ctlz that are 'cheap' for the target. Therefore, some of the logic in CodeGenPrepare that was originally added at revision 224899 can now be removed. This patch is basically a no functional change. It removes the duplicated logic in CodeGenPrepare and converts all the existing target specific tests for cttz/ctlz into SimplifyCFG tests. Differential Revision: http://reviews.llvm.org/D7608 llvm-svn: 229105
* [PBQP] Conservativelly allocatable nodes can be spilled and give a better ↵Arnaud A. de Grandmaison2015-02-131-2/+0
| | | | | | | | | | solution Although such nodes are allocatable, the cost of spilling may be less than allocating to register, so spilling the node may provide a better solution. The assert does not account for this case, so remove it for now. llvm-svn: 229103
* [SimplifyCFG] Be more aggressiveJames Molloy2015-02-131-2/+6
| | | | | | | | Up the phi node folding threshold from a cheap "1" to a meagre "2". Update tests for extra added selects and slight code churn. llvm-svn: 229099
* [mips] Improve support for the .set at/noat assembler directives.Toma Tabacu2015-02-133-36/+63
| | | | | | | | | | | | | | | | | | | | | Summary: Made the following changes: Added calls to emitDirectiveSetNoAt() and emitDirectiveSetAt(). Added special emit function for .set at=$reg, emitDirectiveSetAtWithArg(unsigned RegNo). Improved parsing error checks for .set at. Refactored parser code for .set at. Improved testing of both directives. Improved code readability and comments. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7176 llvm-svn: 229097
* [PM] Remove the old 'PassManager.h' header file at the top level ofChandler Carruth2015-02-1331-56/+58
| | | | | | | | | | | | | | | | | | | | LLVM's include tree and the use of using declarations to hide the 'legacy' namespace for the old pass manager. This undoes the primary modules-hostile change I made to keep out-of-tree targets building. I sent an email inquiring about whether this would be reasonable to do at this phase and people seemed fine with it, so making it a reality. This should allow us to start bootstrapping with modules to a certain extent along with making it easier to mix and match headers in general. The updates to any code for users of LLVM are very mechanical. Switch from including "llvm/PassManager.h" to "llvm/IR/LegacyPassManager.h". Qualify the types which now produce compile errors with "legacy::". The most common ones are "PassManager", "PassManagerBase", and "FunctionPassManager". llvm-svn: 229094
* Re-sort #include lines using my handy dandy ./utils/sort_includes.pyChandler Carruth2015-02-1355-99/+57
| | | | | | script. This is in preparation for changes to lots of include lines. llvm-svn: 229088
* Revert a series of commits starting at r228886 which is triggering someChandler Carruth2015-02-135-121/+104
| | | | | | | | | | | | | | | | regressions for LLDB on Linux. Rafael indicated on lldb-dev that we should just go ahead and revert these but that he wasn't at a computer. The patches backed out are as follows: r228980: Add support for having multiple sections with the name and ... r228889: Invert the section relocation map. r228888: Use the existing SymbolTableIndex intsead of doing a lookup. r228886: Create the Section -> Rel Section map when it is first needed. These patches look pretty nice to me, so hoping its not too hard to get them re-instated. =D llvm-svn: 229080
* [X86] Add support for parsing and printing the mnemonic aliases for the XOP ↵Craig Topper2015-02-138-27/+122
| | | | | | VPCOM instructions. llvm-svn: 229078
* [X86] Fix XOP vpcom intrinsic autoupgrade to map 'true' and 'false' to the ↵Craig Topper2015-02-131-2/+2
| | | | | | correct immediates. Seems they were swapped. llvm-svn: 229077
* llvm-pdbdump: Add more comprehensive dumping of symbol types.Zachary Turner2015-02-1319-108/+316
| | | | | | | | | In particular this patch adds the ability to dump complete function signature information including argument types as correctly formatted strings. A side effect of this is that almost all symbol and meta types are now formatted. llvm-svn: 229076
* InstCombine: cleanup redundant dyn_cast<> (NFC)Mehdi Amini2015-02-131-44/+43
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 229075
* Fix a typo in a comment. NFCCraig Topper2015-02-131-1/+1
| | | | llvm-svn: 229071
* [X86] Remove int_x86_sse2_psll_dq_bs and int_x86_sse2_psrl_dq_bs intrinsics. ↵Craig Topper2015-02-132-14/+45
| | | | | | The builtins aren't used by clang. llvm-svn: 229069
* [unroll] Concede defeat and disable the unroll analyzer for now.Chandler Carruth2015-02-131-1/+1
| | | | | | | | | | The issues with the new unroll analyzer are more fundamental than code cleanup, algorithm, or data structure changes. I've sent an email to the original commit thread with details and a proposal for how to redesign things. I'm disabling this for now so that we don't spend time debugging issues with it in its current state. llvm-svn: 229064
* [InstCombine] Fix a bug when combining `icmp` from `ptrtoint`Michael Liao2015-02-131-7/+10
| | | | | | | | | | | | - First, there's a crash when we try to combine that pointers into `icmp` directly by creating a `bitcast`, which is invalid if that two pointers are from different address spaces. - It's not always appropriate to cast one pointer to another if they are from different address spaces as that is not no-op cast. Instead, we only combine `icmp` from `ptrtoint` if that two pointers are of the same address space. llvm-svn: 229063
* [unroll] Merge the simplification and DCE estimation methods on theChandler Carruth2015-02-131-20/+16
| | | | | | | | | | | UnrollAnalyzer. Now they share a single worklist and have less implicit state between them. There was no real benefit to separating these two things out. I'm going to subsequently refactor things to share even more code. llvm-svn: 229062
* [unroll] Remove pointless dyn_cast<>s to Instruction - the users of anChandler Carruth2015-02-131-12/+4
| | | | | | instruction must by definition be instructions. llvm-svn: 229061
* [unroll] Don't check the loop set for whether an instruction isChandler Carruth2015-02-131-4/+2
| | | | | | | | | contained in it each time we try to add it to the worklist, just check this when pulling it off the worklist. That way we do it at most once per instruction with the cost of the worklist set we would need to pay anyways. llvm-svn: 229060
* [unroll] Change the other worklist in the unroll analyzer to be a setChandler Carruth2015-02-131-3/+3
| | | | | | | | | | | | | | | | | | | | vector. In addition to dramatically reducing the work required for contrived example loops, this also has to correct some serious latent bugs in the cost computation. Previously, we might add an instruction onto the worklist once for every load which it used and was simplified. Then we would visit it many times and accumulate "savings" each time. I mean, fortunately this couldn't matter for things like calls with 100s of operands, but even for binary operators this code seems like it must be double counting the savings. I just noticed this by inspection and due to the runtime problems it can introduce, I don't have any test cases for cases where the cost produced by this routine is unacceptable. llvm-svn: 229059
* [unroll] Replace a boolean, for loop, condition, and break withChandler Carruth2015-02-131-7/+3
| | | | | | | std::all_of and a lambda. Much cleaner, no functionality changed. llvm-svn: 229058
* [unroll] Directly query for dead instructions.Chandler Carruth2015-02-131-4/+3
| | | | | | | | | | | | | | | In the unroll analyzer, it is checking each user to see if that user will become dead. However, it first checked if that user was missing from the simplified values map, and then if was also missing from the dead instructions set. We add everything from the simplified values map to the dead instructions set, so the first step is completely subsumed by the second. Moreover, the first step requires *inserting* something into the simplified value map which isn't what we want at all. This also replaces a dyn_cast with a cast as an instruction cannot be used by a non-instruction. llvm-svn: 229057
* [unroll] Replace a linear time check for no uses with a constant timeChandler Carruth2015-02-131-3/+2
| | | | | | | | | | check. Also hoist this into the enqueue process as it is faster even than testing the worklist set, we should just directly filter these out much like we filter out constants and such. llvm-svn: 229056
* [unroll] Rather than an operand set, use a setvector for the worklist.Chandler Carruth2015-02-131-10/+14
| | | | | | | | | | We don't just want to handle duplicate operands within an instruction, but also duplicates across operands of different instructions. I should have gone straight to this, but I had convinced myself that it wasn't going to be necessary briefly. I've come to my senses after chatting more with Nick, and am now happier here. llvm-svn: 229054
OpenPOWER on IntegriCloud