summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [PowerPC] Fix PR22711 - Misaligned .toc sectionBill Schmidt2015-02-272-0/+66
| | | | | | | | | | | | Straightforward patch to emit an alignment directive when emitting a TOC entry. The test case was generated from the test in PR22711 that demonstrated a misaligned .toc section. The object code is run through llvm-readobj to verify that the correct alignment has been applied to the .toc section. Thanks to Ulrich Weigand for running down where the fix was needed. llvm-svn: 230801
* Reduce double set lookups.Benjamin Kramer2015-02-273-6/+3
| | | | llvm-svn: 230798
* [opaque pointer type] Add textual IR support for explicit type parameter to ↵David Blaikie2015-02-273931-29293/+29317
| | | | | | | | | | | | | | | | | | | | | | | | load instruction Essentially the same as the GEP change in r230786. A similar migration script can be used to update test cases, though a few more test case improvements/changes were required this time around: (r229269-r229278) import fileinput import sys import re pat = re.compile(r"((?:=|:|^)\s*load (?:atomic )?(?:volatile )?(.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$)") for line in sys.stdin: sys.stdout.write(re.sub(pat, r"\1, \2\3*\4", line)) Reviewers: rafael, dexonsmith, grosser Differential Revision: http://reviews.llvm.org/D7649 llvm-svn: 230794
* Target/X86: Never use the redzone for Win64 ABI functions.Charles Davis2015-02-272-2/+3
| | | | | | | | | | | | | | | | | Summary: Until now, we did this (among other things) based on whether or not the target was Windows. This is clearly wrong, not just for Win64 ABI functions on non-Windows, but for System V ABI functions on Windows, too. In this change, we make this decision based on the ABI the calling convention specifies instead. Reviewers: rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7953 llvm-svn: 230793
* [PowerPC] Use vector types for memcpy and friends (sometimes)Hal Finkel2015-02-273-4/+139
| | | | | | | | | | When using Altivec, we can use vector loads and stores for aligned memcpy and friends. Starting with the P7 and VXS, we have reasonable unaligned vector stores. Starting with the P8, we have fast unaligned loads too. For QPX, we use vector loads are stores, but only for aligned memory accesses. llvm-svn: 230788
* [opaque pointer type] Add textual IR support for explicit type parameter to ↵David Blaikie2015-02-272277-41819/+41849
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getelementptr instruction One of several parallel first steps to remove the target type of pointers, replacing them with a single opaque pointer type. This adds an explicit type parameter to the gep instruction so that when the first parameter becomes an opaque pointer type, the type to gep through is still available to the instructions. * This doesn't modify gep operators, only instructions (operators will be handled separately) * Textual IR changes only. Bitcode (including upgrade) and changing the in-memory representation will be in separate changes. * geps of vectors are transformed as: getelementptr <4 x float*> %x, ... ->getelementptr float, <4 x float*> %x, ... Then, once the opaque pointer type is introduced, this will ultimately look like: getelementptr float, <4 x ptr> %x with the unambiguous interpretation that it is a vector of pointers to float. * address spaces remain on the pointer, not the type: getelementptr float addrspace(1)* %x ->getelementptr float, float addrspace(1)* %x Then, eventually: getelementptr float, ptr addrspace(1) %x Importantly, the massive amount of test case churn has been automated by same crappy python code. I had to manually update a few test cases that wouldn't fit the script's model (r228970,r229196,r229197,r229198). The python script just massages stdin and writes the result to stdout, I then wrapped that in a shell script to handle replacing files, then using the usual find+xargs to migrate all the files. update.py: import fileinput import sys import re ibrep = re.compile(r"(^.*?[^%\w]getelementptr inbounds )(((?:<\d* x )?)(.*?)(| addrspace\(\d\)) *\*(|>)(?:$| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$))") normrep = re.compile( r"(^.*?[^%\w]getelementptr )(((?:<\d* x )?)(.*?)(| addrspace\(\d\)) *\*(|>)(?:$| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$))") def conv(match, line): if not match: return line line = match.groups()[0] if len(match.groups()[5]) == 0: line += match.groups()[2] line += match.groups()[3] line += ", " line += match.groups()[1] line += "\n" return line for line in sys.stdin: if line.find("getelementptr ") == line.find("getelementptr inbounds"): if line.find("getelementptr inbounds") != line.find("getelementptr inbounds ("): line = conv(re.match(ibrep, line), line) elif line.find("getelementptr ") != line.find("getelementptr ("): line = conv(re.match(normrep, line), line) sys.stdout.write(line) apply.sh: for name in "$@" do python3 `dirname "$0"`/update.py < "$name" > "$name.tmp" && mv "$name.tmp" "$name" rm -f "$name.tmp" done The actual commands: From llvm/src: find test/ -name *.ll | xargs ./apply.sh From llvm/src/tools/clang: find test/ -name *.mm -o -name *.m -o -name *.cpp -o -name *.c | xargs -I '{}' ../../apply.sh "{}" From llvm/src/tools/polly: find test/ -name *.ll | xargs ./apply.sh After that, check-all (with llvm, clang, clang-tools-extra, lld, compiler-rt, and polly all checked out). The extra 'rm' in the apply.sh script is due to a few files in clang's test suite using interesting unicode stuff that my python script was throwing exceptions on. None of those files needed to be migrated, so it seemed sufficient to ignore those cases. Reviewers: rafael, dexonsmith, grosser Differential Revision: http://reviews.llvm.org/D7636 llvm-svn: 230786
* Refer users looking for the release notes to 3.6.Benjamin Kramer2015-02-271-1/+1
| | | | llvm-svn: 230781
* Remove the Forward Control Flow Integrity pass and its dependencies.Eric Christopher2015-02-2723-1552/+1
| | | | | | | | | This work is currently being rethought along different lines and if this work is needed it can be resurrected out of svn. Remove it for now as no current work in ongoing on it and it's unused. Verified with the authors before removal. llvm-svn: 230780
* Object: Test for reading kext bundlesJustin Bogner2015-02-272-0/+7
| | | | | | | In the review for r230567, it was pointed out we should really test the lib/Object part of that change. This does so using llvm-readobj. llvm-svn: 230779
* Delete LLVM_DELETED_FUNCTION from coding standardsReid Kleckner2015-02-271-28/+0
| | | | | | | | | It didn't seem worth leaving behind a guideline to use '= delete' to make a class uncopyable. That's a well known C++ design pattern. Reported on the mailing list and in PR22724. llvm-svn: 230776
* Change the fast-isel-abort option from bool to int to enable "levels"Mehdi Amini2015-02-27144-291/+291
| | | | | | | | | | | | | | | | | | | | | | | Summary: Currently fast-isel-abort will only abort for regular instructions, and just warn for function calls, terminators, function arguments. There is already fast-isel-abort-args but nothing for calls and terminators. This change turns the fast-isel-abort options into an integer option, so that multiple levels of strictness can be defined. This will help no being surprised when the "abort" option indeed does not abort, and enables the possibility to write test that verifies that no intrinsics are forgotten by fast-isel. Reviewers: resistor, echristo Subscribers: jfb, llvm-commits Differential Revision: http://reviews.llvm.org/D7941 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 230775
* Minor follow-ups to r229720 suggested on llvmdevReid Kleckner2015-02-272-2/+3
| | | | | | "svn" patch by Sedat Dilek plus trimming whitespace added in r229720. llvm-svn: 230773
* Centralize handling of the eh_begin and eh_end labels.Rafael Espindola2015-02-2713-40/+77
| | | | | | | | | | This removes a bit of duplicated code and more importantly, remembers the labels so that they don't need to be looked up by name. This in turn allows for any name to be used and avoids a crash if the name we wanted was already taken. llvm-svn: 230772
* remove function names from comments; NFCSanjay Patel2015-02-271-9/+8
| | | | llvm-svn: 230771
* Switch a std::map to a DenseMap in CodeGenRegisters.Owen Anderson2015-02-273-9/+12
| | | | | | | | The keys of the map are unique by pointer address, so there's no need to use the llvm::less comparator. This allows us to use DenseMap instead, which reduces tblgen time by 20% on my stress test. llvm-svn: 230769
* remove function names from comments; NFCSanjay Patel2015-02-271-20/+15
| | | | llvm-svn: 230766
* Equally to NetBSD, Bitrig/ARM uses the Itanium-ABI.Renato Golin2015-02-272-0/+5
| | | | | | Patch by Patrick Wildt. llvm-svn: 230762
* [mips][microMIPS] Change register class for GP registerZoran Jovanovic2015-02-272-6/+29
| | | | | | Differential Revision: http://reviews.llvm.org/D7934 llvm-svn: 230760
* R600/SI: Add missing mubuf instructionsTom Stellard2015-02-272-9/+25
| | | | llvm-svn: 230759
* R600/SI: Consistently put soffset before the offset operand for mubuf ↵Tom Stellard2015-02-273-20/+20
| | | | | | | | instructions This matches the assembly syntax. llvm-svn: 230758
* R600/SI: Add slc, glc, and tfe to non-atomic _ADDR64 instructionsTom Stellard2015-02-274-17/+33
| | | | llvm-svn: 230757
* Pass correct -mtriple for krait-cpu-div-attribute.llPetar Jovanovic2015-02-271-1/+1
| | | | | | | | | Not passing mtriple for one of the tests caused a regression failure on MIPS buildbot. The issue was introduced by r230651. Differential Revision: http://reviews.llvm.org/D7938 llvm-svn: 230756
* [x86] Run most of the rest of the shuffle combining over non-128-bitChandler Carruth2015-02-273-71/+29
| | | | | | | | | | | | vectors. This lets us fix the rest of the v16 lowering problems when pshufb is clearly better. We might still be able to improve some of the lowerings by enabling the other combine-based rewriting to fire for non-128-bit vectors, but this at least should remove any regressions from using the fancy v16i16 lowering strategy. llvm-svn: 230753
* [x86] Teach a bunch of the x86-specific shuffle combining to work withChandler Carruth2015-02-272-15/+29
| | | | | | | 256-bit vectors as well as 128-bit vectors. Fixes some of the redundant shuffles for v16i16. llvm-svn: 230752
* [x86] Make the v8i16 clever single-input shuffle lowering usable forChandler Carruth2015-02-273-49/+118
| | | | | | | | | | | | | | | | | repeated 128-bit lane shuffles of wider vector types and use it to lower 256-bit v16i16 vector shuffles where applicable. This should let us perfectly lowering the pattern of pshuflw and pshufhw even for AVX2 256-bit patterns. I've not added AVX-512 support, but it should be trivial for someone working on that to wire up. Note that currently this generates bad, long shuffle chains because we don't combine 256-bit target shuffles. The subsequent patches will fix that. llvm-svn: 230751
* [x86] Add a bunch more tests for v16i16 shuffles. All of these are takenChandler Carruth2015-02-271-0/+1669
| | | | | | | | by mirroring v8i16 test cases across both 128-bit lanes. This should highlight problems where we aren't correctly using 128-bit shuffles to implement things. llvm-svn: 230750
* [mips] Remove redundant periods from -mattr=help descriptions for MIPS.Toma Tabacu2015-02-271-6/+6
| | | | | | | | | | | | | | Summary: Also fixes an infringement of the 80-column limit rule. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7910 llvm-svn: 230748
* [llvm-pdbdump] Fix member initialization order warnings.Zachary Turner2015-02-272-2/+2
| | | | llvm-svn: 230747
* [llvm-pdbdump] Colorize output.Zachary Turner2015-02-2718-191/+493
| | | | llvm-svn: 230746
* [llvm-pdbdump] Fix warnings found by clang-cl self host.Zachary Turner2015-02-271-1/+1
| | | | llvm-svn: 230745
* [llvm-pdbdump] Add support for dumping global variables.Zachary Turner2015-02-277-56/+82
| | | | llvm-svn: 230744
* [x86] Make the single-input v8i16 lowering directly recurse rather thanChandler Carruth2015-02-271-2/+2
| | | | | | | | going back through the entire vector shuffle lowering. This is an important step to being able to re-use this logic. llvm-svn: 230743
* [mips] Account for constant-zero operands in ADDE nodes.Vasileios Kalintiris2015-02-272-2/+41
| | | | | | | | | | | | | | | Summary: We identify the cases where the operand to an ADDE node is a constant zero. In such cases, we can avoid generating an extra ADDu instruction disguised as an identity move alias (ie. addu $r, $r, 0 --> move $r, $r). Reviewers: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7906 llvm-svn: 230742
* [asan] Skip promotable allocas to improve performance at -O0Anna Zaks2015-02-278-36/+105
| | | | | | | | | | | | Currently, the ASan executables built with -O0 are unnecessarily slow. The main reason is that ASan instrumentation pass inserts redundant checks around promotable allocas. These allocas do not get instrumented under -O1 because they get converted to virtual registered by mem2reg. With this patch, ASan instrumentation pass will only instrument non promotable allocas, giving us a speedup of 39% on a collection of benchmarks with -O0. (There is no measurable speedup at -O1.) llvm-svn: 230724
* Don't modify the DenseMap being iterated over from within the loopSanjoy Das2015-02-271-3/+6
| | | | | | | | | | | that is iterating over it Inserting elements into a `DenseMap` invalidated iterators pointing into the `DenseMap` instance. Differential Revision: http://reviews.llvm.org/D7924 llvm-svn: 230719
* Fix a use-iterator-after-invalidate errorSanjoy Das2015-02-271-0/+6
| | | | | | | | AnalysisResult::getResultImpl reuses an iterator into a DenseMap after inserting elements into it. This change adds code to recompute the iterator before the second use. llvm-svn: 230718
* Target/X86: Save Win64 non-volatile registers in a Win64 ABI function.Charles Davis2015-02-272-1/+39
| | | | | | | | | | | | | | Summary: This change causes us to actually save non-volatile registers in a Win64 ABI function that calls a System V ABI function, and vice-versa. Reviewers: rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7919 llvm-svn: 230714
* llvm-vtabledump: Dump catch/throw exception structures for MS ABIDavid Majnemer2015-02-273-2/+365
| | | | llvm-svn: 230713
* Rewrite MachineOperand::print and MachineInstr::print to avoidEric Christopher2015-02-279-50/+36
| | | | | | | | | | | | uses of TM->getSubtargetImpl and propagate to all calls. This could be a debugging regression in places where we had a TargetMachine and/or MachineFunction but don't have it as part of the MachineInstr. Fixing this would require passing a MachineFunction/Function down through the print operator, but none of the existing uses in tree seem to do this. llvm-svn: 230710
* Put jump tables in distinct sections if -ffunction-sections is used.Rafael Espindola2015-02-262-20/+34
| | | | | | | A small regression in r230411 was that we were basing the decision on -fdata-sections. llvm-svn: 230707
* [Orc][Kaleidoscope] More tutorial cleanup, a little extra debugging output.Lang Hames2015-02-262-23/+19
| | | | llvm-svn: 230705
* [llvm-pdbdump] Add missing files.Zachary Turner2015-02-262-0/+105
| | | | llvm-svn: 230704
* [llvm-pdbdump] Fix dumping of function pointers and basic types.Zachary Turner2015-02-2612-65/+93
| | | | | | | | | | | | Function pointers were not correctly handled by the dumper, and they would print as "* name". They now print as "int (__cdecl *name)(int arg1, int arg2)" as they should. Also, doubles were being printed as floats. This fixes that bug as well, and adds tests for all builtin types. as well as a test for function pointers. llvm-svn: 230703
* Remove commented out function.Eric Christopher2015-02-261-1/+0
| | | | | | (Saving files works, who knew?) llvm-svn: 230701
* Remove DebugLoc::print(LLVMContext, raw_ostream), it was justEric Christopher2015-02-263-10/+4
| | | | | | forwarding to the one that didn't take a context. llvm-svn: 230700
* getRegForInlineAsmConstraint wants to use TargetRegisterInfo forEric Christopher2015-02-2627-108/+137
| | | | | | | | | a lookup, pass that in rather than use a naked call to getSubtargetImpl. This involved passing down and around either a TargetMachine or TargetRegisterInfo. Update all callers/definitions around the targets and SelectionDAG. llvm-svn: 230699
* Add a TargetMachine argument to the AddressingModeMatcher, we'llEric Christopher2015-02-261-10/+14
| | | | | | | need this shortly to get a TargetRegisterInfo from the subtarget for TargetLowering routines. llvm-svn: 230698
* [x86] Fix PR22706 where we would incorrectly try lower a v32i8 dynamicChandler Carruth2015-02-262-13/+41
| | | | | | | | | | | | | blend as legal. We made the same mistake in two different places. Whenever we are custom lowering a v32i8 blend we need to check whether we are custom lowering it only for constant conditions that can be shuffled, or whether we actually have AVX2 and full dynamic blending support on bytes. Both are fixed, with comments added to make it clear what is going on and a new test case. llvm-svn: 230695
* Simplify arange output.Rafael Espindola2015-02-262-68/+43
| | | | | | | Move SectionMap to its only user (emitDebugARanges) and reorder to save a call to sort. llvm-svn: 230693
* Re-instate the pragma optimize hack for MSVC, but not clang-clReid Kleckner2015-02-261-0/+8
| | | | | | Reverts commit r230686 with define modifications. llvm-svn: 230692
OpenPOWER on IntegriCloud