summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* This patch breaks up Wrap.h so that it does not have to include all of Filip Pizlo2013-05-0119-19/+15
| | | | | | | | | | | | | | | | | | | | | | | | the things, and renames it to CBindingWrapping.h. I also moved CBindingWrapping.h into Support/. This new file just contains the macros for defining different wrap/unwrap methods. The calls to those macros, as well as any custom wrap/unwrap definitions (like for array of Values for example), are put into corresponding C++ headers. Doing this required some #include surgery, since some .cpp files relied on the fact that including Wrap.h implicitly caused the inclusion of a bunch of other things. This also now means that the C++ headers will include their corresponding C API headers; for example Value.h must include llvm-c/Core.h. I think this is harmless, since the C API headers contain just external function declarations and some C types, so I don't believe there should be any nasty dependency issues here. llvm-svn: 180881
* SROA: Generate selects instead of shuffles when blending values because this ↵Nadav Rotem2013-05-011-8/+6
| | | | | | | | is the cannonical form. Shuffles are more difficult to lower and we usually don't touch them, while we do optimize selects more often. llvm-svn: 180875
* [inline asm] Return an undef SDValue of the expected value type, rather thanChad Rosier2013-05-011-1/+1
| | | | | | | | | report a fatal error. This allows us to continue processing the translation unit. Test case to come on the clang side because we need an inline asm diagnostics handler in place. rdar://13446483 llvm-svn: 180873
* Optimize away nop CONCAT_VECTOR nodes.Nadav Rotem2013-05-011-0/+39
| | | | | | | | | Optimize CONCAT_VECTOR nodes that merge EXTRACT_SUBVECTOR values that extract from the same vector. rdar://13402653 PR15866 llvm-svn: 180871
* Now that the underlying issue is fixed, revert r180750 and r180722.Rafael Espindola2013-05-013-13/+24
| | | | | | | | | | | The cause of the windows failures was fixed by r180791. Revert to the state after Sabre's original revert. Original message: revert r179735, it has no testcases, and doesn't really make sense. llvm-svn: 180844
* Put VMOVPQIto64rr in the VRPDI class.Rafael Espindola2013-05-011-3/+3
| | | | | | Patch by Joshua Magee. llvm-svn: 180842
* Fixes a buffer overrun where the allocated buffer wasn't large enough to ↵Aaron Ballman2013-05-011-1/+8
| | | | | | accommodate the closing quote escape rules in some instances. llvm-svn: 180836
* Revert "InstCombine: Fold more shuffles of shuffles."Jim Grosbach2013-05-011-12/+5
| | | | | | | | | This reverts commit r180802 There's ongoing discussion about whether this is the right place to make this transformation. Reverting for now while we figure it out. llvm-svn: 180834
* [mips] Fix handling of instructions which copy to/from accumulator registers.Akira Hatanaka2013-04-307-37/+43
| | | | | | | | | Expand copy instructions between two accumulator registers before callee-saved scan is done. Handle copies between integer GPR and hi/lo registers in MipsSEInstrInfo::copyPhysReg. Delete pseudo-copy instructions that are not needed. llvm-svn: 180827
* Only pass 'returned' to target-specific lowering code when the value of ↵Stephen Lin2013-04-302-28/+42
| | | | | | entire register is guaranteed to be preserved. llvm-svn: 180825
* Fix a use after free. RI is freed before the call to getDebugLoc(). ToRichard Trieu2013-04-301-4/+5
| | | | | | prevent this, capture the location before RI is freed. llvm-svn: 180824
* [mips] Instruction selection patterns for DSP-ASE vector select and compareAkira Hatanaka2013-04-305-3/+145
| | | | | | instructions. llvm-svn: 180820
* Temporarily revert "Change the informal convention of DBG_VALUE so that we ↵Adrian Prantl2013-04-307-58/+36
| | | | | | | | | | can express a" because it breaks some buildbots. This reverts commit 180816. llvm-svn: 180819
* Change the informal convention of DBG_VALUE so that we can express aAdrian Prantl2013-04-307-36/+58
| | | | | | | | | | | | register-indirect address with an offset of 0. It used to be that a DBG_VALUE is a register-indirect value if the offset (operand 1) is nonzero. The new convention is that a DBG_VALUE is register-indirect if the first operand is a register and the second operand is an immediate. For plain registers use the combination reg, reg. rdar://problem/13658587 llvm-svn: 180816
* MI Sched: revert a minor heuristic that snuck in with -misched-vcopy.Andrew Trick2013-04-301-0/+6
| | | | | | I'll fix the heuristic in a general way in a follow-up commit. llvm-svn: 180815
* [mips] Simplify code.Akira Hatanaka2013-04-301-4/+1
| | | | | | No intended functionality changes. llvm-svn: 180807
* Fix a typoNadav Rotem2013-04-301-1/+1
| | | | llvm-svn: 180806
* InstCombine: Fold more shuffles of shuffles.Jim Grosbach2013-04-301-5/+12
| | | | | | | | | | | Always fold a shuffle-of-shuffle into a single shuffle when there's only one input vector in the first place. Continue to be more conservative when there's multiple inputs. rdar://13402653 PR15866 llvm-svn: 180802
* [mips] Clear isCommutable bit of instructions which are not commutable.Akira Hatanaka2013-04-301-14/+8
| | | | llvm-svn: 180801
* LocalStackSlotAllocation improvementsHal Finkel2013-04-301-94/+111
| | | | | | | | | | | | First, taking advantage of the fact that the virtual base registers are allocated in order of the local frame offsets, remove the quadratic register-searching behavior. Because of the ordering, we only need to check the last virtual base register created. Second, store the frame index in the FrameRef structure, and get the frame index and the local offset from this structure at the top of the loop iteration. This allows us to de-nest the loops in insertFrameReferenceRegisters (and I think makes the code cleaner). I also moved the needsFrameBaseReg check into the first loop over instructions so that we don't bother pushing FrameRefs for instructions that don't want a virtual base register anyway. Lastly, and this is the only functionality change, avoid the creation of single-use virtual base registers. These are currently not useful because, in general, they end up replacing what would be one r+r instruction with an add and a r+i instruction. Committing this removes the XFAIL in CodeGen/PowerPC/2007-09-07-LoadStoreIdxForms.ll Jim has okayed this off-list. llvm-svn: 180799
* Text files should not be marked executable.Rafael Espindola2013-04-301-0/+0
| | | | | | Patch by Oliver Pinter. llvm-svn: 180797
* Spelling. Thanks, Eric.Adrian Prantl2013-04-301-1/+1
| | | | llvm-svn: 180794
* Set debug locations for branch instructions created during inlining, evenAdrian Prantl2013-04-301-2/+10
| | | | | | | | the inlined function has multiple returns. rdar://problem/12415623 llvm-svn: 180793
* Change getSlotIndex to return unsigned.Rafael Espindola2013-04-302-4/+4
| | | | | | | | | | | The actual storage was already using unsigned, but the interface was using uint64_t. This is wasteful on 32 bits and looks to be the root causes of a miscompilation on Windows where a value was being sign extended to 64bits to compare with the result of getSlotIndex. Patch by Pasi Parviainen! llvm-svn: 180791
* Fix Addend computation for non external relocations on Macho.Rafael Espindola2013-04-302-28/+20
| | | | llvm-svn: 180790
* Fix a bug in foldSelectICmpAndOr.David Majnemer2013-04-301-1/+2
| | | | | | | Differences in bitwidth between X and Y could exist even if C1 and C2 have the same Log2 representation. llvm-svn: 180779
* s tightens up the encoding description for ARM post-indexed ldr ↵Mihai Popa2013-04-301-0/+1
| | | | | | instructions. All instructions in this class have bit 4 cleared. It turns out that there is a test case for this, but it was marked XFAIL. llvm-svn: 180778
* Fix "Combine bit test + conditional or into simple math"David Majnemer2013-04-301-0/+64
| | | | | | | | | This fixes the optimization introduced in r179748 and reverted in r179750. While the optimization was sound, it did not properly respect differences in bit-width. llvm-svn: 180777
* Refactoring patch.Stepan Dyatkovskiy2013-04-305-66/+100
| | | | | | | | | | | | 1. VarArgStyleRegisters: functionality that emits "store" instructions for byval regs moved out into separated method "StoreByValRegs". Before this patch VarArgStyleRegisters had confused use-cases. It was used for both variadic functions and for regular functions with byval parameters. In last case it created new stack-frame and registered it as VarArg frame, that is wrong. This patch replaces VarArgsStyleRegisters usage for byval parameters with StoreByValRegs method. 2. In ARMMachineFunctionInfo, "get/setVarArgsRegSaveSize" was renamed to "get/setArgRegsSaveSize". By the same reason. Sometimes it was used for variadic functions, and sometimes for byval parameters in regular functions. Actually, this property means the size of registers, that keeps arguments, and thats why it was renamed. 3. In ARMISelLowering.cpp, ARMTargetLowering class, in methods computeRegArea and StoreByValRegs, VARegXXXXXX was renamed to ArgRegsXXXXXX still by the same reasons. llvm-svn: 180774
* Collect the Addend for external relocs.Rafael Espindola2013-04-301-5/+12
| | | | | | | This fixes 2013-04-04-RelocAddend.ll. We don't have a testcase for non external relocs with an Addend. I will try to write one. llvm-svn: 180767
* R600: Always use texture cache for compute shadersVincent Lejeune2013-04-301-2/+6
| | | | | | This will improve the performance of memory reads. llvm-svn: 180762
* R600: use native for aluVincent Lejeune2013-04-304-4/+135
| | | | llvm-svn: 180761
* R600: Packetize instructionsVincent Lejeune2013-04-306-3/+464
| | | | llvm-svn: 180760
* R600: Rework Scheduling to handle difference between VLIW4 and VLIW5 chipsVincent Lejeune2013-04-305-32/+105
| | | | llvm-svn: 180759
* R600: Add a Bank Swizzle operandVincent Lejeune2013-04-304-11/+19
| | | | llvm-svn: 180758
* R600: Take inner dependency into tex/vtx clausesVincent Lejeune2013-04-301-0/+34
| | | | llvm-svn: 180757
* R600: Turn TEX/VTX into native instructionsVincent Lejeune2013-04-303-15/+50
| | | | llvm-svn: 180756
* R600: Add FetchInst bit to instruction defs to denote vertex/tex instructionsVincent Lejeune2013-04-309-58/+95
| | | | | | v2[Vincent Lejeune]: Split FetchInst into usesTextureCache/usesVertexCache llvm-svn: 180755
* R600: Add some new processor variantsVincent Lejeune2013-04-302-1/+3
| | | | llvm-svn: 180753
* R600: Clean up instruction class definitionsVincent Lejeune2013-04-301-23/+14
| | | | llvm-svn: 180752
* R600: config section now reports use of killgtVincent Lejeune2013-04-301-0/+4
| | | | llvm-svn: 180751
* Revert the command line option patch. However, keep the part that makes this ↵Bill Wendling2013-04-292-20/+5
| | | | | | pass on Windows. I.e., we don't emit the target dependent attributes in a comment before the function. llvm-svn: 180750
* Emit the TLS initialization function pointers into the correct section.Bill Wendling2013-04-291-0/+15
| | | | | | | | | | The `llvm.tls_init_funcs' (created by the front-end) holds pointers to the TLS initialization functions. These need to be placed into the correct section so that they are run before `main()'. <rdar://problem/13733006> llvm-svn: 180737
* Add getSymbolAlignment to the ObjectFile interface.Rafael Espindola2013-04-296-20/+27
| | | | | | | | | | | | | For regular object files this is only meaningful for common symbols. An object file format with direct support for atoms should be able to provide alignment information for all symbols. This replaces getCommonSymbolAlignment and fixes test-common-symbols-alignment.ll on darwin. This also includes a fix to MachOObjectFile::getSymbolFlags. It was marking undefined symbols as common (already tested by existing mcjit tests now that it is used). llvm-svn: 180736
* R600: Use correct CF_END instruction on Northern Island GPUsTom Stellard2013-04-291-1/+1
| | | | llvm-svn: 180735
* R600: Fix encoding of CF_END_{EG, R600} instructionsTom Stellard2013-04-291-0/+1
| | | | | | The EOP bit was not being encoded. llvm-svn: 180734
* Rationalize what is public in RuntimeDyldMachO and RuntimeDyldELF.Rafael Espindola2013-04-292-25/+18
| | | | | | | | The implemented RuntimeDyldImpl interface is public. Everything else is private. Since these classes are not inherited from (yet), there is no need to have protected members. llvm-svn: 180733
* SimplifyCFG: If convert single conditional storesArnold Schwaighofer2013-04-291-4/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This resurrects r179957, but adds code that makes sure we don't touch atomic/volatile stores: This transformation will transform a conditional store with a preceeding uncondtional store to the same location: a[i] = may-alias with a[i] load if (cond) a[i] = Y into an unconditional store. a[i] = X may-alias with a[i] load tmp = cond ? Y : X; a[i] = tmp We assume that on average the cost of a mispredicted branch is going to be higher than the cost of a second store to the same location, and that the secondary benefits of creating a bigger basic block for other optimizations to work on outway the potential case where the branch would be correctly predicted and the cost of the executing the second store would be noticably reflected in performance. hmmer's execution time improves by 30% on an imac12,2 on ref data sets. With this change we are on par with gcc's performance (gcc also performs this transformation). There was a 1.2 % performance improvement on a ARM swift chip. Other tests in the test-suite+external seem to be mostly uninfluenced in my experiments: This optimization was triggered on 41 tests such that the executable was different before/after the patch. Only 1 out of the 40 tests (dealII) was reproducable below 100% (by about .4%). Given that hmmer benefits so much I believe this to be a fair trade off. llvm-svn: 180731
* Update the documentation.Rafael Espindola2013-04-291-5/+1
| | | | llvm-svn: 180725
* Use a RelocationRef instead of a relocation_iterator.Rafael Espindola2013-04-296-13/+13
| | | | | | No functionality change. llvm-svn: 180723
OpenPOWER on IntegriCloud