summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [ConstantRange] Teach multiply to be cleverer about signed ranges.James Molloy2015-03-063-3/+36
| | | | | | | | | | | | | Multiplication is not dependent on signedness, so just treating all input ranges as unsigned is not incorrect. However it will cause overly pessimistic ranges (such as full-set) when used with signed negative values. Teach multiply to try to interpret its inputs as both signed and unsigned, and then to take the most specific (smallest population) as its result. llvm-svn: 231483
* Initialize ProcessPOSIXLog by NativeProcessLinuxTamas Berghammer2015-03-063-5/+43
| | | | | | | | | | Previously it was initialized by ProcessLinux but lldb-server don't contain ProcessLinux anymore so it have to be initialized by NativeProcessLinux also. Differential revision: http://reviews.llvm.org/D8080 llvm-svn: 231482
* [AsmPrinter][TLOF] Make AArch64 test a bit more flexibleBruno Cardoso Lopes2015-03-061-8/+8
| | | | llvm-svn: 231481
* [AsmPrinter][TLOF] Split tests and move to appropriate directoriesBruno Cardoso Lopes2015-03-064-38/+164
| | | | | | Follow up from r231474 and 231475 to appease buildbots llvm-svn: 231480
* Rename test/tools/lldb-gdbserver to test/tools/lldb-serverRobert Flack2015-03-0628-31/+31
| | | | | | | | As requested in http://reviews.llvm.org/D7545 this change moves test/tools/lldb-gdbserver to test/tools/lldb-server ot match the name of the target being tested. Differential Revision: http://reviews.llvm.org/D8061 llvm-svn: 231479
* Symbolizer refactoring: Make WinSymbolizer use SymbolizerTool interfaceKuba Brecka2015-03-063-113/+179
| | | | | | Reviewed at http://reviews.llvm.org/D8089 llvm-svn: 231478
* Removing code that is unused after r231424; NFC.Aaron Ballman2015-03-061-8/+0
| | | | llvm-svn: 231477
* Use delegating ctors to reduce code duplication. NFC.Benjamin Kramer2015-03-063-47/+6
| | | | llvm-svn: 231476
* [AsmPrinter][TLOF] 32-bit MachO support for replacing GOT equivalentsBruno Cardoso Lopes2015-03-069-22/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | Add MachO 32-bit (i.e. arm and x86) support for replacing global GOT equivalent symbol accesses. Unlike 64-bit targets, there's no GOTPCREL relocation, and access through a non_lazy_symbol_pointers section is used instead. -- before _extgotequiv: .long _extfoo _delta: .long _extgotequiv-_delta -- after _delta: .long L_extfoo$non_lazy_ptr-_delta .section __IMPORT,__pointers,non_lazy_symbol_pointers L_extfoo$non_lazy_ptr: .indirect_symbol _extfoo .long 0 llvm-svn: 231475
* [AsmPrinter][TLOF] ARM64 MachO support for replacing GOT equivalentsBruno Cardoso Lopes2015-03-067-28/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up r230264 and add ARM64 support for replacing global GOT equivalent symbol accesses by references to the GOT entry for the final symbol instead, example: -- before .globl _foo _foo: .long 42 .globl _gotequivalent _gotequivalent: .quad _foo .globl _delta _delta: .long _gotequivalent-_delta -- after .globl _foo _foo: .long 42 .globl _delta Ltmp3: .long _foo@GOT-Ltmp3 llvm-svn: 231474
* CodingStyle: Allow delegating ctorsBenjamin Kramer2015-03-061-0/+2
| | | | | | Delegating constructors seem to work fine with all supported compilers. llvm-svn: 231473
* [mips] [IAS] Add missing constraints and improve testing for the .module ↵Toma Tabacu2015-03-065-13/+303
| | | | | | | | | | | | | | | | | | directive. Summary: None of the .set directives can be used before the .module directives. The .set mips0/pop/push were not triggering this constraint. Also added testing for all the other implemented directives which are supposed to trigger this constraint. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7140 llvm-svn: 231465
* clang-format: Slightly change indentation rules in for loops.Daniel Jasper2015-03-062-4/+7
| | | | | | | | | | | | | | | | | | | | | | There was already a TODO to double-check whether the extra indenation makes sense. A slightly different case reveals that it is actively harmful: for (int i = 0; i < aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || bbbbbbbbbbbbbbbbbbbb < ccccccccccccccc; ++i) { } Here (and it is probably not a totally infrequent case, it just works out that "i < " is four spaces and so the four space extra indentation makes the operator precedence confusing. So, this will now instead be formatted as: for (int i = 0; i < aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || bbbbbbbbbbbbbbbbbbbb < ccccccccccccccc; ++i) { } llvm-svn: 231461
* Fix race condition with -o "process launch" on linuxPavel Labath2015-03-062-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | Summary: starting a debug session on linux with -o "process launch" lldb parameter was failing since Target::Launch (in sychronous mode) is expecting to be able to receive public process events. However, PlatformLinux did not set up event hijacking on process launch, which caused these events to be processed elsewhere and left Target::Launch hanging. This patch enables event interception in PlatformLinux (which was commented out). Upon enabling event interception, I noticed an issue, which I traced back to the inconsistent state of public run lock, which remained false even though public and private process states were "stopped". I addressed this by making sure the run lock is "stopped" upon exit from WaitForProcessToStop (which already had similar provisions for other return paths). Test Plan: This should fix the intermittent TestFormats failure we have been experiencing on Linux. Reviewers: jingham, clayborg, vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8079 llvm-svn: 231460
* Change the way in which error case is being handled.Daniel Jasper2015-03-061-2/+4
| | | | | | | | | Specifically this: * Prevents an "unused" warning in non-assert builds. * In that error case return with out removing a child loop instead of looping forever. llvm-svn: 231459
* Add a new pass "Loop Interchange"Karthik Bhat2015-03-0610-0/+2033
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This pass interchanges loops to provide a more cache-friendly memory access. For e.g. given a loop like - for(int i=0;i<N;i++) for(int j=0;j<N;j++) A[j][i] = A[j][i]+B[j][i]; is interchanged to - for(int j=0;j<N;j++) for(int i=0;i<N;i++) A[j][i] = A[j][i]+B[j][i]; This pass is currently disabled by default. To give a brief introduction it consists of 3 stages- LoopInterchangeLegality : Checks the legality of loop interchange based on Dependency matrix. LoopInterchangeProfitability: A very basic heuristic has been added to check for profitibility. This will evolve over time. LoopInterchangeTransform : Which does the actual transform. LNT Performance tests shows improvement in Polybench/linear-algebra/kernels/mvt and Polybench/linear-algebra/kernels/gemver becnmarks. TODO: 1) Add support for reductions and lcssa phi. 2) Improve profitability model. 3) Improve loop selection algorithm to select best loop for interchange. Currently the innermost loop is selected for interchange. 4) Improve compile time regression found in llvm lnt due to this pass. 5) Fix issues in Dependency Analysis module. A special thanks to Hal for reviewing this code. Review: http://reviews.llvm.org/D7499 llvm-svn: 231458
* asan: fix comment formattingDmitry Vyukov2015-03-062-3/+3
| | | | | | As per comments in http://reviews.llvm.org/D8032 llvm-svn: 231457
* X86: Form IMGREL relocations for LLVM FunctionsDavid Majnemer2015-03-062-9/+12
| | | | | | | | We supported forming IMGREL relocations from ConstantExprs involving __ImageBase if the minuend was a GlobalVariable. Extend this functionality to all GlobalObjects. llvm-svn: 231456
* Silence C4715 'not all control paths return a value' warnings.Yaron Keren2015-03-062-0/+4
| | | | llvm-svn: 231455
* PECOFF: Optimize the writer using parallel_for.Rui Ueyama2015-03-061-8/+11
| | | | | | | | | Previously applying 1 million relocations took about 2 seconds on my Xeon 2.4GHz 8 core workstation. After this patch, it takes about 300 milliseconds. As a result, time to link chrome.dll becomes 23 seconds to 21 seconds. llvm-svn: 231454
* Remove unneeded python importEric Fiselier2015-03-061-1/+0
| | | | llvm-svn: 231453
* Support: Improve performance of FileOutputBuffer on WindowsRui Ueyama2015-03-061-0/+7
| | | | | | | | | | We extend an underlying file before mmap'ing it, but it's not needed on Windows. Extending file is slow on Windows, so we should avoid doing that. The difference gets larger as the size of an output file gets larger. It shove off 2 seconds out of 25 seconds when linking chrome.dll with LLD, for example. llvm-svn: 231452
* Don't crash on non-public referenced dtors in toplevel classes.Nico Weber2015-03-062-2/+19
| | | | | | | Fixes PR22793, a bug that caused self-hosting to fail after the innocuous r231254. See the bug for details. llvm-svn: 231451
* Windows botEnrico Granata2015-03-061-0/+1
| | | | llvm-svn: 231450
* Provide synthetic children for some vector typesEnrico Granata2015-03-0610-1/+384
| | | | | | | | | | Unlike GDB, we tackle the problem of representing vector types in different styles by having a synthetic child provider that recognizes the format you're trying to apply to the variable, and coming up with the right type and number of child values to match that format This makes for a more compact representation and less visual noise Fixes rdar://5429347 llvm-svn: 231449
* [llgo] Disable known failing packages in check-libgoAndrew Wilkins2015-03-064-4/+42
| | | | | | | | | | | | | | | | | | | | | Summary: There are two packages in libgo which have known failures when running the "make check" rule. This change disables those packages in the tests so that we can run libgo tests without them until the root causes are identified and resolved. Test Plan: ran check-libgo rule Reviewers: pcc Reviewed By: pcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8003 llvm-svn: 231448
* [objc-arc] Sprinkle some more auto on some iterators.Michael Gottesman2015-03-061-8/+4
| | | | llvm-svn: 231447
* [objc-arc] Move the detection of potential uses or altering of a ref count ↵Michael Gottesman2015-03-063-108/+171
| | | | | | onto PtrState. llvm-svn: 231446
* We want to add the entry point to the root set unconditionally, but theseDavide Italiano2015-03-061-6/+1
| | | | | | | asserts don't allow us to do it. Remove them, they're not really needed anyway. llvm-svn: 231445
* Remove unused function.Rui Ueyama2015-03-062-7/+0
| | | | llvm-svn: 231444
* LegalizeTypes: Handle shift by 0 in ExpandShiftByConstant.Michael Zolotukhin2015-03-062-1/+20
| | | | | | | Though such shifts are usually optimized away by combiner, we still can encounter them after a vector shift is legalized. llvm-svn: 231443
* Remember to move a type to the correct set when setting the body.Rafael Espindola2015-03-065-0/+35
| | | | | | | | | We would set the body of a struct type (therefore making it non-opaque) but were forgetting to move it to the non-opaque set. Fixes pr22807. llvm-svn: 231442
* Bump major vers # in xcode project file from 330 to 340.Jason Molenda2015-03-065-39/+39
| | | | llvm-svn: 231441
* Renamed function to avoid confusion about purpose.John Thompson2015-03-061-3/+5
| | | | llvm-svn: 231440
* [objc-arc] Move the checking of whether or not we can match onto PtrStates ↵Michael Gottesman2015-03-063-51/+76
| | | | | | | | | | | and out of the main dataflow. These refactored computations check whether or not we are at a stage of the sequence where we can perform a match. This patch moves the computation out of the main dataflow and into {BottomUp,TopDown}PtrState. llvm-svn: 231439
* [objc-arc] Refactor (Re-)initialization of PtrState from dataflow -> ↵Michael Gottesman2015-03-063-47/+64
| | | | | | | | | | {TopDown,BottomUp}PtrState Class. This initialization occurs when we see a new retain or release. Before we performed the actual initialization inline in the dataflow. That is just messy. llvm-svn: 231438
* [objc-arc] Create two subclasses of PtrState in preparation for moving per ↵Michael Gottesman2015-03-062-43/+60
| | | | | | | | | | | ptr state change behavior onto a PtrState class. This will enable the main ObjCARCOpts dataflow to work with higher level concepts such as "can this ptr state be modified by this ref count" and not need to understand the nitty gritty details of how that is determined. This makes the dataflow cleaner. llvm-svn: 231437
* [objc-arc] Extract out MDNodes into a cache structure so the information can ↵Michael Gottesman2015-03-062-22/+33
| | | | | | be passed around. llvm-svn: 231436
* [objc-arc] Remove annotations code.Michael Gottesman2015-03-062-410/+0
| | | | | | | It will always be in the history if it is needed again. Now it is just dead code. llvm-svn: 231435
* Core: Make the resolver faster.Rui Ueyama2015-03-0611-73/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the resolver, we maintain a list of undefined symbols, and when we visit an archive file, we check that file if undefined symbols can be resolved using files in the archive. The archive file class provides find() function to lookup a symbol. Previously, we call find() for each undefined symbols. Archive files may be visited multiple times if they are in a --start-group and --end-group. If we visit a file M times and if we have N undefined symbols, find() is called M*N times. I found that that is one of the most significant bottlenecks in LLD when linking a large executable. find() is not a very cheap operation because it looks up a hash table for a given string. And a string, or a symbol name, can be pretty long if you are dealing with C++ symbols. We can eliminate the bottleneck. Calling find() with the same symbol multiple times is a waste. If a result of looking up a symbol is "not found", it stays "not found" forever because the symbol simply doesn't exist in the archive. Thus, we should call find() only for newly-added undefined symbols. This optimization makes O(M*N) O(N). In this patch, all undefined symbols are added to a vector. For each archive/shared library file, we maintain a start position P. All symbols [0, P) are already searched. [P, end of the vector) are not searched yet. For each file, we scan the vector only once. This patch changes the order in which undefined symbols are looked for. Previously, we iterated over the result of _symbolTable.undefines(). Now we iterate over the new vector. This is a benign change but caused differences in output if remaining undefines exist. This is why some tests are updated. The performance improvement of this patch seems sometimes significant. Previously, linking chrome.dll on my workstation (Xeon 2.4GHz 8 cores) took about 70 seconds. Now it takes (only?) 30 seconds! http://reviews.llvm.org/D8091 llvm-svn: 231434
* Teach ComputeNumSignBits about signed reminder.Nadav Rotem2015-03-062-1/+48
| | | | | | This optimization a continuation of r231140 that reasoned about signed div. llvm-svn: 231433
* Optimize resolver by using std::unordered_multimap.Rui Ueyama2015-03-062-3/+8
| | | | | | | | | | | | | | | | | _reverseRef is a multimap from atoms to atoms. The map contains reverse edges of "layout-before" and "group" edges for dead-stripping. The type of the variable was DenseMap<Atom *, DenseSet<Atom *>>. This patch changes that to std::unordered_multimap<Atom *, Atom *>. A DenseMap with a value type of DenseSet was not fast. Inserting 900k items to the map took about 1.6 seconds on my workstation. unordered_multimap on the other hand took only 0.6 seconds. Use of the map also got faster -- originally markLive took 1.3 seconds in the same test case, and it now took 1.0 seconds. In total we shove off 1.3 seconds out of 27 seconds in that test case. llvm-svn: 231432
* Add a download link to the web page (PR22764)Hans Wennborg2015-03-061-0/+1
| | | | llvm-svn: 231431
* Fix build error.Michael Gottesman2015-03-052-21/+29
| | | | llvm-svn: 231430
* Add a symbolizer testcase for closed stdin/stdoutKuba Brecka2015-03-051-0/+30
| | | | | | Reviewed at http://reviews.llvm.org/D7973 llvm-svn: 231429
* Print out which symbolizer are we using when verbosity >= 2Kuba Brecka2015-03-051-0/+6
| | | | | | Reviewed at http://reviews.llvm.org/D8087 llvm-svn: 231428
* [objc-arc] Change some casts and loop iterators to use auto.Michael Gottesman2015-03-051-16/+12
| | | | llvm-svn: 231427
* [objc-arc] Extract out state specific to a ref count from the main objc arc ↵Michael Gottesman2015-03-054-287/+298
| | | | | | sequence dataflow. This will allow me to separate the actual ARC queries from the meat of the dataflow algorithm. llvm-svn: 231426
* [objc-arc] Extract blot map vector into its own file. NFC.Michael Gottesman2015-03-052-160/+151
| | | | llvm-svn: 231425
* [modules] Rework merging of redeclaration chains on module import.Richard Smith2015-03-0512-194/+146
| | | | | | | | | | | | | | | | | | | | | | We used to save out and eagerly load a (potentially huge) table of merged formerly-canonical declarations when we loaded each module. This was extremely inefficient in the presence of large amounts of merging, and didn't actually save any merging lookup work, because we still needed to perform name lookup to check that our merged declaration lists were complete. This also resulted in a loss of laziness -- even if we only needed an early declaration of an entity, we would eagerly pull in all declarations that had been merged into it regardless. We now store the relevant fragments of the table within the declarations themselves. In detail: * The first declaration of each entity within a module stores a list of first declarations from imported modules that are merged into it. * Loading that declaration pre-loads those other entities, so that they appear earlier within the redeclaration chain. * The name lookup tables list the most recent local lookup result, if there is one, or all directly-imported lookup results if not. llvm-svn: 231424
OpenPOWER on IntegriCloud