summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update tests which broke from r218189David Majnemer2014-09-209-19/+19
| | | | llvm-svn: 218191
* [x86] Teach the new vector shuffle lowering to use the AVX VPERMILPSChandler Carruth2014-09-202-24/+90
| | | | | | | | instruction for single-vector floating point shuffles. This in turn allows the shuffles to fold a load into the instruction which is one of the common regressions hit with the new shuffle lowering. llvm-svn: 218190
* MC: Fix MCSectionCOFF::PrintSwitchToSectionDavid Majnemer2014-09-202-7/+18
| | | | | | | | | | | | We had a few bugs: - We were considering the GVKind instead of just looking at the section characteristics - We would never print out 'y' when a section was meant to be unreadable - We would never print out 's' when a section was meant to be shared - We translated IMAGE_SCN_MEM_DISCARDABLE to 'n' when it should've meant IMAGE_SCN_LNK_REMOVE llvm-svn: 218189
* [x86] Start moving to a fancier check syntax to reduce the need forChandler Carruth2014-09-201-174/+102
| | | | | | | | | | | | | duplication of check lines. The idea is to have broad sets of compilation modes that will frequently diverge without having to always and immediately explode to the precise ISA feature set. While this already helps due to VEX encoded differences, it will help much more as I teach the new shuffle lowering about more of the new VEX encoded instructions which can still be used to implement 128-bit shuffles. llvm-svn: 218188
* [MCJIT] Make RTDyldMemoryManager::getSymbolAddress's behaviour more consistent.Lang Hames2014-09-202-15/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch modifies RTDyldMemoryManager::getSymbolAddress(Name)'s behavior to make it consistent with how clients are using it: Name should be mangled, and getSymbolAddress should demangle it on the caller's behalf before looking the name up in the process. This patch also fixes the one client (MCJIT::getPointerToFunction) that had been passing unmangled names (by having it pass mangled names instead). Background: RTDyldMemoryManager::getSymbolAddress(Name) has always used a re-try mechanism when looking up symbol names in the current process. Prior to this patch getSymbolAddress first tried to look up 'Name' exactly as the user passed it in and then, if that failed, tried to demangle 'Name' and re-try the look up. The implication of this behavior is that getSymbolAddress expected to be called with unmangled names, and that handling mangled names was a fallback for convenience. This is inconsistent with how clients (particularly the RuntimeDyldImpl subclasses, but also MCJIT) usually use this API. Most clients pass in mangled names, and succeed only because of the fallback case. For clients passing in mangled names, getSymbolAddress's old behavior was actually dangerous, as it could cause unmangled names in the process to shadow mangled names being looked up. For example, consider: foo.c: int _x = 7; int x() { return _x; } foo.o: 000000000000000c D __x 0000000000000000 T _x If foo.c becomes part of the process (E.g. via dlopen("libfoo.dylib")) it will add symbols 'x' (the function) and '_x' (the variable) to the process. However jit clients looking for the function 'x' will be using the mangled function name '_x' (note how function 'x' appears in foo.o). When getSymbolAddress goes looking for '_x' it will find the variable instead, and return its address and in place of the function, leading to JIT'd code calling the variable and crashing (if we're lucky). By requiring that getSymbolAddress be called with mangled names, and demangling only when we're about to do a lookup in the process, the new behavior implemented in this patch should eliminate any chance of names being shadowed during lookup. There's no good way to test this at the moment: This issue only arrises when looking up process symbols (not JIT'd symbols). Any test case would have to generate a platform-appropriate dylib to pass to llvm-rtdyld, and I'm not aware of any in-tree tool for doing this in a portable way. llvm-svn: 218187
* Fix lldb-gdbserver build.Todd Fiala2014-09-201-3/+3
| | | | | | | | Build break change by Paul Osmialowski. Minor changes to argument passing (converted unintentional pass-by-value to pass-by-ref) by Todd. llvm-svn: 218186
* llvm-cov: Allow creating CoverageMappings from filenamesJustin Bogner2014-09-203-19/+20
| | | | llvm-svn: 218185
* llvm-cov: Disentangle the coverage data logic from the display (NFC)Justin Bogner2014-09-2014-479/+542
| | | | | | | | | | This splits the logic for actually looking up coverage information from the logic that displays it. These were tangled rather thoroughly so this change is a bit large, but it mostly consists of moving things around. The coverage lookup logic itself now lives in the library, rather than being spread between the library and the tool. llvm-svn: 218184
* llvm-cov: Move some reader debug output out of the tool.Justin Bogner2014-09-202-11/+15
| | | | | | | This debug output is really for testing CoverageMappingReader, not the llvm-cov tool. Move it to where it can be more useful. llvm-svn: 218183
* Using a deque to manage the stack of nodes is faster here.Lenny Maiorani2014-09-201-2/+6
| | | | | | | | | | Vector is slow due to many reallocations as the size regularly changes in unpredictable ways. See the investigation provided on the mailing list for more information: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120116/135228.html llvm-svn: 218182
* Have CommandObject::CheckRequirements() report the largest missingJason Molenda2014-09-201-3/+18
| | | | | | | | | | | requirement for a command instead of the smallest. e.g. if a command requires a Target, Process, Thread, and Frame, and none of those are available, report the largest -- Target -- as being missing instead of the smallest -- Frame. Patch by Paul Osmialowski. llvm-svn: 218181
* MC: Treat ReadOnlyWithRel and ReadOnlyWithRelLocal as ReadOnly for COFFDavid Majnemer2014-09-203-3/+11
| | | | | | | | | | | A problem with our old behavior becomes observable under x86-64 COFF when we need a read-only GV which has an initializer which is referenced using a relocation: we would mark the section as writable. Marking the section as writable interferes with section merging. This fixes PR21009. llvm-svn: 218179
* [x86] Teach the v4f32 path of the new shuffle lowering to handle theChandler Carruth2014-09-202-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | tricky case of single-element insertion into the zero lane of a zero vector. We can't just use the same pattern here as we do in every other vector type because the general insertion logic can handle insertion into the non-zero lane of the vector. However, in SSE4.1 with v4f32 vectors we have INSERTPS that is a much better choice than the generic one for such lowerings. But INSERTPS can do lots of other lowerings as well so factoring its logic into the general insertion logic doesn't work very well. We also can't just extract the core common part of the general insertion logic that is faster (forming VZEXT_MOVL synthetic nodes that lower to MOVSS when they can) because VZEXT_MOVL is often *faster* than a blend while INSERTPS is slower! So instead we do a restrictive condition on attempting to use the generic insertion logic to narrow it to those cases where VZEXT_MOVL won't need a shuffle afterward and thus will do better than INSERTPS. Then we try blending. Then we go back to INSERTPS. This still doesn't generate perfect code for some silly reasons that can be fixed by tweaking the td files for lowering VZEXT_MOVL to use XORPS+BLENDPS when available rather than XORPS+MOVSS when the input ends up in a register rather than a load from memory -- BLENDPSrr has twice the reciprocal throughput of MOVSSrr. Don't you love this ISA? llvm-svn: 218177
* [x86] Refactor the code for emitting INSERTPS to reuse the zeroable maskChandler Carruth2014-09-201-25/+15
| | | | | | | analysis used elsewhere. This removes the last duplicate of this logic. Also simplify the code here quite a bit. No functionality changed. llvm-svn: 218176
* [x86] Generalize the single-element insertion lowering to work withChandler Carruth2014-09-202-13/+83
| | | | | | | | | | | | floating point types and use it for both v2f64 and v2i64 single-element insertion lowering. This fixes the last non-AVX performance regression test case I've gotten of for the new vector shuffle lowering. There is obvious analogous lowering for v4f32 that I'll add in a follow-up patch (because with INSERTPS, v4f32 requires special treatment). After that, its AVX stuff. llvm-svn: 218175
* [x86] Replace some duplicated logic reasoning about whether particularChandler Carruth2014-09-201-13/+6
| | | | | | | | | | vector lanes can be modeled as zero with a call to the new function that computes a bit-vector representing that information. No functionality changed here, but will allow doing more clever things with the zero-test. llvm-svn: 218174
* Fix bugs in cpuid.h.Akira Hatanaka2014-09-202-15/+31
| | | | | | | | | | | | | | | This commit makes two changes: - Remove the push and pop instructions that were saving and restoring %ebx before and after cpuid in 32-bit pic mode. We were doing this to ensure we don't lose the GOT address in pic register %ebx, but this isn't necessary because the GOT address is kept in a virtual register. - In 64-bit mode, preserve base register %rbx around cpuid. This fixes PR20311 and rdar://problem/17686779. llvm-svn: 218173
* llvm-readobj: pretty-print special COFF section namesDavid Majnemer2014-09-2015-30/+46
| | | | | | Print IMAGE_SYM_DEBUG and the like instead of (-2). llvm-svn: 218172
* Fix crash with an insertvalue that produces an empty object.Peter Collingbourne2014-09-202-0/+13
| | | | llvm-svn: 218171
* [X86] Erase some obsolete comments from README.txtRobin Morisset2014-09-191-177/+0
| | | | | | | | | | | I just tried reproducing some of the optimization failures in README.txt in the X86 backend, and many of them could not be reproduced. In general the entire file appears quite bit-rotted, whatever interesting parts remain should be moved to bugzilla, and the rest deleted. I did not spend the time to do that, so I just deleted the few I tried reproducing which are obsolete, to save some time to whoever will find the courage to do it. llvm-svn: 218170
* constify the TargetMachine being passed through the Mips subtargetEric Christopher2014-09-198-15/+18
| | | | | | creation. llvm-svn: 218169
* Converting InstrProf's error_category to a ManagedStatic to avoid static ↵Chris Bieneman2014-09-191-2/+4
| | | | | | constructors and destructors. llvm-svn: 218168
* DIBuilder: Delete dead code, NFCDuncan P. N. Exon Smith2014-09-192-54/+0
| | | | | | | There are two versions of `DIBuilder::createObjCIVar()`. Delete the one that's apparently dead. llvm-svn: 218167
* Follow-up to r214408: Warn on other callee-cleanup functions without ↵Nico Weber2014-09-196-11/+46
| | | | | | | | | | | | | | | | | | prototype too. According to lore, we used to verifier-fail on: void __thiscall f(); int main() { f(1); } So that's fixed now. System headers use prototype-less __stdcall functions, so make that a warning that's DefaultError -- then it fires on regular code but is suppressed in system headers. Since it's used in system headers, we have codegen tests for this; massage them slightly so that they still compile. llvm-svn: 218166
* R600: Un-xfail a test which passes with pass disabledMatt Arsenault2014-09-191-2/+1
| | | | llvm-svn: 218165
* R600/SI: Un-xfail tests which work nowMatt Arsenault2014-09-193-43/+56
| | | | llvm-svn: 218164
* Converting SpillPlacement's BlockFrequency threshold to a ManagedStatic to ↵Chris Bieneman2014-09-191-3/+4
| | | | | | avoid static constructors and destructors. llvm-svn: 218163
* R600/SI: Un xfail a test that works nowMatt Arsenault2014-09-191-3/+2
| | | | llvm-svn: 218162
* [FastIsel][AArch64] Fix a think-o in address computation.Juergen Ributzka2014-09-192-20/+66
| | | | | | | | | | When looking through sign/zero-extensions the code would always assume there is such an extension instruction and use the wrong operand for the address. There was also a minor issue in the handling of 'AND' instructions. I accidentially used a 'cast' instead of a 'dyn_cast'. llvm-svn: 218161
* Converting object's error_category to a ManagedStatic to avoid static ↵Chris Bieneman2014-09-191-2/+4
| | | | | | constructors and destructors. llvm-svn: 218160
* Fix ctor/dtor aliases losing 'dllexport' (for Itanium ABI)Dario Domizioli2014-09-194-1/+35
| | | | | | | This patch makes sure that the dllexport attribute is transferred to the alias when such alias is created. It only affects the Itanium ABI because for the MSVC ABI a workaround is in place to not generate aliases of dllexport ctors/dtors. A new CodeGenModule function is provided, CodeGenModule::setAliasAttributes, to factor the code for transferring attributes to aliases. llvm-svn: 218159
* [PECOFF] Set ordinal to alias atomsRui Ueyama2014-09-192-3/+14
| | | | | | | | | | | | | | | | Atoms are ordered in the output file by ordinal. File has file ordinal, and atom has atom ordinal which is unique within the file. No two atoms should have the same combination of ordinals. However that contract was not satisifed for alias atoms. Alias atom is defined by /alternatename:sym1=sym2. In this case sym1 is defined as an alias for sym2. sym1 always got ordinal 0. As a result LLD failed with an assertion failure. This patch assigns ordinal to alias atoms. llvm-svn: 218158
* Fix a thinko in how the RemoteiOS Platform looked up files in the SDK & otherJim Ingham2014-09-191-66/+52
| | | | | | | | | | platform locations. We didn't always do an exhaustive search through all the platform locations, so we would have to read some files out of memory even though they existed in the exploded shared cache or SDK. <rdar://problem/18385947> llvm-svn: 218157
* We had to squirrel away the dyld module before doing ↵Jim Ingham2014-09-191-1/+7
| | | | | | | | | | | | ResolveExecutableModule, since that would clear the module list, and then put it back by hand. But we forgot to also put its sections back in the target SectionList, so we would jettison it as unloaded when we finished handling the first real load event. Add its sections. <rdar://problem/18385947> llvm-svn: 218156
* [x86] Hoist a function up to the rest of the non-type-specific loweringChandler Carruth2014-09-191-75/+74
| | | | | | | | | helpers, and re-flow the logic to use early exit and be a bit more readable. No functionality changed. llvm-svn: 218155
* Converting the JITDebugLock mutex to a ManagedStatic to avoid the static ↵Chris Bieneman2014-09-191-4/+4
| | | | | | constructor and destructor. llvm-svn: 218154
* [x86] Hoist the actual lowering logic into a helper function to separateChandler Carruth2014-09-191-74/+89
| | | | | | | | it from the shuffle pattern matching logic. Also cleaned up variable names, comments, etc. No functionality changed. llvm-svn: 218152
* Converting FuncNames to a ManagedStatic to avoid static constructors and ↵Chris Bieneman2014-09-191-14/+14
| | | | | | destructors. llvm-svn: 218151
* R600/SI: Fix config value for number of gprsTom Stellard2014-09-191-4/+7
| | | | | | | | | | | | | | In r217636, the value stored in KernelInfo.Num[VS]GPRSs was changed from the highest GPR index used to the number of gprs in order to be consistent with the name of the variable. The code writing the config values still assumed that the value in this variable was the highest GPR index used, which caused the compiler to over report the number of GPRs being used. https://bugs.freedesktop.org/show_bug.cgi?id=84089 llvm-svn: 218150
* Eliminating static destructor for the BitCodeErrorCategory by converting to ↵Chris Bieneman2014-09-191-2/+5
| | | | | | | | | | | | | | | | a ManagedStatic. Summary: This is part of the overall goal of removing static initializers from LLVM. Reviewers: chandlerc Reviewed By: chandlerc Subscribers: chandlerc, llvm-commits Differential Revision: http://reviews.llvm.org/D5416 llvm-svn: 218149
* Make sure to #include <atomic> when using std::atomic.Zachary Turner2014-09-193-0/+3
| | | | llvm-svn: 218148
* Fix for 218140 for SBTarget.i, the added functions were in the wrong class ↵Carlo Kok2014-09-191-10/+11
| | | | | | definition llvm-svn: 218147
* Test suite runs better again after recent fixes that would select a platform ↵Greg Clayton2014-09-1935-155/+226
| | | | | | | | | | | | | if a "file a.out" auto selected a different platform than the selected one. Changes include: - fix it so you can select the "host" platform using "platform select host" - change all callbacks that create platforms to returns shared pointers - fix TestImageListMultiArchitecture.py to restore the "host" platform by running "platform select host" - Add a new "PlatformSP Platform::Find(const ConstString &name)" method to get a cached platform - cache platforms that are created and re-use them instead of always creating a new one llvm-svn: 218145
* Support newlib as libc++'s C library [locale part]Jonathan Roelofs2014-09-194-169/+271
| | | | | | http://reviews.llvm.org/D5385 llvm-svn: 218144
* [x86] Fully generalize the zext lowering in the new vector shuffleChandler Carruth2014-09-195-68/+117
| | | | | | | | | | | | lowering to support both anyext and zext and to custom lower for many different microarchitectures. Using this allows us to get *exactly* the right code for zext and anyext shuffles in all the vector sizes. For v16i8, the improvement is *huge*. The new SSE2 test case added I refused to add before this because it was sooooo muny instructions. llvm-svn: 218143
* Add hsail and amdil64 to TripleMatt Arsenault2014-09-193-6/+117
| | | | llvm-svn: 218142
* In the Itanium ABI, move stuff to the comdat of variables with static init.Rafael Espindola2014-09-193-5/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang can already handle ------------------------------------------- struct S { static const int x; }; template<typename T> struct U { static const int k; }; template<typename T> const int U<T>::k = T::x; const int S::x = 42; extern const int *f(); const int *g() { return &U<S>::k; } int main() { return *f() + U<S>::k; } const int *f() { return &U<S>::k; } ------------------------------------------- since r217264 which puts the .inint_array section in the same COMDAT as the variable. This patch allows the linker to more easily delete some dead code and data by putting the guard variable and init function in the same COMDAT. This is a fixed version of r218089. llvm-svn: 218141
* Adds two new functions to SBTarget FindGlobalVariables and ↵Carlo Kok2014-09-196-0/+173
| | | | | | FindGlobalFunctions that lets you search by name, by regular expression and by starts with. llvm-svn: 218140
* llvm-cov: Return unique_ptrs instead of filling objects (NFC)Justin Bogner2014-09-191-53/+62
| | | | | | | Having create* functions return the object they create is more readable than using an in-out parameter. llvm-svn: 218139
* llvm-cov: Prevent a test from matching its own check linesJustin Bogner2014-09-192-5/+3
| | | | | | | Since llvm-cov shows the source file in its output, be careful about potentially matching the check lines themselves. llvm-svn: 218138
OpenPOWER on IntegriCloud