summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a self-memcpy which only breaks under Valgrind's memcpyChandler Carruth2013-11-261-0/+3
| | | | | | | implementation. Silliness, but it'll be a trivial performance optimization. This should clear up a failure on the vg_leak bot. llvm-svn: 195704
* Make helper function static.Benjamin Kramer2013-11-251-2/+3
| | | | llvm-svn: 195650
* X86: enable AVX2 under Haswell native compilationTim Northover2013-11-251-6/+90
| | | | | | Patch by Adam Strzelecki llvm-svn: 195632
* revert r194655Nick Kledzik2013-11-211-2/+2
| | | | llvm-svn: 195285
* Make the moved-from SmallPtrSet be a valid, empty, small-state object.Chandler Carruth2013-11-201-1/+13
| | | | | | | | | | | Enhance the tests to actually require moves in C++11 mode, in addition to testing the moved-from state. Further enhance the tests to cover copy-assignment into a moved-from object and moving a large-state object. (Note that we can't really test small-state vs. large-state as that isn't an observable property of the API really.) This should finish addressing review on r195239. llvm-svn: 195261
* Give SmallPtrSet move semantics when we have R-value references.Chandler Carruth2013-11-201-0/+44
| | | | | | | | | | | | Somehow, this ADT got missed which is moderately terrifying considering the efficiency of move for it. The code to implement move semantics for it is pretty horrible currently but was written to reasonably closely match the rest of the code. Unittests that cover both copying and moving (at a basic level) added. llvm-svn: 195239
* YAML I/O - Added default trait support for std:string. Making another ↵John Thompson2013-11-191-0/+11
| | | | | | attempt at this, this time doing a clean build on Linux, and running the LLVM, clang, and extra tests, to try to make sure there's no problems. llvm-svn: 195134
* [weak vtables] Remove a bunch of weak vtablesJuergen Ributzka2013-11-193-0/+17
| | | | | | | | | | | | This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. The memory leaks in this version have been fixed. Thanks Alexey for pointing them out. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy llvm-svn: 195064
* Checking for a return value with FormatMessage; if the call fails, there's ↵Aaron Ballman2013-11-181-4/+9
| | | | | | no guarantee that the buffer will be non-null. llvm-svn: 195019
* Fixing a possible memory leak from a failing realloc() call.Aaron Ballman2013-11-181-2/+7
| | | | llvm-svn: 195018
* Recover gracefully when deserializing invalid YAML input.Alexander Kornienko2013-11-181-7/+26
| | | | | | | | | Fixes http://llvm.org/PR16221, http://llvm.org/PR15927 Phabricator: http://llvm-reviews.chandlerc.com/D1236 Patch by Andrew Tulloch! llvm-svn: 195016
* Revert r194865 and r194874.Alexey Samsonov2013-11-184-20/+0
| | | | | | | | | | | | This change is incorrect. If you delete virtual destructor of both a base class and a subclass, then the following code: Base *foo = new Child(); delete foo; will not cause the destructor for members of Child class. As a result, I observe plently of memory leaks. Notable examples I investigated are: ObjectBuffer and ObjectBufferStream, AttributeImpl and StringSAttributeImpl. llvm-svn: 194997
* [block-freq] Add BlockFrequency::scale that returns a remainder from the ↵Michael Gottesman2013-11-171-38/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | division and make the private scale in BlockFrequency more performant. This change is the first in a series of changes improving LLVM's Block Frequency propogation implementation to not lose probability mass in branchy code when propogating block frequency information from a basic block to its successors. This patch is a simple infrastructure improvement that does not actually modify the block frequency algorithm. The specific changes are: 1. Changes the division algorithm used when scaling block frequencies by branch probabilities to a short division algorithm. This gives us the remainder for free as well as provides a nice speed boost. When I benched the old routine and the new routine on a Sandy Bridge iMac with disabled turbo mode performing 8192 iterations on an array of length 32768, I saw ~600% increase in speed in mean/median performance. 2. Exposes a scale method that returns a remainder. This is important so we can ensure that when we scale a block frequency by some branch probability BP = N/D, the remainder from the division by D can be retrieved and propagated to other children to ensure no probability mass is lost (more to come on this). llvm-svn: 194950
* X86: Encode the 'h' cpu subtype in the MachO header for x86.Jim Grosbach2013-11-161-1/+1
| | | | llvm-svn: 194906
* [weak vtables] Remove a bunch of weak vtablesJuergen Ributzka2013-11-154-0/+20
| | | | | | | | | | | This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy llvm-svn: 194865
* Path: Recognize COFF import library file magic.Rui Ueyama2013-11-151-0/+4
| | | | | | | | | | | | Summary: Make identify_magic to recognize COFF import file. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2165 llvm-svn: 194852
* Recognize 0x0000 as a COFF file magic.Rui Ueyama2013-11-141-0/+3
| | | | | | | | | | | | | | | Summary: Some machine-type-neutral object files containing only undefined symbols actually do exist in the Windows standard library. Need to recognize them as COFF files. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2164 llvm-svn: 194734
* yaml::Input::mapTag(): Don't use StringRef to hold return type of std::string.NAKAMURA Takumi2013-11-141-1/+1
| | | | llvm-svn: 194681
* Whitespace.NAKAMURA Takumi2013-11-141-1/+1
| | | | llvm-svn: 194680
* Add dyn_cast<> support to YAML I/O's IO classNick Kledzik2013-11-141-2/+2
| | | | llvm-svn: 194655
* Add simple support for tags in YAML I/ONick Kledzik2013-11-141-0/+18
| | | | llvm-svn: 194644
* Make sure LLVMLoadLibraryPermanently gets an extern "C" symbol.Benjamin Kramer2013-11-131-1/+1
| | | | | | | Otherwise it's impossible to use it. Also don't include C++ headers in a C header. llvm-svn: 194581
* Add newline at EOF in DynamicLibrary.cppPeter Zotov2013-11-061-1/+1
| | | | llvm-svn: 194144
* [llvm-c] Specify explicit namespace in LLVMLoadLibraryPermanentlyPeter Zotov2013-11-061-1/+1
| | | | | | | Presence of using namespace llvm depended on several #ifdef's, and this broke the build on mswin32. llvm-svn: 194142
* [llvm-c] Expose LLVMLoadLibraryPermanentlyPeter Zotov2013-11-061-0/+9
| | | | | | Original patch by Chris Wailes llvm-svn: 194139
* X86: Add a description for AMD bdver3 aka Steamroller.Benjamin Kramer2013-11-041-3/+5
| | | | | | This is just bdver2 + FSGSBase. llvm-svn: 193984
* Make the pretty stack trace be an opt-in, rather than opt-out, facility. ↵Filip Pizlo2013-11-041-16/+13
| | | | | | | | | Enable pretty stack traces by default if you use PrettyStackTraceProgram, so that existing LLVM-based tools will continue to get it without any changes. llvm-svn: 193971
* When LLVM is embedded in a larger application, it's not OK for LLVM to ↵Filip Pizlo2013-11-031-0/+5
| | | | | | | | intercept crashes. LLVM already has the ability to disable this functionality. This patch exposes it via the C API. llvm-svn: 193937
* [ConstantRange] improve my previous patch per Nick suggestionNuno Lopes2013-10-311-1/+1
| | | | llvm-svn: 193795
* Rules adjustments in order to build on DragonFly BSD.Rafael Espindola2013-10-311-2/+3
| | | | | | Patch by Robin Hahling. llvm-svn: 193750
* [SystemZ] Automatically detect zEC12 and z196 hostsRichard Sandiford2013-10-311-0/+42
| | | | | | | | | | As on other hosts, the CPU identification instruction is priveleged, so we need to look through /proc/cpuinfo. I copied the PowerPC way of handling "generic". Several tests were implicitly assuming z10 and so failed on z196. llvm-svn: 193742
* Add {start,end}with_lower methods to StringRef.Rui Ueyama2013-10-301-5/+24
| | | | | | | | | startswith_lower is ocassionally useful and I think worth adding. endwith_lower is added for completeness. Differential Revision: http://llvm-reviews.chandlerc.com/D2041 llvm-svn: 193706
* make ConstantRange::signExtend() optimalNuno Lopes2013-10-301-0/+5
| | | | | | the case [x, INT_MIN) was not handled optimally llvm-svn: 193694
* simplify ConstantRange::getSetSize()Nuno Lopes2013-10-281-3/+0
| | | | llvm-svn: 193523
* Change MemoryBuffer::getFile to take a Twine.Rafael Espindola2013-10-251-8/+12
| | | | llvm-svn: 193429
* Reverting my r193344 checkin due to build breakage.John Thompson2013-10-241-11/+0
| | | | llvm-svn: 193350
* Added std::string as a built-in type for mapping.John Thompson2013-10-241-0/+11
| | | | llvm-svn: 193344
* Fix the -Werror -Wpedantic clang selfhost buildAlp Toker2013-10-221-3/+3
| | | | | | | | This is a stopgap fix for cast warnings introduced in r192864. A proper fix should be investigated by the author when possible. llvm-svn: 193160
* Can we move to C++11 already?Michael J. Spencer2013-10-181-3/+3
| | | | llvm-svn: 193007
* [Support][YAML] Add support for accessing tags and tag handle substitution.Michael J. Spencer2013-10-181-11/+91
| | | | llvm-svn: 193004
* Fix a conversion warning in the mingw32 buildAlp Toker2013-10-181-2/+2
| | | | | | | | | | | gcc diagnoses this: warning: converting to non-pointer type 'unsigned int' from NULL Also remove an empty statement. No change in functionality. llvm-svn: 192955
* Fix initialization order warning in mingw32 buildAlp Toker2013-10-181-1/+1
| | | | | | No change in functionality. llvm-svn: 192953
* Expose install_fatal_error_handler() through the C API.Filip Pizlo2013-10-171-0/+17
| | | | | | | | | | | | | | | | | I expose the API with some caveats: - The C++ API involves a traditional void* opaque pointer for the fatal error callback. The C API doesn’t do this. I don’t think that the void* opaque pointer makes any sense since this is a global callback - there will only be one of them. So if you need to pass some data to your callback, just put it in a global variable. - The bindings will ignore the gen_crash_diag boolean. I ignore it because (1) I don’t know what it does, (2) it’s not documented AFAIK, and (3) I couldn’t imagine any use for it. I made the gut call that it probably wasn’t important enough to expose through the C API. llvm-svn: 192864
* Fix a bug in Windows resource file detection.Rui Ueyama2013-10-161-1/+1
| | | | | | The magic bytes should not include the trailing NUL byte. llvm-svn: 192769
* Path: Recognize Windows compiled resource file.Rui Ueyama2013-10-151-0/+8
| | | | | | | | | | | | | | Some background: One can pass compiled resource files (.res files) directly to the linker on Windows. If a resource file is given, the linker will run "cvtres" command in background to convert the resource file to a COFF file to link it. What I'm trying to do with this patch is to make the linker to recognize the resource file by file magic, so that it can run cvtres command. Differential Revision: http://llvm-reviews.chandlerc.com/D1943 llvm-svn: 192742
* Windows: Fix a typo in an assertDavid Majnemer2013-10-141-6/+3
| | | | llvm-svn: 192564
* Windows: Don't bother with pinning Kernel32.dllDavid Majnemer2013-10-141-3/+1
| | | | | | We don't delay load it so it shouldn't be going anywhere. llvm-svn: 192561
* Windows: Use GetModuleHandleEx instead of LoadLibraryDavid Majnemer2013-10-131-2/+2
| | | | | | | | | | | | | | | | | | | We were using an anti-pattern of: - LoadLibrary - GetProcAddress - FreeLibrary This is problematic because of several reasons: - We are holding on to pointers into a library we just unloaded. - Calling LoadLibrary results in an increase in the reference count of the library in question and any libraries that it depends on and so-on and so-forth. This is none too quick. Instead, use GetModuleHandleEx with GET_MODULE_HANDLE_EX_FLAG_PIN. This is done because because we didn't bring the reference for the library into existence and therefor shouldn't count on it being around later. llvm-svn: 192550
* Add missing #include's to cctype when using isdigit/alpha/etc.Will Dietz2013-10-121-0/+1
| | | | llvm-svn: 192519
* Fix build on Solaris 11.Rafael Espindola2013-10-082-0/+7
| | | | | | | | | | | | | Patch by Vladimir Voskresensky. The erros were: Path.inc:274:3: error: ‘Dl_info’ was not declared in this scope ... and usr/include/spawn.h:52:14: error: expected ‘,’ or ‘...’ before ‘argv’ llvm-svn: 192185
OpenPOWER on IntegriCloud