- Feb 28, 2015
-
-
Jon Roelofs authored
http://reviews.llvm.org/D7961 llvm-svn: 230812
-
Bill Schmidt authored
llvm-svn: 230811
-
David Blaikie authored
llvm-svn: 230810
-
David Blaikie authored
llvm-svn: 230809
-
Rui Ueyama authored
Previously we didn't call the hook on a file in an archive, which let the PE/COFF port fail to link files in archives. It was a simple mistake. Added a call to the hook and also added a test to catch that error. const_cast is an unfortunate hack. Files in the resolver are usually const, but they are not actually const objects, since they are mutated if either a file is taken from an archive (an archive file does never return the same file twice) or the beforeLink hook is called. Maybe we should just remove const from there -- because they are not const. llvm-svn: 230808
-
Philip Reames authored
As mentioned on llvm-dev, this is a new documentation page intended to collect tips for frontend authors on how to generate IR that LLVM is able to optimize well. These types of things come up repeated in review threads and it would be good to have a place to save them. I added a small handful to start us off, but I mostly want to get the framework in place. Once the docs are here, we can add to them incrementally. If you know of something appropriate for this page, please add it! Differential Revision: http://reviews.llvm.org/D7890 llvm-svn: 230807
-
Benjamin Kramer authored
It's too big for inlining anyways. Also clean it up slightly. No functionality change intended. llvm-svn: 230806
-
Richard Smith authored
undeserialized specializations (because we merged an imported declaration of the same template since we last added one), don't bother reading in the specializations themselves just so we can write out their IDs again. llvm-svn: 230805
-
- Feb 27, 2015
-
-
David Majnemer authored
llvm-svn: 230804
-
Bill Schmidt authored
llvm-svn: 230803
-
Dan Albert authored
This improves the performance of unwinding on DWARF based targets. The 32-bit x86 support for scanning the full eh_frame (CFI_Parser::findFDE) apparently does not work (at least not on Linux). Since the eh_frame_hdr code delegates to that, this still doesn't work for x86 Linux, but it has been tested on x86_64 Linux and aarch64 Android. llvm-svn: 230802
-
Bill Schmidt authored
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
-
Johannes Doerfert authored
llvm-svn: 230800
-
Chaoren Lin authored
Reviewers: clayborg, zturner, ki.stfu, abidh Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7950 llvm-svn: 230799
-
Benjamin Kramer authored
llvm-svn: 230798
-
David Blaikie authored
This was & is failing at ToT, but now it's failing for the original reason, not because the IR can't be parsed. llvm-svn: 230797
-
David Blaikie authored
llvm-svn: 230796
-
David Blaikie authored
llvm-svn: 230795
-
David Blaikie authored
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
-
Charles Davis authored
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
-
David Blaikie authored
llvm-svn: 230792
-
Rui Ueyama authored
In doParse, we shouldn't do anything that has side effects. That function may be called speculatively and possibly in parallel. We called WinLinkDriver::parse from doParse to parse a command line in a .drectve section. The parse function updates a linking context object, so it has many side effects. It was not safe to call that function from doParse. beforeLink is a function for a File object to do something that has side effects. Moving a call of WinLinkDriver::parse to there. llvm-svn: 230791
-
Johannes Doerfert authored
llvm-svn: 230790
-
Richard Smith authored
to date' after it gets updated. llvm-svn: 230789
-
Hal Finkel authored
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
-
Ilia K authored
Summary: Before this fix the FileSpec::GetPath() returned string which might be without '\0' at the end. It could have happened if the size of buffer for path was less than actual path. Test case: ``` FileSpec test("/path/to/file", false); char buf[]="!!!!!!"; test.GetPath(buf, 3); ``` Before fix: ``` 233 FileSpec test("/path/to/file", false); 234 char buf[]="!!!!!!"; 235 test.GetPath(buf, 3); 236 -> 237 if (core_file) 238 { 239 if (!core_file.Exists()) 240 { (lldb) print buf (char [7]) $0 = "/pa!!!" ``` After fix: ``` 233 FileSpec test("/path/to/file", false); 234 char buf[]="!!!!!!"; 235 test.GetPath(buf, 3); 236 -> 237 if (core_file) 238 { 239 if (!core_file.Exists()) 240 { (lldb) print buf (char [7]) $0 = "/p" ``` Reviewers: zturner, abidh, clayborg Reviewed By: abidh, clayborg Subscribers: tberghammer, vharron, lldb-commits, clayborg, zturner, abidh Differential Revision: http://reviews.llvm.org/D7553 llvm-svn: 230787
-
David Blaikie authored
[opaque pointer type] Add textual IR support for explicit type parameter to 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
-
David Blaikie authored
llvm-svn: 230784
-
David Blaikie authored
llvm-svn: 230783
-
Ilia K authored
Summary: This ability was added by @jasonmolenda in [[ http://reviews.llvm.org/rL225748 | r225748 ]] but it was commented out because he hadn't test it. I tested it on OS X and now we can enable it legally. This change is made by @chying request. Reviewers: jasonmolenda, chying, clayborg Reviewed By: clayborg Subscribers: lldb-commits, chying, jasonmolenda, clayborg Differential Revision: http://reviews.llvm.org/D7930 llvm-svn: 230782
-
Benjamin Kramer authored
llvm-svn: 230781
-
Eric Christopher authored
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
-
Justin Bogner authored
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
-
Reid Kleckner authored
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
-
Mehdi Amini authored
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
-
Johannes Doerfert authored
When we generate code for a whole region we have to respect dominance and update it too. The first is achieved with multiple "BBMap"s. Each copied block in the region gets its own map. It is initialized only with values mapped in the immediate dominator block, if this block is in the region and was therefor already copied. This way no values defined in a block that doesn't dominate the current one will be used. To update dominance information we check if the immediate dominator of the original block we want to copy is in the region. If so we set the immediate dominator of the current block to the copy of the immediate dominator of the original block. llvm-svn: 230774
-
Reid Kleckner authored
"svn" patch by Sedat Dilek plus trimming whitespace added in r229720. llvm-svn: 230773
-
Rafael Espindola authored
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
-
Sanjay Patel authored
llvm-svn: 230771
-
Rui Ueyama authored
llvm-svn: 230770
-