summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [NaryReassociate] Run EarlyCSE after NaryReassociateJingyue Wu2015-05-283-10/+48
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch made two improvements to NaryReassociate and the NVPTX pipeline 1. Run EarlyCSE/GVN after NaryReassociate to get rid of redundant common expressions. 2. When adding an instruction to SeenExprs, maps both the SCEV before and after reassociation to that instruction. Test Plan: updated @reassociate_gep_nsw in nary-gep.ll Reviewers: meheff, broune Reviewed By: broune Subscribers: dberlin, jholewinski, llvm-commits Differential Revision: http://reviews.llvm.org/D9947 llvm-svn: 238396
* Add quick bit of doc about SBFrame::GetCFA().Jason Molenda2015-05-281-0/+6
| | | | llvm-svn: 238395
* [Basic] Define __declspec for cygwinDavid Majnemer2015-05-282-5/+19
| | | | | | | | Cygwin (and MinGW) targets define __declspec to __attribute__ unless -fms-extensions is specified. It turns out that cygwin headers rely on the existence of this macro. llvm-svn: 238394
* Added a new API to SBFrame:Greg Clayton2015-05-285-18/+130
| | | | | | | | | | lldb::addr_t SBFrame::GetCFA(); This gets the CFA (call frame address) of the frame so it allows us to take an address that is on the stack and figure out which thread it comes from. Also modified the heap.py module to be able to find out which variable in a frame's stack frame contains an address. This way when ptr_refs finds a match on the stack, it get then report which variable contains the pointer. llvm-svn: 238393
* I finally found the strong reference that was keeping all ↵Greg Clayton2015-05-281-0/+7
| | | | | | | | | | | | lldb_private::Process instances from ever destroying themselves: ProcessModID.m_mod_id was holding onto the last stop event with ProcessModID::SetStopEventForLastNaturalStopID(EventSP). This is a bad idea because ProcessEventData contains a strong refereence to the process. This is now fixed by calling ProcessModID::SetStopEventForLastNaturalStopID(EventSP()) to clear this event in Process::SetExitStatus() and in Process::Finalize(). This was the original cause of the file descriptor leaks that would cause the test suite to die after running a few hundred processes since no process would ever get destroyed and the communication channel in ProcessGDBRemote and the ProcessIOHandler would never close their pipes. This process leak was previously worked around by closing the pipes when the communication channel was disconnected. This was found by using "ptr_refs" from the heap.py in the lldb.macosx.heap module. It was able to find all strong references to the Process and helped me to figure out who was holding this extra reference. llvm-svn: 238392
* [x86] Refactor the tests for popcnt.Chandler Carruth2015-05-283-159/+2902
| | | | | | | | | Extracted from the D6531 patch by Bruno Cardoso Lopes, and re-generated to reflect the current state of the world. This should let Bruno's D6531 actually show the delta between the approaches by running the x86 test case update script after re-building. llvm-svn: 238391
* [omp] Actually provide a default OpenMP runtime -- libgomp for now.Chandler Carruth2015-05-282-2/+2
| | | | llvm-svn: 238390
* [omp] Re-work Clang's handling of -fopenmp and undo r237769.Chandler Carruth2015-05-286-58/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This isn't an actual revert of r237769, it just restores the behavior of the Clang driver prior to it while completely re-implementing how that behavior works. This also re-does the work of making the default OpenMP runtime selectable at CMake (or configure) time to work in the way all of our other such hooks do (config.h, configure and cmake hooks, etc.). I've re-implemented how we manage the '-fopenmp' flagset in an important way. Now, the "default" hook just makes '-fopenmp' equivalent to '-fopenmp=<default>' rather than a separate special beast. Also, there is an '-fno-openmp' flag which does the obvious thing. Also, the code is shared between all the places to select a known OpenMP runtime and act on it. Finally, and most significantly, I've taught the driver to inspect the selected runtime when choosing whether to propagate the '-fopenmp' flag to the frontend in the CC1 commandline. Without this, it isn't possible to use Clang with libgomp, even if you were happy with the serial, boring way in which it worked previously (ignoring all #pragmas but linking in the library to satisfy direct calls into the runtime). While I'm here, I've gone ahead and sketched out a path for the future name of LLVM's OpenMP runtime (libomp) and the legacy support for its current name (libiomp5) in what seems a more reasonable way. To re-enable LLVM's OpenMP runtime (which I think should wait until the normal getting started instructions are a reasonable way for falks to check out, build, and install Clang with the runtime) all that needs to change is the default string in the CMakeLists.txt and configure.ac file. No code changes necessary. I also added a test for the driver's behavior around OpenMP since it was *completely missing* previously. Makes it unsurprising that we got it wrong. llvm-svn: 238389
* [omp] Add a configuration variable for the default OpenMP runtime.Chandler Carruth2015-05-283-0/+26
| | | | | | This will be used in my next commit to Clang. llvm-svn: 238388
* Added doxygen comments for the intrinsics.Ekaterina Romanova2015-05-281-0/+142
| | | | llvm-svn: 238386
* [TestDataFormatterUnordered] Use patterns to match unordered_<multi>set elementsSiva Chandra2015-05-281-8/+8
| | | | | | | | | | | | | | | | Summary: This fixes the test for i386 targets. Test Plan: dotest.py -C clang --arch i386 TestDataFormatterUnordered Reviewers: chying, chaoren, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10078 llvm-svn: 238385
* Fix unused variable warnings.Michael J. Spencer2015-05-281-0/+9
| | | | llvm-svn: 238384
* Add PHDR and FILL parsing.Michael J. Spencer2015-05-284-60/+343
| | | | llvm-svn: 238383
* Update -Winvalid-noreturn to handle destructors better.Richard Trieu2015-05-284-3/+176
| | | | | | | | | | When checking if a function is noreturn, consider a codepath to be noreturn if the path destroys a class and the class destructor, base class destructors, or member field destructors are marked noreturn. Differential Revision: http://reviews.llvm.org/D9454 llvm-svn: 238382
* Fix comment about balanced affinityJonathan Peyton2015-05-271-1/+1
| | | | | | | | A while back, Hal mentioned fixing a comment concerning balanced affinity. http://lists.cs.uiuc.edu/pipermail/openmp-dev/2014-December/000358.html I forgot about fixing it until now, but now is better than never. llvm-svn: 238378
* AsmPrinter: Avoid a warning in NDEBUG, NFCDuncan P. N. Exon Smith2015-05-271-0/+1
| | | | | | | Should fix the -Werror release build: http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/11113 llvm-svn: 238375
* AsmPrinter: Return added DIE from DIE::addChild()Duncan P. N. Exon Smith2015-05-272-3/+3
| | | | | | | | | Change `DIE::addChild()` to return a reference to the just-added node, and update consumers to use it directly. An upcoming commit will abstract away (and eventually change) the underlying storage of `DIE::Children`. llvm-svn: 238372
* RegisterPressure: fix debug prints in case of physical registersFiona Glaser2015-05-271-2/+2
| | | | llvm-svn: 238371
* Fix PR#23647 - make_shared<volatile bool> - second tryMarshall Clow2015-05-272-4/+4
| | | | llvm-svn: 238370
* AsmPrinter: Stop exposing underlying DIEValue list, NFCDuncan P. N. Exon Smith2015-05-278-55/+53
| | | | | | | Change the `DIE` API to hide the implementation of the list of `DIEValue`s. llvm-svn: 238369
* [TestNamespace] Fix an accidentally committed local change.Siva Chandra2015-05-271-1/+1
| | | | | | | | | | | | Test Plan: dotest.py -p TestNamespace Reviewers: sivachandra Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10076 llvm-svn: 238368
* [asan] Fix build dependency issues with ASan version list file.Evgeniy Stepanov2015-05-271-2/+15
| | | | | | | | | | CMake pre-3.1 has a bug where a shared library depending on a custom_target does not really depend on it. This commit implements a hilariously ugly workaround for this problem, see code comments for more details. llvm-svn: 238367
* AsmPrinter: Remove DIEHash::AttrEntry, NFCDuncan P. N. Exon Smith2015-05-272-62/+53
| | | | | | Remove "the most boring struct ever" (thanks to review by Eric). llvm-svn: 238366
* Allow expresions to have unique expression prefixes:Greg Clayton2015-05-276-27/+96
| | | | | | | | | | | | | | | | | | expr_options = lldb.SBExpressionOptions() expr_options.SetPrefix(''' struct Foo { int a; int b; int c; } ''' expr_result = frame.EvaluateExpression ("Foo foo = { 1, 2, 3}; foo", expr_options) This fixed a current issue with ptr_refs, cstr_refs and malloc_info so that they can work. If expressions define their own types and then return expression results that use those types, those types get copied into the target's AST context so they persist and the expression results can be still printed and used in future expressions. Code was added to the expression parser to copy the context in which types are defined if they are used as the expression results. So in the case of types defined by expressions, they get defined in a lldb_expr function and that function and _all_ of its statements get copied. Many types of statements are not supported in this copy (array subscript, lambdas, etc) so this causes expressions to fail as they can't copy the result types. To work around this issue I have added code that allows expressions to specify an expression specific prefix. Then when you evaluate the expression you can pass the "expr_options" and have types that can be correctly copied out into the target. I added this as a way to work around an issue, but I also think it is nice to be allowed to specify an expression prefix that can be reused by many expressions, so this feature is very useful. <rdar://problem/21130675> llvm-svn: 238365
* AsmPrinter: Store abbreviation data directly in DIE and DIEValueDuncan P. N. Exon Smith2015-05-279-99/+129
| | | | | | | | | | | | | | | | Stop storing a `DIEAbbrev` in `DIE`, since the data fits neatly inside the `DIEValue` list. Besides being a cleaner data structure (avoiding the parallel arrays), this gives us more freedom to rearrange the `DIEValue` list. This fixes the temporary memory regression from 845 MB up to 879 MB, and drops it further to 829 MB for a net memory decrease of around 1.9% (incremental decrease around 5.7%). (I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`; see r236629 for details.) llvm-svn: 238364
* [TestBase.runCmd] Better error message when runCmd fails.Siva Chandra2015-05-27174-253/+263
| | | | | | | | | | | | | | | | | | | | | Summary: Before: AssertionError: False is not True : Process is launched successfully After: AssertionError: False is not True : Command 'run a.out' failed. >>> error: invalid target, create a target using the 'target create' command >>> Process could not be launched successfully Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits, vharron Differential Revision: http://reviews.llvm.org/D9948 llvm-svn: 238363
* Reapply "AsmPrinter: Change DIEValue to be stored by value"Duncan P. N. Exon Smith2015-05-2713-545/+575
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit r238350, effectively reapplying r238349 after fixing (all?) the problems, all somehow related to how I was using `AlignedArrayCharUnion<>` inside `DIEValue`: - MSVC can only handle `sizeof()` on types, not values. Change the assert. - GCC doesn't know the `is_trivially_copyable` type trait. Instead of asserting it, add destructors. - Call placement new even when constructing POD (i.e., the pointers). - Instead of copying the char buffer, copy the casted classes. I've left in a couple of `static_assert`s that I think both MSVC and GCC know how to handle. If the bots disagree with me, I'll remove them. - Check that the constructed type is either standard layout or a pointer. This protects against a programming error: we really want the "small" `DIEValue`s to be small and simple, so don't accidentally change them not to be. - Similarly, check that the size of the buffer is no bigger than a `uint64_t` or a pointer. (I thought checking against `sizeof(uint64_t)` would be good enough, but Chandler suggested that pointers might sometimes be bigger than that in the context of sanitizers.) I've also committed r238359 in the meantime, which introduces a DIEValue.def to simplify dispatching between the various types (thanks to a review comment by David Blaikie). Without that, this commit would be almost unintelligible. Here's the original commit message: -- Change `DIEValue` to be stored/passed/etc. by value, instead of reference. It's now a discriminated union, with a `Val` field storing the actual type. The classes that used to inherit from `DIEValue` no longer do. There are two categories of these: - Small values fit in a single pointer and are stored by value. - Large values require auxiliary storage, and are stored by reference. The only non-mechanical change is to tools/dsymutil/DwarfLinker.cpp. It was relying on `DIEInteger`s being passed around by reference, so I replaced that assumption with a `PatchLocation` type that stores a safe reference to where the `DIEInteger` lives instead. This commit causes a temporary regression in memory usage, since I've left merging `DIEAbbrevData` into `DIEValue` for a follow-up commit. I measured an increase from 845 MB to 879 MB, around 3.9%. The follow-up drops it lower than the starting point, and I've only recently brought the memory this low anyway, so I'm committing these changes separately to keep them incremental. (I also considered swapping the commits, but the other one first would cause a lot more code churn.) (I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`; see r236629 for details.) -- llvm-svn: 238362
* [TestDataFormatterUnordered] Fix a few typos in the test.Siva Chandra2015-05-271-2/+2
| | | | | | | | | | | | | | | | Summary: The typos were exposed by http://reviews.llvm.org/D9948. Test Plan: dotest.py -p TestDataFormatterUnordered Reviewers: vharron, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10071 llvm-svn: 238361
* Set function entry counts with -fprofile-instr-use.Diego Novillo2015-05-273-0/+31
| | | | | | This generates function entry counts from instrumentation profiles. llvm-svn: 238360
* AsmPrinter: Introduce DIEValue.def, NFCDuncan P. N. Exon Smith2015-05-273-52/+43
| | | | | | | Use a .def macro file to iterate through the various subclasses of `DIEValue`. llvm-svn: 238359
* Rename and move getCurrentSectionData.Rafael Espindola2015-05-275-15/+14
| | | | | | I think this concludes the merge of MCSectionData and MCSection. llvm-svn: 238358
* There is only one current section.Rafael Espindola2015-05-278-26/+34
| | | | | | | | | | | | | | | | | Both MCStreamer and MCObjectStreamer were maintaining a current section variable and they were slightly out of sync. I don't think this was observable, but was inefficient and error prone. Changing this requires a few cascading changes: * SwitchSection has to call ChangeSection earlier for ChangeSection to see the old section. * With that change, ChangeSection cannot call EmitLabel, since during ChangeSection we are still in the old section. * When the object streamer requires a begin label, just reused the existing generic support for begin labels instead of calling EmitLabel directly. llvm-svn: 238357
* [RuntimeDyld] Fix MachO i386 SECTDIFF relocation to support non-zero addends.Lang Hames2015-05-272-8/+7
| | | | | | | Previously, relocations of the form 'A - B + C' would fail on i386 when C was non-zero. llvm-svn: 238356
* Revert 238354 while I figure out what broke in weak_ptrMarshall Clow2015-05-272-5/+5
| | | | llvm-svn: 238355
* Fix PR#23647 - make_shared<volatile bool>Marshall Clow2015-05-272-2/+63
| | | | llvm-svn: 238354
* ARMTargetParser: Make BSD Thumb/BE armv6 workRenato Golin2015-05-272-2/+10
| | | | | | | Simple change to make arch like "thumbv6" and "armbev6" to return the correct CPU for FreeBSD and NetBSD. llvm-svn: 238353
* MIR: Remove 2 empty non-reverted directories form SVN.Alex Lorenz2015-05-270-0/+0
| | | | | | | | | The revert commit r238007 didn't delete the old 'MIR' directories in 'include/llvm/CodeGen' and 'lib/CodeGen'. Since the resubmitted commit r238341 uses the 'MIRParser' directories instead of 'MIR' this commit deletes the unused directories. llvm-svn: 238352
* Final fix for PR 23499 and IR test case.Diego Novillo2015-05-272-5/+26
| | | | | | | | | | | This fixes a bit I forgot in r238335. In addition to the data record and the counter, we can also move the name of the counter to the comdat for the associated function. I'm also adding an IR test case to check that these three elements are placed in the proper comdat. llvm-svn: 238351
* Revert "AsmPrinter: Change DIEValue to be stored by value"Duncan P. N. Exon Smith2015-05-2712-512/+542
| | | | | | | | | This reverts commit r238349, since it caused some errors on bots: - std::is_trivially_copyable isn't available until GCC 5.0. - It was complaining about strict aliasing with my use of ArrayCharUnion. llvm-svn: 238350
* AsmPrinter: Change DIEValue to be stored by valueDuncan P. N. Exon Smith2015-05-2712-542/+512
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change `DIEValue` to be stored/passed/etc. by value, instead of reference. It's now a discriminated union, with a `Val` field storing the actual type. The classes that used to inherit from `DIEValue` no longer do. There are two categories of these: - Small values fit in a single pointer and are stored by value. - Large values require auxiliary storage, and are stored by reference. The only non-mechanical change is to tools/dsymutil/DwarfLinker.cpp. It was relying on `DIEInteger`s being passed around by reference, so I replaced that assumption with a `PatchLocation` type that stores a safe reference to where the `DIEInteger` lives instead. This commit causes a temporary regression in memory usage, since I've left merging `DIEAbbrevData` into `DIEValue` for a follow-up commit. I measured an increase from 845 MB to 879 MB, around 3.9%. The follow-up drops it lower than the starting point, and I've only recently brought the memory this low anyway, so I'm committing these changes separately to keep them incremental. (I also considered swapping the commits, but the other one first would cause a lot more code churn.) (I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`; see r236629 for details.) llvm-svn: 238349
* XTIMEOUT another test timing out on the FreeBSD buildbotEd Maste2015-05-271-0/+1
| | | | llvm-svn: 238348
* Allow gcc 5.x to compile library.Jonathan Peyton2015-05-271-1/+1
| | | | | | | Change check of __GNUC__ macro from: __GNUC__ == 4 to __GNUC__ >= 4 llvm-svn: 238347
* AsmPrinter: Reorganize DIE.h, NFCDuncan P. N. Exon Smith2015-05-271-120/+119
| | | | | | | | | | | | | An upcoming commit will switch to storing `DIEValue`s by value in a `DIE`, so move the `DIE` down below all the subclasses it can. Two subclasses inherit from `DIE`, so drop those down below `DIE`. `DIEValue` will become a discriminated union, which contains an instance of one of the classes that are currently subclasses. "Big" ones, such as those that inherit from `DIE`, will continue to be stored by pointer. This commit does as much of the code motion ahead of time as possible. llvm-svn: 238346
* It appears these exports are needed, as wmmintrin.h includes them.John Thompson2015-05-271-0/+2
| | | | llvm-svn: 238345
* ARMTargetParser: Normalising build attributesRenato Golin2015-05-277-31/+35
| | | | | | | | | | | | | | | Now that most of the methods in Clang and LLVM that were parsing arch/cpu/fpu strings are using ARMTargetParser, it's time to make it a bit more conforming with what the ABI says. This commit adds some clarification on what build attributes are accepted and which are "non-standard". It also makes clear that the "defaultCPU" and "defaultArch" methods were really just build attribute getters. It also diverges from GCC's behaviour to say that armv2/armv3 are really an ARMv4 in the build attributes, when the ABI has a clear state for that: Pre-v4. llvm-svn: 238344
* Avoid creating and destroying a std::string on every iteration.Yaron Keren2015-05-271-2/+2
| | | | llvm-svn: 238343
* Resubmit r237954 (MIR Serialization: print and parse LLVM IR using MIR format).Alex Lorenz2015-05-2722-12/+339
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit a 3rd attempt at comitting the initial MIR serialization patch. The first commit (r237708) was reverted in 237730. Then the second commit (r237954) was reverted in r238007, as the MIR library under CodeGen caused a circular dependency where the CodeGen library depended on MIR and MIR library depended on CodeGen. This commit has fixed the dependencies between CodeGen and MIR by reorganizing the MIR serialization code - the code that prints out MIR has been moved to CodeGen, and the MIR library has been renamed to MIRParser. Now the CodeGen library doesn't depend on the MIRParser library, thus the circular dependency no longer exists. --Original Commit Message-- MIR Serialization: print and parse LLVM IR using MIR format. This commit is the initial commit for the MIR serialization project. It creates a new library under CodeGen called 'MIR'. This new library adds a new machine function pass that prints out the LLVM IR using the MIR format. This pass is then added as a last pass when a 'stop-after' option is used in llc. The new library adds the initial functionality for parsing of MIR files as well. This commit also extends the llc tool so that it can recognize and parse MIR input files. Reviewers: Duncan P. N. Exon Smith, Matthias Braun, Philip Reames Differential Revision: http://reviews.llvm.org/D9616 llvm-svn: 238341
* Add N4259 to the list of papers from Lenexa. Update links to point at public ↵Marshall Clow2015-05-271-7/+8
| | | | | | repos. llvm-svn: 238340
* Test case for PR 23499.Diego Novillo2015-05-272-1/+6
| | | | llvm-svn: 238338
* R600: Rely on TypeLegalizer to use divrem instead of div/remJan Vesely2015-05-271-43/+0
| | | | | reviewer: tstellardAMD llvm-svn: 238337
OpenPOWER on IntegriCloud