aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* R600/SI: Add more special cases for opcodes to ensureSRegLimit()Tom Stellard2013-08-0610-77/+128
| | | | | | Also factor out the register class lookup to its own function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187830 91177308-0d34-0410-b5e6-96231b3b80d8
* [NVPTX] We dont have any target specific flags yet for generating symbol ↵Justin Holewinski2013-08-061-7/+2
| | | | | | references, so get rid of the default-only switch statement. Fixes an MSVC warning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187829 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips] Mark instructions defined in Mips64InstrInfo.td that are duplicates ofAkira Hatanaka2013-08-063-54/+41
| | | | | | | instructions defined in MipsInstrInfo.td as codegen-only instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187828 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the linkage of these global values to 'internal'.Bill Wendling2013-08-062-6/+9
| | | | | | | | | | | | | | | | | | | The globals being generated here were given the 'private' linkage type. However, this caused them to end up in different sections with the wrong prefix. E.g., they would be in the __TEXT,__const section with an 'L' prefix instead of an 'l' (lowercase ell) prefix. The problem is that the linker will eat a literal label with 'L'. If a weak symbol is then placed into the __TEXT,__const section near that literal, then it cannot distinguish between the literal and the weak symbol. Part of the problems here was introduced because the address sanitizer converted some C strings into constant initializers with trailing nuls. (Thus putting them in the __const section with the wrong prefix.) The others were variables that the address sanitizer created but simply had the wrong linkage type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187827 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some std stream usage from Support and TableGenReid Kleckner2013-08-064-19/+25
| | | | | | | | | | LLVM's coding standards recommend raw_ostream and MemoryBuffer for reading and writing text. This has the side effect of allowing clang to compile more of Support and TableGen in the Microsoft C++ ABI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187826 91177308-0d34-0410-b5e6-96231b3b80d8
* LoopVectorize: Allow vectorization of loops with lifetime markersArnold Schwaighofer2013-08-063-8/+117
| | | | | | Patch by Marc Jessome! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187825 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips] Delete unnecessary InstAliases. Also, clear some of the InstAlias'Akira Hatanaka2013-08-063-38/+18
| | | | | | | EmitAlias flag and have MipsInstPrinter::printAlias print the aliases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187824 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips] Replace usages of register classes with register operands. Also, removeAkira Hatanaka2013-08-067-168/+221
| | | | | | | | unnecessary jalr InstAliases in Mips64InstrInfo.td and add the code to print jalr InstAliases in MipsInstPrinter::printAlias. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187821 91177308-0d34-0410-b5e6-96231b3b80d8
* Change private functions of LTOCodeGenerator from ret-false-on-succ to ↵Shuxin Yang2013-08-061-9/+9
| | | | | | ret-true-on-succ. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187819 91177308-0d34-0410-b5e6-96231b3b80d8
* Use gnu style builtins in MathExtras.h with clang on WindowsReid Kleckner2013-08-061-4/+4
| | | | | | Clang does not provide BitScan* intrinsic implementations yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187813 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info Finder|Verifier: handle DbgLoc attached to instructions.Manman Ren2013-08-0617-50/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also remove checking of llvm.dbg.sp since it is not used in generating dwarf. Current state of Finder: DebugInfoFinder tries to list all debug info MDNodes used in a module. To list debug info MDNodes used by an instruction, DebugInfoFinder provides processDeclare, processValue and processLocation to handle DbgDeclareInst, DbgValueInst and DbgLoc attached to instructions. processModule will go through all DICompileUnits in llvm.dbg.cu and list debug info MDNodes used by the CUs. TODO: 1> Finder has a list of CUs, SPs, Types, Scopes and global variables. We need to add a list of variables that are used by DbgDeclareInst and DbgValueInst. 2> MDString fields should be null or isa<MDString> and MDNode fields should be null or isa<MDNode>. We currently use empty string or int 0 to represent null. 3> Go though Verify functions and make sure that they check field types. 4> Clean up existing testing cases to remove llvm.dbg.sp and make sure each testing case has a llvm.dbg.cu. Re-apply r187609 with fix to pass ocaml binding. vmcore.ml generates a debug location with scope being metadata !{}, in verifier we treat this as a null scope. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187812 91177308-0d34-0410-b5e6-96231b3b80d8
* [LangRef] Alphabetize function attribute listing.Sean Silva2013-08-061-4/+4
| | | | | | | | No content change. Patch by Andrea Di Biagio! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187811 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust file to the coding standard.Jakub Staszak2013-08-061-53/+49
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187808 91177308-0d34-0410-b5e6-96231b3b80d8
* Add PPC64 mulli patternHal Finkel2013-08-062-0/+19
| | | | | | | | The PPC backend had been missing a pattern to generate mulli for 64-bit multiples. We had been generating it only for 32-bit multiplies. Unfortunately, generating li + mulld unnecessarily increases register pressure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187807 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extraneous semicolon.Jakub Staszak2013-08-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187806 91177308-0d34-0410-b5e6-96231b3b80d8
* This corrects creation of operands for t2PLDW. It also removes the ↵Mihai Popa2013-08-064-27/+31
| | | | | | | | | definition of t2PLDWpci, as pldw does not have a literal variant (i.e. pc relative version) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187804 91177308-0d34-0410-b5e6-96231b3b80d8
* Support APSR_nzcv as operand for Thumb2 mrc. Deprecate pre-UAL syntax (pc ↵Mihai Popa2013-08-064-20/+19
| | | | | | instead of apsr_nzcv) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187803 91177308-0d34-0410-b5e6-96231b3b80d8
* [NVPTX] Add missing patterns for i1 [s,u]int_to_fpJustin Holewinski2013-08-062-11/+56
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187800 91177308-0d34-0410-b5e6-96231b3b80d8
* [NVPTX] Fix bug in stack code generation causes by MC conversionJustin Holewinski2013-08-065-53/+86
| | | | | | | We do use a very small set of physical registers, so account for them in the virtual register encoding between MachineInstr and MC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187799 91177308-0d34-0410-b5e6-96231b3b80d8
* [NVPTX] Start conversion to MC infrastructureJustin Holewinski2013-08-0611-317/+611
| | | | | | | | | This change converts the NVPTX target to use the MC infrastructure instead of directly emitting MachineInstr instances. This brings the target more up-to-date with LLVM TOT, and should fix PR15175 and PR15958 (libNVPTXInstPrinter is empty) as a side-effect. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187798 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: implement allowTruncateForTailCallTim Northover2013-08-063-0/+129
| | | | | | | Now that it's in place, it seems silly not to let ARM make use of the extra tail call opportunities. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187795 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a release not about llvm-ar.Rafael Espindola2013-08-061-0/+3
| | | | | | Thanks to Bill Wendling for the reminder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187794 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove oddly named libraries with "make uninstall-local"Tim Northover2013-08-061-1/+1
| | | | | | Patch by Edward-san. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187793 91177308-0d34-0410-b5e6-96231b3b80d8
* Store compile unit corresponding to each chain of inlined debug info ↵Alexey Samsonov2013-08-065-39/+44
| | | | | | entries. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187792 91177308-0d34-0410-b5e6-96231b3b80d8
* LLVM Interpreter: fixed bug 16694Elena Demikhovsky2013-08-061-52/+137
| | | | | | | | | | | | | | fix for: Bug 16694 - ExecutionEngine/test-interp-vec-loadstore.ll failing on powerpc-darwin8 (http://llvm.org/bugs/show_bug.cgi?id=16694) The ExecutionEngine/test-interp-vec-loadstore.ll test has been failing on powerpc-darwin8 (on other platforms it passed) the reason of fail was wrong output by printf. this output is checked by FileCheck, but on little-endian powerpc the output numeric data were printed inside out and FileCheck reported fail. the printfs have been replaced by checking data inside test and numeric output has been replaced by the text output like : "int test passed, float test passed". The text output is checked by FileCheck. the dependency on data layout has been removed. done by Yuri Veselov (Intel) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187791 91177308-0d34-0410-b5e6-96231b3b80d8
* Add LLVM-style RTTI to DIContext/DWARFContext classesAlexey Samsonov2013-08-062-1/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187790 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor isInTailCallPosition handlingTim Northover2013-08-069-134/+484
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change came about primarily because of two issues in the existing code. Niether of: define i64 @test1(i64 %val) { %in = trunc i64 %val to i32 tail call i32 @ret32(i32 returned %in) ret i64 %val } define i64 @test2(i64 %val) { tail call i32 @ret32(i32 returned undef) ret i32 42 } should be tail calls, and the function sameNoopInput is responsible. The main problem is that it is completely symmetric in the "tail call" and "ret" value, but in reality different things are allowed on each side. For these cases: 1. Any truncation should lead to a larger value being generated by "tail call" than needed by "ret". 2. Undef should only be allowed as a source for ret, not as a result of the call. Along the way I noticed that a mismatch between what this function treats as a valid truncation and what the backends see can lead to invalid calls as well (see x86-32 test case). This patch refactors the code so that instead of being based primarily on values which it recurses into when necessary, it starts by inspecting the type and considers each fundamental slot that the backend will see in turn. For example, given a pathological function that returned {{}, {{}, i32, {}}, i32} we would consider each "real" i32 in turn, and ask if it passes through unchanged. This is much closer to what the backend sees as a result of ComputeValueVTs. Aside from the bug fixes, this eliminates the recursion that's going on and, I believe, makes the bulk of the code significantly easier to understand. The trade-off is the nasty iterators needed to find the real types inside a returned value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187787 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak Debug build on WindowsSerge Pavlov2013-08-061-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187786 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify vector lane handling math a bit. No functional change intended.Craig Topper2013-08-061-22/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187783 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify math a little bit.Craig Topper2013-08-061-16/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187781 91177308-0d34-0410-b5e6-96231b3b80d8
* Target/*/CMakeLists.txt: Add the dependency to CommonTableGen explicitly for ↵NAKAMURA Takumi2013-08-0612-12/+14
| | | | | | | | | each corresponding CodeGen. Without explicit dependencies, both per-file action and in-CommonTableGen action could run in parallel. It races to emit *.inc files simultaneously. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187780 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace EVT with MVT in isHorizontalBinOp as it is only called with legal types.Craig Topper2013-08-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187779 91177308-0d34-0410-b5e6-96231b3b80d8
* AsmPrinter/CMakeLists.txt: Add explicit dependency to intrinsics_gen here.NAKAMURA Takumi2013-08-061-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187778 91177308-0d34-0410-b5e6-96231b3b80d8
* Option/CMakeLists.txt: Don't use target_link_libraries. LLVMBuild knows ↵NAKAMURA Takumi2013-08-061-2/+0
| | | | | | dependencies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187777 91177308-0d34-0410-b5e6-96231b3b80d8
* Put an llvm_unreachable at the end of getSplatIndex as its loop should never ↵Craig Topper2013-08-061-1/+1
| | | | | | find all undef elements. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187775 91177308-0d34-0410-b5e6-96231b3b80d8
* Check against >= 0 instead of != -1 in getSplatIndex because it generally ↵Craig Topper2013-08-061-1/+1
| | | | | | compiles to better code and is equivalent for shuffle indices. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187774 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespace and fix an 80-column violation. No functional change.Craig Topper2013-08-061-4/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187773 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify code slightly. No functional change.Craig Topper2013-08-061-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187771 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor FlattenCFG out from SimplifyCFGTom Stellard2013-08-0621-703/+832
| | | | | | Patch by: Mei Ye git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187764 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow 4 as a valid debug info version.Eric Christopher2013-08-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187763 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some comment to LTOCodeGenerator classShuxin Yang2013-08-061-1/+44
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187761 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix missing -*- C++ -*-sMatt Arsenault2013-08-062-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187758 91177308-0d34-0410-b5e6-96231b3b80d8
* FileCheckize some of the testcases.Bill Wendling2013-08-0513-26/+39
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187756 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix grammar.Bill Wendling2013-08-051-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187755 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Add missing test for r187749Tom Stellard2013-08-051-0/+48
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187754 91177308-0d34-0410-b5e6-96231b3b80d8
* Recommit previous cleanup with a fix for c++98 ambiguity.Eric Christopher2013-08-051-5/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187752 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Implement TargetLowering::getVectorIdxTy()Tom Stellard2013-08-053-5/+14
| | | | | | | We use MVT::i32 for the vector index type, because we use 32-bit operations to caculate offsets when dynamically indexing vectors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187749 91177308-0d34-0410-b5e6-96231b3b80d8
* TargetLowering: Add getVectorIdxTy() function v2Tom Stellard2013-08-059-77/+105
| | | | | | | | | | | | | | | | | | | | | This virtual function can be implemented by targets to specify the type to use for the index operand of INSERT_VECTOR_ELT, EXTRACT_VECTOR_ELT, INSERT_SUBVECTOR, EXTRACT_SUBVECTOR. The default implementation returns the result from TargetLowering::getPointerTy() The previous code was using TargetLowering::getPointerTy() for vector indices, because this is guaranteed to be legal on all targets. However, using TargetLowering::getPointerTy() can be a problem for targets with pointer sizes that differ across address spaces. On such targets, when vectors need to be loaded or stored to an address space other than the default 'zero' address space (which is the address space assumed by TargetLowering::getPointerTy()), having an index that is a different size than the pointer can lead to inefficient pointer calculations, (e.g. 64-bit adds for a 32-bit address space). There is no intended functionality change with this patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187748 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Use existing builtin hashing functions to make this routine more"Eric Christopher2013-08-051-2/+5
| | | | | | This reverts commit r187745. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187747 91177308-0d34-0410-b5e6-96231b3b80d8
* Use existing builtin hashing functions to make this routine moreEric Christopher2013-08-051-5/+2
| | | | | | simple. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187745 91177308-0d34-0410-b5e6-96231b3b80d8